A manifold to allow the composition of control manifolds. More...
#include <ControlManifold.h>
Public Types | |
typedef CompoundControl | ControlType |
Define the type of control allocated by this manifold. | |
Public Member Functions | |
CompoundControlManifold (const base::StateManifoldPtr &stateManifold) | |
Constructor. The corresponding state manifold needs to be specified. | |
template<class T > | |
T * | as (const unsigned int index) const |
Cast a component of this instance to a desired type. | |
virtual void | addSubManifold (const ControlManifoldPtr &component) |
Adds a control manifold as a component of the compound manifold. | |
unsigned int | getSubManifoldCount (void) const |
Get the number of manifolds that make up the compound manifold. | |
const ControlManifoldPtr & | getSubManifold (const unsigned int index) const |
Get a specific manifold from the compound manifold. | |
const ControlManifoldPtr & | getSubManifold (const std::string &name) const |
Get a specific manifold from the compound manifold. | |
virtual unsigned int | getDimension (void) const |
Get the dimension of this manifold. | |
virtual Control * | allocControl (void) const |
Allocate memory for a control. | |
virtual void | freeControl (Control *control) const |
Free the memory of a control. | |
virtual void | copyControl (Control *destination, const Control *source) const |
Copy a control to another. | |
virtual bool | equalControls (const Control *control1, const Control *control2) const |
Check if two controls are the same. | |
virtual void | nullControl (Control *control) const |
Make the control have no effect if it were to be applied to a state for any amount of time. | |
virtual ControlSamplerPtr | allocControlSampler (void) const |
Allocate a control sampler. | |
virtual void | propagate (const base::State *state, const Control *control, const double duration, base::State *result) const |
Propagate from a state, given a control, for some specified amount of time (the amount of time can also be negative, if canPropagateBackward() returns true) | |
virtual bool | canPropagateBackward (void) const |
Some systems can only propagate forward in time (i.e., the duration argument for the propagate() function is always positive). If this is the case, this function should return false. Planners that need backward propagation (negative durations) will call this function to check. If backward propagation is possible, this function should return true (this is the default). | |
virtual double * | getValueAddressAtIndex (Control *control, const unsigned int index) const |
Many controls contain a number of double values. This function provides a means to get the memory address of a double value from a control control located at position index. The first double value is returned for index = 0. If index is too large (does not point to any double values in the control), the return value is NULL. | |
virtual void | printControl (const Control *control, std::ostream &out=std::cout) const |
Print a control to a stream. | |
virtual void | printSettings (std::ostream &out) const |
Print the settings for this manifold to a stream. | |
virtual void | setup (void) |
Perform final setup steps. This function is automatically called by the SpaceInformation. | |
void | lock (void) |
Lock this manifold. This means no further manifolds can be added as components. This function can be for instance called from the constructor of a manifold that inherits from CompoundControlManifold to prevent the user to add further components. | |
Protected Attributes | |
std::vector< ControlManifoldPtr > | components_ |
The component manifolds that make up the compound control space. | |
unsigned int | componentCount_ |
The number of contained components. | |
bool | locked_ |
Flag indicating whether adding further components is allowed or not. |
A manifold to allow the composition of control manifolds.
Definition at line 185 of file ControlManifold.h.
T* ompl::control::CompoundControlManifold::as | ( | const unsigned int | index | ) | const [inline] |
Cast a component of this instance to a desired type.
Make sure the type we are casting to is indeed a control manifold
Definition at line 203 of file ControlManifold.h.
void ompl::control::CompoundControlManifold::propagate | ( | const base::State * | state, |
const Control * | control, | ||
const double | duration, | ||
base::State * | result | ||
) | const [virtual] |
Propagate from a state, given a control, for some specified amount of time (the amount of time can also be negative, if canPropagateBackward() returns true)
state | the state to start propagating from |
control | the control to apply |
duration | the duration for which the control is applied |
result | the state the system is brought to |
Reimplemented from ompl::control::ControlManifold.
Definition at line 185 of file ControlManifold.cpp.