Aikido
aikido::planner::ompl::GoalRegion Class Reference

Exposes a Testable/Sampleable constraint pair as a goal to OMPL planners. More...

#include <aikido/planner/ompl/GoalRegion.hpp>

Inheritance diagram for aikido::planner::ompl::GoalRegion:

Public Member Functions

 GoalRegion (const ::ompl::base::SpaceInformationPtr &_si, constraint::TestablePtr _goalTestable, std::unique_ptr< constraint::SampleGenerator > _generator)
 Constructor. More...
 
void sampleGoal (::ompl::base::State *_state) const override
 Sample a state in the goal region using the SampleGenerator defined on the class. More...
 
unsigned int maxSampleCount () const override
 Return the maximum number of samples that can be asked for before repeating. More...
 
bool couldSample () const override
 Return true if the SampleGenerator can generate more samples. More...
 
double distanceGoal (const ::ompl::base::State *_state) const override
 Return 0 if the goal is satisfied or inf otherwise. More...
 
bool isSatisfied (const ::ompl::base::State *_state) const override
 Return true if the state satisfies the goal constraints. More...
 

Private Attributes

constraint::TestablePtr mTestable
 
std::unique_ptr< constraint::SampleGeneratormSampleGenerator
 

Detailed Description

Exposes a Testable/Sampleable constraint pair as a goal to OMPL planners.

Constructor & Destructor Documentation

◆ GoalRegion()

aikido::planner::ompl::GoalRegion::GoalRegion ( const ::ompl::base::SpaceInformationPtr &  _si,
constraint::TestablePtr  _goalTestable,
std::unique_ptr< constraint::SampleGenerator _generator 
)

Constructor.

Generate a goal region from a Testable constraint and a SampleGenerator.

Parameters
_siThe SpaceInformation defining the planning instance where this goal is used
_goalTestableA Testable that is satisfied for all states in this GoalRegion
_generatorA SampleGenerator that returns states in this GoalRegion

Member Function Documentation

◆ couldSample()

bool aikido::planner::ompl::GoalRegion::couldSample ( ) const
override

Return true if the SampleGenerator can generate more samples.

◆ distanceGoal()

double aikido::planner::ompl::GoalRegion::distanceGoal ( const ::ompl::base::State *  _state) const
override

Return 0 if the goal is satisfied or inf otherwise.

Parameters
_stateThe state to evaluate

◆ isSatisfied()

bool aikido::planner::ompl::GoalRegion::isSatisfied ( const ::ompl::base::State *  _state) const
override

Return true if the state satisfies the goal constraints.

Parameters
_stateThe state to evaluate

◆ maxSampleCount()

unsigned int aikido::planner::ompl::GoalRegion::maxSampleCount ( ) const
override

Return the maximum number of samples that can be asked for before repeating.

◆ sampleGoal()

void aikido::planner::ompl::GoalRegion::sampleGoal ( ::ompl::base::State *  _state) const
override

Sample a state in the goal region using the SampleGenerator defined on the class.

Parameters
[out]_stateThe sampled state

Member Data Documentation

◆ mSampleGenerator

std::unique_ptr<constraint::SampleGenerator> aikido::planner::ompl::GoalRegion::mSampleGenerator
private

◆ mTestable

constraint::TestablePtr aikido::planner::ompl::GoalRegion::mTestable
private