openrave.org

Questions? Suggestions?

Join the openrave-users mailing list

Digest:

Trac: Report bugs/request features

Reference

Core C++ API

Python API

Developers Guide

このページ

misc Module

Misc openravepy functions. Need to explicitly import to use them.

openravepy.misc.CompareBodies(body0, body1, comparegeometries=True, comparesensors=True, comparemanipulators=True, comparegrabbed=True, comparephysics=True, computeadjacent=True, epsilon=1e-10)[ソース]

Compares that two bodies are structurally and positionally equivalent without hashes, used for debug checking.

openravepy.misc.CompareEnvironments(env, env2, options=openravepy.openravepy_int.CloningOptions.Bodies, epsilon=1e-10)[ソース]

compares two state of two environments and raises exceptions if anything is different, used for debugging.

Structural information of bodies is compared with hashes.

openravepy.misc.ComputeBoxMesh(extents)[ソース]

Computes a box mesh

openravepy.misc.ComputeCylinderYMesh(radius, height, angledelta=0.10000000000000001)[ソース]

Computes a mesh of a cylinder oriented towards y-axis

openravepy.misc.ComputeGeodesicSphereMesh(radius=1.0, level=2)[ソース]

Computes a geodesic sphere to a specified level. Returns the vertices and triangle indices

openravepy.misc.DrawAxes(env, target, dist=1.0, linewidth=1, coloradd=None)[ソース]

draws xyz coordinate system around target.

パラメタ:
  • env – Environment
  • target – can be a 7 element pose, 4x4 matrix, or the name of a kinbody in the environment
  • dist – how far the lines extend from the origin
  • linewidth – how thick the line is rendered in pixels
  • coloradd – an optional 3-element vector for
openravepy.misc.DrawIkparam(env, ikparam, dist=1.0, linewidth=1, coloradd=None)[ソース]

draws an IkParameterization

openravepy.misc.InitOpenRAVELogging()[ソース]

Sets the python logging openravepy scope to the same debug level as OpenRAVE and initializes handles if they are not present

openravepy.misc.LoadTrajectoryFromFile(env, trajfile, trajtype='')[ソース]
class openravepy.misc.MultiManipIKSolver(manips)[ソース]

Finds the simultaneous IK solutions of all disjoint manipulators (no manipulators share a joint).

The class is extremely useful in dual-manipulation IK solutions. It also handled grabbed bodies correctly.

findMultiIKSolution(Tgrasps, filteroptions=openravepy.openravepy_int.IkFilterOptions.CheckEnvCollisions, dooptimize=False)[ソース]

Return one set collision-free ik solutions for all manipulators.

Method always checks self-collisions.

パラメタ:
  • Tgrasps – a list of all the end effector transforms of each of the manipualtors
  • filteroptions – a bitmask of IkFilterOptions
class openravepy.misc.OpenRAVEGlobalArguments[ソース]

manages a global set of command-line options applicable to all openrave environments

static addOptions(parser, testmode=True)[ソース]
static parseAndCreate(options, createenv=<class 'openravepy.openravepy_int.Environment'>, returnviewer=False, **kwargs)[ソース]

Parse all options and create the global Environment. The left over arguments are passed to the parse functions. If returnviewer is False, the viewer is created in a separate thread, so this method will not work for MacOSX if this is the main executing thread.

static parseAndCreateThreadedUser(options, userfn, createenv=<class 'openravepy.openravepy_int.Environment'>, returnviewer=True, **kwargs)[ソース]

Parse all options and create the global Environment. The left over arguments are passed to the parse functions. If a viewer is requested, it is created in this thread, and another thread is executed with the user function. This is required for OSes that require viewer thread to be in main thread (Mac OSX) :param userfn: Call with userfn(env,options) :return: nothing

static parseEnvironment(options, env, defaultviewer=False, returnviewer=False, **kwargs)[ソース]

Parses all options that affect the environment. If returnviewer is set, will return the viewer to set instead of setting it

static parseGlobal(options, **kwargs)[ソース]

Parses all global options independent of the environment

openravepy.misc.SetViewerUserThread(env, viewername, userfn)[ソース]

Adds a viewer to the environment if one doesn’t exist yet and starts it on this thread. Then creates a new thread to call the user-defined function to continue computation. This function will return when the viewer and uesrfn exits. If userfn exits first, then will quit the viewer

class openravepy.misc.SpaceSamplerExtra[ソース]
computeFaceIndices(N)[ソース]
static computeSepration(qarray)[ソース]

used to test separation of a set of quaternions

static hopf2quat(hopfarray)[ソース]

convert hopf rotation coordinates to quaternion

static sampleR3(averagedist, boxdims)[ソース]

low-discrepancy sampling using primes. The samples are evenly distributed with an average distance of averagedist inside the box with dimensions boxdims. Algorithim from “Geometric Discrepancy: An Illustrated Guide” by Jiri Matousek

static sampleR3lattice(averagedist, boxdims)[ソース]

low-discrepancy lattice sampling in using the roots of x^3-3x+1. The samples are evenly distributed with an average distance of averagedist inside the box with extents boxextents. Algorithim from “Geometric Discrepancy: An Illustrated Guide” by Jiri Matousek

sampleS2(level=0, angledelta=None)[ソース]

uses healpix algorithm with ordering from Yershova et. al. 2009 journal paper

sampleSO3(level=0, quatdelta=None)[ソース]

Uniformly Sample 3D Rotations. If quatdelta is specified, will compute the best level aiming for that average quaternion distance. Algorithm From A. Yershova, S. Jain, S. LaValle, J. Mitchell “Generating Uniform Incremental Grids on SO(3) Using the Hopf Fibration”, International Journal of Robotics Research, Nov 13, 2009.

openravepy.misc.TSP(solutions, distfn)[ソース]

solution to travelling salesman problem. orders the set of solutions such that visiting them one after another is fast.

openravepy.misc.mkdir_recursive(newdir)[ソース]
openravepy.misc.sequence_cross_product(*sequences)[ソース]

iterates through the cross product of all items in the sequences