RealVectorControlSpace.cpp
45 const base::RealVectorBounds &bounds = static_cast<const RealVectorControlSpace *>(space_)->getBounds();
72 void ompl::control::RealVectorControlSpace::copyControl(Control *destination, const Control *source) const
74 memcpy(static_cast<ControlType *>(destination)->values, static_cast<const ControlType *>(source)->values,
78 bool ompl::control::RealVectorControlSpace::equalControls(const Control *control1, const Control *control2) const
91 ompl::control::ControlSamplerPtr ompl::control::RealVectorControlSpace::allocDefaultControlSampler() const
122 double *ompl::control::RealVectorControlSpace::getValueAddressAtIndex(Control *control, const unsigned int index) const
127 void ompl::control::RealVectorControlSpace::printControl(const Control *control, std::ostream &out) const
163 void ompl::control::RealVectorControlSpace::serialize(void *serialization, const Control *ctrl) const
168 void ompl::control::RealVectorControlSpace::deserialize(Control *ctrl, const void *serialization) const
unsigned int getSerializationLength() const override
Returns the serialization size for a single control in this space.
Definition: RealVectorControlSpace.cpp:157
ControlSamplerPtr allocDefaultControlSampler() const override
Allocate the default control sampler.
Definition: RealVectorControlSpace.cpp:90
void copyControl(Control *destination, const Control *source) const override
Copy a control to another.
Definition: RealVectorControlSpace.cpp:71
Control * allocControl() const override
Allocate memory for a control.
Definition: RealVectorControlSpace.cpp:95
void setBounds(const base::RealVectorBounds &bounds)
Set the bounds (min max values for each dimension) for the control.
Definition: RealVectorControlSpace.cpp:57
bool equalControls(const Control *control1, const Control *control2) const override
Check if two controls are the same.
Definition: RealVectorControlSpace.cpp:77
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: RealVectorControlSpace.cpp:121
virtual unsigned int getDimension() const =0
Get the dimension of this control space.
virtual void setup()
Perform final setup steps. This function is automatically called by the SpaceInformation.
Definition: ControlSpace.cpp:81
void freeControl(Control *control) const override
Free the memory of a control.
Definition: RealVectorControlSpace.cpp:102
A shared pointer wrapper for ompl::control::ControlSampler.
void printSettings(std::ostream &out) const override
Print the settings for this control space to a stream.
Definition: RealVectorControlSpace.cpp:144
void serialize(void *serialization, const Control *ctrl) const override
Serializes the given control into the serialization buffer.
Definition: RealVectorControlSpace.cpp:162
double uniformReal(double lower_bound, double upper_bound)
Generate a random real within given bounds: [lower_bound, upper_bound)
Definition: RandomNumbers.h:133
void deserialize(Control *ctrl, const void *serialization) const override
Deserializes a control from the serialization buffer.
Definition: RealVectorControlSpace.cpp:167
A control space representing Rn.
Definition: RealVectorControlSpace.h:122
The definition of a control in Rn
Definition: RealVectorControlSpace.h:126
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: RealVectorControlSpace.cpp:109
void sample(Control *control) override
Sample a control. All other control sampling functions default to this one, unless a user-specified i...
Definition: RealVectorControlSpace.cpp:41
unsigned int getDimension() const override
Get the dimension of this control space.
Definition: RealVectorControlSpace.cpp:66
void setup() override
Perform final setup steps. This function is automatically called by the SpaceInformation.
Definition: RealVectorControlSpace.cpp:51
double * values
An array of length n, representing the value of the control.
Definition: RealVectorControlSpace.h:144
void printControl(const Control *control, std::ostream &out) const override
Print a control to a stream.
Definition: RealVectorControlSpace.cpp:126
const ControlSpace * space_
The control space this sampler operates on.
Definition: ControlSampler.h:181
The lower and upper bounds for an Rn space.
Definition: RealVectorBounds.h:108