OpenRAVE Documentation

inversereachability Module

Inverse reachability space of manipulators.

../../_images/inversereachability.jpg

[source]

Running the Generator

openrave.py --database inversereachability --robot=robots/barrettsegway.robot.xml

Description

Clusters the reachability space for a base-placement sampling distribution that can be used to find out where the robot should stand in order to perform a manipulation task.
../../_images/inversereachability_wam2.jpg ../../_images/inversereachability_wam3.jpg

Command-line

Usage: openrave.py --database inversereachability [options]

Generates model storing the inverse reachability space and its clusters.

Options:
  -h, --help            show this help message and exit
  --heightthresh=HEIGHTTHRESH
                        The max radius of the arm to perform the computation
                        (default=0.05)
  --quatthresh=QUATTHRESH
                        The max radius of the arm to perform the computation
                        (default=0.15)
  --id=ID               Special id differentiating inversereachability models
  --jointvalues=JOINTVALUES
                        String of joint values that connect the robot base
                        link to the manipulator base link
  --show_maxnumber=SHOW_MAXNUMBER
                        Number of robots to show simultaneously (default=20)
  --show_transparency=SHOW_TRANSPARENCY
                        Transparency of the robots to show (default=0.8)

  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

  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
                        (default=robots/barrettsegway.robot.xml)
    --numthreads=NUMTHREADS
                        number of threads to compute the database with
                        (default=1)
    --manipname=MANIPNAME
                        The name of the manipulator on the robot to use

Class Definitions

class openravepy.databases.inversereachability.InverseReachabilityModel(robot, id=None)[source]

Bases: openravepy.databases.DatabaseGenerator

Inverts the reachability and computes probability distributions of the robot’s base given an end effector position

static CreateOptionParser()[source]
static RunFromParser(Model=None, parser=None, args=None, **kwargs)[source]
autogenerate(options=None)[source]
static classnormalizationconst(classstd)[source]

normalization const for the equation exp(dot(-0.5/bandwidth**2,r_[arccos(x[0])**2,x[1:]**2]))

clone(envother)[source]
computeAggregateBaseDistribution(Tgrasps, logllthresh=2.0, zaxis=None)[source]

Return a function of the distribution of possible positions of the robot such that any grasp from Tgrasps is reachable. Also computes a sampler function that returns a random position of the robot along with the index into Tgrasps

computeBaseDistribution(Tgrasp, logllthresh=2.0, zaxis=None)[source]

Return a function of the distribution of possible positions of the robot such that Tgrasp is reachable. Also returns a sampler function

generate(heightthresh=None, quatthresh=None, Nminimum=None)[source]

First transform all end effectors to the identity and get the robot positions, then cluster the robot position modulo in-plane rotation (z-axis) and position (xy), then compute statistics for each cluster.

getCloseIK(Tgrasp)[source]
getEquivalenceClass(Tgrasp)[source]
static getdofindices(manip)[source]
getfilename(read=False)[source]
getversion()[source]
has()[source]
load()[source]
necessaryjointstate()[source]
preprocess()[source]
randomBaseDistributionIterator(Tgrasps, Nprematuresamples=1, bounds=None, **kwargs)[source]

randomly sample base positions given the grasps. This is mostly used for comparison

sampleBaseDistributionIterator(Tgrasps, logllthresh=2.0, weight=1.0, Nprematuresamples=1, zaxis=None)[source]

infinitely samples valid base placements from Tgrasps. Assumes environment is locked. If Nprematuresamples > 0, will sample from the clusters as soon as they are found

save()[source]
show(options=None)[source]
static showBaseDistribution(env, densityfn, bounds, zoffset=0, thresh=1.0, maxprob=None, marginalizeangle=True)[source]
showEquivalenceClass(equivalenceclass, transparency=0.80000000000000004, neighthresh=0.10000000000000001, onlymaniplinks=True)[source]

Overlays several robots of the same equivalence class

testEquivalenceClass(equivalenceclass)[source]

tests that configurations in the cluster has IK solutions

testSampling(heights=None, N=100, weight=1.0, **kwargs)[source]
openravepy.databases.inversereachability.RaveCreateRobot((Environment)env, (str)name) → Robot :

OPENRAVE_API RobotBasePtr RaveCreateRobot(EnvironmentBasePtr penv, const std::string & name = “” )

openravepy.databases.inversereachability.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.

Parameters
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.
Return
a non-empty string if a file could be found.
openravepy.databases.inversereachability.matrixFromAxisAngle((object)axisangle) → object :

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

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

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

matrixFromAxisAngle( (object)axis, (float)angle) -> object

openravepy.databases.inversereachability.matrixFromPose((object)pose) → object :

Converts a 7 element quaterion+translation transform to a 4x4 matrix.

Parameters:pose – 7 values
openravepy.databases.inversereachability.matrixFromQuat((object)quat) → object :

Converts a quaternion to a 4x4 affine matrix.

Parameters:quat – 4 values
openravepy.databases.inversereachability.poseFromMatrix((object)transform) → object :

Converts a 4x4 matrix to a 7 element quaternion+translation representation.

Parameters:transform – 3x4 or 4x4 affine matrix
openravepy.databases.inversereachability.poseMult((object)pose1, (object)pose2) → object :

multiplies two poses.

Parameters:
  • pose1 – 7 values
  • pose2 – 7 values
openravepy.databases.inversereachability.quatFromAxisAngle((object)axisangle) → object :

RaveVector < T > quatFromAxisAngle(const RaveVector < T > & axisangle)

Converts an axis-angle rotation into a quaternion.

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

quatFromAxisAngle( (object)axis, (float)angle) -> object :

RaveVector < T > quatFromAxisAngle(const RaveVector < T > & axis, T angle)

Converts an axis-angle rotation into a quaternion.

Parameters
axis -
unit axis, 3 values
angle -
rotation angle (radians)
openravepy.databases.inversereachability.rotationMatrixFromAxisAngle((object)axisangle) → object :

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

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

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

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

openravepy.databases.inversereachability.run(*args, **kwargs)[source]

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

Questions/Feedback

Having problems with OpenRAVE?