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

A control space to allow the composition of control spaces. More...

#include <ControlSpace.h>

Inheritance diagram for ompl::control::CompoundControlSpace:

List of all members.

Public Types

typedef CompoundControl ControlType
 Define the type of control allocated by this control space.

Public Member Functions

 CompoundControlSpace (const base::StateSpacePtr &stateSpace)
 Constructor. The corresponding state space 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 addSubSpace (const ControlSpacePtr &component)
 Adds a control space as a component of the compound control space.
unsigned int getSubSpaceCount (void) const
 Get the number of control spaces that make up the compound control space.
const ControlSpacePtrgetSubSpace (const unsigned int index) const
 Get a specific subspace from the compound control space.
const ControlSpacePtrgetSubSpace (const std::string &name) const
 Get a specific subspace from the compound control space.
virtual unsigned int getDimension (void) const
 Get the dimension of this control space.
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 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 control space to a stream.
virtual void setup (void)
 Perform final setup steps. This function is automatically called by the SpaceInformation.
void lock (void)
 Lock this control space. This means no further control spaces can be added as components. This function can be for instance called from the constructor of a state space that inherits from CompoundControlSpace to prevent the user to add further components.

Protected Attributes

std::vector< ControlSpacePtrcomponents_
 The component control spaces 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 control space to allow the composition of control spaces.

Definition at line 152 of file ControlSpace.h.


Member Function Documentation

template<class T >
T* ompl::control::CompoundControlSpace::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 space

Definition at line 170 of file ControlSpace.h.


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