All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
ompl::control::CompoundControlManifold Class Reference

A manifold to allow the composition of control manifolds. More...

#include <ControlManifold.h>

Inheritance diagram for ompl::control::CompoundControlManifold:

List of all members.

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 ControlManifoldPtrgetSubManifold (const unsigned int index) const
 Get a specific manifold from the compound manifold.
const ControlManifoldPtrgetSubManifold (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 ControlallocControl (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< ControlManifoldPtrcomponents_
 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.

Detailed Description

A manifold to allow the composition of control manifolds.

Definition at line 185 of file ControlManifold.h.


Member Function Documentation

template<class T >
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)

Parameters:
statethe state to start propagating from
controlthe control to apply
durationthe duration for which the control is applied
resultthe state the system is brought to
Note:
This function is not used for integration internally. If integrating a system of differential equations is needed, this should be implemented inside the propagate() function.
The pointer to the starting state and the result state may be the same.

Reimplemented from ompl::control::ControlManifold.

Definition at line 185 of file ControlManifold.cpp.


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