ValidStateSampler.h
134 typedef std::function<ValidStateSamplerPtr(const SpaceInformation *)> ValidStateSamplerAllocator;
const SpaceInformation * si_
The state space this sampler samples.
Definition: ValidStateSampler.h:121
void setName(const std::string &name)
Set the name of the sampler.
Definition: ValidStateSampler.h:81
Abstract definition of a state sampler.
Definition: ValidStateSampler.h:62
The base class for space information. This contains all the information about the space planning is d...
Definition: SpaceInformation.h:81
unsigned int attempts_
Number of attempts to find a valid sample.
Definition: ValidStateSampler.h:124
std::function< ValidStateSamplerPtr(const SpaceInformation *)> ValidStateSamplerAllocator
Definition of a function that can allocate a valid state sampler.
Definition: ValidStateSampler.h:134
const ParamSet & params() const
Get the parameters for the valid state sampler.
Definition: ValidStateSampler.h:114
virtual bool sample(State *state)=0
Sample a state. Return false in case of failure.
ParamSet & params()
Get the parameters for the valid state sampler.
Definition: ValidStateSampler.h:108
virtual bool sampleNear(State *state, const State *near, double distance)=0
Sample a state near another, within specified distance. Return false, in case of failure.
ParamSet params_
The parameters for this instance of the valid state sampler.
Definition: ValidStateSampler.h:130
unsigned int getNrAttempts() const
Get the number of attempts to be performed by the sampling routine.
Definition: ValidStateSampler.h:102
void setNrAttempts(unsigned int attempts)
Finding a valid sample usually requires performing multiple attempts. This call allows setting the nu...
Definition: ValidStateSampler.h:96