Convex decomposition of the link geometry of the robot.
Running the Generator
openrave.py --database convexdecomposition --robot=robots/barrettsegway.robot.xml
Showing the Decomposition
openrave.py --database convexdecomposition --robot=robots/barrettsegway.robot.xml --show
Dynamically load the convex hulls for a robot:
cdmodel = openravepy.databases.convexdecomposition.ConvexDecompositionModel(robot)
if not cdmodel.load():
cdmodel.autogenerate()
Approximates each of the links with a set of convex hulls using John Ratcliff’s convexdecomposition library.
Usage: openrave.py --database convexdecomposition [options] Computes the set of convex hulls for each triangle mesh geometry.using convexdecomposition Options: -h, --help show this help message and exit --skinWidth=SKINWIDTH Skin width on the convex hulls generated, convex decomposition side (default=0.0) --padding=PADDING The distance to move the hull planes along their respective normals (default=0.005) --decompositionDepth=DECOMPOSITIONDEPTH recursion depth for convex decomposition (default=8) --maxHullVertices=MAXHULLVERTICES maximum number of vertices in output convex hulls (default=64) --concavityThresholdPercent=CONCAVITYTHRESHOLDPERCENT The percentage of concavity allowed without causing a split to occur (default=5.0). --mergeThresholdPercent=MERGETHRESHOLDPERCENT The percentage of volume difference allowed to merge two convex hulls (default=30.0). --volumeSplitThresholdPercent=VOLUMESPLITTHRESHOLDPERCENT The percentage of the total volume of the object above which splits will still occur (default=5.0). --useInitialIslandGeneration=USEINITIALISLANDGENERATION whether or not to perform initial island generation on the input mesh (default=1). --useIslandGeneration=USEISLANDGENERATION Whether or not to perform island generation at each split. Currently disabled due to bug in RemoveTjunctions (default=0). 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)
ベースクラス: openravepy.databases.DatabaseGenerator
Computes the convex decomposition of all of the robot’s links
Executes the ConvexDecompositionModel database generation
The computed planes point outside of the mesh. Therefore a point is inside only if the distance to all planes is negative.
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.
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.