Class PrecomputedStateSampler
Defined in File PrecomputedStateSampler.h
Inheritance Relationships
Base Type
public ompl::base::StateSampler
(Class StateSampler)
Class Documentation
-
class PrecomputedStateSampler : public ompl::base::StateSampler
State space sampler for discrete states.
Public Functions
-
PrecomputedStateSampler(const StateSpace *space, const std::vector<const State*> &states)
Constructor. Takes the state space to be sampled (space) and the set of states to draw samples from (states)
-
PrecomputedStateSampler(const StateSpace *space, const std::vector<const State*> &states, std::size_t minStateIndex, std::size_t maxStateIndex)
Constructor. Takes the state space to be sampled (space), the set of states to draw samples from (states) and a range to sample from: [minIndex, maxIndex].
-
virtual void sampleUniformNear(State *state, const State *near, double distance) override
Sample a state near another, within a neighborhood controlled by a distance parameter.
Typically, StateSampler-derived classes will return in
state
a state that is uniformly distributed within a ball with radiusdistance
defined by the distance function from the corresponding state space. However, this is not guaranteed. For example, the default state sampler for the RealVectorStateSpace returns samples uniformly distributed using L_inf distance, while the default distance function is L_2 distance.
-
virtual void sampleGaussian(State *state, const State *mean, double stdDev) override
Sample a state using a Gaussian distribution with given mean and standard deviation (stdDev).
As with sampleUniform, the implementation of sampleGaussian is specific to the derived class and few assumptions can be made about the distance between
state
andmean
.
-
PrecomputedStateSampler(const StateSpace *space, const std::vector<const State*> &states)