Class CompoundStateSampler

Inheritance Relationships

Base Type

Class Documentation

class CompoundStateSampler : public ompl::base::StateSampler

Definition of a compound state sampler. This is useful to construct samplers for compound states.

Public Functions

inline CompoundStateSampler(const StateSpace *space)

Constructor.

~CompoundStateSampler() override = default

Destructor. This frees the added samplers as well.

virtual void addSampler(const StateSamplerPtr &sampler, double weightImportance)

Add a sampler as part of the new compound sampler. This sampler is used to sample part of the compound state. When sampling near a state, the compound sampler calls in to added samplers. The distance passed to the called samplers is adjusted according to the specified importance.

virtual void sampleUniform(State *state) override

Sample a state.

virtual void sampleUniformNear(State *state, const State *near, double distance) override

Call sampleUniformNear for each of the subspace states with distance scaled by the corresponding subspace weight.

virtual void sampleGaussian(State *state, const State *mean, double stdDev) override

Call sampleGaussian for each of the subspace states with stdDev scaled by the corresponding subspace weight.

Protected Attributes

std::vector<StateSamplerPtr> samplers_

The samplers that are composed.

std::vector<double> weightImportance_

The weight of each sampler (used when sampling near a state)