State manifold representing ODE states. More...
#include <ODEStateManifold.h>
Classes | |
class | StateType |
ODE State. This is a compound state that allows accessing the properties of the bodies the manifold is constructed for. More... | |
Public Types | |
enum | { STATE_COLLISION_KNOWN_BIT = 0, STATE_COLLISION_VALUE_BIT = 1, STATE_VALIDITY_KNOWN_BIT = 2, STATE_VALIDITY_VALUE_BIT = 3 } |
Public Member Functions | |
ODEStateManifold (const ODEEnvironmentPtr &env, double positionWeight=1.0, double linVelWeight=0.5, double angVelWeight=0.5, double orientationWeight=1.0) | |
Construct a manifold representing ODE states. | |
const ODEEnvironmentPtr & | getEnvironment (void) const |
Get the ODE environment this manifold corresponds to. | |
unsigned int | getNrBodies (void) const |
Get the number of bodies state is maintained for. | |
void | setDefaultBounds (void) |
By default, the volume bounds enclosing the geometry of the environment are computed to include all objects in the spaces collision checking is performed (env.collisionSpaces_). The linear and angular velocity bounds are set as -1 to 1 for each dimension. | |
void | setVolumeBounds (const base::RealVectorBounds &bounds) |
Set the bounds for each of the position submanifolds. | |
void | setLinearVelocityBounds (const base::RealVectorBounds &bounds) |
Set the bounds for each of the linear velocity submanifolds. | |
void | setAngularVelocityBounds (const base::RealVectorBounds &bounds) |
Set the bounds for each of the angular velocity submanifolds. | |
virtual void | readState (base::State *state) const |
Read the parameters of the ODE bodies and store them in state. | |
virtual void | writeState (const base::State *state) const |
Set the parameters of the ODE bodies to be the ones read from state. The code will technically work if this function is called from multiple threads simultaneously, but the results are unpredictable. | |
bool | satisfiesBoundsExceptRotation (const StateType *state) const |
This is a convenience function provided for optimization purposes. It checks whether a state satisfies its bounds. Typically, in the process of simulation the rotations remain valid (very slightly out of bounds), so there is no point in updating or checking them. This function checks all other bounds (position, linear and agular velocities) | |
virtual base::State * | allocState (void) const |
Allocate a state that can store a point in the described space. | |
virtual void | freeState (base::State *state) const |
Free the memory of the allocated state. | |
virtual void | copyState (base::State *destination, const base::State *source) const |
Copy a state to another. The memory of source and destination should NOT overlap. | |
virtual bool | evaluateCollision (const base::State *source) const |
Fill the ODEStateManifold::STATE_COLLISION_VALUE_BIT of StateType::collision member of a state, if unspecified. Return the value value of that bit. | |
Protected Attributes | |
ODEEnvironmentPtr | env_ |
Representation of the ODE parameters OMPL needs to plan. |
State manifold representing ODE states.
Definition at line 51 of file ODEStateManifold.h.
anonymous enum |
STATE_COLLISION_KNOWN_BIT |
Index of bit in StateType::collision indicating whether it is known if a state is in collision or not. Initially this is 0. The value of this bit is updated by ODEStateManifold::evaluateCollision() and ODEControlManifold::propagate(). |
STATE_COLLISION_VALUE_BIT |
Index of bit in StateType::collision indicating whether a state is in collision or not. Initially the value of this field is unspecified. The value gains meaning (1 or 0) when ODEStateManifold::STATE_COLLISION_KNOWN_BIT becomes 1. The value of this bit is updated by ODEStateManifold::evaluateCollision() and ODEControlManifold::propagate(). A value of 1 implies that there is no collision for which ODEEnvironment::isValidCollision() returns false. |
STATE_VALIDITY_KNOWN_BIT |
Index of bit in StateType::collision indicating whether it is known if a state is in valid or not. Initially this is 0. The value of this bit is updated by ODEStateValidityChecker::isValid(). This bit is only used if the ODEStateValidityChecker is used. |
STATE_VALIDITY_VALUE_BIT |
Index of bit in StateType::collision indicating whether a state is valid or not. Initially the value of this field is unspecified. The value gains meaning (1 or 0) when ODEStateManifold::STATE_VALIDITY_KNOWN_BIT becomes 1. The value of this bit is updated by ODEEnvironment::isValid(). A value of 1 implies that a state is valid. This bit is only used if the ODEStateValidityChecker is used. |
Definition at line 55 of file ODEStateManifold.h.
ompl::control::ODEStateManifold::ODEStateManifold | ( | const ODEEnvironmentPtr & | env, |
double | positionWeight = 1.0 , |
||
double | linVelWeight = 0.5 , |
||
double | angVelWeight = 0.5 , |
||
double | orientationWeight = 1.0 |
||
) |
Construct a manifold representing ODE states.
This will be a compound manifold with 4 components for each body in env.stateBodies_. The 4 submanifolds constructed for each body are: position (R3), linear velocity (R3), angular velocity (R3) and orientation (SO(3)). Default bounds are set by calling setDefaultBounds().
env | the environment to construct the manifold for |
positionWeight | the weight to pass to CompoundManifold::addSubManifold() for position submanifolds |
linVelWeight | the weight to pass to CompoundManifold::addSubManifold() for linear velocity submanifolds |
angVelWeight | the weight to pass to CompoundManifold::addSubManifold() for angular velocity submanifolds |
orientationWeight | the weight to pass to CompoundManifold::addSubManifold() for orientation submanifolds |
Definition at line 7 of file ODEStateManifold.cpp.