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

A space representing discrete controls; i.e. there are a small number of discrete controls the system can react to. Controls are represented as integers [lowerBound, upperBound], where lowerBound and upperBound are inclusive. More...

#include <DiscreteControlSpace.h>

Inheritance diagram for ompl::control::DiscreteControlSpace:

Classes

class  ControlType
 The definition of a discrete control. More...

Public Member Functions

 DiscreteControlSpace (const base::StateSpacePtr &stateSpace, int lowerBound, int upperBound)
 Construct a discrete space in wich controls can take values in the set [lowerBound, upperBound].
virtual unsigned int getDimension (void) const
 Get the dimension of this control space.
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 ControlSamplerPtr allocDefaultControlSampler (void) const
 Allocate the default control sampler.
virtual ControlallocControl (void) const
 Allocate memory for a control.
virtual void freeControl (Control *control) const
 Free the memory of a control.
virtual void nullControl (Control *control) const
 This sets the control value to lowerBound_.
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.
unsigned int getControlCount (void) const
 Returns the number of controls possible.
int getLowerBound (void) const
 Returns the lowest possible control value.
int getUpperBound (void) const
 Returns the highest possible control value.
void setBounds (int lowerBound, int upperBound)
 Set the bounds for the states in this space (the states will be in the set [lowerBound, upperBound].
virtual void setup (void)
 Perform final setup steps. This function is automatically called by the SpaceInformation.
virtual unsigned int getSerializationLength (void) const
 Returns the serialization size for a single control in this space.
virtual void serialize (void *serialization, const Control *ctrl) const
 Serializes the given control into the serialization buffer.
virtual void deserialize (Control *ctrl, const void *serialization) const
 Deserializes a control from the serialization buffer.
- Public Member Functions inherited from ompl::control::ControlSpace
 ControlSpace (const base::StateSpacePtr &stateSpace)
 Construct a control space, given the state space.
template<class T >
T * as (void)
 Cast this instance to a desired type.
template<class T >
const T * as (void) const
 Cast this instance to a desired type.
const std::string & getName (void) const
 Get the name of the control space.
void setName (const std::string &name)
 Set the name of the control space.
int getType (void) const
 Get the type of the control space. The type can be used to verify whether two space instances are of the same type.
const base::StateSpacePtrgetStateSpace (void) const
 Return the state space this control space depends on.
virtual ControlSamplerPtr allocControlSampler (void) const
 Allocate an instance of the control sampler for this space. This sampler will be allocated with the sampler allocator that was previously specified by setControlSamplerAllocator() or, if no sampler allocator was specified, allocDefaultControlSampler() is called.
void setControlSamplerAllocator (const ControlSamplerAllocator &csa)
 Set the sampler allocator to use.
void clearControlSamplerAllocator (void)
 Clear the control sampler allocator (reset to 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.
void computeSignature (std::vector< int > &signature) const
 Compute an array of ints that uniquely identifies the structure of the control space. The first element of the signature is the number of integers that follow.
virtual bool isCompound (void) const
 Check if the control space is compound.

Protected Attributes

int lowerBound_
 The lowest integer state.
int upperBound_
 The highest integer state.
- Protected Attributes inherited from ompl::control::ControlSpace
int type_
 A type assigned for this control space.
base::StateSpacePtr stateSpace_
 The state space controls can be applied to.
ControlSamplerAllocator csa_
 An optional control sampler allocator.

Detailed Description

A space representing discrete controls; i.e. there are a small number of discrete controls the system can react to. Controls are represented as integers [lowerBound, upperBound], where lowerBound and upperBound are inclusive.

Definition at line 64 of file DiscreteControlSpace.h.


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