fastgrasping Module
Finds the first feasible grasp for an object as fast as possible without generating a grasp database.
Running the Example:
openrave.py --example fastgrasping
Description
This type of example is suited for object geometries that are dynamically created from sensor data.
Command-line
Usage: openrave.py [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.
Options:
-h, --help show this help message and exit
--scene=SCENE Scene file to load (default=data/wamtest1.env.xml)
--manipname=MANIPNAME
Choose the manipulator to perform the grasping for
OpenRAVE Environment Options:
--loadplugin=_LOADPLUGINS
List all plugins and the interfaces they provide.
--collision=_COLLISION
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).
--serverport=_SERVERPORT
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
(fatal,error,warn,info,debug,verbose,verifyplans)
--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."
env.Load(options.scene)
robot = env.GetRobots()[0]
if options.manipname is not None:
robot.SetActiveManipulator(options.manipname)
# 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 = FastGrasping(robot,target=body)
grasp,jointvalues = self.computeGrasp()
if grasp is not None:
print 'grasp is found!'
self.gmodel.showgrasp(grasp)
self.robot.SetDOFValues(jointvalues)
raw_input('press any key')
Class Definitions
-
class openravepy.examples.fastgrasping.FastGrasping(robot, target)[ソース]
-
exception GraspingException(args)[ソース]
ベースクラス: exceptions.Exception
-
FastGrasping.checkgraspfn(contacts, finalconfig, grasp, info)[ソース]
-
FastGrasping.computeGrasp()[ソース]
-
openravepy.examples.fastgrasping.main(env, options)[ソース]
Main example code.
-
openravepy.examples.fastgrasping.run(*args, **kwargs)[ソース]
Command-line execution of the example.
パラメタ: | args – arguments for script to parse, if not specified will use sys.argv |