OpenRAVE Documentation

fastgraspingthreaded Module

Finds the first feasible grasp for an object as fast as possible without generating a grasp database.


Running the Example: --example fastgraspingthreaded


This type of example is suited for object geometries that are dynamically created from sensor data.


Usage: [options]

Example showing how to compute a valid grasp as fast as possible without
computing a grasp set, this is used when the target objects change frequently.

  -h, --help            show this help message and exit
  --scene=SCENE         Scene file to load (default=data/wamtest1.env.xml)
                        Choose the manipulator to perform the grasping for

  OpenRAVE Environment Options:
                        List all plugins and the interfaces they provide.
                        Default collision checker to use
    --physics=_PHYSICS  physics engine to use (default=none)
    --viewer=_VIEWER    viewer to use (default=qtcoin)
    --server=_SERVER    server to use (default=None).
                        port to load server on (default=4765).
    --module=_MODULES   module to load, can specify multiple modules. Two
                        arguments are required: "name" "args".
    -l _LEVEL, --level=_LEVEL, --log_level=_LEVEL
                        Debug level, one of
    --testmode          if set, will run the program in a finite amount of
                        time and spend computation time validating results.
                        Used for testing

Main Python Code

def main(env,options):
    "Main example code."
    robot = env.GetRobots()[0]
    if options.manipname is not None:
    # find an appropriate target
    bodies = [b for b in env.GetBodies() if not b.IsRobot() and linalg.norm(b.ComputeAABB().extents()) < 0.2]
    for body in bodies:
        self = FastGraspingThreaded(robot,target=body)
        grasps, jointvalues = self.computeGrasp()
        self.showgrasps(grasps, jointvalues)

Class Definitions

class openravepy.examples.fastgraspingthreaded.FastGraspingThreaded(robot, target)[source]
callGraspThreaded(approachrays, standoffs, preshapes, rolls, manipulatordirections=None, target=None, transformrobot=True, onlycontacttarget=True, tightgrasp=False, graspingnoise=None, ngraspingnoiseretries=None, forceclosurethreshold=None, avoidlinks=None, collisionchecker=None, translationstepmult=None, numthreads=None, startindex=None, maxgrasps=None, checkik=False, friction=None)[source]

See GraspThreaded

showgrasps(grasps, jointvalues)[source]
openravepy.examples.fastgraspingthreaded.main(env, options)[source]

Main example code.*args, **kwargs)[source]

Command-line execution of the example.

Parameters:args – arguments for script to parse, if not specified will use sys.argv


Having problems with OpenRAVE?