Library allows OpenRAVE to be used through Python.
Beginners should first check out Beginning with openravepy.
There is a __build_doc__ external variable that is set to True only when building docs. This allows package to clean their symbols and documentation.
boost::shared_ptr< T > RaveClone(boost::shared_ptr< T const > preference, int cloningoptions)
returned a fully cloned interface
OPENRAVE_API CollisionCheckerBasePtr RaveCreateCollisionChecker(EnvironmentBasePtr penv, const std::string & name)
OPENRAVE_API ControllerBasePtr RaveCreateController(EnvironmentBasePtr penv, const std::string & name)
OPENRAVE_API IkSolverBasePtr RaveCreateIkSolver(EnvironmentBasePtr penv, const std::string & name)
OPENRAVE_API InterfaceBasePtr RaveCreateInterface(EnvironmentBasePtr penv, InterfaceType type, const std::string & interfacename)
OPENRAVE_API KinBodyPtr RaveCreateKinBody(EnvironmentBasePtr penv, const std::string & name = “” )
OPENRAVE_API ModuleBasePtr RaveCreateModule(EnvironmentBasePtr penv, const std::string & name)
OPENRAVE_API PhysicsEngineBasePtr RaveCreatePhysicsEngine(EnvironmentBasePtr penv, const std::string & name)
OPENRAVE_API PlannerBasePtr RaveCreatePlanner(EnvironmentBasePtr penv, const std::string & name)
OPENRAVE_API ModuleBasePtr RaveCreateModule(EnvironmentBasePtr penv, const std::string & name)
OPENRAVE_API ModuleBasePtr RaveCreateModule(EnvironmentBasePtr penv, const std::string & name)
OPENRAVE_API RobotBasePtr RaveCreateRobot(EnvironmentBasePtr penv, const std::string & name = “” )
OPENRAVE_API SensorBasePtr RaveCreateSensor(EnvironmentBasePtr penv, const std::string & name)
OPENRAVE_API SensorSystemBasePtr RaveCreateSensorSystem(EnvironmentBasePtr penv, const std::string & name)
OPENRAVE_API SpaceSamplerBasePtr RaveCreateSpaceSampler(EnvironmentBasePtr penv, const std::string & name)
OPENRAVE_API TrajectoryBasePtr RaveCreateTrajectory(EnvironmentBasePtr penv, const std::string & name = “” )
Return an empty trajectory instance.
OPENRAVE_API ViewerBasePtr RaveCreateViewer(EnvironmentBasePtr penv, const std::string & name)
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.
OPENRAVE_API ConfigurationSpecification RaveGetAffineConfigurationSpecification(int affinedofs, KinBodyConstPtr pbody = KinBodyConstPtr () , const std::string & interpolation = “” )
OPENRAVE_API int RaveGetAffineDOF(int affinedofs)
Returns the degrees of freedom needed to represent all the values in the affine dof mask.
- Exceptions
- openrave_exception -
- throws if
OPENRAVE_API DOFAffine RaveGetAffineDOFFromIndex(int affinedofs, int index)
Given a mask of affine dofs and an index into the array, returns the affine dof that is being referenced.
- Parameters
- affinedofs -
- a mask of DOFAffine values
- index -
- an index into the affine dof array Exceptions
- openrave_exception -
- throws if dof if index is out of bounds
OPENRAVE_API void RaveGetAffineDOFValuesFromTransform(std::vector< dReal >::iterator itvalues, const Transform & t, int affinedofs, const Vector & vActvAffineRotationAxis = Vector (0, 0, 1) )
Converts the transformation matrix into the specified affine values format.
- Parameters
- itvalues -
- an iterator to the vector to write the values to. Will write exactly RaveGetAffineDOF(affinedofs) values.
- the -
- affine transformation to convert
- affinedofs -
- the affine format to output values in
- vActvAffineRotationAxis -
- optional rotation axis if affinedofs specified DOF_RotationAxis
OPENRAVE_API int RaveGetDataAccess()
Returns the acess options set.
- See
- RaveSetDataAccess
OPENRAVE_API int RaveGetDebugLevel()
Returns the openrave debug level.
OPENRAVE_API EnvironmentBasePtr RaveGetEnvironment(int id)
get the environment from its unique id
- Parameters
- id -
- the unique environment id returned by RaveGetEnvironmentId
OPENRAVE_API int RaveGetEnvironmentId(EnvironmentBasePtr penv)
return the environment’s unique id, returns 0 if environment could not be found or not registered
OPENRAVE_API void RaveGetEnvironments(std::list< EnvironmentBasePtr > & listenvironments)
Return all the created OpenRAVE environments.
OPENRAVE_API std::string RaveGetHomeDirectory()
Returns the openrave home directory where settings, cache, and other files are stored.
On Linux/Unix systems, this is usually $HOME/.openrave, on Windows this is $HOMEPATH/.openrave
OPENRAVE_API IkParameterizationType RaveGetIkTypeFromUniqueId(int uniqueid)
returns the IkParameterizationType given the unique id detmerined b IKP_UniqueIdMask
OPENRAVE_API int RaveGetIndexFromAffineDOF(int affinedofs, DOFAffine dof)
Given a mask of affine dofs and a dof inside that mask, returns the index where the value could be found.
- Parameters
- affinedofs -
- a mask of DOFAffine values
- dof -
- a set of values inside affinedofs, the index of the first value is returned Exceptions
- openrave_exception -
- throws if dof is not present in affinedofs
OPENRAVE_API void RaveGetLoadedInterfaces(std::map< InterfaceType, std::vector< std::string > > & interfacenames)
Get a list of all the loaded interfaces.
OPENRAVE_API void RaveGetPluginInfo(std::list< std::pair< std::string, PLUGININFO > > & plugins)
Get all the loaded plugins and the interfaces they support.
- Parameters
- plugins -
- A list of plugins. Each entry has the plugin name and the interfaces it supports
OPENRAVE_API UserDataPtr RaveGlobalState()
A pointer to the global openrave state.
- Return
- a managed pointer to the state.
OPENRAVE_API bool RaveHasInterface(InterfaceType type, const std::string & interfacename)
Returns true if interface can be created, otherwise false.
OPENRAVE_API int RaveInitialize(bool bLoadAllPlugins = true , int level = Level_Info )
Explicitly initializes the global OpenRAVE state (optional).
- Parameters
- bLoadAllPlugins -
- If true will load all the openrave plugins automatically that can be found in the OPENRAVE_PLUGINS environment path Optional function to initialize openrave plugins, logging, and read OPENRAVE_* environment variables. Although environment creation will automatically make sure this function is called, users might want explicit control of when this happens. Will not do anything if OpenRAVE runtime is already initialized. If OPENRAVE_* environment variables must be re-read, first call RaveDestroy.
- Return
- 0 if successful, otherwise an error code
Send a log to the openrave system with excplicit level
Send a debug log to the openrave system
Send an error log to the openrave system
Send a fatal log to the openrave system
Send an info log to the openrave system
Send a verbose log to the openrave system
Send a warn log to the openrave system
OPENRAVE_API void RaveReloadPlugins()
Reloads all the plugins.
The interfaces currently created remain will continue using the old plugins, so this function is safe in that plugins currently loaded remain loaded until the last interface that uses them is released.
OPENRAVE_API void RaveSetDataAccess(int accessoptions)
Sets the default data access options for cad resources/robot files.
- Parameters
- accessoptions -
- if 1 will only allow resources inside directories specified from OPERNAVE_DATA environment variable. This allows reject of full paths from unsecure/unauthenticated resources. Controls how files are processed in functions like RaveFindLocalFile
OPENRAVE_API void RaveSetDebugLevel(int level)
Sets the global openrave debug level. A combination of DebugLevel.
RaveVector < T > axisAngleFromQuat(const RaveVector < T > & quat)
Converts a quaternion into the axis-angle representation.
- Parameters
- quat -
- quaternion, (s,vx,vy,vz)
RaveVector < T > axisAngleFromMatrix(const RaveTransformMatrix < T > & rotation)
Converts the rotation of a matrix into axis-angle representation.
- Parameters
- rotation -
- 3x3 rotation matrix
Inverts a Nx7 array of poses where first 4 columns are the quaternion and last 3 are the translation components.
Parameters: | poses – nx7 array |
---|
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
Converts a 7 element quaterion+translation transform to a 4x4 matrix.
Parameters: | pose – 7 values |
---|
Converts a Nx7 element quaterion+translation array to a 4x4 matrices.
Parameters: | poses – nx7 array |
---|
Converts a quaternion to a 4x4 affine matrix.
Parameters: | quat – 4 values |
---|
Serializes a transformation into a string representing a 3x4 matrix.
Parameters: | transform – 3x4 or 4x4 array |
---|
std::pair< T, RaveVector < T > > normalizeAxisRotation(const RaveVector < T > & axis, const RaveVector < T > & quat)
Find the rotation theta around axis such that rot(axis,theta) * q is closest to the identity rotation.
- Parameters
- axis -
- axis to minimize rotation about
- quat -
- input
- Return
- The angle that minimizes the rotation along with the normalized rotation rot(axis,theta)*q
Returns the compiler version that openravepy_int was compiled with
Converts an array/list of 4x4 matrices to a Nx7 array where each row is quaternion+translation representation.
Parameters: | transforms – list of 3x4 or 4x4 affine matrices |
---|
Converts a 4x4 matrix to a 7 element quaternion+translation representation.
Parameters: | transform – 3x4 or 4x4 affine matrix |
---|
multiplies two poses.
Parameters: |
|
---|
Serializes a transformation into a string representing a quaternion with translation.
Parameters: | pose – 7 values |
---|
left-transforms a set of points by a pose transformation.
Parameters: |
|
---|
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)
RaveVector < T > quatFromMatrix(const RaveTransformMatrix < T > & rotation)
Converts the rotation of a matrix into a quaternion.
- Parameters
- t -
- transform for extracting the 3x3 rotation.
RaveVector < T > quatInverse(const RaveVector < T > & quat)
Inverted a quaternion rotation.
- Parameters
- quat -
- quaternion, (s,vx,vy,vz)
RaveVector < T > quatMultiply(const RaveVector < T > & quat0, const RaveVector < T > & quat1)
Multiply two quaternions.
- Parameters
- quat0 -
- quaternion, (s,vx,vy,vz)
- quat1 -
- quaternion, (s,vx,vy,vz)
RaveVector < T > quatMultiply(const RaveVector < T > & quat0, const RaveVector < T > & quat1)
Multiply two quaternions.
- Parameters
- quat0 -
- quaternion, (s,vx,vy,vz)
- quat1 -
- quaternion, (s,vx,vy,vz)
RaveVector < T > quatRotateDirection(const RaveVector < T > & sourcedir, const RaveVector < T > & targetdir)
Return the minimal quaternion that orients sourcedir to targetdir.
- Parameters
- sourcedir -
- direction of the original vector, 3 values
- targetdir -
- new direction, 3 values
RaveVector < T > quatSlerp(const RaveVector < T > & quat0, const RaveVector < T > & quat1, T t)
Sphereical linear interpolation between two quaternions.
- Parameters
- quat0 -
- quaternion, (s,vx,vy,vz)
- quat1 -
- quaternion, (s,vx,vy,vz)
- t -
- real value in [0,1]. 0 returns quat1, 1 returns quat2
OPENRAVE_API int RaveGetDebugLevel()
Returns the openrave debug level.
Send a log to the openrave system with excplicit level
Send a debug log to the openrave system
Send an error log to the openrave system
Send a fatal log to the openrave system
Send an info log to the openrave system
Send a verbose log to the openrave system
Send a warn log to the openrave system
OPENRAVE_API void RaveSetDebugLevel(int level)
Sets the global openrave debug level. A combination of DebugLevel.
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
Converts an array of quaternions to a list of 3x3 rotation matrices.
Parameters: | quatarray – nx4 array |
---|
RaveTransformMatrix < T > matrixFromQuat(const RaveVector < T > & quat)
Converts a quaternion to a 3x3 matrix.
- Parameters
- quat -
- quaternion, (s,vx,vy,vz)
Returns a camera matrix that looks along a ray with a desired up vector.
Parameters: |
|
---|