Abstract definition of a control sampler. Motion planners that need to sample controls will call functions from this class. Planners should call the versions of sample() and sampleNext() with most arguments, whenever this information is available. More...
#include <ControlSampler.h>
Public Member Functions | |
ControlSampler (const ControlSpace *space) | |
Constructor takes the state space to construct samples for as argument. | |
virtual void | sample (Control *control)=0 |
Sample a control. All other control sampling functions default to this one, unless a user-specified implementation is given. | |
virtual void | sample (Control *control, const base::State *state) |
Sample a control, given it is applied to a specific state (state). The default implementation calls the previous definition of sample(). Providing a different implementation of this function is useful if, for example, the sampling of controls depends on the state of the system. When attempting to sample controls that keep a system stable, for example, knowing the state at which the control is applied is important. | |
virtual void | sampleNext (Control *control, const Control *previous) |
Sample a control, given the previously applied control. The default implementation calls the first definition of sample(). For some systems it is possible that large changes in controls are not desirable. For example, switching from maximum acceleration to maximum deceleration is not desirable when driving a car. | |
virtual void | sampleNext (Control *control, const Control *previous, const base::State *state) |
Sample a control, given the previously applied control and that it is applied to a specific state. The default implementation calls the first definition of sample(), even if other implementations of the sampleNext() shown above are provided. Often this function needs to be overridden as it is the function planners typically call. | |
virtual void | sampleTo (Control *control, const base::State *source, const base::State *target) |
Sample a control given that it will be applied to state state and the intention is to reach state target. This is useful for some algorithms that have a notion of direction in their exploration (e.g., ). By default, this function calls the first definition of sample(). | |
virtual void | sampleTo (Control *control, const Control *previous, const base::State *source, const base::State *target) |
Sample a control given that it will be applied to state state and the intention is to reach state target. 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., ). By default, this function calls the first definition of sample(). | |
virtual unsigned int | sampleTo (Control *control, unsigned int minSteps, unsigned int maxSteps, const base::State *source, const base::State *target) |
Sample a control given that it will be applied to state state and the intention is to reach state target. This is useful for some algorithms that have a notion of direction in their exploration (e.g., ). Furthermore, return the duration for which this control should be applied. By default, this function calls the first definition of sample() and returns the value of sampleStepCount(minSteps, maxSteps). | |
virtual unsigned int | sampleTo (Control *control, unsigned int minSteps, unsigned int maxSteps, const Control *previous, const base::State *source, const base::State *target) |
Sample a control given that it will be applied to state state and the intention is to reach state target. 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., ). Furthermore, return the duration for which this control should be applied. By default, this function calls the first definition of sample() and returns the value of sampleStepCount(minSteps, maxSteps). | |
virtual unsigned int | sampleStepCount (unsigned int minSteps, unsigned int maxSteps) |
Sample a number of steps to execute a control for. | |
Protected Attributes | |
const ControlSpace * | space_ |
The control space this sampler operates on. | |
RNG | rng_ |
Instance of random number generator. |
Abstract definition of a control sampler. Motion planners that need to sample controls will call functions from this class. Planners should call the versions of sample() and sampleNext() with most arguments, whenever this information is available.
Definition at line 65 of file ControlSampler.h.