ompl::control::ControlSpace Class Reference

A control space representing the space of applicable controls. More...

#include <ControlSpace.h>

Inheritance diagram for ompl::control::ControlSpace:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ControlallocControl (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.
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).
 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::StateSpacePtrgetStateSpace (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.
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).
void setName (const std::string &name)
 Set the name of the control space.
void setPropagationFunction (const StatePropagationFn &fn)
 Set the function that performs state propagation.
virtual void setup (void)
 Perform final setup steps. This function is automatically called by the SpaceInformation.
virtual ~ControlSpace (void)

Protected Attributes

StatePropagationFn statePropagation_
 Function that can perform state propagation.
base::StateSpacePtr stateSpace_
 The state space controls can be applied to.

Private Attributes

std::string name_
 The name of this control space.

Detailed Description

A control space representing the space of applicable controls.

Definition at line 67 of file ControlSpace.h.


Constructor & Destructor Documentation

ompl::control::ControlSpace::ControlSpace ( const base::StateSpacePtr stateSpace  ) 

Construct a control space, given the state space.

virtual ompl::control::ControlSpace::~ControlSpace ( void   )  [virtual]

Member Function Documentation

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.

template<class T >
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 88 of file ControlSpace.h.

template<class T >
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 78 of file ControlSpace.h.

virtual bool ompl::control::ControlSpace::canPropagateBackward ( void   )  const [virtual]

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).

Reimplemented in ompl::control::CompoundControlSpace, and ompl::control::ODEControlSpace.

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 103 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.

virtual void ompl::control::ControlSpace::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:
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
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 in ompl::control::CompoundControlSpace, and ompl::control::ODEControlSpace.

void ompl::control::ControlSpace::setName ( const std::string &  name  ) 

Set the name of the control space.

void ompl::control::ControlSpace::setPropagationFunction ( const StatePropagationFn fn  ) 

Set the function that performs state propagation.

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.


Member Data Documentation

std::string ompl::control::ControlSpace::name_ [private]

The name of this control space.

Definition at line 181 of file ControlSpace.h.

Function that can perform state propagation.

Definition at line 176 of file ControlSpace.h.

The state space controls can be applied to.

Definition at line 173 of file ControlSpace.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


ompl
Author(s): Ioan Sucan/isucan@rice.edu, Mark Moll/mmoll@rice.edu, Lydia Kavraki/kavraki@rice.edu
autogenerated on Fri Jan 11 09:34:02 2013