Loading...
Searching...
No Matches
ompl::base::ValidStateSampler Class Referenceabstract

Abstract definition of a state sampler. More...

#include <ompl/base/ValidStateSampler.h>

Inheritance diagram for ompl::base::ValidStateSampler:

Public Member Functions

 ValidStateSampler (const ValidStateSampler &)=delete
ValidStateSampleroperator= (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.
ParamSetparams ()
 Get the parameters for the valid state sampler.
const ParamSetparams () const
 Get the parameters for the valid state sampler.

Protected Attributes

const SpaceInformationsi_
 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

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()

const std::string & ompl::base::ValidStateSampler::getName ( ) const
inline

Get the name of the sampler.

Definition at line 75 of file ValidStateSampler.h.

◆ getNrAttempts()

unsigned int ompl::base::ValidStateSampler::getNrAttempts ( ) const
inline

Get the number of attempts to be performed by the sampling routine.

Definition at line 102 of file ValidStateSampler.h.

◆ params() [1/2]

ParamSet & ompl::base::ValidStateSampler::params ( )
inline

Get the parameters for the valid state sampler.

Definition at line 108 of file ValidStateSampler.h.

◆ params() [2/2]

const ParamSet & ompl::base::ValidStateSampler::params ( ) const
inline

Get the parameters for the valid state sampler.

Definition at line 114 of file ValidStateSampler.h.

◆ sample()

◆ sampleNear()

virtual bool ompl::base::ValidStateSampler::sampleNear ( State * state,
const State * near,
double distance )
pure virtual

◆ setName()

void ompl::base::ValidStateSampler::setName ( const std::string & name)
inline

Set the name of the sampler.

Definition at line 81 of file ValidStateSampler.h.

◆ setNrAttempts()

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 96 of file ValidStateSampler.h.

Member Data Documentation

◆ attempts_

unsigned int ompl::base::ValidStateSampler::attempts_
protected

Number of attempts to find a valid sample.

Definition at line 124 of file ValidStateSampler.h.

◆ name_

std::string ompl::base::ValidStateSampler::name_
protected

The name of the sampler.

Definition at line 127 of file ValidStateSampler.h.

◆ params_

ParamSet ompl::base::ValidStateSampler::params_
protected

The parameters for this instance of the valid state sampler.

Definition at line 130 of file ValidStateSampler.h.

◆ si_

const SpaceInformation* ompl::base::ValidStateSampler::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: