OpenRAVE Documentation

cubeassembly Module

Assembly of cube from randomly scattered blocks using grasp sets.

../../_images/cubeassembly.jpg

Running the Example:

openrave.py --example cubeassembly

There’s an ODE bug that can cause the demo to crash, if that happens try with a different collision checker like:

openrave.py --example cubeassembly --collision=bullet

Description

Command-line

Usage: openrave.py [options]

Simple cube assembly task using grasp sets.

Options:
  -h, --help            show this help message and exit
  --scene=SCENE         Scene file to load (default=data/hironxtable.env.xml)
  --manipname=MANIPNAME
                        The manipulator to use

  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 len(options.manipname) > 0:
        robot.SetActiveManipulator(options.manipname)
    time.sleep(0.1) # give time for environment to update
    self = CubeAssembly(robot)
    self.CreateBlocks()
    while True:
        Tgoal = eye(4)
        Tgoal[0,3] = -0.2
        Tgoal[2,3] = 0.001
        self.SetGoal(Tgoal)
        self.Plan()

Class Definitions

class openravepy.examples.cubeassembly.CubeAssembly(robot)[source]

Bases: object

CubeAssembly.CreateBlocks(side=0.014999999999999999, T=array([[ 1., 0., 0., 0.],
[ 0., 1., 0., 0.],
[ 0., 0., 1., 0.],
[ 0., 0., 0., 1.]]), generategrasps=True)
Plan()[source]
SetGoal(Tgoal, randomize=True)[source]

sets the goal of all the target bodies and randomizes the obstacles across the plane

ShowGoal(Tgoal)[source]
openravepy.examples.cubeassembly.main(env, options)[source]

Main example code.

openravepy.examples.cubeassembly.run(*args, **kwargs)[source]

Command-line execution of the example.

Parameters:args – arguments for script to parse, if not specified will use sys.argv
openravepy.examples.cubeassembly.test()[source]

Questions/Feedback

Having problems with OpenRAVE?