openrave.org

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | List of all members
OpenRAVE::EnvironmentBase Class Referenceabstract

Maintains a world state, which serves as the gateway to all functions offered through OpenRAVE. See Environment Concepts. More...

#include <environment.h>

Inheritance diagram for OpenRAVE::EnvironmentBase:
Inheritance graph
[legend]
Collaboration diagram for OpenRAVE::EnvironmentBase:
Collaboration graph
[legend]

Public Member Functions

 EnvironmentBase ()
 
virtual ~EnvironmentBase ()
 
virtual void Destroy ()=0
 Releases all environment resources, should be always called when environment stops being used.
 
virtual void Reset ()=0
 Resets all objects of the scene (preserves all problems, planners). [multi-thread safe]
 
virtual void SetUserData (UserDataPtr data)
 set user data
 
virtual UserDataPtr GetUserData () const
 return the user custom data
 
virtual UserDataPtr GlobalState ()=0
 Returns the OpenRAVE global state, used for initializing plugins.
 
virtual void OwnInterface (InterfaceBasePtr pinterface)=0
 Environment will own the interface until EnvironmentBase::Destroy is called.
 
virtual void DisownInterface (InterfaceBasePtr pinterface)=0
 Remove ownership of the interface.
 
virtual EnvironmentBasePtr CloneSelf (int options)=0
 Create and return a clone of the current environment.
 
virtual void Clone (EnvironmentBaseConstPtr preference, int cloningoptions)=0
 Clones the reference environment into the current environment.
 
virtual int AddModule (ModuleBasePtr module, const std::string &cmdargs)=0
 Load a new module, need to Lock if calling outside simulation thread.
 
virtual int LoadProblem (ModuleBasePtr module, const std::string &cmdargs) RAVE_DEPRECATED
 
virtual void GetModules (std::list< ModuleBasePtr > &listModules, uint64_t timeout=0) const =0
 Fills a list with the loaded modules in the environment.
 
virtual void GetLoadedProblems (std::list< ModuleBasePtr > &listModules) const
 
virtual EnvironmentMutexGetMutex () const =0
 Return the global environment mutex used to protect environment information access in multi-threaded environments.
 
Physics and Simulation
virtual bool SetPhysicsEngine (PhysicsEngineBasePtr physics)=0
 
virtual PhysicsEngineBasePtr GetPhysicsEngine () const =0
 
virtual void StepSimulation (dReal timeStep)=0
 Makes one simulation time step. [multi-thread safe]
 
virtual void StartSimulation (dReal fDeltaTime, bool bRealTime=true)=0
 Start the internal simulation thread. [multi-thread safe]
 
virtual void StopSimulation ()=0
 Stops the internal physics loop, stops calling SimulateStep for all modules. [multi-thread safe]
 
virtual bool IsSimulationRunning () const =0
 Return true if inner simulation loop is executing. [multi-thread safe]
 
virtual uint64_t GetSimulationTime ()=0
 Return simulation time since the start of the environment (in microseconds). [multi-thread safe]
 
Object Setting and Querying

virtual void Add (InterfaceBasePtr pinterface, bool bAnonymous=false, const std::string &cmdargs="")=0
 Add an interface to the environment.
 
virtual void AddKinBody (KinBodyPtr body, bool bAnonymous=false) RAVE_DEPRECATED
 
virtual void AddRobot (RobotBasePtr robot, bool bAnonymous=false) RAVE_DEPRECATED
 
virtual void AddSensor (SensorBasePtr sensor, bool bAnonymous=false) RAVE_DEPRECATED
 
virtual void GetSensors (std::vector< SensorBasePtr > &sensors, uint64_t timeout=0) const =0
 Fill an array with all sensors loaded in the environment. [multi-thread safe]
 
virtual bool Remove (InterfaceBasePtr obj)=0
 Removes a currently loaded interface from the environment. [multi-thread safe]
 
virtual KinBodyPtr GetKinBody (const std::string &name) const =0
 Query a body from its name. [multi-thread safe]
 
virtual SensorBasePtr GetSensor (const std::string &name) const =0
 Query a sensor from its name. [multi-thread safe]
 
virtual RobotBasePtr GetRobot (const std::string &name) const =0
 Query a robot from its name. [multi-thread safe]
 
virtual void GetBodies (std::vector< KinBodyPtr > &bodies, uint64_t timeout=0) const =0
 Get all bodies loaded in the environment (including robots). [multi-thread safe]
 
virtual void GetRobots (std::vector< RobotBasePtr > &robots, uint64_t timeout=0) const =0
 Fill an array with all robots loaded in the environment. [multi-thread safe]
 
virtual void GetPublishedBodies (std::vector< KinBody::BodyState > &vbodies, uint64_t timeout=0)=0
 Retrieve published bodies, completes even if environment is locked. [multi-thread safe]
 
virtual void UpdatePublishedBodies (uint64_t timeout=0)=0
 Updates the published bodies that viewers and other programs listening in on the environment see.
 
virtual KinBodyPtr GetBodyFromEnvironmentId (int id)=0
 Get the corresponding body from its unique network id.
 
virtual void Triangulate (KinBody::Link::TRIMESH &trimesh, KinBodyConstPtr pbody)=0
 Triangulation of the body including its current transformation. trimesh will be appended the new data. [multi-thread safe]
 
virtual void TriangulateScene (KinBody::Link::TRIMESH &trimesh, SelectionOptions options, const std::string &selectname)=0
 General triangulation of the whole scene. [multi-thread safe]
 
virtual void SetDebugLevel (int level)=0
 
virtual int GetDebugLevel () const =0
 

Protected Member Functions

virtual const char * GetHash () const
 

Collision specific functions.

Each function takes an optional pointer to a CollisionReport structure and returns true if collision occurs. [multi-thread safe]

typedef boost::function
< CollisionAction(CollisionReportPtr,
bool)> 
CollisionCallbackFn
 
virtual bool SetCollisionChecker (CollisionCheckerBasePtr pchecker)=0
 set the global environment collision checker
 
virtual CollisionCheckerBasePtr GetCollisionChecker () const =0
 
virtual bool CheckCollision (KinBodyConstPtr pbody1, CollisionReportPtr report=CollisionReportPtr())=0
 
virtual bool CheckCollision (KinBodyConstPtr pbody1, KinBodyConstPtr pbody2, CollisionReportPtr report=CollisionReportPtr())=0
 
virtual bool CheckCollision (KinBody::LinkConstPtr plink, CollisionReportPtr report=CollisionReportPtr())=0
 
virtual bool CheckCollision (KinBody::LinkConstPtr plink1, KinBody::LinkConstPtr plink2, CollisionReportPtr report=CollisionReportPtr())=0
 
virtual bool CheckCollision (KinBody::LinkConstPtr plink, KinBodyConstPtr pbody, CollisionReportPtr report=CollisionReportPtr())=0
 
virtual bool CheckCollision (KinBody::LinkConstPtr plink, const std::vector< KinBodyConstPtr > &vbodyexcluded, const std::vector< KinBody::LinkConstPtr > &vlinkexcluded, CollisionReportPtr report=CollisionReportPtr())=0
 
virtual bool CheckCollision (KinBodyConstPtr pbody, const std::vector< KinBodyConstPtr > &vbodyexcluded, const std::vector< KinBody::LinkConstPtr > &vlinkexcluded, CollisionReportPtr report=CollisionReportPtr())=0
 
virtual bool CheckCollision (const RAY &ray, KinBody::LinkConstPtr plink, CollisionReportPtr report=CollisionReportPtr())=0
 
virtual bool CheckCollision (const RAY &ray, KinBodyConstPtr pbody, CollisionReportPtr report=CollisionReportPtr())=0
 
virtual bool CheckCollision (const RAY &ray, CollisionReportPtr report=CollisionReportPtr())=0
 
virtual bool CheckSelfCollision (KinBodyConstPtr pbody, CollisionReportPtr report=CollisionReportPtr())=0
 
virtual UserDataPtr RegisterCollisionCallback (const CollisionCallbackFn &callback)=0
 
virtual bool HasRegisteredCollisionCallbacks () const =0
 
virtual void GetRegisteredCollisionCallbacks (std::list< CollisionCallbackFn > &) const =0
 return all the collision callbacks, the environment must be locked!
 

File Loading and Parsing

enum  SelectionOptions {
  SO_NoRobots = 1, TO_Obstacles = 1, SO_Robots = 2, TO_Robots = 2,
  SO_Everything = 3, TO_Everything = 3, SO_Body = 4, TO_Body = 4,
  SO_AllExceptBody = 5, TO_AllExceptBody = 5
}
 A set of options used to select particular parts of the scene. More...
 
typedef SelectionOptions TriangulateOptions
 
virtual bool Load (const std::string &filename, const AttributesList &atts=AttributesList())=0
 Loads a scene from a file and adds all objects in the environment. [multi-thread safe]
 
virtual bool LoadURI (const std::string &filename, const AttributesList &atts=AttributesList())=0
 Loads a scene from a URI and adds all objects in the environment. [multi-thread safe]
 
virtual bool LoadData (const std::string &data, const AttributesList &atts=AttributesList())=0
 Loads a scene from in-memory data and adds all objects in the environment. [multi-thread safe]
 
virtual bool LoadXMLData (const std::string &data, const AttributesList &atts=AttributesList())
 
virtual void Save (const std::string &filename, SelectionOptions options=SO_Everything, const AttributesList &atts=AttributesList())=0
 Saves a scene depending on the filename extension. Default is in COLLADA format.
 
virtual void Save (const std::string &filename, SelectionOptions options, const std::string &selectname) RAVE_DEPRECATED
 
virtual RobotBasePtr ReadRobotURI (RobotBasePtr robot, const std::string &filename, const AttributesList &atts=AttributesList())=0
 Initializes a robot from a resource file. The robot is not added to the environment when calling this function. [multi-thread safe]
 
virtual RobotBasePtr ReadRobotXMLFile (RobotBasePtr robot, const std::string &filename, const AttributesList &atts=AttributesList())
 
virtual RobotBasePtr ReadRobotURI (const std::string &filename)
 Creates a new robot from a file with no extra load options specified. [multi-thread safe]
 
virtual RobotBasePtr ReadRobotXMLFile (const std::string &filename)
 
virtual RobotBasePtr ReadRobotData (RobotBasePtr robot, const std::string &data, const AttributesList &atts=AttributesList())=0
 Initialize a robot from in-memory data. [multi-thread safe]
 
virtual RobotBasePtr ReadRobotXMLData (RobotBasePtr robot, const std::string &data, const AttributesList &atts=AttributesList())
 
virtual KinBodyPtr ReadKinBodyURI (KinBodyPtr body, const std::string &filename, const AttributesList &atts=AttributesList())=0
 Initializes a kinematic body from a resource file. The body is not added to the environment when calling this function. [multi-thread safe]
 
virtual KinBodyPtr ReadKinBodyXMLFile (KinBodyPtr body, const std::string &filename, const AttributesList &atts=AttributesList())
 
virtual KinBodyPtr ReadKinBodyURI (const std::string &filename)
 Creates a new kinbody from an XML file with no extra load options specified. [multi-thread safe]
 
virtual KinBodyPtr ReadKinBodyXMLFile (const std::string &filename)
 
virtual KinBodyPtr ReadKinBodyData (KinBodyPtr body, const std::string &data, const AttributesList &atts=AttributesList())=0
 Initializes a kinematic body from in-memory data. [multi-thread safe]
 
virtual KinBodyPtr ReadKinBodyXMLData (KinBodyPtr body, const std::string &data, const AttributesList &atts=AttributesList())
 
virtual InterfaceBasePtr ReadInterfaceURI (InterfaceBasePtr pinterface, InterfaceType type, const std::string &filename, const AttributesList &atts=AttributesList())=0
 Initializes an interface from a resource file. [multi-thread safe]
 
virtual InterfaceBasePtr ReadInterfaceXMLFile (InterfaceBasePtr pinterface, InterfaceType type, const std::string &filename, const AttributesList &atts=AttributesList())
 
virtual InterfaceBasePtr ReadInterfaceURI (const std::string &filename, const AttributesList &atts=AttributesList())=0
 
virtual InterfaceBasePtr ReadInterfaceXMLFile (const std::string &filename, const AttributesList &atts=AttributesList())
 
virtual InterfaceBasePtr ReadInterfaceData (InterfaceBasePtr pinterface, InterfaceType type, const std::string &data, const AttributesList &atts=AttributesList())=0
 Initializes an interface from in-memory data. [multi-thread safe]
 
virtual InterfaceBasePtr ReadInterfaceXMLData (InterfaceBasePtr pinterface, InterfaceType type, const std::string &data, const AttributesList &atts=AttributesList())
 
virtual boost::shared_ptr
< KinBody::Link::TRIMESH
ReadTrimeshURI (boost::shared_ptr< KinBody::Link::TRIMESH > ptrimesh, const std::string &filename, const AttributesList &atts=AttributesList())=0
 reads in the rigid geometry of a resource file into a TRIMESH structure
 
virtual boost::shared_ptr
< KinBody::Link::TRIMESH
ReadTrimeshFile (boost::shared_ptr< KinBody::Link::TRIMESH > ptrimesh, const std::string &filename, const AttributesList &atts=AttributesList())
 

3D plotting methods.

typedef
OpenRAVE::GraphHandlePtr
GraphHandlePtr 
RAVE_DEPRECATED
 
virtual void AddViewer (ViewerBasePtr pviewer)
 
virtual bool AttachViewer (ViewerBasePtr pnewviewer) RAVE_DEPRECATED
 
virtual ViewerBasePtr GetViewer (const std::string &name="") const =0
 Return a viewer with a particular name.
 
virtual void GetViewers (std::list< ViewerBasePtr > &listViewers) const =0
 Returns a list of loaded viewers with a pointer to a lock preventing the list from being modified.
 
virtual OpenRAVE::GraphHandlePtr plot3 (const float *ppoints, int numPoints, int stride, float fPointSize, const RaveVector< float > &color=RaveVector< float >(1, 0.5, 0.5, 1), int drawstyle=0)=0
 Plot a point cloud with one color. [multi-thread safe]
 
virtual OpenRAVE::GraphHandlePtr plot3 (const float *ppoints, int numPoints, int stride, float fPointSize, const float *colors, int drawstyle=0, bool bhasalpha=false)=0
 . Plots 3D points with individual colors. [multi-thread safe]
 
virtual OpenRAVE::GraphHandlePtr drawlinestrip (const float *ppoints, int numPoints, int stride, float fwidth, const RaveVector< float > &color=RaveVector< float >(1, 0.5, 0.5, 1))=0
 Draws a series of connected lines with one color. [multi-thread safe]
 
virtual OpenRAVE::GraphHandlePtr drawlinestrip (const float *ppoints, int numPoints, int stride, float fwidth, const float *colors)=0
 Draws a series of connected lines with individual colors. [multi-thread safe]
 
virtual OpenRAVE::GraphHandlePtr drawlinelist (const float *ppoints, int numPoints, int stride, float fwidth, const RaveVector< float > &color=RaveVector< float >(1, 0.5, 0.5, 1))=0
 Draws a list of individual lines, each specified by a succeeding pair of points. [multi-thread safe]
 
virtual OpenRAVE::GraphHandlePtr drawlinelist (const float *ppoints, int numPoints, int stride, float fwidth, const float *colors)=0
 Draws a list of individual lines, each specified by a succeeding pair of points. [multi-thread safe]
 
virtual OpenRAVE::GraphHandlePtr drawarrow (const RaveVector< float > &p1, const RaveVector< float > &p2, float fwidth, const RaveVector< float > &color=RaveVector< float >(1, 0.5, 0.5, 1))=0
 Draws an arrow p1 is start, p2 is finish. [multi-thread safe]
 
virtual OpenRAVE::GraphHandlePtr drawbox (const RaveVector< float > &vpos, const RaveVector< float > &vextents)=0
 Draws a box. [multi-thread safe]
 
virtual OpenRAVE::GraphHandlePtr drawplane (const RaveTransform< float > &tplane, const RaveVector< float > &vextents, const boost::multi_array< float, 3 > &vtexture)=0
 Draws a textured plane. [multi-thread safe]
 
virtual OpenRAVE::GraphHandlePtr drawtrimesh (const float *ppoints, int stride, const int *pIndices, int numTriangles, const RaveVector< float > &color)=0
 
virtual OpenRAVE::GraphHandlePtr drawtrimesh (const float *ppoints, int stride, const int *pIndices, int numTriangles, const boost::multi_array< float, 2 > &colors)=0
 Draws a triangle mesh, each vertices of each triangle should be counter-clockwise. [multi-thread safe]
 

Detailed Description

Maintains a world state, which serves as the gateway to all functions offered through OpenRAVE. See Environment Concepts.

Definition at line 31 of file environment.h.

Member Typedef Documentation

Definition at line 124 of file environment.h.

Deprecated:
(10/11/05)

Definition at line 490 of file environment.h.

Definition at line 197 of file environment.h.

Member Enumeration Documentation

A set of options used to select particular parts of the scene.

Enumerator:
SO_NoRobots 

everything but robots

TO_Obstacles 
SO_Robots 

all robots

TO_Robots 
SO_Everything 

all bodies and robots everything

TO_Everything 
SO_Body 

robot/kinbody. atts 'target' key contains the body name. If multiple targets are specified, then will save all related bodies.

TO_Body 
SO_AllExceptBody 

save everything but the robot/kinbody objects specified through the atts 'target' key. Multiple targets can be specified.

TO_AllExceptBody 

Definition at line 184 of file environment.h.

Constructor & Destructor Documentation

OpenRAVE::EnvironmentBase::EnvironmentBase ( )

Definition at line 1620 of file libopenrave.cpp.

OpenRAVE::EnvironmentBase::~EnvironmentBase ( )
virtual

Definition at line 1629 of file libopenrave.cpp.

Member Function Documentation

virtual void OpenRAVE::EnvironmentBase::Add ( InterfaceBasePtr  pinterface,
bool  bAnonymous = false,
const std::string &  cmdargs = "" 
)
pure virtual

Add an interface to the environment.

Depending on the type of interface, the addition behaves differently. For bodies/robots, will add them to visual/geometric environment. For modules, will call their main() method and add them officially. For viewers, will attach a viewer to the environment and start sending it data. For interfaces that don't make sense to add, will throw an exception.

Parameters
[in]pinterfacethe pointer to an initialized interface
[in]bAnonymousif true and there exists a body/robot with the same name, will make body's name unique
[in]cmdargsThe command-line arguments for the module.
Exceptions
openrave_exceptionThrow if interface is invalid or already added
virtual void OpenRAVE::EnvironmentBase::AddKinBody ( KinBodyPtr  body,
bool  bAnonymous = false 
)
inlinevirtual
Deprecated:
(12/04/18)

Definition at line 361 of file environment.h.

virtual int OpenRAVE::EnvironmentBase::AddModule ( ModuleBasePtr  module,
const std::string &  cmdargs 
)
pure virtual

Load a new module, need to Lock if calling outside simulation thread.

virtual void OpenRAVE::EnvironmentBase::AddRobot ( RobotBasePtr  robot,
bool  bAnonymous = false 
)
inlinevirtual
Deprecated:
(12/04/18)

Definition at line 366 of file environment.h.

virtual void OpenRAVE::EnvironmentBase::AddSensor ( SensorBasePtr  sensor,
bool  bAnonymous = false 
)
inlinevirtual
Deprecated:
(12/04/18)

Definition at line 372 of file environment.h.

virtual void OpenRAVE::EnvironmentBase::AddViewer ( ViewerBasePtr  pviewer)
inlinevirtual
Deprecated:
(12/04/18)

Definition at line 493 of file environment.h.

virtual bool OpenRAVE::EnvironmentBase::AttachViewer ( ViewerBasePtr  pnewviewer)
inlinevirtual
Deprecated:
(11/06/13) see AddViewer

Definition at line 498 of file environment.h.

virtual bool OpenRAVE::EnvironmentBase::CheckCollision ( KinBodyConstPtr  pbody1,
CollisionReportPtr  report = CollisionReportPtr() 
)
pure virtual
virtual bool OpenRAVE::EnvironmentBase::CheckCollision ( KinBodyConstPtr  pbody1,
KinBodyConstPtr  pbody2,
CollisionReportPtr  report = CollisionReportPtr() 
)
pure virtual
virtual bool OpenRAVE::EnvironmentBase::CheckCollision ( KinBody::LinkConstPtr  plink,
CollisionReportPtr  report = CollisionReportPtr() 
)
pure virtual
virtual bool OpenRAVE::EnvironmentBase::CheckCollision ( KinBody::LinkConstPtr  plink1,
KinBody::LinkConstPtr  plink2,
CollisionReportPtr  report = CollisionReportPtr() 
)
pure virtual
virtual bool OpenRAVE::EnvironmentBase::CheckCollision ( KinBody::LinkConstPtr  plink,
KinBodyConstPtr  pbody,
CollisionReportPtr  report = CollisionReportPtr() 
)
pure virtual
virtual bool OpenRAVE::EnvironmentBase::CheckCollision ( KinBody::LinkConstPtr  plink,
const std::vector< KinBodyConstPtr > &  vbodyexcluded,
const std::vector< KinBody::LinkConstPtr > &  vlinkexcluded,
CollisionReportPtr  report = CollisionReportPtr() 
)
pure virtual
virtual bool OpenRAVE::EnvironmentBase::CheckCollision ( KinBodyConstPtr  pbody,
const std::vector< KinBodyConstPtr > &  vbodyexcluded,
const std::vector< KinBody::LinkConstPtr > &  vlinkexcluded,
CollisionReportPtr  report = CollisionReportPtr() 
)
pure virtual
virtual bool OpenRAVE::EnvironmentBase::CheckCollision ( const RAY ray,
KinBody::LinkConstPtr  plink,
CollisionReportPtr  report = CollisionReportPtr() 
)
pure virtual
virtual bool OpenRAVE::EnvironmentBase::CheckCollision ( const RAY ray,
KinBodyConstPtr  pbody,
CollisionReportPtr  report = CollisionReportPtr() 
)
pure virtual
virtual bool OpenRAVE::EnvironmentBase::CheckCollision ( const RAY ray,
CollisionReportPtr  report = CollisionReportPtr() 
)
pure virtual
virtual bool OpenRAVE::EnvironmentBase::CheckSelfCollision ( KinBodyConstPtr  pbody,
CollisionReportPtr  report = CollisionReportPtr() 
)
pure virtual
virtual void OpenRAVE::EnvironmentBase::Clone ( EnvironmentBaseConstPtr  preference,
int  cloningoptions 
)
pure virtual

Clones the reference environment into the current environment.

Tries to preserve computation by re-using bodies/interfaces that are already similar between the current and reference environments.

Parameters
[in]cloningoptionsThe parts of the environment to clone. Parts not specified are left as is.
virtual EnvironmentBasePtr OpenRAVE::EnvironmentBase::CloneSelf ( int  options)
pure virtual

Create and return a clone of the current environment.

Clones do not share any memory or resource between each other. or their parent making them ideal for performing separte planning experiments while keeping the parent environment unchanged. By default a clone only copies the collision checkers and physics engine. When bodies are cloned, the unique ids are preserved across environments (each body can be referenced with its id in both environments). The attached and grabbed bodies of each body/robot are also copied to the new environment.

Parameters
optionsA set of CloningOptions describing what is actually cloned.
Returns
An environment of the same type as this environment containing the copied information.
virtual void OpenRAVE::EnvironmentBase::Destroy ( )
pure virtual

Releases all environment resources, should be always called when environment stops being used.

Removing all environment pointer might not be enough to destroy the environment resources.

virtual void OpenRAVE::EnvironmentBase::DisownInterface ( InterfaceBasePtr  pinterface)
pure virtual

Remove ownership of the interface.

virtual OpenRAVE::GraphHandlePtr OpenRAVE::EnvironmentBase::drawarrow ( const RaveVector< float > &  p1,
const RaveVector< float > &  p2,
float  fwidth,
const RaveVector< float > &  color = RaveVector< float >(1, 0.5, 0.5, 1) 
)
pure virtual

Draws an arrow p1 is start, p2 is finish. [multi-thread safe]

Parameters
colorthe rgb color of the point. The last component of the color is used for alpha blending.
Returns
handle to plotted points, graph is removed when handle is destroyed (goes out of scope). This requires the user to always store the handle in a persistent variable if the plotted graphics are to remain on the viewer.
virtual OpenRAVE::GraphHandlePtr OpenRAVE::EnvironmentBase::drawbox ( const RaveVector< float > &  vpos,
const RaveVector< float > &  vextents 
)
pure virtual

Draws a box. [multi-thread safe]

extents are half the width, height, and depth of the box

Returns
handle to plotted points, graph is removed when handle is destroyed (goes out of scope). This requires the user to always store the handle in a persistent variable if the plotted graphics are to remain on the viewer.
virtual OpenRAVE::GraphHandlePtr OpenRAVE::EnvironmentBase::drawlinelist ( const float *  ppoints,
int  numPoints,
int  stride,
float  fwidth,
const RaveVector< float > &  color = RaveVector< float >(1, 0.5, 0.5, 1) 
)
pure virtual

Draws a list of individual lines, each specified by a succeeding pair of points. [multi-thread safe]

Parameters
stridestride in bytes to next point, ie: nextpoint = (float*)((char*)ppoints+stride)
colorthe rgb color of the point. The last component of the color is used for alpha blending.
Returns
handle to plotted points, graph is removed when handle is destroyed (goes out of scope). This requires the user to always store the handle in a persistent variable if the plotted graphics are to remain on the viewer.
virtual OpenRAVE::GraphHandlePtr OpenRAVE::EnvironmentBase::drawlinelist ( const float *  ppoints,
int  numPoints,
int  stride,
float  fwidth,
const float *  colors 
)
pure virtual

Draws a list of individual lines, each specified by a succeeding pair of points. [multi-thread safe]

Parameters
stridestride in bytes to next point, ie: nextpoint = (float*)((char*)ppoints+stride)
Returns
handle to plotted points, graph is removed when handle is destroyed (goes out of scope). This requires the user to always store the handle in a persistent variable if the plotted graphics are to remain on the viewer.
virtual OpenRAVE::GraphHandlePtr OpenRAVE::EnvironmentBase::drawlinestrip ( const float *  ppoints,
int  numPoints,
int  stride,
float  fwidth,
const RaveVector< float > &  color = RaveVector< float >(1, 0.5, 0.5, 1) 
)
pure virtual

Draws a series of connected lines with one color. [multi-thread safe]

Parameters
stridestride in bytes to next point, ie: nextpoint = (float*)((char*)ppoints+stride)
colorthe rgb color of the point. The last component of the color is used for alpha blending
Returns
handle to plotted points, graph is removed when handle is destroyed (goes out of scope). This requires the user to always store the handle in a persistent variable if the plotted graphics are to remain on the viewer.
virtual OpenRAVE::GraphHandlePtr OpenRAVE::EnvironmentBase::drawlinestrip ( const float *  ppoints,
int  numPoints,
int  stride,
float  fwidth,
const float *  colors 
)
pure virtual

Draws a series of connected lines with individual colors. [multi-thread safe]

Parameters
stridestride in bytes to next point, ie: nextpoint = (float*)((char*)ppoints+stride)
Returns
handle to plotted points, graph is removed when handle is destroyed (goes out of scope). This requires the user to always store the handle in a persistent variable if the plotted graphics are to remain on the viewer.
virtual OpenRAVE::GraphHandlePtr OpenRAVE::EnvironmentBase::drawplane ( const RaveTransform< float > &  tplane,
const RaveVector< float > &  vextents,
const boost::multi_array< float, 3 > &  vtexture 
)
pure virtual

Draws a textured plane. [multi-thread safe]

Parameters
tplanedescribes the center of the plane. the zaxis of this coordinate is the normal of the plane
vextentsthe extents of the plane along the x and y directions (z is ignored)
vtexturea 3D array specifying height x width x color (the color dimension can be 1, 3, or 4 (for alpha blending))
Returns
handle to plotted points, graph is removed when handle is destroyed (goes out of scope). This requires the user to always store the handle in a persistent variable if the plotted graphics are to remain on the viewer.
virtual OpenRAVE::GraphHandlePtr OpenRAVE::EnvironmentBase::drawtrimesh ( const float *  ppoints,
int  stride,
const int *  pIndices,
int  numTriangles,
const RaveVector< float > &  color 
)
pure virtual
virtual OpenRAVE::GraphHandlePtr OpenRAVE::EnvironmentBase::drawtrimesh ( const float *  ppoints,
int  stride,
const int *  pIndices,
int  numTriangles,
const boost::multi_array< float, 2 > &  colors 
)
pure virtual

Draws a triangle mesh, each vertices of each triangle should be counter-clockwise. [multi-thread safe]

Parameters
ppoints- array of 3D points
stridestride in bytes to next point, ie: nextpoint = (float*)((char*)ppoints+stride)
pIndicesIf not NULL, zero-based indices into the points for every triangle. pIndices should be of size numTriangles. If pIndices is NULL, ppoints is assumed to contain numTriangles*3 points and triangles will be rendered in list order.
colorThe color of the triangle. The last component of the color is used for alpha blending
Returns
handle to plotted points, graph is removed when handle is destroyed (goes out of scope). This requires the user to always store the handle in a persistent variable if the plotted graphics are to remain on the viewer.
virtual void OpenRAVE::EnvironmentBase::GetBodies ( std::vector< KinBodyPtr > &  bodies,
uint64_t  timeout = 0 
) const
pure virtual

Get all bodies loaded in the environment (including robots). [multi-thread safe]

A separate interface mutex is locked for reading the bodies.

Parameters
[out]bodiesfilled with all the bodies
timeoutmicroseconds to wait before throwing an exception, if 0, will block indefinitely.
Exceptions
openrave_exceptionwith ORE_Timeout error code
virtual KinBodyPtr OpenRAVE::EnvironmentBase::GetBodyFromEnvironmentId ( int  id)
pure virtual

Get the corresponding body from its unique network id.

virtual CollisionCheckerBasePtr OpenRAVE::EnvironmentBase::GetCollisionChecker ( ) const
pure virtual
virtual int OpenRAVE::EnvironmentBase::GetDebugLevel ( ) const
pure virtual
virtual const char* OpenRAVE::EnvironmentBase::GetHash ( ) const
inlineprotectedvirtual

Definition at line 606 of file environment.h.

virtual KinBodyPtr OpenRAVE::EnvironmentBase::GetKinBody ( const std::string &  name) const
pure virtual

Query a body from its name. [multi-thread safe]

Returns
first KinBody (including robots) that matches with name
virtual void OpenRAVE::EnvironmentBase::GetLoadedProblems ( std::list< ModuleBasePtr > &  listModules) const
inlinevirtual
Deprecated:
(12/01/30)

Definition at line 474 of file environment.h.

virtual void OpenRAVE::EnvironmentBase::GetModules ( std::list< ModuleBasePtr > &  listModules,
uint64_t  timeout = 0 
) const
pure virtual

Fills a list with the loaded modules in the environment.

A separate interface mutex is locked for reading the modules. If the environment is locked, the modules are guaranteed to stay loaded in the environment.

Parameters
timeoutmicroseconds to wait before throwing an exception, if 0, will block indefinitely.
Exceptions
openrave_exceptionwith ORE_Timeout error code
virtual EnvironmentMutex& OpenRAVE::EnvironmentBase::GetMutex ( ) const
pure virtual

Return the global environment mutex used to protect environment information access in multi-threaded environments.

Accessing environment body information and adding/removing bodies or changing any type of scene property should have the environment lock acquired. Once the environment is locked, the user is guaranteed that nnothing will change in the environment.

virtual PhysicsEngineBasePtr OpenRAVE::EnvironmentBase::GetPhysicsEngine ( ) const
pure virtual
virtual void OpenRAVE::EnvironmentBase::GetPublishedBodies ( std::vector< KinBody::BodyState > &  vbodies,
uint64_t  timeout = 0 
)
pure virtual

Retrieve published bodies, completes even if environment is locked. [multi-thread safe]

A separate interface mutex is locked for reading the modules. Note that the pbody pointer might become invalid as soon as GetPublishedBodies returns.

Parameters
timeoutmicroseconds to wait before throwing an exception, if 0, will block indefinitely.
Exceptions
openrave_exceptionwith ORE_Timeout error code
virtual void OpenRAVE::EnvironmentBase::GetRegisteredCollisionCallbacks ( std::list< CollisionCallbackFn > &  ) const
pure virtual

return all the collision callbacks, the environment must be locked!

Parameters
listcallbacksfilled with the user callbacks. Once the environment is unlocked, the list becomes invalid.
virtual RobotBasePtr OpenRAVE::EnvironmentBase::GetRobot ( const std::string &  name) const
pure virtual

Query a robot from its name. [multi-thread safe]

Returns
first Robot that matches the name
virtual void OpenRAVE::EnvironmentBase::GetRobots ( std::vector< RobotBasePtr > &  robots,
uint64_t  timeout = 0 
) const
pure virtual

Fill an array with all robots loaded in the environment. [multi-thread safe]

A separate interface mutex is locked for reading the bodies.

Parameters
timeoutmicroseconds to wait before throwing an exception, if 0, will block indefinitely.
Exceptions
openrave_exceptionwith ORE_Timeout error code
virtual SensorBasePtr OpenRAVE::EnvironmentBase::GetSensor ( const std::string &  name) const
pure virtual

Query a sensor from its name. [multi-thread safe]

Returns
first sensor that matches with name, note that sensors attached to robots have the robot name as a prefix.
virtual void OpenRAVE::EnvironmentBase::GetSensors ( std::vector< SensorBasePtr > &  sensors,
uint64_t  timeout = 0 
) const
pure virtual

Fill an array with all sensors loaded in the environment. [multi-thread safe]

The sensors come from the currently loaded robots and the explicitly added sensors

Parameters
timeoutmicroseconds to wait before throwing an exception, if 0, will block indefinitely.
Exceptions
openrave_exceptionwith ORE_Timeout error code
virtual uint64_t OpenRAVE::EnvironmentBase::GetSimulationTime ( )
pure virtual

Return simulation time since the start of the environment (in microseconds). [multi-thread safe]

See Simulation Thread for more about the simulation thread.

virtual UserDataPtr OpenRAVE::EnvironmentBase::GetUserData ( ) const
inlinevirtual

return the user custom data

Definition at line 52 of file environment.h.

virtual ViewerBasePtr OpenRAVE::EnvironmentBase::GetViewer ( const std::string &  name = "") const
pure virtual

Return a viewer with a particular name.

When no name is specified, the first loaded viewer is returned.

virtual void OpenRAVE::EnvironmentBase::GetViewers ( std::list< ViewerBasePtr > &  listViewers) const
pure virtual

Returns a list of loaded viewers with a pointer to a lock preventing the list from being modified.

If the environment is locked, the viewers are guaranteed to stay loaded in the environment.

virtual UserDataPtr OpenRAVE::EnvironmentBase::GlobalState ( )
pure virtual

Returns the OpenRAVE global state, used for initializing plugins.

virtual bool OpenRAVE::EnvironmentBase::HasRegisteredCollisionCallbacks ( ) const
pure virtual
virtual bool OpenRAVE::EnvironmentBase::IsSimulationRunning ( ) const
pure virtual

Return true if inner simulation loop is executing. [multi-thread safe]

See Simulation Thread for more about the simulation thread.

virtual bool OpenRAVE::EnvironmentBase::Load ( const std::string &  filename,
const AttributesList atts = AttributesList() 
)
pure virtual

Loads a scene from a file and adds all objects in the environment. [multi-thread safe]

For collada readers, the options are passed through to

DAE::getIOPlugin()->setOption(key,value).
virtual bool OpenRAVE::EnvironmentBase::LoadData ( const std::string &  data,
const AttributesList atts = AttributesList() 
)
pure virtual

Loads a scene from in-memory data and adds all objects in the environment. [multi-thread safe]

virtual int OpenRAVE::EnvironmentBase::LoadProblem ( ModuleBasePtr  module,
const std::string &  cmdargs 
)
inlinevirtual
Deprecated:
(12/01/30) see EnvironmentBase::AddModule

Definition at line 461 of file environment.h.

virtual bool OpenRAVE::EnvironmentBase::LoadURI ( const std::string &  filename,
const AttributesList atts = AttributesList() 
)
pure virtual

Loads a scene from a URI and adds all objects in the environment. [multi-thread safe]

Currently only collada files are supported. Options are passed through to

DAE::getIOPlugin()->setOption(key,value).
virtual bool OpenRAVE::EnvironmentBase::LoadXMLData ( const std::string &  data,
const AttributesList atts = AttributesList() 
)
inlinevirtual

Definition at line 220 of file environment.h.

virtual void OpenRAVE::EnvironmentBase::OwnInterface ( InterfaceBasePtr  pinterface)
pure virtual

Environment will own the interface until EnvironmentBase::Destroy is called.

virtual OpenRAVE::GraphHandlePtr OpenRAVE::EnvironmentBase::plot3 ( const float *  ppoints,
int  numPoints,
int  stride,
float  fPointSize,
const RaveVector< float > &  color = RaveVector< float >(1, 0.5, 0.5, 1),
int  drawstyle = 0 
)
pure virtual

Plot a point cloud with one color. [multi-thread safe]

Parameters
ppointsarray of points
numPointsnumber of points to plot
stridestride in bytes to next point, ie: nextpoint = (float*)((char*)ppoints+stride)
fPointSizesize of a point in pixels
colorthe rgb color of the point. The last component of the color is used for alpha blending
drawstyleif 0 will draw pixels. if 1, will draw 3D spheres
Returns
handle to plotted points, graph is removed when handle is destroyed (goes out of scope). This requires the user to always store the handle in a persistent variable if the plotted graphics are to remain on the viewer.
virtual OpenRAVE::GraphHandlePtr OpenRAVE::EnvironmentBase::plot3 ( const float *  ppoints,
int  numPoints,
int  stride,
float  fPointSize,
const float *  colors,
int  drawstyle = 0,
bool  bhasalpha = false 
)
pure virtual

. Plots 3D points with individual colors. [multi-thread safe]

Arguments same as plot3 with one color, except has an individual color for every point

Parameters
colorsAn array of rgb colors of size numPoints where each channel is in [0,1]. colors+(bhasalpha?4:3) points to the second color.
stridestride in bytes to next point, ie: nextpoint = (float*)((char*)ppoints+stride)
drawstyleif 0 will draw pixels. if 1, will draw 3D spherse
bhasalphaif true, then each color consists of 4 values with the last value being the alpha of the point (1 means opaque). If false, then colors is 3 values.
Returns
handle to plotted points, graph is removed when handle is destroyed (goes out of scope). This requires the user to always store the handle in a persistent variable if the plotted graphics are to remain on the viewer.
virtual InterfaceBasePtr OpenRAVE::EnvironmentBase::ReadInterfaceData ( InterfaceBasePtr  pinterface,
InterfaceType  type,
const std::string &  data,
const AttributesList atts = AttributesList() 
)
pure virtual

Initializes an interface from in-memory data. [multi-thread safe]

Parameters
pinterfaceIf a null pointer is passed, a new interface will be created, otherwise an existing interface will be filled
datastring containing data
attsThe attribute/value pair specifying loading options. See the individual interface descriptions at Base Interface Concepts.
virtual InterfaceBasePtr OpenRAVE::EnvironmentBase::ReadInterfaceURI ( InterfaceBasePtr  pinterface,
InterfaceType  type,
const std::string &  filename,
const AttributesList atts = AttributesList() 
)
pure virtual

Initializes an interface from a resource file. [multi-thread safe]

Parameters
pinterfaceIf a null pointer is passed, a new interface will be created, otherwise an existing interface will be filled
filenamethe name of the resource file, its extension determines the format of the file. See Resource File Formats.
attsThe attribute/value pair specifying loading options. See the individual interface descriptions at Base Interface Concepts.
virtual InterfaceBasePtr OpenRAVE::EnvironmentBase::ReadInterfaceURI ( const std::string &  filename,
const AttributesList atts = AttributesList() 
)
pure virtual
virtual InterfaceBasePtr OpenRAVE::EnvironmentBase::ReadInterfaceXMLData ( InterfaceBasePtr  pinterface,
InterfaceType  type,
const std::string &  data,
const AttributesList atts = AttributesList() 
)
inlinevirtual

Definition at line 329 of file environment.h.

virtual InterfaceBasePtr OpenRAVE::EnvironmentBase::ReadInterfaceXMLFile ( InterfaceBasePtr  pinterface,
InterfaceType  type,
const std::string &  filename,
const AttributesList atts = AttributesList() 
)
inlinevirtual

Definition at line 313 of file environment.h.

virtual InterfaceBasePtr OpenRAVE::EnvironmentBase::ReadInterfaceXMLFile ( const std::string &  filename,
const AttributesList atts = AttributesList() 
)
inlinevirtual

Definition at line 318 of file environment.h.

virtual KinBodyPtr OpenRAVE::EnvironmentBase::ReadKinBodyData ( KinBodyPtr  body,
const std::string &  data,
const AttributesList atts = AttributesList() 
)
pure virtual

Initializes a kinematic body from in-memory data. [multi-thread safe]

The body should not be added to the environment when calling this function.

Parameters
bodyIf a null pointer is passed, a new body will be created, otherwise an existing robot will be filled
attsThe attribute/value pair specifying loading options. Defined in Kinematics Body Concepts.
virtual KinBodyPtr OpenRAVE::EnvironmentBase::ReadKinBodyURI ( KinBodyPtr  body,
const std::string &  filename,
const AttributesList atts = AttributesList() 
)
pure virtual

Initializes a kinematic body from a resource file. The body is not added to the environment when calling this function. [multi-thread safe]

Parameters
filenamethe name of the resource file, its extension determines the format of the file. See Resource File Formats.
bodyIf a null pointer is passed, a new body will be created, otherwise an existing robot will be filled
attsThe attribute/value pair specifying loading options. Defined in Kinematics Body Concepts.
virtual KinBodyPtr OpenRAVE::EnvironmentBase::ReadKinBodyURI ( const std::string &  filename)
inlinevirtual

Creates a new kinbody from an XML file with no extra load options specified. [multi-thread safe]

Definition at line 288 of file environment.h.

virtual KinBodyPtr OpenRAVE::EnvironmentBase::ReadKinBodyXMLData ( KinBodyPtr  body,
const std::string &  data,
const AttributesList atts = AttributesList() 
)
inlinevirtual

Definition at line 302 of file environment.h.

virtual KinBodyPtr OpenRAVE::EnvironmentBase::ReadKinBodyXMLFile ( KinBodyPtr  body,
const std::string &  filename,
const AttributesList atts = AttributesList() 
)
inlinevirtual

Definition at line 283 of file environment.h.

virtual KinBodyPtr OpenRAVE::EnvironmentBase::ReadKinBodyXMLFile ( const std::string &  filename)
inlinevirtual

Definition at line 291 of file environment.h.

virtual RobotBasePtr OpenRAVE::EnvironmentBase::ReadRobotData ( RobotBasePtr  robot,
const std::string &  data,
const AttributesList atts = AttributesList() 
)
pure virtual

Initialize a robot from in-memory data. [multi-thread safe]

The robot should not be added the environment when calling this function.

Parameters
robotIf a null pointer is passed, a new robot will be created, otherwise an existing robot will be filled
attsThe attribute/value pair specifying loading options. Defined in Robot Concepts.
virtual RobotBasePtr OpenRAVE::EnvironmentBase::ReadRobotURI ( RobotBasePtr  robot,
const std::string &  filename,
const AttributesList atts = AttributesList() 
)
pure virtual

Initializes a robot from a resource file. The robot is not added to the environment when calling this function. [multi-thread safe]

Parameters
robotIf a null pointer is passed, a new robot will be created, otherwise an existing robot will be filled
filenamethe name of the resource file, its extension determines the format of the file. See Resource File Formats.
attsThe attribute/value pair specifying loading options. Defined in Robot Concepts.
virtual RobotBasePtr OpenRAVE::EnvironmentBase::ReadRobotURI ( const std::string &  filename)
inlinevirtual

Creates a new robot from a file with no extra load options specified. [multi-thread safe]

Definition at line 258 of file environment.h.

virtual RobotBasePtr OpenRAVE::EnvironmentBase::ReadRobotXMLData ( RobotBasePtr  robot,
const std::string &  data,
const AttributesList atts = AttributesList() 
)
inlinevirtual

Definition at line 272 of file environment.h.

virtual RobotBasePtr OpenRAVE::EnvironmentBase::ReadRobotXMLFile ( RobotBasePtr  robot,
const std::string &  filename,
const AttributesList atts = AttributesList() 
)
inlinevirtual

Definition at line 253 of file environment.h.

virtual RobotBasePtr OpenRAVE::EnvironmentBase::ReadRobotXMLFile ( const std::string &  filename)
inlinevirtual

Definition at line 261 of file environment.h.

virtual boost::shared_ptr<KinBody::Link::TRIMESH> OpenRAVE::EnvironmentBase::ReadTrimeshFile ( boost::shared_ptr< KinBody::Link::TRIMESH ptrimesh,
const std::string &  filename,
const AttributesList atts = AttributesList() 
)
inlinevirtual

Definition at line 339 of file environment.h.

virtual boost::shared_ptr<KinBody::Link::TRIMESH> OpenRAVE::EnvironmentBase::ReadTrimeshURI ( boost::shared_ptr< KinBody::Link::TRIMESH ptrimesh,
const std::string &  filename,
const AttributesList atts = AttributesList() 
)
pure virtual

reads in the rigid geometry of a resource file into a TRIMESH structure

Parameters
filenamethe name of the resource file, its extension determines the format of the file. Complex meshes and articulated meshes are all triangulated appropriately. See Resource File Formats.
optionsOptions to control the parsing process.
virtual UserDataPtr OpenRAVE::EnvironmentBase::RegisterCollisionCallback ( const CollisionCallbackFn callback)
pure virtual

Register a collision callback.

Whenever a collision is detected between between bodies during a CheckCollision call or physics simulation, the callback is called. The callback should return an action specifying how the collision should be handled: action = callback(CollisionReport,bool IsCalledFromPhysicsEngine)

Returns
a handle to the registration, once the handle loses scope, the callback is unregistered
virtual bool OpenRAVE::EnvironmentBase::Remove ( InterfaceBasePtr  obj)
pure virtual

Removes a currently loaded interface from the environment. [multi-thread safe]

The function removes currently loaded bodies, robots, sensors, problems from the actively used interfaces of the environment. This does not destroy the interface, but it does remove all references managed. Some interfaces like problems have destroy methods that are called to signal unloading. Note that the active interfaces are different from the owned interfaces.

Parameters
[in]objinterface to remove
Returns
true if the interface was successfully removed from the environment.
virtual void OpenRAVE::EnvironmentBase::Reset ( )
pure virtual

Resets all objects of the scene (preserves all problems, planners). [multi-thread safe]

Do not call inside a SimulationStep call

virtual void OpenRAVE::EnvironmentBase::Save ( const std::string &  filename,
SelectionOptions  options = SO_Everything,
const AttributesList atts = AttributesList() 
)
pure virtual

Saves a scene depending on the filename extension. Default is in COLLADA format.

Parameters
filenamethe filename to save the results at
optionscontrols what to save
attsattributes that refine further options. For collada parsing, the options are passed through
DAE::getIOPlugin()->setOption(key,value).
Several default options are:
  • 'target' - the target body name of the options, if relevant
  • 'password' - the password/key to encrypt the data with, collada supports this through zae zip archives
Exceptions
openrave_exceptionThrow if failed to save anything
virtual void OpenRAVE::EnvironmentBase::Save ( const std::string &  filename,
SelectionOptions  options,
const std::string &  selectname 
)
inlinevirtual
Deprecated:
(12/08/15)

Definition at line 240 of file environment.h.

virtual bool OpenRAVE::EnvironmentBase::SetCollisionChecker ( CollisionCheckerBasePtr  pchecker)
pure virtual

set the global environment collision checker

virtual void OpenRAVE::EnvironmentBase::SetDebugLevel ( int  level)
pure virtual

sets the debug level

Parameters
level0 for no debug, 1 - to print all debug messeges. Default value for release builds is 0, for debug builds it is 1 declaring variables with stdcall can be a little complex
virtual bool OpenRAVE::EnvironmentBase::SetPhysicsEngine ( PhysicsEngineBasePtr  physics)
pure virtual

set the physics engine, disabled by default

Parameters
physicsthe engine to set, if NULL, environment sets an dummy physics engine
virtual void OpenRAVE::EnvironmentBase::SetUserData ( UserDataPtr  data)
inlinevirtual

set user data

Definition at line 48 of file environment.h.

virtual void OpenRAVE::EnvironmentBase::StartSimulation ( dReal  fDeltaTime,
bool  bRealTime = true 
)
pure virtual

Start the internal simulation thread. [multi-thread safe]

Resets simulation time to 0. See Simulation Thread for more about the simulation thread.

Parameters
fDeltaTimethe delta step to take in simulation
bRealTimeif false will call SimulateStep as fast as possible, otherwise will time the simulate step calls so that simulation progresses with real system time.
virtual void OpenRAVE::EnvironmentBase::StepSimulation ( dReal  timeStep)
pure virtual

Makes one simulation time step. [multi-thread safe]

Can be called manually by the user inside planners. Keep in mind that the internal simulation thread also calls this function periodically. See Simulation Thread for more about the simulation thread.

virtual void OpenRAVE::EnvironmentBase::StopSimulation ( )
pure virtual

Stops the internal physics loop, stops calling SimulateStep for all modules. [multi-thread safe]

See Simulation Thread for more about the simulation thread.

virtual void OpenRAVE::EnvironmentBase::Triangulate ( KinBody::Link::TRIMESH trimesh,
KinBodyConstPtr  pbody 
)
pure virtual

Triangulation of the body including its current transformation. trimesh will be appended the new data. [multi-thread safe]

Parameters
[out]trimesh- The output triangle mesh
[in]bodybody the triangulate
Exceptions
openrave_exceptionThrow if failed to add anything
virtual void OpenRAVE::EnvironmentBase::TriangulateScene ( KinBody::Link::TRIMESH trimesh,
SelectionOptions  options,
const std::string &  selectname 
)
pure virtual

General triangulation of the whole scene. [multi-thread safe]

Parameters
[out]trimesh- The output triangle mesh. The new triangles are appended to the existing triangles!
[in]options- Controlls what to triangulate.
[in]selectname- name of the body used in options
Exceptions
openrave_exceptionThrow if failed to add anything
virtual void OpenRAVE::EnvironmentBase::UpdatePublishedBodies ( uint64_t  timeout = 0)
pure virtual

Updates the published bodies that viewers and other programs listening in on the environment see.

For example, calling this function inside a planning loop allows the viewer to update the environment reflecting the status of the planner. Assumes that the physics are locked.

Parameters
timeoutmicroseconds to wait before throwing an exception, if 0, will block indefinitely.
Exceptions
openrave_exceptionwith ORE_Timeout error code

The documentation for this class was generated from the following files: