dualarmdemo_schunk Module
Dual arm manipulation example.
Running the Example:
openrave.py --example dualarmdemo_schunk
Command-line
Usage: openrave.py [options]
Schunk Manipulation planning example For a dual arm robot with Schunk LWA3
arms, plan trajectories for grasping an object and manipulating it on a shelf.
Options:
-h, --help show this help message and exit
--scene=SCENE Scene file to load
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)
schunk = Schunkplanner(env)
time.sleep(1)
while True:
# initialize
with env:
jointvalues=schunk.robot.GetDOFValues()
schunk.robot.SetActiveManipulator(schunk.rightArm)
obj=env.GetKinBody('Object1')
while True:
Toriginal=obj.GetTransform()
with obj:
T=array(Toriginal)
T[0:3,3] += 0.4*(random.rand(3)-0.5) # yz only
obj.SetTransform(T)
if not env.CheckCollision(obj):
break
obj.SetTransform(T)
try:
schunk.graspAndMoveObject(jointvalues,obj)
schunk.WaitForController()
print "Path Planning complete...."
except planning_error:
pass
Class Definitions
-
class openravepy.examples.dualarmdemo_schunk.Schunkplanner(env)[source]
-
MoveArmsToJointPosition(T)[source]
Moves the two arms to the given joint position T
-
MoveObjectToPosition(T)[source]
Constrained movement of the arms to new position T while holding the object
-
Serialize(T)[source]
-
WaitForController()[source]
-
graspAndMoveObject(jointvalues, obj)[source]
-
graspObject()[source]
-
moveObject(obj, delta)[source]
this plans the trajectory for both the manipulators manipulating the object ‘name’
-
planDualPath(obj)[source]
this plans the trajectory for both the manipulators
-
probsmanip = None
-
releaseObject()[source]
-
openravepy.examples.dualarmdemo_schunk.main(env, options)[source]
Main example code.
-
openravepy.examples.dualarmdemo_schunk.run(*args, **kwargs)[source]
Command-line execution of the example.
Parameters: | args – arguments for script to parse, if not specified will use sys.argv |