Definition of a compound state sampler. This is useful to construct samplers for compound states. More...
#include <ompl/base/StateSampler.h>

Public Member Functions | |
| 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. | |
| void | sampleUniform (State *state) override |
| Sample a state. | |
| 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. | |
| 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. | |
| Public Member Functions inherited from ompl::base::StateSampler | |
| StateSampler (const StateSampler &)=delete | |
| StateSampler & | operator= (const StateSampler &)=delete |
| StateSampler (const StateSpace *space) | |
| Constructor. | |
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). | |
| 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
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()
|
inline |
Constructor.
Definition at line 115 of file StateSampler.h.
Member Function Documentation
◆ addSampler()
|
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()
|
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()
|
overridevirtual |
Sample a state.
Implements ompl::base::StateSampler.
Definition at line 47 of file StateSampler.cpp.
◆ sampleUniformNear()
|
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_
|
protected |
The samplers that are composed.
Definition at line 142 of file StateSampler.h.
◆ 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:
- ompl/base/StateSampler.h
- ompl/base/src/StateSampler.cpp