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>

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 StateSpace * | getStateSpace () 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 | |
StateSampler & | operator= (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 StateSpace * | space_ |
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()
|
inline |
Constructor.
Definition at line 55 of file CForestStateSampler.h.
◆ ~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()
|
protected |
Extracts the next sample when statesToSample_ is not empty.
Definition at line 80 of file CForestStateSampler.cpp.
◆ getStateSpace()
|
inline |
Definition at line 78 of file CForestStateSampler.h.
◆ sampleGaussian()
|
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()
|
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()
|
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_
|
protected |
Underlying, user-specified state sampler.
Definition at line 97 of file CForestStateSampler.h.
◆ statesLock_
|
protected |
Lock to control the access to the statesToSample_ vector.
Definition at line 100 of file CForestStateSampler.h.
◆ 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:
- ompl/geometric/planners/cforest/CForestStateSampler.h
- ompl/geometric/planners/cforest/src/CForestStateSampler.cpp