OpenRAVE Documentation

linkstatistics Module

Computes statistics on body links like swept volumes.



Running the Generator --database linkstatistics --robot=robots/barrettsegway.robot.xml

Showing the Swept Volumes --database linkstatistics --robot=robots/barrettsegway.robot.xml --show


Usage: --database linkstatistics [options]

Computes statistics about the link geometry

  -h, --help            show this help message and exit
                        Skin width on the convex hulls generated

  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

  OpenRAVE Database Generator General Options:
    --show              Graphically shows the built model
    --getfilename       If set, will return the final database filename where
                        all data is stored
    --gethas            If set, will exit with 0 if datafile is generated and
                        up to date, otherwise will return a 1. This will
                        require loading the model and checking versions, so
                        might be a little slow.
    --robot=ROBOT       OpenRAVE robot to load
                        number of threads to compute the database with


When using link statics, it is possible to set the joints weights and resolutions so that planning is fastest. The xyzdelta parameter specifies the smallest object that can be found in the environment, this becomes the new discretization factor when checking collision. Higher values mean faster planning.

lmodel = databases.linkstatistics.LinkStatisticsModel(robot)
if not lmodel.load():
print 'robot resolutions: ',repr(robot.GetDOFResolutions())
print 'robot weights: ',repr(robot.GetDOFWeights())

Class Definitions

class openravepy.databases.linkstatistics.LinkStatisticsModel(robot)[source]

Bases: openravepy.databases.DatabaseGenerator

Computes the convex decomposition of all of the robot’s links

static ComputeSweptVolume(volumepoints, axis, minangle, maxangle, samplingdelta)[source]

Compute the swept volume and mesh of volumepoints around rotated around an axis

static CreateOptionParser()[source]
static PrunePointsKDTree(points, thresh2, neighsize, k=20)[source]

Prunes the poses so that every pose has at most neighsize neighbors within sqrt(thresh2) distance. In order to successfully compute the nearest neighbors, each pose’s quaternion is also negated. Input: thresh2 - squared threshold

static RunFromParser(Model=None, parser=None, **kwargs)[source]
static TransformJointPoints(joint, points, translation=array([ 0., 0., 0.]))[source]
generate(samplingdelta=None, **kwargs)[source]

sets the robot resolution xyzdelta is the maxdistance allowed to be swept.

setRobotWeights(weightexp=0.33329999999999999, type=0, weightmult=10.0)[source]

sets the weights for the robot. weightexp is the exponent for the final weights to help reduce the max:min (default is 1/3 which results in 50:1) Weights should be proportional so that equal distances displace the same volume on average.

openravepy.databases.linkstatistics.RaveDestroy() → None :

OPENRAVE_API void RaveDestroy()

Destroys the entire OpenRAVE state and all loaded environments.

This functions should be always called before program shutdown in order to assure all resources are relased appropriately.

openravepy.databases.linkstatistics.RaveFindDatabaseFile((str)arg1, (bool)arg2) → str :

OPENRAVE_API std::string RaveFindDatabaseFile(const std::string & filename, bool bRead = true )

Searches for a filename in the database and returns a full path/URL to it.

filename -
the relative filename in the database
bRead -
if true will only return a file if it exists. If false, will return the filename of the first valid database directory.
a non-empty string if a file could be found.
openravepy.databases.linkstatistics.quatRotateDirection((planningutils)arg1, (planningutils)sourcedir, targetdir) → object :

RaveVector < T > quatRotateDirection(const RaveVector < T > & sourcedir, const RaveVector < T > & targetdir)

Return the minimal quaternion that orients sourcedir to targetdir.

sourcedir -
direction of the original vector, 3 values
targetdir -
new direction, 3 values
openravepy.databases.linkstatistics.rotationMatrixFromAxisAngle((planningutils)axisangle) → object :

RaveTransformMatrix < T > matrixFromAxisAngle(const RaveVector < T > & axisangle)

Converts an axis-angle rotation to a 3x3 matrix.

axis -
unit axis * rotation angle (radians), 3 values

rotationMatrixFromAxisAngle( (planningutils)axis, (float)angle) -> object

openravepy.databases.linkstatistics.rotationMatrixFromQuat((planningutils)quat) → object :

RaveTransformMatrix < T > matrixFromQuat(const RaveVector < T > & quat)

Converts a quaternion to a 3x3 matrix.

quat -
quaternion, (s,vx,vy,vz)*args, **kwargs)[source]

Command-line execution of the example. args specifies a list of the arguments to the script.


Having problems with OpenRAVE?