Loading...
Searching...
No Matches
ompl::base::CForestStateSampler Class Reference

Extended state sampler to use with the CForest planning algorithm. It wraps the user-specified state sampler. More...

#include <ompl/geometric/planners/cforest/CForestStateSampler.h>

Inheritance diagram for ompl::base::CForestStateSampler:

Public Member Functions

 CForestStateSampler (const StateSpace *space, StateSamplerPtr sampler)
 Constructor.
 ~CForestStateSampler () override
 Destructor.
void sampleUniform (State *state) override
 It will sample the next state of the vector StatesToSample_. If this is empty, it will call the sampleUniform() method of the specified sampler.
void sampleUniformNear (State *state, const State *near, double distance) override
 It will sample the next state of the vector StatesToSample_. If this is empty, it will call the sampleUniformNear() method of the specified sampler.
void sampleGaussian (State *state, const State *mean, double stdDev) override
 It will sample the next state of the vector StatesToSample_. If this is empty, it will call the sampleGaussian() method of the specified sampler.
const StateSpacegetStateSpace () const
void setStatesToSample (const std::vector< const State * > &states)
 Fills the vector StatesToSample_ of states to be sampled in the next calls to sampleUniform(), sampleUniformNear() or sampleGaussian().
void clear ()
Public Member Functions inherited from ompl::base::StateSampler
 StateSampler (const StateSampler &)=delete
StateSampleroperator= (const StateSampler &)=delete
 StateSampler (const StateSpace *space)
 Constructor.

Protected Member Functions

void getNextSample (State *state)
 Extracts the next sample when statesToSample_ is not empty.

Protected Attributes

std::vector< State * > statesToSample_
 States to be sampled.
StateSamplerPtr sampler_
 Underlying, user-specified state sampler.
std::mutex statesLock_
 Lock to control the access to the statesToSample_ vector.
Protected Attributes inherited from ompl::base::StateSampler
const StateSpacespace_
 The state space this sampler samples.
RNG rng_
 An instance of a random number generator.

Detailed Description

Extended state sampler to use with the CForest planning algorithm. It wraps the user-specified state sampler.

Definition at line 51 of file CForestStateSampler.h.

Constructor & Destructor Documentation

◆ CForestStateSampler()

ompl::base::CForestStateSampler::CForestStateSampler ( const StateSpace * space,
StateSamplerPtr sampler )
inline

Constructor.

Definition at line 55 of file CForestStateSampler.h.

◆ ~CForestStateSampler()

ompl::base::CForestStateSampler::~CForestStateSampler ( )
inlineoverride

Destructor.

Definition at line 61 of file CForestStateSampler.h.

Member Function Documentation

◆ clear()

void ompl::base::CForestStateSampler::clear ( )

Definition at line 88 of file CForestStateSampler.cpp.

◆ getNextSample()

void ompl::base::CForestStateSampler::getNextSample ( State * state)
protected

Extracts the next sample when statesToSample_ is not empty.

Definition at line 80 of file CForestStateSampler.cpp.

◆ getStateSpace()

const StateSpace * ompl::base::CForestStateSampler::getStateSpace ( ) const
inline

Definition at line 78 of file CForestStateSampler.h.

◆ sampleGaussian()

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

It will sample the next state of the vector StatesToSample_. If this is empty, it will call the sampleGaussian() method of the specified sampler.

Implements ompl::base::StateSampler.

Definition at line 55 of file CForestStateSampler.cpp.

◆ sampleUniform()

void ompl::base::CForestStateSampler::sampleUniform ( State * state)
overridevirtual

It will sample the next state of the vector StatesToSample_. If this is empty, it will call the sampleUniform() method of the specified sampler.

Implements ompl::base::StateSampler.

Definition at line 39 of file CForestStateSampler.cpp.

◆ sampleUniformNear()

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

It will sample the next state of the vector StatesToSample_. If this is empty, it will call the sampleUniformNear() method of the specified sampler.

Implements ompl::base::StateSampler.

Definition at line 47 of file CForestStateSampler.cpp.

◆ setStatesToSample()

void ompl::base::CForestStateSampler::setStatesToSample ( const std::vector< const State * > & states)

Fills the vector StatesToSample_ of states to be sampled in the next calls to sampleUniform(), sampleUniformNear() or sampleGaussian().

Definition at line 63 of file CForestStateSampler.cpp.

Member Data Documentation

◆ sampler_

StateSamplerPtr ompl::base::CForestStateSampler::sampler_
protected

Underlying, user-specified state sampler.

Definition at line 97 of file CForestStateSampler.h.

◆ statesLock_

std::mutex ompl::base::CForestStateSampler::statesLock_
protected

Lock to control the access to the statesToSample_ vector.

Definition at line 100 of file CForestStateSampler.h.

◆ statesToSample_

std::vector<State *> ompl::base::CForestStateSampler::statesToSample_
protected

States to be sampled.

Definition at line 94 of file CForestStateSampler.h.


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