A control space representing the space of applicable controls. More...
#include <ControlSpace.h>
Public Member Functions | |
virtual Control * | allocControl (void) const =0 |
Allocate memory for a control. | |
virtual ControlSamplerPtr | allocControlSampler (void) const =0 |
Allocate a control sampler. | |
template<class T > | |
const T * | as (void) const |
Cast this instance to a desired type. | |
template<class T > | |
T * | as (void) |
Cast this instance to a desired type. | |
ControlSpace (const base::StateSpacePtr &stateSpace) | |
Construct a control space, given the state space. | |
virtual void | copyControl (Control *destination, const Control *source) const =0 |
Copy a control to another. | |
virtual bool | equalControls (const Control *control1, const Control *control2) const =0 |
Check if two controls are the same. | |
virtual void | freeControl (Control *control) const =0 |
Free the memory of a control. | |
virtual unsigned int | getDimension (void) const =0 |
Get the dimension of this control space. | |
const std::string & | getName (void) const |
Get the name of the control space. | |
const base::StateSpacePtr & | getStateSpace (void) const |
Return the state space this control space depends on. | |
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 | nullControl (Control *control) const =0 |
Make the control have no effect if it were to be applied to a state for any amount of time. | |
virtual void | printControl (const Control *control, std::ostream &out) const |
Print a control to a stream. | |
virtual void | printSettings (std::ostream &out) const |
Print the settings for this control space to a stream. | |
void | setName (const std::string &name) |
Set the name of the control space. | |
virtual void | setup (void) |
Perform final setup steps. This function is automatically called by the SpaceInformation. | |
virtual | ~ControlSpace (void) |
Protected Attributes | |
base::StateSpacePtr | stateSpace_ |
The state space controls can be applied to. | |
Private Attributes | |
std::string | name_ |
The name of this control space. |
A control space representing the space of applicable controls.
Definition at line 52 of file ControlSpace.h.
ompl::control::ControlSpace::ControlSpace | ( | const base::StateSpacePtr & | stateSpace | ) |
Construct a control space, given the state space.
virtual ompl::control::ControlSpace::~ControlSpace | ( | void | ) | [virtual] |
virtual Control* ompl::control::ControlSpace::allocControl | ( | void | ) | const [pure virtual] |
Allocate memory for a control.
Implemented in ompl::control::CompoundControlSpace, and ompl::control::RealVectorControlSpace.
virtual ControlSamplerPtr ompl::control::ControlSpace::allocControlSampler | ( | void | ) | const [pure virtual] |
Allocate a control sampler.
Implemented in ompl::control::CompoundControlSpace, and ompl::control::RealVectorControlSpace.
const T* ompl::control::ControlSpace::as | ( | void | ) | const [inline] |
Cast this instance to a desired type.
Make sure the type we are casting to is indeed a control space
Definition at line 73 of file ControlSpace.h.
T* ompl::control::ControlSpace::as | ( | void | ) | [inline] |
Cast this instance to a desired type.
Make sure the type we are casting to is indeed a control space
Definition at line 63 of file ControlSpace.h.
virtual void ompl::control::ControlSpace::copyControl | ( | Control * | destination, | |
const Control * | source | |||
) | const [pure virtual] |
Copy a control to another.
Implemented in ompl::control::CompoundControlSpace, and ompl::control::RealVectorControlSpace.
virtual bool ompl::control::ControlSpace::equalControls | ( | const Control * | control1, | |
const Control * | control2 | |||
) | const [pure virtual] |
Check if two controls are the same.
Implemented in ompl::control::CompoundControlSpace, and ompl::control::RealVectorControlSpace.
virtual void ompl::control::ControlSpace::freeControl | ( | Control * | control | ) | const [pure virtual] |
Free the memory of a control.
Implemented in ompl::control::CompoundControlSpace, and ompl::control::RealVectorControlSpace.
virtual unsigned int ompl::control::ControlSpace::getDimension | ( | void | ) | const [pure virtual] |
Get the dimension of this control space.
Implemented in ompl::control::CompoundControlSpace, and ompl::control::RealVectorControlSpace.
const std::string& ompl::control::ControlSpace::getName | ( | void | ) | const |
Get the name of the control space.
const base::StateSpacePtr& ompl::control::ControlSpace::getStateSpace | ( | void | ) | const [inline] |
Return the state space this control space depends on.
Definition at line 88 of file ControlSpace.h.
virtual double* ompl::control::ControlSpace::getValueAddressAtIndex | ( | Control * | control, | |
const unsigned int | index | |||
) | const [virtual] |
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.
Reimplemented in ompl::control::CompoundControlSpace, and ompl::control::RealVectorControlSpace.
virtual void ompl::control::ControlSpace::nullControl | ( | Control * | control | ) | const [pure virtual] |
Make the control have no effect if it were to be applied to a state for any amount of time.
Implemented in ompl::control::CompoundControlSpace, and ompl::control::RealVectorControlSpace.
virtual void ompl::control::ControlSpace::printControl | ( | const Control * | control, | |
std::ostream & | out | |||
) | const [virtual] |
Print a control to a stream.
Reimplemented in ompl::control::CompoundControlSpace, and ompl::control::RealVectorControlSpace.
virtual void ompl::control::ControlSpace::printSettings | ( | std::ostream & | out | ) | const [virtual] |
Print the settings for this control space to a stream.
Reimplemented in ompl::control::CompoundControlSpace, and ompl::control::RealVectorControlSpace.
void ompl::control::ControlSpace::setName | ( | const std::string & | name | ) |
Set the name of the control space.
virtual void ompl::control::ControlSpace::setup | ( | void | ) | [virtual] |
Perform final setup steps. This function is automatically called by the SpaceInformation.
Reimplemented in ompl::control::CompoundControlSpace, and ompl::control::RealVectorControlSpace.
std::string ompl::control::ControlSpace::name_ [private] |
The name of this control space.
Definition at line 137 of file ControlSpace.h.
The state space controls can be applied to.
Definition at line 132 of file ControlSpace.h.