Loading...
Searching...
No Matches
ompl::control::KPIECE1::CloseSamples Struct Reference

Bounded set of good samples. More...

#include <ompl/control/planners/kpiece/KPIECE1.h>

Public Member Functions

 CloseSamples (unsigned int size)
 Construct an object to maintain a set of at most size samples. More...
 
bool consider (Grid::Cell *cell, Motion *motion, double distance)
 Evaluate whether motion motion, part of cell cell is good enough to be part of the set of samples closest to the goal, given its distance to the goal is distance. If so, add it to the set and return true. Otherwise, return false. More...
 
bool selectMotion (Motion *&smotion, Grid::Cell *&scell)
 Select the top sample (closest to the goal) and update its position in the set subsequently (pretend the distance to the goal is larger). Returns true if the sample selection is successful. More...
 
bool canSample () const
 Return true if samples can be selected from this set. More...
 

Public Attributes

unsigned int maxSize
 Maximum number of samples to maintain. More...
 
std::set< CloseSamplesamples
 The maintained samples. More...
 

Detailed Description

Bounded set of good samples.

Definition at line 295 of file KPIECE1.h.

Constructor & Destructor Documentation

◆ CloseSamples()

ompl::control::KPIECE1::CloseSamples::CloseSamples ( unsigned int  size)
inline

Construct an object to maintain a set of at most size samples.

Definition at line 298 of file KPIECE1.h.

Member Function Documentation

◆ canSample()

bool ompl::control::KPIECE1::CloseSamples::canSample ( ) const
inline

Return true if samples can be selected from this set.

Definition at line 317 of file KPIECE1.h.

◆ consider()

bool ompl::control::KPIECE1::CloseSamples::consider ( Grid::Cell cell,
Motion motion,
double  distance 
)

Evaluate whether motion motion, part of cell cell is good enough to be part of the set of samples closest to the goal, given its distance to the goal is distance. If so, add it to the set and return true. Otherwise, return false.

Definition at line 121 of file KPIECE1.cpp.

◆ selectMotion()

bool ompl::control::KPIECE1::CloseSamples::selectMotion ( Motion *&  smotion,
Grid::Cell *&  scell 
)

Select the top sample (closest to the goal) and update its position in the set subsequently (pretend the distance to the goal is larger). Returns true if the sample selection is successful.

Definition at line 150 of file KPIECE1.cpp.

Member Data Documentation

◆ maxSize

unsigned int ompl::control::KPIECE1::CloseSamples::maxSize

Maximum number of samples to maintain.

Definition at line 323 of file KPIECE1.h.

◆ samples

std::set<CloseSample> ompl::control::KPIECE1::CloseSamples::samples

The maintained samples.

Definition at line 326 of file KPIECE1.h.


The documentation for this struct was generated from the following files: