DiscreteControlSpace.h
unsigned int getDimension() const override
Get the dimension of this control space.
Definition: DiscreteControlSpace.cpp:46
Abstract definition of a control sampler. Motion planners that need to sample controls will call func...
Definition: ControlSampler.h:68
int getUpperBound() const
Returns the highest possible control value.
Definition: DiscreteControlSpace.h:116
bool equalControls(const Control *control1, const Control *control2) const override
Check if two controls are the same.
Definition: DiscreteControlSpace.cpp:56
unsigned int getSerializationLength() const override
Returns the serialization size for a single control in this space.
Definition: DiscreteControlSpace.cpp:104
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
int getLowerBound() const
Returns the lowest possible control value.
Definition: DiscreteControlSpace.h:110
A shared pointer wrapper for ompl::base::StateSpace.
A shared pointer wrapper for ompl::control::ControlSampler.
void freeControl(Control *control) const override
Free the memory of a control.
Definition: DiscreteControlSpace.cpp:71
A space representing discrete controls; i.e. there are a small number of discrete controls the system...
Definition: DiscreteControlSpace.h:62
void setName(const std::string &name)
Set the name of the control space.
Definition: ControlSpace.cpp:77
DiscreteControlSpace(const base::StateSpacePtr &stateSpace, int lowerBound, int upperBound)
Construct a discrete space in wich controls can take values in the set [lowerBound, upperBound].
Definition: DiscreteControlSpace.h:75
The definition of a discrete control.
Definition: DiscreteControlSpace.h:66
unsigned int getControlCount() const
Returns the number of controls possible.
Definition: DiscreteControlSpace.h:104
void printSettings(std::ostream &out) const override
Print the settings for this control space to a stream.
Definition: DiscreteControlSpace.cpp:91
Control * allocControl() const override
Allocate memory for a control.
Definition: DiscreteControlSpace.cpp:66
void serialize(void *serialization, const Control *ctrl) const override
Serializes the given control into the serialization buffer.
Definition: DiscreteControlSpace.cpp:109
void copyControl(Control *destination, const Control *source) const override
Copy a control to another.
Definition: DiscreteControlSpace.cpp:51
int value
The current control - an int in range [lowerBound, upperBound].
Definition: DiscreteControlSpace.h:70
ompl::control::DiscreteControlSpace
Definition: ControlSpaceTypes.h:55
Control space sampler for discrete controls.
Definition: DiscreteControlSpace.h:47
void nullControl(Control *control) const override
This sets the control value to lowerBound_.
Definition: DiscreteControlSpace.cpp:76
void printControl(const Control *control, std::ostream &out) const override
Print a control to a stream.
Definition: DiscreteControlSpace.cpp:81
A control space representing the space of applicable controls.
Definition: ControlSpace.h:63
ControlSamplerPtr allocDefaultControlSampler() const override
Allocate the default control sampler.
Definition: DiscreteControlSpace.cpp:61
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, upperBound].
Definition: DiscreteControlSpace.h:123
void setup() override
Perform final setup steps. This function is automatically called by the SpaceInformation.
Definition: DiscreteControlSpace.cpp:97
const std::string & getName() const
Get the name of the control space.
Definition: ControlSpace.cpp:72