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. More...
#include <ompl/control/SimpleDirectedControlSampler.h>
Public Member 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. | |
unsigned int | getNumControlSamples () const |
Retrieve the number of controls to generate when finding the best control. | |
void | setNumControlSamples (unsigned int numSamples) |
Set the number of controls to generate when finding the best control. | |
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. | |
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. | |
Public Member Functions inherited from ompl::control::DirectedControlSampler | |
DirectedControlSampler (const DirectedControlSampler &)=delete | |
DirectedControlSampler & | operator= (const DirectedControlSampler &)=delete |
DirectedControlSampler (const SpaceInformation *si) | |
Constructor takes the state space to construct samples for as argument. | |
Protected Member Functions | |
virtual unsigned int | getBestControl (Control *control, const base::State *source, base::State *dest, const Control *previous) |
Samples numControlSamples_ controls, and returns the control that brings the system the closest to target. | |
Protected Attributes | |
ControlSamplerPtr | cs_ |
An instance of the control sampler. | |
unsigned int | numControlSamples_ |
The number of controls to sample when finding the best control. | |
Protected Attributes inherited from ompl::control::DirectedControlSampler | |
const SpaceInformation * | si_ |
The space information this sampler operates on. | |
Detailed Description
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.
- External documentation
- K-control sampling is first believed to be proposed in:
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]
Definition at line 124 of file SimpleDirectedControlSampler.h.
The documentation for this class was generated from the following files:
- ompl/control/SimpleDirectedControlSampler.h
- ompl/control/src/SimpleDirectedControlSampler.cpp