DiscreteControlSpace.cpp
43 space_->as<DiscreteControlSpace>()->getLowerBound(), space_->as<DiscreteControlSpace>()->getUpperBound());
51 void ompl::control::DiscreteControlSpace::copyControl(Control *destination, const Control *source) const
56 bool ompl::control::DiscreteControlSpace::equalControls(const Control *control1, const Control *control2) const
61 ompl::control::ControlSamplerPtr ompl::control::DiscreteControlSpace::allocDefaultControlSampler() const
81 void ompl::control::DiscreteControlSpace::printControl(const Control *control, std::ostream &out) const
93 out << "Discrete control space '" << getName() << "' with bounds [" << lowerBound_ << ", " << upperBound_ << "]"
109 void ompl::control::DiscreteControlSpace::serialize(void *serialization, const Control *ctrl) const
114 void ompl::control::DiscreteControlSpace::deserialize(Control *ctrl, const void *serialization) const
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
A space representing discrete controls; i.e. there are a small number of discrete controls the system...
Definition: DiscreteControlSpace.h:126
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
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
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 uniformInt(int lower_bound, int upper_bound)
Generate a random integer within given bounds: [lower_bound, upper_bound].
Definition: RandomNumbers.h:144
virtual void setup()
Perform final setup steps. This function is automatically called by the SpaceInformation.
Definition: ControlSpace.cpp:82
The definition of a discrete control.
Definition: DiscreteControlSpace.h:130
void freeControl(Control *control) const override
Free the memory of a control.
Definition: DiscreteControlSpace.cpp:71
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
const ControlSpace * space_
The control space this sampler operates on.
Definition: ControlSampler.h:184
unsigned int getSerializationLength() const override
Returns the serialization size for a single control in this space.
Definition: DiscreteControlSpace.cpp:104