ControlSpace.h
const base::StateSpacePtr & getStateSpace() const
Return the state space this control space depends on.
Definition: ControlSpace.h:171
virtual bool isCompound() const
Check if the control space is compound.
Definition: ControlSpace.cpp:137
unsigned int getSubspaceCount() const
Get the number of control spaces that make up the compound control space.
Definition: ControlSpace.cpp:151
void setup() override
Perform final setup steps. This function is automatically called by the SpaceInformation.
Definition: ControlSpace.cpp:273
bool locked_
Flag indicating whether adding further components is allowed or not.
Definition: ControlSpace.h:343
A control space to allow the composition of control spaces.
Definition: ControlSpace.h:259
std::function< ControlSamplerPtr(const ControlSpace *)> ControlSamplerAllocator
Definition of a function that can allocate a control sampler.
Definition: ControlSampler.h:220
ompl::control::CompoundControl ControlType
Define the type of control allocated by this control space.
Definition: ControlSpace.h:263
bool isCompound() const override
Check if the control space is compound.
Definition: ControlSpace.cpp:310
const std::string & getName() const
Get the name of the control space.
Definition: ControlSpace.cpp:71
A shared pointer wrapper for ompl::control::ControlSpace.
const ControlSpacePtr & getSubspace(unsigned int index) const
Get a specific subspace from the compound control space.
Definition: ControlSpace.cpp:156
void lock()
Lock this control space. This means no further control spaces can be added as components....
Definition: ControlSpace.cpp:230
virtual double * getValueAddressAtIndex(Control *control, unsigned int index) const
Many controls contain a number of double values. This function provides a means to get the memory add...
Definition: ControlSpace.cpp:102
unsigned int getDimension() const override
Get the dimension of this control space.
Definition: ControlSpace.cpp:171
void setName(const std::string &name)
Set the name of the control space.
Definition: ControlSpace.cpp:76
void setControlSamplerAllocator(const ControlSamplerAllocator &csa)
Set the sampler allocator to use.
Definition: ControlSpace.cpp:92
void computeSignature(std::vector< int > &signature) const
Compute an array of ints that uniquely identifies the structure of the control space....
Definition: ControlSpace.cpp:130
void freeControl(Control *control) const override
Free the memory of a control.
Definition: ControlSpace.cpp:188
CompoundControlSpace(const base::StateSpacePtr &stateSpace)
Constructor. The corresponding state space needs to be specified.
Definition: ControlSpace.h:266
virtual Control * allocControl() const =0
Allocate memory for a control.
virtual ControlSamplerPtr allocControlSampler() const
Allocate an instance of the control sampler for this space. This sampler will be allocated with the s...
Definition: ControlSpace.cpp:85
void serialize(void *serialization, const Control *ctrl) const override
Serializes the given control into the serialization buffer.
Definition: ControlSpace.cpp:288
A control space representing the space of applicable controls.
Definition: ControlSpace.h:124
virtual unsigned int getDimension() const =0
Get the dimension of this control space.
ControlSamplerPtr allocDefaultControlSampler() const override
Allocate the default control sampler.
Definition: ControlSpace.cpp:222
virtual void printSettings(std::ostream &out) const
Print the settings for this control space to a stream.
Definition: ControlSpace.cpp:112
void printControl(const Control *control, std::ostream &out=std::cout) const override
Print a control to a stream.
Definition: ControlSpace.cpp:256
int getType() const
Get the type of the control space. The type can be used to verify whether two space instances are of ...
Definition: ControlSpace.h:165
void printSettings(std::ostream &out) const override
Print the settings for this control space to a stream.
Definition: ControlSpace.cpp:265
Control * allocControl() const override
Allocate memory for a control.
Definition: ControlSpace.cpp:179
void clearControlSamplerAllocator()
Clear the control sampler allocator (reset to default)
Definition: ControlSpace.cpp:97
virtual void printControl(const Control *control, std::ostream &out) const
Print a control to a stream.
Definition: ControlSpace.cpp:107
virtual void freeControl(Control *control) const =0
Free the memory of a control.
virtual void setup()
Perform final setup steps. This function is automatically called by the SpaceInformation.
Definition: ControlSpace.cpp:81
virtual unsigned int getSerializationLength() const
Returns the serialization size for a single control in this space.
Definition: ControlSpace.cpp:117
void deserialize(Control *ctrl, const void *serialization) const override
Deserializes a control from the serialization buffer.
Definition: ControlSpace.cpp:299
std::vector< ControlSpacePtr > components_
The component control spaces that make up the compound control space.
Definition: ControlSpace.h:337
virtual void addSubspace(const ControlSpacePtr &component)
Adds a control space as a component of the compound control space.
Definition: ControlSpace.cpp:142
base::StateSpacePtr stateSpace_
The state space controls can be applied to.
Definition: ControlSpace.h:248
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.
Definition: ControlSpace.cpp:215
A shared pointer wrapper for ompl::control::ControlSampler.
unsigned int getSerializationLength() const override
Returns the serialization size for a single control in this space.
Definition: ControlSpace.cpp:280
virtual void deserialize(Control *ctrl, const void *serialization) const
Deserializes a control from the serialization buffer.
Definition: ControlSpace.cpp:126
virtual bool equalControls(const Control *control1, const Control *control2) const =0
Check if two controls are the same.
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 add...
Definition: ControlSpace.cpp:235
virtual void serialize(void *serialization, const Control *ctrl) const
Serializes the given control into the serialization buffer.
Definition: ControlSpace.cpp:122
void copyControl(Control *destination, const Control *source) const override
Copy a control to another.
Definition: ControlSpace.cpp:197
virtual ControlSamplerPtr allocDefaultControlSampler() const =0
Allocate the default control sampler.
virtual void copyControl(Control *destination, const Control *source) const =0
Copy a control to another.
bool equalControls(const Control *control1, const Control *control2) const override
Check if two controls are the same.
Definition: ControlSpace.cpp:205
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.