Maintains a world state, which serves as the gateway to all functions offered through OpenRAVE. See Environment Concepts. More...
#include <environment.h>
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 EnvironmentMutex & | GetMutex () 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 (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 (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 |
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 < TriMesh > | ReadTrimeshURI (boost::shared_ptr< 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 < TriMesh > | ReadTrimeshFile (boost::shared_ptr< 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] | |
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.
typedef boost::function<CollisionAction(CollisionReportPtr,bool)> OpenRAVE::EnvironmentBase::CollisionCallbackFn |
Definition at line 124 of file environment.h.
Definition at line 490 of file environment.h.
Definition at line 197 of file environment.h.
A set of options used to select particular parts of the scene.
Definition at line 184 of file environment.h.
OpenRAVE::EnvironmentBase::EnvironmentBase | ( | ) |
Definition at line 1833 of file libopenrave.cpp.
|
virtual |
Definition at line 1842 of file libopenrave.cpp.
|
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.
[in] | pinterface | the pointer to an initialized interface |
[in] | bAnonymous | if true and there exists a body/robot with the same name, will make body's name unique |
[in] | cmdargs | The command-line arguments for the module. |
openrave_exception | Throw if interface is invalid or already added |
|
inlinevirtual |
Definition at line 361 of file environment.h.
|
pure virtual |
Load a new module, need to Lock if calling outside simulation thread.
|
inlinevirtual |
Definition at line 366 of file environment.h.
|
inlinevirtual |
Definition at line 372 of file environment.h.
|
inlinevirtual |
Definition at line 493 of file environment.h.
|
inlinevirtual |
Definition at line 498 of file environment.h.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
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.
[in] | cloningoptions | The parts of the environment to clone. Parts not specified are left as is. |
|
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.
options | A set of CloningOptions describing what is actually cloned. |
|
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.
|
pure virtual |
Remove ownership of the interface.
|
pure virtual |
Draws an arrow p1 is start, p2 is finish. [multi-thread safe]
color | the rgb color of the point. The last component of the color is used for alpha blending. |
|
pure virtual |
Draws a box. [multi-thread safe]
extents are half the width, height, and depth of the box
|
pure virtual |
Draws a list of individual lines, each specified by a succeeding pair of points. [multi-thread safe]
stride | stride in bytes to next point, ie: nextpoint = (float*)((char*)ppoints+stride) |
color | the rgb color of the point. The last component of the color is used for alpha blending. |
|
pure virtual |
Draws a list of individual lines, each specified by a succeeding pair of points. [multi-thread safe]
stride | stride in bytes to next point, ie: nextpoint = (float*)((char*)ppoints+stride) |
|
pure virtual |
Draws a series of connected lines with one color. [multi-thread safe]
stride | stride in bytes to next point, ie: nextpoint = (float*)((char*)ppoints+stride) |
color | the rgb color of the point. The last component of the color is used for alpha blending |
|
pure virtual |
Draws a series of connected lines with individual colors. [multi-thread safe]
stride | stride in bytes to next point, ie: nextpoint = (float*)((char*)ppoints+stride) |
|
pure virtual |
Draws a textured plane. [multi-thread safe]
tplane | describes the center of the plane. the zaxis of this coordinate is the normal of the plane |
vextents | the extents of the plane along the x and y directions (z is ignored) |
vtexture | a 3D array specifying height x width x color (the color dimension can be 1, 3, or 4 (for alpha blending)) |
|
pure virtual |
|
pure virtual |
Draws a triangle mesh, each vertices of each triangle should be counter-clockwise. [multi-thread safe]
ppoints | - array of 3D points |
stride | stride in bytes to next point, ie: nextpoint = (float*)((char*)ppoints+stride) |
pIndices | If 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. |
color | The color of the triangle. The last component of the color is used for alpha blending |
|
pure virtual |
Get all bodies loaded in the environment (including robots). [multi-thread safe]
A separate interface mutex is locked for reading the bodies.
[out] | bodies | filled with all the bodies |
timeout | microseconds to wait before throwing an exception, if 0, will block indefinitely. |
openrave_exception | with ORE_Timeout error code |
|
pure virtual |
Get the corresponding body from its unique network id.
|
pure virtual |
|
pure virtual |
|
inlineprotectedvirtual |
Definition at line 606 of file environment.h.
|
pure virtual |
Query a body from its name. [multi-thread safe]
|
inlinevirtual |
Definition at line 474 of file environment.h.
|
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.
timeout | microseconds to wait before throwing an exception, if 0, will block indefinitely. |
openrave_exception | with ORE_Timeout error code |
|
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.
|
pure virtual |
|
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.
timeout | microseconds to wait before throwing an exception, if 0, will block indefinitely. |
openrave_exception | with ORE_Timeout error code |
|
pure virtual |
return all the collision callbacks, the environment must be locked!
listcallbacks | filled with the user callbacks. Once the environment is unlocked, the list becomes invalid. |
|
pure virtual |
Query a robot from its name. [multi-thread safe]
|
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.
timeout | microseconds to wait before throwing an exception, if 0, will block indefinitely. |
openrave_exception | with ORE_Timeout error code |
|
pure virtual |
Query a sensor from its name. [multi-thread safe]
|
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
timeout | microseconds to wait before throwing an exception, if 0, will block indefinitely. |
openrave_exception | with ORE_Timeout error code |
|
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.
|
inlinevirtual |
return the user custom data
Definition at line 52 of file environment.h.
|
pure virtual |
Return a viewer with a particular name.
When no name is specified, the first loaded viewer is returned.
|
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.
|
pure virtual |
Returns the OpenRAVE global state, used for initializing plugins.
|
pure virtual |
|
pure virtual |
Return true if inner simulation loop is executing. [multi-thread safe]
See Simulation Thread for more about the simulation thread.
|
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
|
pure virtual |
Loads a scene from in-memory data and adds all objects in the environment. [multi-thread safe]
|
inlinevirtual |
Definition at line 461 of file environment.h.
|
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
|
inlinevirtual |
Definition at line 220 of file environment.h.
|
pure virtual |
Environment will own the interface until EnvironmentBase::Destroy is called.
|
pure virtual |
Plot a point cloud with one color. [multi-thread safe]
ppoints | array of points |
numPoints | number of points to plot |
stride | stride in bytes to next point, ie: nextpoint = (float*)((char*)ppoints+stride) |
fPointSize | size of a point in pixels |
color | the rgb color of the point. The last component of the color is used for alpha blending |
drawstyle | if 0 will draw pixels. if 1, will draw 3D spheres |
|
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
colors | An array of rgb colors of size numPoints where each channel is in [0,1]. colors+(bhasalpha?4:3) points to the second color. |
stride | stride in bytes to next point, ie: nextpoint = (float*)((char*)ppoints+stride) |
drawstyle | if 0 will draw pixels. if 1, will draw 3D spherse |
bhasalpha | if 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. |
|
pure virtual |
Initializes an interface from in-memory data. [multi-thread safe]
pinterface | If a null pointer is passed, a new interface will be created, otherwise an existing interface will be filled |
data | string containing data |
atts | The attribute/value pair specifying loading options. See the individual interface descriptions at Base Interface Concepts. |
|
pure virtual |
Initializes an interface from a resource file. [multi-thread safe]
pinterface | If a null pointer is passed, a new interface will be created, otherwise an existing interface will be filled |
filename | the name of the resource file, its extension determines the format of the file. See Resource File Formats. |
atts | The attribute/value pair specifying loading options. See the individual interface descriptions at Base Interface Concepts. |
|
pure virtual |
|
inlinevirtual |
Definition at line 329 of file environment.h.
|
inlinevirtual |
Definition at line 313 of file environment.h.
|
inlinevirtual |
Definition at line 318 of file environment.h.
|
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.
body | If a null pointer is passed, a new body will be created, otherwise an existing robot will be filled |
atts | The attribute/value pair specifying loading options. Defined in Kinematics Body Concepts. |
|
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]
filename | the name of the resource file, its extension determines the format of the file. See Resource File Formats. |
body | If a null pointer is passed, a new body will be created, otherwise an existing robot will be filled |
atts | The attribute/value pair specifying loading options. Defined in Kinematics Body Concepts. |
|
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.
|
inlinevirtual |
Definition at line 302 of file environment.h.
|
inlinevirtual |
Definition at line 283 of file environment.h.
|
inlinevirtual |
Definition at line 291 of file environment.h.
|
pure virtual |
Initialize a robot from in-memory data. [multi-thread safe]
The robot should not be added the environment when calling this function.
robot | If a null pointer is passed, a new robot will be created, otherwise an existing robot will be filled |
atts | The attribute/value pair specifying loading options. Defined in Robot Concepts. |
|
pure virtual |
Initializes a robot from a resource file. The robot is not added to the environment when calling this function. [multi-thread safe]
robot | If a null pointer is passed, a new robot will be created, otherwise an existing robot will be filled |
filename | the name of the resource file, its extension determines the format of the file. See Resource File Formats. |
atts | The attribute/value pair specifying loading options. Defined in Robot Concepts. |
|
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.
|
inlinevirtual |
Definition at line 272 of file environment.h.
|
inlinevirtual |
Definition at line 253 of file environment.h.
|
inlinevirtual |
Definition at line 261 of file environment.h.
|
inlinevirtual |
Definition at line 339 of file environment.h.
|
pure virtual |
reads in the rigid geometry of a resource file into a TriMesh structure
filename | the 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. |
options | Options to control the parsing process. |
|
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)
|
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.
[in] | obj | interface to remove |
|
pure virtual |
Resets all objects of the scene (preserves all problems, planners). [multi-thread safe]
Do not call inside a SimulationStep call
|
pure virtual |
Saves a scene depending on the filename extension. Default is in COLLADA format.
filename | the filename to save the results at |
options | controls what to save |
atts | attributes that refine further options. For collada parsing, the options are passed through DAE::getIOPlugin()->setOption(key,value).
|
openrave_exception | Throw if failed to save anything |
|
inlinevirtual |
Definition at line 240 of file environment.h.
|
pure virtual |
set the global environment collision checker
|
pure virtual |
sets the debug level
level | 0 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 |
|
pure virtual |
set the physics engine, disabled by default
physics | the engine to set, if NULL, environment sets an dummy physics engine |
|
inlinevirtual |
set user data
Definition at line 48 of file environment.h.
|
pure virtual |
Start the internal simulation thread. [multi-thread safe]
Resets simulation time to 0. See Simulation Thread for more about the simulation thread.
fDeltaTime | the delta step to take in simulation |
bRealTime | if false will call SimulateStep as fast as possible, otherwise will time the simulate step calls so that simulation progresses with real system time. |
|
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.
|
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.
|
pure virtual |
Triangulation of the body including its current transformation. trimesh will be appended the new data. [multi-thread safe]
[out] | trimesh | - The output triangle mesh |
[in] | body | body the triangulate |
openrave_exception | Throw if failed to add anything |
|
pure virtual |
General triangulation of the whole scene. [multi-thread safe]
[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 |
openrave_exception | Throw if failed to add anything |
|
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.
timeout | microseconds to wait before throwing an exception, if 0, will block indefinitely. |
openrave_exception | with ORE_Timeout error code |