DiscreteControlSpace.h
147 }
void nullControl(Control *control) const override
This sets the control value to lowerBound_.
Definition: DiscreteControlSpace.cpp:76
void deserialize(Control *ctrl, const void *serialization) const override
Deserializes a control from the serialization buffer.
Definition: DiscreteControlSpace.cpp:114
void setBounds(int lowerBound, int upperBound)
Set the bounds for the states in this space (the states will be in the set [lowerBound,...
Definition: DiscreteControlSpace.h:187
bool equalControls(const Control *control1, const Control *control2) const override
Check if two controls are the same.
Definition: DiscreteControlSpace.cpp:56
void copyControl(Control *destination, const Control *source) const override
Copy a control to another.
Definition: DiscreteControlSpace.cpp:51
const std::string & getName() const
Get the name of the control space.
Definition: ControlSpace.cpp:72
void serialize(void *serialization, const Control *ctrl) const override
Serializes the given control into the serialization buffer.
Definition: DiscreteControlSpace.cpp:109
Control * allocControl() const override
Allocate memory for a control.
Definition: DiscreteControlSpace.cpp:66
DiscreteControlSpace(const base::StateSpacePtr &stateSpace, int lowerBound, int upperBound)
Construct a discrete space in wich controls can take values in the set [lowerBound,...
Definition: DiscreteControlSpace.h:139
void setName(const std::string &name)
Set the name of the control space.
Definition: ControlSpace.cpp:77
void sample(Control *control) override
Sample a control. All other control sampling functions default to this one, unless a user-specified i...
Definition: DiscreteControlSpace.cpp:40
void printControl(const Control *control, std::ostream &out) const override
Print a control to a stream.
Definition: DiscreteControlSpace.cpp:81
int getUpperBound() const
Returns the highest possible control value.
Definition: DiscreteControlSpace.h:180
ompl::control::Control ControlType
Define the type of control allocated by this control space.
Definition: ControlSpace.h:131
void freeControl(Control *control) const override
Free the memory of a control.
Definition: DiscreteControlSpace.cpp:71
unsigned int getControlCount() const
Returns the number of controls possible.
Definition: DiscreteControlSpace.h:168
void printSettings(std::ostream &out) const override
Print the settings for this control space to a stream.
Definition: DiscreteControlSpace.cpp:91
A shared pointer wrapper for ompl::control::ControlSampler.
void setup() override
Perform final setup steps. This function is automatically called by the SpaceInformation.
Definition: DiscreteControlSpace.cpp:97
int getLowerBound() const
Returns the lowest possible control value.
Definition: DiscreteControlSpace.h:174
int value
The current control - an int in range [lowerBound, upperBound].
Definition: DiscreteControlSpace.h:134
ControlSamplerPtr allocDefaultControlSampler() const override
Allocate the default control sampler.
Definition: DiscreteControlSpace.cpp:61
unsigned int getDimension() const override
Get the dimension of this control space.
Definition: DiscreteControlSpace.cpp:46
unsigned int getSerializationLength() const override
Returns the serialization size for a single control in this space.
Definition: DiscreteControlSpace.cpp:104