RealVectorControlSpace.h
The lower and upper bounds for an Rn space.
Definition: RealVectorBounds.h:48
A shared pointer wrapper for ompl::control::ControlSampler.
Abstract definition of a control sampler. Motion planners that need to sample controls will call func...
Definition: ControlSampler.h:69
A control space representing the space of applicable controls.
Definition: ControlSpace.h:64
const std::string & getName() const
Get the name of the control space.
Definition: ControlSpace.cpp:72
void setName(const std::string &name)
Set the name of the control space.
Definition: ControlSpace.cpp:77
The definition of a control in Rn
Definition: RealVectorControlSpace.h:66
double operator[](unsigned int i) const
Access element i of values. This does not check whether the index is within bounds.
Definition: RealVectorControlSpace.h:70
double * values
An array of length n, representing the value of the control.
Definition: RealVectorControlSpace.h:83
double & operator[](unsigned int i)
Access element i of values. This does not check whether the index is within bounds.
Definition: RealVectorControlSpace.h:77
A control space representing Rn.
Definition: RealVectorControlSpace.h:62
RealVectorControlSpace(const base::StateSpacePtr &stateSpace, unsigned int dim)
Constructor takes the state space the controls correspond to and the dimension of the space of contro...
Definition: RealVectorControlSpace.h:88
void printSettings(std::ostream &out) const override
Print the settings for this control space to a stream.
Definition: RealVectorControlSpace.cpp:145
void freeControl(Control *control) const override
Free the memory of a control.
Definition: RealVectorControlSpace.cpp:103
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
void printControl(const Control *control, std::ostream &out) const override
Print a control to a stream.
Definition: RealVectorControlSpace.cpp:127
ControlSamplerPtr allocDefaultControlSampler() const override
Allocate the default control sampler.
Definition: RealVectorControlSpace.cpp:91
const base::RealVectorBounds & getBounds() const
Get the bounds (min max values for each dimension) for the control.
Definition: RealVectorControlSpace.h:101
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
void setup() override
Perform final setup steps. This function is automatically called by the SpaceInformation.
Definition: RealVectorControlSpace.cpp:52
void copyControl(Control *destination, const Control *source) const override
Copy a control to another.
Definition: RealVectorControlSpace.cpp:72
unsigned int getDimension() const override
Get the dimension of this control space.
Definition: RealVectorControlSpace.cpp:67
void deserialize(Control *ctrl, const void *serialization) const override
Deserializes a control from the serialization buffer.
Definition: RealVectorControlSpace.cpp:168
unsigned int getSerializationLength() const override
Returns the serialization size for a single control in this space.
Definition: RealVectorControlSpace.cpp:158
void serialize(void *serialization, const Control *ctrl) const override
Serializes the given control into the serialization buffer.
Definition: RealVectorControlSpace.cpp:163
bool equalControls(const Control *control1, const Control *control2) const override
Check if two controls are the same.
Definition: RealVectorControlSpace.cpp:78
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
Uniform sampler for the Rn state space.
Definition: RealVectorControlSpace.h:50
RealVectorControlUniformSampler(const ControlSpace *space)
Constructor.
Definition: RealVectorControlSpace.h:53
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