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

Public Member Functions | |
| ValidStateSampler (const SpaceInformation *si) | |
| Constructor. | |
| const std::string & | getName (void) const |
| Get the name of the sampler. | |
| void | setName (const std::string &name) |
| Set the name of the sampler. | |
| 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 | setNrAttempts (unsigned int attempts) |
| Finding a valid sample usually requires performing multiple attempts. This call allows setting the number of such attempts. | |
| unsigned int | getNrAttempts (void) const |
| Get the number of attempts to be performed by the sampling routine. | |
Protected Attributes | |
| const SpaceInformation * | si_ |
| The state space this sampler samples. | |
| unsigned int | attempts_ |
| Number of attempts to find a valid sample. | |
| std::string | name_ |
| The name of the sampler. | |
Abstract definition of a state sampler.
Definition at line 60 of file ValidStateSampler.h.
| 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, and ompl::base::UniformValidStateSampler.