Loading...
Searching...
No Matches
ompl::control::OpenDEEnvironment Class Referenceabstract

This class contains the OpenDE constructs OMPL needs to know about when planning. More...

#include <ompl/extensions/ode/OpenDEEnvironment.h>

Public Member Functions

virtual unsigned int getControlDimension () const =0
 Number of parameters (double values) needed to specify a control input.
 
virtual void getControlBounds (std::vector< double > &lower, std::vector< double > &upper) const =0
 Get the control bounds – the bounding box in which to sample controls.
 
virtual void applyControl (const double *control) const =0
 Application of a control. This function sets the forces/torques/velocities for bodies in the simulation based on control inputs.
 
virtual bool isValidCollision (dGeomID geom1, dGeomID geom2, const dContact &contact) const
 Decide whether a collision is a valid one or not. In some cases, collisions between some bodies can be allowed. By default, this function always returns false, making all collisions invalid.
 
virtual unsigned int getMaxContacts (dGeomID geom1, dGeomID geom2) const
 Get the maximum number of contacts to set up between two colliding geoms. By default, this just returns the member variable maxContacts.
 
virtual void setupContact (dGeomID geom1, dGeomID geom2, dContact &contact) const
 Parameters to set when contacts are created between geom1 and geom2.
 
std::string getGeomName (dGeomID geom) const
 Get the name of a body.
 
void setGeomName (dGeomID geom, const std::string &name)
 Set the name of a body.
 

Public Attributes

dWorldID world_ {nullptr}
 The OpenDE world where the simulation is performed.
 
std::vector< dSpaceID > collisionSpaces_
 The set of spaces where contacts need to be evaluated before simulation takes place.
 
std::vector< dBodyID > stateBodies_
 The set of bodies that need to be considered part of the state when planning. This is not necessarily all the bodies in the environment.
 
std::map< dGeomID, std::string > geomNames_
 Optional map of names given to geoms. This is useful when collision checking is verbose.
 
bool verboseContacts_ {false}
 Issue debug messages when contacts are found. Default is false. This should only be used for debugging.
 
dJointGroupID contactGroup_
 The group of joints where contacts are created.
 
unsigned int maxContacts_ {3}
 The maximum number of contacts to create between two bodies when a collision occurs.
 
double stepSize_ {0.05}
 The simulation step size.
 
unsigned int maxControlSteps_ {100}
 The maximum number of times a control is applies in sequence.
 
unsigned int minControlSteps_ {5}
 The minimum number of times a control is applies in sequence.
 
std::mutex mutex_
 Lock to use when performing simulations in the world. (OpenDE simulations are NOT thread safe)
 

Detailed Description

This class contains the OpenDE constructs OMPL needs to know about when planning.

Definition at line 66 of file OpenDEEnvironment.h.

Constructor & Destructor Documentation

◆ OpenDEEnvironment()

ompl::control::OpenDEEnvironment::OpenDEEnvironment ( )
inline

Definition at line 105 of file OpenDEEnvironment.h.

◆ ~OpenDEEnvironment()

virtual ompl::control::OpenDEEnvironment::~OpenDEEnvironment ( )
inlinevirtual

Definition at line 110 of file OpenDEEnvironment.h.

Member Function Documentation

◆ getGeomName()

std::string ompl::control::OpenDEEnvironment::getGeomName ( dGeomID geom) const

Get the name of a body.

Definition at line 60 of file OpenDEEnvironment.cpp.

◆ getMaxContacts()

unsigned int ompl::control::OpenDEEnvironment::getMaxContacts ( dGeomID geom1,
dGeomID geom2 ) const
virtual

Get the maximum number of contacts to set up between two colliding geoms. By default, this just returns the member variable maxContacts.

Definition at line 39 of file OpenDEEnvironment.cpp.

◆ isValidCollision()

bool ompl::control::OpenDEEnvironment::isValidCollision ( dGeomID geom1,
dGeomID geom2,
const dContact & contact ) const
virtual

Decide whether a collision is a valid one or not. In some cases, collisions between some bodies can be allowed. By default, this function always returns false, making all collisions invalid.

Definition at line 44 of file OpenDEEnvironment.cpp.

◆ setGeomName()

void ompl::control::OpenDEEnvironment::setGeomName ( dGeomID geom,
const std::string & name )

Set the name of a body.

Definition at line 68 of file OpenDEEnvironment.cpp.

◆ setupContact()

void ompl::control::OpenDEEnvironment::setupContact ( dGeomID geom1,
dGeomID geom2,
dContact & contact ) const
virtual

Parameters to set when contacts are created between geom1 and geom2.

Definition at line 50 of file OpenDEEnvironment.cpp.

Member Data Documentation

◆ collisionSpaces_

std::vector<dSpaceID> ompl::control::OpenDEEnvironment::collisionSpaces_

The set of spaces where contacts need to be evaluated before simulation takes place.

Definition at line 73 of file OpenDEEnvironment.h.

◆ contactGroup_

dJointGroupID ompl::control::OpenDEEnvironment::contactGroup_

The group of joints where contacts are created.

Definition at line 88 of file OpenDEEnvironment.h.

◆ geomNames_

std::map<dGeomID, std::string> ompl::control::OpenDEEnvironment::geomNames_

Optional map of names given to geoms. This is useful when collision checking is verbose.

Definition at line 81 of file OpenDEEnvironment.h.

◆ maxContacts_

unsigned int ompl::control::OpenDEEnvironment::maxContacts_ {3}

The maximum number of contacts to create between two bodies when a collision occurs.

Definition at line 91 of file OpenDEEnvironment.h.

◆ maxControlSteps_

unsigned int ompl::control::OpenDEEnvironment::maxControlSteps_ {100}

The maximum number of times a control is applies in sequence.

Definition at line 97 of file OpenDEEnvironment.h.

◆ minControlSteps_

unsigned int ompl::control::OpenDEEnvironment::minControlSteps_ {5}

The minimum number of times a control is applies in sequence.

Definition at line 100 of file OpenDEEnvironment.h.

◆ mutex_

std::mutex ompl::control::OpenDEEnvironment::mutex_
mutable

Lock to use when performing simulations in the world. (OpenDE simulations are NOT thread safe)

Definition at line 103 of file OpenDEEnvironment.h.

◆ stateBodies_

std::vector<dBodyID> ompl::control::OpenDEEnvironment::stateBodies_

The set of bodies that need to be considered part of the state when planning. This is not necessarily all the bodies in the environment.

Definition at line 78 of file OpenDEEnvironment.h.

◆ stepSize_

double ompl::control::OpenDEEnvironment::stepSize_ {0.05}

The simulation step size.

Definition at line 94 of file OpenDEEnvironment.h.

◆ verboseContacts_

bool ompl::control::OpenDEEnvironment::verboseContacts_ {false}

Issue debug messages when contacts are found. Default is false. This should only be used for debugging.

Definition at line 85 of file OpenDEEnvironment.h.

◆ world_

dWorldID ompl::control::OpenDEEnvironment::world_ {nullptr}

The OpenDE world where the simulation is performed.

Definition at line 70 of file OpenDEEnvironment.h.


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