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, const base::State *) |
Sample a control, given it is applied to a specific 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 | 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 | sampleNext (Control *control, const Control *, const base::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(). This is the function planners typically call. If implementations that require information about the state or about the previous control are provided, this function should be reimplemented as well, to call those functions. Providing an implementation that takes into account both the previous control and the state is also possible. | |
virtual void | sampleNext (Control *control, const Control *) |
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 unsigned int | sampleStepCount (unsigned int minSteps, unsigned int maxSteps) |
Sample a number of steps to execute a control for. | |
virtual | ~ControlSampler (void) |
Protected Attributes | |
RNG | rng_ |
Instance of random number generator. | |
const ControlSpace * | space_ |
The control space this sampler operates on. |
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.
ompl::control::ControlSampler::ControlSampler | ( | const ControlSpace * | space | ) | [inline] |
Constructor takes the state space to construct samples for as argument.
Definition at line 70 of file ControlSampler.h.
virtual ompl::control::ControlSampler::~ControlSampler | ( | void | ) | [inline, virtual] |
Definition at line 74 of file ControlSampler.h.
virtual void ompl::control::ControlSampler::sample | ( | Control * | control, | |
const base::State * | ||||
) | [inline, virtual] |
Sample a control, given it is applied to a specific 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.
Reimplemented in ompl::control::CompoundControlSampler.
Definition at line 91 of file ControlSampler.h.
virtual void ompl::control::ControlSampler::sample | ( | Control * | control | ) | [pure virtual] |
Sample a control. All other control sampling functions default to this one, unless a user-specified implementation is given.
Implemented in ompl::control::CompoundControlSampler, and ompl::control::RealVectorControlUniformSampler.
virtual void ompl::control::ControlSampler::sampleNext | ( | Control * | control, | |
const Control * | , | |||
const base::State * | ||||
) | [inline, virtual] |
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(). This is the function planners typically call. If implementations that require information about the state or about the previous control are provided, this function should be reimplemented as well, to call those functions. Providing an implementation that takes into account both the previous control and the state is also possible.
Reimplemented in ompl::control::CompoundControlSampler.
Definition at line 119 of file ControlSampler.h.
virtual void ompl::control::ControlSampler::sampleNext | ( | Control * | control, | |
const Control * | ||||
) | [inline, virtual] |
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.
Reimplemented in ompl::control::CompoundControlSampler.
Definition at line 103 of file ControlSampler.h.
virtual unsigned int ompl::control::ControlSampler::sampleStepCount | ( | unsigned int | minSteps, | |
unsigned int | maxSteps | |||
) | [virtual] |
Sample a number of steps to execute a control for.
RNG ompl::control::ControlSampler::rng_ [protected] |
Instance of random number generator.
Definition at line 133 of file ControlSampler.h.
const ControlSpace* ompl::control::ControlSampler::space_ [protected] |
The control space this sampler operates on.
Definition at line 130 of file ControlSampler.h.