ompl::base::CompoundStateSampler Class Reference

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

#include <ompl/base/StateSampler.h>

Inheritance diagram for ompl::base::CompoundStateSampler:

Public Member Functions

 CompoundStateSampler (const StateSpace *space)
 Constructor. More...
 
 ~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. More...
 
void sampleUniform (State *state) override
 Sample a state. More...
 
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. More...
 
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. More...
 
- Public Member Functions inherited from ompl::base::StateSampler
 StateSampler (const StateSampler &)=delete
 
StateSampleroperator= (const StateSampler &)=delete
 
 StateSampler (const StateSpace *space)
 Constructor. More...
 
virtual void sampleUniform (State *state)=0
 Sample a state. More...
 
virtual void sampleUniformNear (State *state, const State *near, double distance)=0
 Sample a state near another, within a neighborhood controlled by a distance parameter. More...
 
virtual void sampleGaussian (State *state, const State *mean, double stdDev)=0
 Sample a state using a Gaussian distribution with given mean and standard deviation (stdDev). More...
 

Protected Attributes

std::vector< StateSamplerPtrsamplers_
 The samplers that are composed. More...
 
std::vector< double > weightImportance_
 The weight of each sampler (used when sampling near a state) More...
 
- Protected Attributes inherited from ompl::base::StateSampler
const StateSpacespace_
 The state space this sampler samples. More...
 
RNG rng_
 An instance of a random number generator. More...
 

Detailed Description

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

Definition at line 111 of file StateSampler.h.

Constructor & Destructor Documentation

◆ CompoundStateSampler()

ompl::base::CompoundStateSampler::CompoundStateSampler ( const StateSpace space)
inline

Constructor.

Definition at line 115 of file StateSampler.h.

Member Function Documentation

◆ addSampler()

void ompl::base::CompoundStateSampler::addSampler ( const StateSamplerPtr sampler,
double  weightImportance 
)
virtual

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.

Definition at line 40 of file StateSampler.cpp.

◆ sampleGaussian()

void ompl::base::CompoundStateSampler::sampleGaussian ( State state,
const State mean,
double  stdDev 
)
overridevirtual

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

Implements ompl::base::StateSampler.

Definition at line 65 of file StateSampler.cpp.

◆ sampleUniform()

void ompl::base::CompoundStateSampler::sampleUniform ( State state)
overridevirtual

Sample a state.

Implements ompl::base::StateSampler.

Definition at line 47 of file StateSampler.cpp.

◆ sampleUniformNear()

void ompl::base::CompoundStateSampler::sampleUniformNear ( State state,
const State near,
double  distance 
)
overridevirtual

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

Implements ompl::base::StateSampler.

Definition at line 54 of file StateSampler.cpp.

Member Data Documentation

◆ samplers_

std::vector<StateSamplerPtr> ompl::base::CompoundStateSampler::samplers_
protected

The samplers that are composed.

Definition at line 142 of file StateSampler.h.

◆ weightImportance_

std::vector<double> ompl::base::CompoundStateSampler::weightImportance_
protected

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

Definition at line 145 of file StateSampler.h.


The documentation for this class was generated from the following files: