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

Public Member Functions | |
| const std::string & | getName (void) const |
| Get the name of the sampler. | |
| unsigned int | getNrAttempts (void) const |
| Get the number of attempts to be performed by the sampling routine. | |
| virtual bool | sample (State *state)=0 |
| Sample a state. Return false in case of failure. | |
| virtual bool | sampleNear (State *state, const State *near, const double distance)=0 |
| Sample a state near another, within specified distance. Return false, in case of failure. | |
| void | setName (const std::string &name) |
| Set the name of the sampler. | |
| void | setNrAttempts (unsigned int attempts) |
| Finding a valid sample usually requires performing multiple attempts. This call allows setting the number of such attempts. | |
| ValidStateSampler (const SpaceInformation *si) | |
| Constructor. | |
| virtual | ~ValidStateSampler (void) |
Protected Attributes | |
| unsigned int | attempts_ |
| Number of attempts to find a valid sample. | |
| std::string | name_ |
| The name of the sampler. | |
| const SpaceInformation * | si_ |
| The state space this sampler samples. | |
Abstract definition of a state sampler.
Definition at line 60 of file ValidStateSampler.h.
| ompl::base::ValidStateSampler::ValidStateSampler | ( | const SpaceInformation * | si | ) | [inline] |
Constructor.
Definition at line 65 of file ValidStateSampler.h.
| virtual ompl::base::ValidStateSampler::~ValidStateSampler | ( | void | ) | [inline, virtual] |
Definition at line 69 of file ValidStateSampler.h.
| const std::string& ompl::base::ValidStateSampler::getName | ( | void | ) | const [inline] |
Get the name of the sampler.
Definition at line 74 of file ValidStateSampler.h.
| unsigned int ompl::base::ValidStateSampler::getNrAttempts | ( | void | ) | const [inline] |
Get the number of attempts to be performed by the sampling routine.
Definition at line 101 of file ValidStateSampler.h.
| virtual bool ompl::base::ValidStateSampler::sample | ( | State * | state | ) | [pure virtual] |
Sample a state. Return false in case of failure.
Implemented in ompl::base::GaussianValidStateSampler, ompl::base::MaximizeClearanceValidStateSampler, ompl::base::ObstacleBasedValidStateSampler, ompl::base::UniformValidStateSampler, and MyValidStateSampler.
| virtual bool ompl::base::ValidStateSampler::sampleNear | ( | State * | state, | |
| const State * | near, | |||
| const double | distance | |||
| ) | [pure virtual] |
Sample a state near another, within specified distance. Return false, in case of failure.
Implemented in ompl::base::GaussianValidStateSampler, ompl::base::MaximizeClearanceValidStateSampler, ompl::base::ObstacleBasedValidStateSampler, ompl::base::UniformValidStateSampler, and MyValidStateSampler.
| void ompl::base::ValidStateSampler::setName | ( | const std::string & | name | ) | [inline] |
Set the name of the sampler.
Definition at line 80 of file ValidStateSampler.h.
| void ompl::base::ValidStateSampler::setNrAttempts | ( | unsigned int | attempts | ) | [inline] |
Finding a valid sample usually requires performing multiple attempts. This call allows setting the number of such attempts.
Definition at line 95 of file ValidStateSampler.h.
unsigned int ompl::base::ValidStateSampler::attempts_ [protected] |
Number of attempts to find a valid sample.
Definition at line 112 of file ValidStateSampler.h.
std::string ompl::base::ValidStateSampler::name_ [protected] |
The name of the sampler.
Reimplemented in StateSampling::MyValidStateSampler.
Definition at line 115 of file ValidStateSampler.h.
const SpaceInformation* ompl::base::ValidStateSampler::si_ [protected] |
The state space this sampler samples.
Definition at line 109 of file ValidStateSampler.h.