Class CompoundControlSpace
Defined in File ControlSpace.h
Inheritance Relationships
Base Type
public ompl::control::ControlSpace
(Class ControlSpace)
Class Documentation
-
class CompoundControlSpace : public ompl::control::ControlSpace
A control space to allow the composition of control spaces.
Public Types
-
using ControlType = ompl::control::CompoundControl
Define the type of control allocated by this control space.
Public Functions
-
inline CompoundControlSpace(const base::StateSpacePtr &stateSpace)
Constructor. The corresponding state space needs to be specified.
-
~CompoundControlSpace() override = default
-
template<class T>
inline 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() const
Get the number of control spaces that make up the compound control space.
-
const ControlSpacePtr &getSubspace(unsigned int index) const
Get a specific subspace from the compound control space.
-
const ControlSpacePtr &getSubspace(const std::string &name) const
Get a specific subspace from the compound control space.
-
virtual unsigned int getDimension() const override
Get the dimension of this control space.
-
virtual void copyControl(Control *destination, const Control *source) const override
Copy a control to another.
-
virtual bool equalControls(const Control *control1, const Control *control2) const override
Check if two controls are the same.
-
virtual void nullControl(Control *control) const override
Make the control have no effect if it were to be applied to a state for any amount of time.
-
virtual ControlSamplerPtr allocDefaultControlSampler() const override
Allocate the default control sampler.
-
virtual double *getValueAddressAtIndex(Control *control, unsigned int index) const override
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 nullptr.
-
virtual void printControl(const Control *control, std::ostream &out = std::cout) const override
Print a control to a stream.
-
virtual void printSettings(std::ostream &out) const override
Print the settings for this control space to a stream.
-
virtual void setup() override
Perform final setup steps. This function is automatically called by the SpaceInformation.
-
virtual unsigned int getSerializationLength() const override
Returns the serialization size for a single control in this space.
-
virtual void serialize(void *serialization, const Control *ctrl) const override
Serializes the given control into the serialization buffer.
-
virtual void deserialize(Control *ctrl, const void *serialization) const override
Deserializes a control from the serialization buffer.
-
virtual bool isCompound() const override
Check if the control space is compound.
-
void lock()
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<ControlSpacePtr> components_
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.
-
using ControlType = ompl::control::CompoundControl