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:158
ControlSamplerPtr allocDefaultControlSampler() const override
Allocate the default control sampler.
Definition: RealVectorControlSpace.cpp:91
void copyControl(Control *destination, const Control *source) const override
Copy a control to another.
Definition: RealVectorControlSpace.cpp:72
Control * allocControl() const override
Allocate memory for a control.
Definition: RealVectorControlSpace.cpp:96
void setBounds(const base::RealVectorBounds &bounds)
Set the bounds (min max values for each dimension) for the control.
Definition: RealVectorControlSpace.cpp:58
bool equalControls(const Control *control1, const Control *control2) const override
Check if two controls are the same.
Definition: RealVectorControlSpace.cpp:78
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:122
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:82
void freeControl(Control *control) const override
Free the memory of a control.
Definition: RealVectorControlSpace.cpp:103
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:145
void serialize(void *serialization, const Control *ctrl) const override
Serializes the given control into the serialization buffer.
Definition: RealVectorControlSpace.cpp:163
double uniformReal(double lower_bound, double upper_bound)
Generate a random real within given bounds: [lower_bound, upper_bound)
Definition: RandomNumbers.h:137
void deserialize(Control *ctrl, const void *serialization) const override
Deserializes a control from the serialization buffer.
Definition: RealVectorControlSpace.cpp:168
A control space representing Rn.
Definition: RealVectorControlSpace.h:125
The definition of a control in Rn
Definition: RealVectorControlSpace.h:129
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:110
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:42
unsigned int getDimension() const override
Get the dimension of this control space.
Definition: RealVectorControlSpace.cpp:67
void setup() override
Perform final setup steps. This function is automatically called by the SpaceInformation.
Definition: RealVectorControlSpace.cpp:52
double * values
An array of length n, representing the value of the control.
Definition: RealVectorControlSpace.h:147
void printControl(const Control *control, std::ostream &out) const override
Print a control to a stream.
Definition: RealVectorControlSpace.cpp:127
const ControlSpace * space_
The control space this sampler operates on.
Definition: ControlSampler.h:184
The lower and upper bounds for an Rn space.
Definition: RealVectorBounds.h:111