Abstract definition of a state sampler. More...
#include <ompl/base/ValidStateSampler.h>

Public Member Functions | |
ValidStateSampler (const ValidStateSampler &)=delete | |
ValidStateSampler & | operator= (const ValidStateSampler &)=delete |
ValidStateSampler (const SpaceInformation *si) | |
Constructor. More... | |
const std::string & | getName () const |
Get the name of the sampler. More... | |
void | setName (const std::string &name) |
Set the name of the sampler. More... | |
virtual bool | sample (State *state)=0 |
Sample a state. Return false in case of failure. More... | |
virtual bool | sampleNear (State *state, const State *near, double distance)=0 |
Sample a state near another, within specified distance. Return false, in case of failure. More... | |
void | setNrAttempts (unsigned int attempts) |
Finding a valid sample usually requires performing multiple attempts. This call allows setting the number of such attempts. More... | |
unsigned int | getNrAttempts () const |
Get the number of attempts to be performed by the sampling routine. More... | |
ParamSet & | params () |
Get the parameters for the valid state sampler. More... | |
const ParamSet & | params () const |
Get the parameters for the valid state sampler. More... | |
Protected Attributes | |
const SpaceInformation * | si_ |
The state space this sampler samples. More... | |
unsigned int | attempts_ |
Number of attempts to find a valid sample. More... | |
std::string | name_ |
The name of the sampler. More... | |
ParamSet | params_ |
The parameters for this instance of the valid state sampler. More... | |
Detailed Description
Abstract definition of a state sampler.
Definition at line 62 of file ValidStateSampler.h.
Constructor & Destructor Documentation
◆ ValidStateSampler()
ompl::base::ValidStateSampler::ValidStateSampler | ( | const SpaceInformation * | si | ) |
Constructor.
Definition at line 40 of file ValidStateSampler.cpp.
Member Function Documentation
◆ getName()
|
inline |
Get the name of the sampler.
Definition at line 75 of file ValidStateSampler.h.
◆ getNrAttempts()
|
inline |
Get the number of attempts to be performed by the sampling routine.
Definition at line 102 of file ValidStateSampler.h.
◆ params() [1/2]
|
inline |
Get the parameters for the valid state sampler.
Definition at line 108 of file ValidStateSampler.h.
◆ params() [2/2]
|
inline |
Get the parameters for the valid state sampler.
Definition at line 114 of file ValidStateSampler.h.
◆ sample()
|
pure virtual |
Sample a state. Return false in case of failure.
Implemented in ompl::base::ConstrainedValidStateSampler, ompl::base::BridgeTestValidStateSampler, ompl::base::GaussianValidStateSampler, ompl::base::MaximizeClearanceValidStateSampler, ompl::base::MinimumClearanceValidStateSampler, ompl::base::ObstacleBasedValidStateSampler, and ompl::base::UniformValidStateSampler.
◆ sampleNear()
|
pure virtual |
Sample a state near another, within specified distance. Return false, in case of failure.
- Note
- The memory for near must be disjoint from the memory for state
Implemented in ompl::base::ConstrainedValidStateSampler, ompl::base::BridgeTestValidStateSampler, ompl::base::GaussianValidStateSampler, ompl::base::MaximizeClearanceValidStateSampler, ompl::base::MinimumClearanceValidStateSampler, ompl::base::ObstacleBasedValidStateSampler, and ompl::base::UniformValidStateSampler.
◆ setName()
|
inline |
Set the name of the sampler.
Definition at line 81 of file ValidStateSampler.h.
◆ setNrAttempts()
|
inline |
Finding a valid sample usually requires performing multiple attempts. This call allows setting the number of such attempts.
Definition at line 96 of file ValidStateSampler.h.
Member Data Documentation
◆ attempts_
|
protected |
Number of attempts to find a valid sample.
Definition at line 124 of file ValidStateSampler.h.
◆ name_
|
protected |
The name of the sampler.
Definition at line 127 of file ValidStateSampler.h.
◆ params_
|
protected |
The parameters for this instance of the valid state sampler.
Definition at line 130 of file ValidStateSampler.h.
◆ si_
|
protected |
The state space this sampler samples.
Definition at line 121 of file ValidStateSampler.h.
The documentation for this class was generated from the following files:
- ompl/base/ValidStateSampler.h
- ompl/base/src/ValidStateSampler.cpp