37 #ifndef OMPL_CONTROL_CONTROL_SAMPLER_
38 #define OMPL_CONTROL_CONTROL_SAMPLER_
40 #include "ompl/base/State.h"
41 #include "ompl/control/Control.h"
42 #include "ompl/util/RandomNumbers.h"
43 #include "ompl/util/ClassForward.h"
45 #include <boost/function.hpp>
46 #include <boost/noncopyable.hpp>
54 OMPL_CLASS_FORWARD(ControlSpace);
59 OMPL_CLASS_FORWARD(ControlSampler);
86 virtual void sample(Control *control) = 0;
105 virtual void sampleNext(Control *control,
const Control *previous);
117 virtual unsigned int sampleStepCount(
unsigned int minSteps,
unsigned int maxSteps);
162 unsigned int samplerCount_;
Abstract definition of a control sampler. Motion planners that need to sample controls will call func...
Definition of a compound control sampler. This is useful to construct samplers for compound controls...
Definition of an abstract control.
virtual void sample(Control *control)=0
Sample a control. All other control sampling functions default to this one, unless a user-specified i...
virtual void addSampler(const ControlSamplerPtr &sampler)
Add a sampler as part of the new compound sampler. This sampler is used to sample part of the compoun...
A boost shared pointer wrapper for ompl::control::ControlSampler.
const ControlSpace * space_
The control space this sampler operates on.
Random number generation. An instance of this class cannot be used by multiple threads at once (membe...
std::vector< ControlSamplerPtr > samplers_
The instances of samplers used for compound sampler.
virtual unsigned int sampleStepCount(unsigned int minSteps, unsigned int maxSteps)
Sample a number of steps to execute a control for.
virtual void sample(Control *control)
Sample a control. All other control sampling functions default to this one, unless a user-specified i...
A control space representing the space of applicable controls.
Definition of an abstract state.
RNG rng_
Instance of random number generator.
virtual void sampleNext(Control *control, const Control *previous)
Sample a control, given the previously applied control. The default implementation calls the first de...
virtual void sampleNext(Control *control, const Control *previous)
Sample a control, given the previously applied control. The default implementation calls the first de...
virtual ~CompoundControlSampler(void)
Destructor. This frees the added samplers as well.
ControlSampler(const ControlSpace *space)
Constructor takes the state space to construct samples for as argument.
boost::function< ControlSamplerPtr(const ControlSpace *)> ControlSamplerAllocator
Definition of a function that can allocate a control sampler.
CompoundControlSampler(const ControlSpace *space)
Constructor.