Generate valid samples randomly, but with a bias towards higher clearance. More...
#include <ompl/base/samplers/MaximizeClearanceValidStateSampler.h>

Public Member Functions | |
MaximizeClearanceValidStateSampler (const SpaceInformation *si) | |
Constructor. | |
bool | sample (State *state) override |
Sample a state. Return false in case of failure. | |
bool | sampleNear (State *state, const State *near, double distance) override |
Sample a state near another, within specified distance. Return false, in case of failure. | |
void | setNrImproveAttempts (unsigned int attempts) |
The number of attempts at improving the clearance of the sampled state. | |
unsigned int | getNrImproveAttempts () const |
Get the number of attempts to improve a sampled state. | |
![]() | |
ValidStateSampler (const ValidStateSampler &)=delete | |
ValidStateSampler & | operator= (const ValidStateSampler &)=delete |
ValidStateSampler (const SpaceInformation *si) | |
Constructor. | |
const std::string & | getName () 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, 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 () const |
Get the number of attempts to be performed by the sampling routine. | |
ParamSet & | params () |
Get the parameters for the valid state sampler. | |
const ParamSet & | params () const |
Get the parameters for the valid state sampler. | |
Protected Attributes | |
StateSamplerPtr | sampler_ |
The sampler to build upon. | |
unsigned int | improveAttempts_ |
Number of attempts to improve a valid sample. | |
![]() | |
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. | |
ParamSet | params_ |
The parameters for this instance of the valid state sampler. | |
Detailed Description
Generate valid samples randomly, but with a bias towards higher clearance.
Definition at line 48 of file MaximizeClearanceValidStateSampler.h.
Constructor & Destructor Documentation
◆ MaximizeClearanceValidStateSampler()
ompl::base::MaximizeClearanceValidStateSampler::MaximizeClearanceValidStateSampler | ( | const SpaceInformation * | si | ) |
Constructor.
Definition at line 40 of file MaximizeClearanceValidStateSampler.cpp.
◆ ~MaximizeClearanceValidStateSampler()
|
override |
Definition at line 55 of file MaximizeClearanceValidStateSampler.cpp.
Member Function Documentation
◆ getNrImproveAttempts()
|
inline |
Get the number of attempts to improve a sampled state.
Definition at line 67 of file MaximizeClearanceValidStateSampler.h.
◆ sample()
|
overridevirtual |
Sample a state. Return false in case of failure.
Implements ompl::base::ValidStateSampler.
Definition at line 60 of file MaximizeClearanceValidStateSampler.cpp.
◆ sampleNear()
|
overridevirtual |
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
Implements ompl::base::ValidStateSampler.
Definition at line 93 of file MaximizeClearanceValidStateSampler.cpp.
◆ setNrImproveAttempts()
|
inline |
The number of attempts at improving the clearance of the sampled state.
Definition at line 61 of file MaximizeClearanceValidStateSampler.h.
Member Data Documentation
◆ improveAttempts_
|
protected |
Number of attempts to improve a valid sample.
Definition at line 77 of file MaximizeClearanceValidStateSampler.h.
◆ sampler_
|
protected |
The sampler to build upon.
Definition at line 74 of file MaximizeClearanceValidStateSampler.h.
The documentation for this class was generated from the following files:
- ompl/base/samplers/MaximizeClearanceValidStateSampler.h
- ompl/base/samplers/src/MaximizeClearanceValidStateSampler.cpp