Class SimpleDirectedControlSampler
Defined in File SimpleDirectedControlSampler.h
Inheritance Relationships
Base Type
public ompl::control::DirectedControlSampler
(Class DirectedControlSampler)
Class Documentation
-
class SimpleDirectedControlSampler : public ompl::control::DirectedControlSampler
Implementation of a simple directed control sampler. This is a basic implementation that does not actually take direction into account and builds upon ControlSampler. Instead, a set of k random controls are sampled, and the control that gets the system closest to the target state is returned.
S.M. LaValle and J.J. Kuffner, Randomized kinodynamic planning, Intl. J. of Robotics Research, vol. 20, pp. 378–400, May 2001. DOI: 10.1177/02783640122067453[PDF] [more]
- External documentation
K-control sampling is first believed to be proposed in:
Public Functions
-
SimpleDirectedControlSampler(const SpaceInformation *si, unsigned int k = 1)
Constructor takes the state space to construct samples for as argument Optionally, a k value can be given to indicate the number of controls to try when directing a system toward a specific state. Default value is 1.
-
~SimpleDirectedControlSampler() override
-
inline unsigned int getNumControlSamples() const
Retrieve the number of controls to generate when finding the best control.
-
inline void setNumControlSamples(unsigned int numSamples)
Set the number of controls to generate when finding the best control.
-
virtual unsigned int sampleTo(Control *control, const base::State *source, base::State *dest) override
Sample a control given that it will be applied to state state and the intention is to reach state dest. This is useful for some algorithms that have a notion of direction in their exploration (e.g., cRRT). Furthermore, return the duration for which this control should be applied. The state dest is modified to match the state reached with the computed control and duration. The motion is checked for validity.
-
virtual unsigned int sampleTo(Control *control, const Control *previous, const base::State *source, base::State *dest) override
Sample a control given that it will be applied to state state and the intention is to reach state dest. Also take into account the fact that the previously applied control is previous. This is useful for some algorithms that have a notion of direction in their exploration (e.g., cRRT). Furthermore, return the duration for which this control should be applied. The state dest is modified to match the state reached with the computed control and duration. The motion is checked for validity.
Protected Functions
Protected Attributes
-
ControlSamplerPtr cs_
An instance of the control sampler.
-
unsigned int numControlSamples_
The number of controls to sample when finding the best control.