ompl::geometric::aitstar::ImplicitGraph Class Reference

Public Member Functions

 ImplicitGraph (const ompl::base::Cost &solutionCost)
 Constructs an implicit graph. More...
 
virtual ~ImplicitGraph ()=default
 Destructs an implicit graph.
 
void setup (const ompl::base::SpaceInformationPtr &spaceInformation, const ompl::base::ProblemDefinitionPtr &problemDefinition, ompl::base::PlannerInputStates *inputStates)
 The setup method for the graph. Needed to have it on the stack. More...
 
void clear ()
 Resets the graph to its construction state, without resetting options. More...
 
void setRewireFactor (double rewireFactor)
 Set the rewire factor of the RGG. More...
 
double getRewireFactor () const
 Get the reqire factor of the RGG. More...
 
void setUseKNearest (bool useKNearest)
 Whether to use a k-nearest connection model. If false, it uses an r-disc model. More...
 
bool getUseKNearest () const
 Whether the graph uses a k-nearest connection model. If false, it uses an r-disc model. More...
 
void setTrackApproximateSolution (bool track)
 Sets whether to track approximate solutions or not.
 
std::vector< std::shared_ptr< Vertex > > addSamples (std::size_t numNewSamples)
 Adds a batch of samples and returns the samples it has added. More...
 
std::size_t getNumVertices () const
 Gets the number of samples in the graph. More...
 
double getConnectionRadius () const
 Gets the RGG connection radius. More...
 
void registerStartState (const ompl::base::State *const startState)
 Registers a state as a start state. More...
 
void registerGoalState (const ompl::base::State *const goalState)
 Registers a state as a goal state. More...
 
bool hasAStartState () const
 Returns whether the graph has a goal state. More...
 
bool hasAGoalState () const
 Returns whether the graph has a goal state. More...
 
void updateStartAndGoalStates (const ompl::base::PlannerTerminationCondition &terminationCondition, ompl::base::PlannerInputStates *inputStates)
 Adds new start and goals to the graph if avavilable and creates a new informed sampler if necessary. More...
 
std::vector< std::shared_ptr< Vertex > > getNeighbors (const std::shared_ptr< Vertex > &vertex) const
 Get neighbors of a vertex. More...
 
bool isStart (const std::shared_ptr< Vertex > &vertex) const
 Checks whether the vertex is a start vertex. More...
 
bool isGoal (const std::shared_ptr< Vertex > &vertex) const
 Checks whether the vertex is a goal vertex. More...
 
const std::vector< std::shared_ptr< Vertex > > & getStartVertices () const
 Get the start vertices. More...
 
const std::vector< std::shared_ptr< Vertex > > & getGoalVertices () const
 Get the goal vertices. More...
 
std::vector< std::shared_ptr< Vertex > > getVertices () const
 Get all vertices. More...
 
void prune ()
 Prune all samples that can not contribute to a solution better than the current one. More...
 
std::size_t getNumberOfSampledStates () const
 Returns the total number of sampled states. More...
 
std::size_t getNumberOfValidSamples () const
 Returns the total number of valid samples found. More...
 
std::size_t getNumberOfStateCollisionChecks () const
 Get the number of state collision checks. More...
 
std::size_t getNumberOfNearestNeighborCalls () const
 Get the number of nearest neighbor calls. More...
 

Detailed Description

Definition at line 58 of file ImplicitGraph.h.

Constructor & Destructor Documentation

◆ ImplicitGraph()

ompl::geometric::aitstar::ImplicitGraph::ImplicitGraph ( const ompl::base::Cost solutionCost)

Constructs an implicit graph.

Definition at line 50 of file ImplicitGraph.cpp.

Member Function Documentation

◆ addSamples()

std::vector< std::shared_ptr< Vertex > > ompl::geometric::aitstar::ImplicitGraph::addSamples ( std::size_t  numNewSamples)

Adds a batch of samples and returns the samples it has added.

Definition at line 317 of file ImplicitGraph.cpp.

◆ clear()

void ompl::geometric::aitstar::ImplicitGraph::clear ( )

Resets the graph to its construction state, without resetting options.

Definition at line 71 of file ImplicitGraph.cpp.

◆ getConnectionRadius()

double ompl::geometric::aitstar::ImplicitGraph::getConnectionRadius ( ) const

Gets the RGG connection radius.

Definition at line 367 of file ImplicitGraph.cpp.

◆ getGoalVertices()

const std::vector< std::shared_ptr< Vertex > > & ompl::geometric::aitstar::ImplicitGraph::getGoalVertices ( ) const

Get the goal vertices.

Definition at line 426 of file ImplicitGraph.cpp.

◆ getNeighbors()

std::vector< std::shared_ptr< Vertex > > ompl::geometric::aitstar::ImplicitGraph::getNeighbors ( const std::shared_ptr< Vertex > &  vertex) const

Get neighbors of a vertex.

Definition at line 373 of file ImplicitGraph.cpp.

◆ getNumberOfNearestNeighborCalls()

std::size_t ompl::geometric::aitstar::ImplicitGraph::getNumberOfNearestNeighborCalls ( ) const

Get the number of nearest neighbor calls.

Definition at line 514 of file ImplicitGraph.cpp.

◆ getNumberOfSampledStates()

std::size_t ompl::geometric::aitstar::ImplicitGraph::getNumberOfSampledStates ( ) const

Returns the total number of sampled states.

Definition at line 497 of file ImplicitGraph.cpp.

◆ getNumberOfStateCollisionChecks()

std::size_t ompl::geometric::aitstar::ImplicitGraph::getNumberOfStateCollisionChecks ( ) const

Get the number of state collision checks.

Definition at line 507 of file ImplicitGraph.cpp.

◆ getNumberOfValidSamples()

std::size_t ompl::geometric::aitstar::ImplicitGraph::getNumberOfValidSamples ( ) const

Returns the total number of valid samples found.

Definition at line 502 of file ImplicitGraph.cpp.

◆ getNumVertices()

std::size_t ompl::geometric::aitstar::ImplicitGraph::getNumVertices ( ) const

Gets the number of samples in the graph.

Definition at line 362 of file ImplicitGraph.cpp.

◆ getRewireFactor()

double ompl::geometric::aitstar::ImplicitGraph::getRewireFactor ( ) const

Get the reqire factor of the RGG.

Definition at line 90 of file ImplicitGraph.cpp.

◆ getStartVertices()

const std::vector< std::shared_ptr< Vertex > > & ompl::geometric::aitstar::ImplicitGraph::getStartVertices ( ) const

Get the start vertices.

Definition at line 421 of file ImplicitGraph.cpp.

◆ getUseKNearest()

bool ompl::geometric::aitstar::ImplicitGraph::getUseKNearest ( ) const

Whether the graph uses a k-nearest connection model. If false, it uses an r-disc model.

Definition at line 100 of file ImplicitGraph.cpp.

◆ getVertices()

std::vector< std::shared_ptr< Vertex > > ompl::geometric::aitstar::ImplicitGraph::getVertices ( ) const

Get all vertices.

Definition at line 431 of file ImplicitGraph.cpp.

◆ hasAGoalState()

bool ompl::geometric::aitstar::ImplicitGraph::hasAGoalState ( ) const

Returns whether the graph has a goal state.

Definition at line 143 of file ImplicitGraph.cpp.

◆ hasAStartState()

bool ompl::geometric::aitstar::ImplicitGraph::hasAStartState ( ) const

Returns whether the graph has a goal state.

Definition at line 138 of file ImplicitGraph.cpp.

◆ isGoal()

bool ompl::geometric::aitstar::ImplicitGraph::isGoal ( const std::shared_ptr< Vertex > &  vertex) const

Checks whether the vertex is a goal vertex.

Definition at line 409 of file ImplicitGraph.cpp.

◆ isStart()

bool ompl::geometric::aitstar::ImplicitGraph::isStart ( const std::shared_ptr< Vertex > &  vertex) const

Checks whether the vertex is a start vertex.

Definition at line 397 of file ImplicitGraph.cpp.

◆ prune()

void ompl::geometric::aitstar::ImplicitGraph::prune ( )

Prune all samples that can not contribute to a solution better than the current one.

Definition at line 438 of file ImplicitGraph.cpp.

◆ registerGoalState()

void ompl::geometric::aitstar::ImplicitGraph::registerGoalState ( const ompl::base::State *const  goalState)

Registers a state as a goal state.

Definition at line 123 of file ImplicitGraph.cpp.

◆ registerStartState()

void ompl::geometric::aitstar::ImplicitGraph::registerStartState ( const ompl::base::State *const  startState)

Registers a state as a start state.

Definition at line 105 of file ImplicitGraph.cpp.

◆ setRewireFactor()

void ompl::geometric::aitstar::ImplicitGraph::setRewireFactor ( double  rewireFactor)

Set the rewire factor of the RGG.

Definition at line 85 of file ImplicitGraph.cpp.

◆ setup()

void ompl::geometric::aitstar::ImplicitGraph::setup ( const ompl::base::SpaceInformationPtr spaceInformation,
const ompl::base::ProblemDefinitionPtr problemDefinition,
ompl::base::PlannerInputStates inputStates 
)

The setup method for the graph. Needed to have it on the stack.

Definition at line 55 of file ImplicitGraph.cpp.

◆ setUseKNearest()

void ompl::geometric::aitstar::ImplicitGraph::setUseKNearest ( bool  useKNearest)

Whether to use a k-nearest connection model. If false, it uses an r-disc model.

Definition at line 95 of file ImplicitGraph.cpp.

◆ updateStartAndGoalStates()

void ompl::geometric::aitstar::ImplicitGraph::updateStartAndGoalStates ( const ompl::base::PlannerTerminationCondition terminationCondition,
ompl::base::PlannerInputStates inputStates 
)

Adds new start and goals to the graph if avavilable and creates a new informed sampler if necessary.

Definition at line 149 of file ImplicitGraph.cpp.


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