ompl::geometric::BITstar::ImplicitGraph Class Reference

A conceptual representation of samples as an edge-implicit random geometric graph. More...

#include <ompl/geometric/planners/bitstar/datastructures/ImplicitGraph.h>

## Public Member Functions

ImplicitGraph (NameFunc nameFunc)
Construct an implicit graph.

void setup (const ompl::base::SpaceInformationPtr &si, const ompl::base::ProblemDefinitionPtr &pdef, CostHelper *costHelper, SearchQueue *searchQueue, const ompl::base::Planner *plannerPtr, ompl::base::PlannerInputStates &pis)
Setup the ImplicitGraph, must be called before use. Does not take a copy of the PlannerInputStates, but checks it for starts/goals.

void clear ()
Clear the graph to the state of construction.

bool hasAStart () const
Gets whether the graph contains a start or not.

bool hasAGoal () const
Gets whether the graph contains a goal or not.

VertexPtrVector::const_iterator startVerticesBeginConst () const
Returns a const-iterator to the front of the start-vertex vector.

VertexPtrVector::const_iterator startVerticesEndConst () const
Returns a const-iterator to the end of the start-vertex vector.

VertexPtrVector::const_iterator goalVerticesBeginConst () const
Returns a const-iterator to the front of the goal-vertex vector.

VertexPtrVector::const_iterator goalVerticesEndConst () const
Returns a const-iterator to the end of the goal-vertex vector.

ompl::base::Cost minCost () const
Get the minimum cost solution possible for this problem.

bool hasInformedMeasure () const
Query whether the underlying state sampler can provide an informed measure.

double getInformedMeasure (const ompl::base::Cost &cost) const
Query the underlying state sampler for the informed measure of the problem.

double distanceFunction (const VertexConstPtr &a, const VertexConstPtr &b) const
The distance function. Calculates the distance directionally from the given state to all the other states (can be used on states either in our out of the graph).

void nearestSamples (const VertexPtr &vertex, VertexPtrVector *neighbourSamples)
Get the nearest unconnected samples using the appropriate "near" definition (i.e., k or r).

void nearestVertices (const VertexPtr &vertex, VertexPtrVector *neighbourVertices)
Get the nearest samples from the vertexNN_ using the appropriate "near" definition (i.e., k or r).

void getGraphAsPlannerData (ompl::base::PlannerData &data) const
Adds the graph to the given PlannerData struct.

VertexConstPtr closestVertexToGoal () const
IF BEING TRACKED, returns the closest vertex in the tree to the goal.

double smallestDistanceToGoal () const
IF BEING TRACKED, returns the how close vertices in the tree are to the goal.

unsigned int getConnectivityK () const
Get the k of this k-nearest RGG.

double getConnectivityR () const
Get the radius of this r-disc RGG.

void hasSolution (const ompl::base::Cost &solnCost)
Mark that a solution has been found and that the graph should be limited to the given heuristic value.

void updateStartAndGoalStates (ompl::base::PlannerInputStates &pis, const base::PlannerTerminationCondition &ptc)
Adds any new goals or starts that have appeared in the problem definition to the vector of vertices and the queue. Creates a new informed sampler if necessary.

void addNewSamples (const unsigned int &numSamples)
Increase the resolution of the graph-based approximation of the continuous search domain by adding a batch of new samples.

std::pair< unsigned int, unsigned int > prune (double prunedMeasure)
Prune the samples to the subproblem of the given measure. Pruning is performed by using the prune conditions of the SearchQueue. Returns the number of vertices disconnected and the number of samples removed.

void removeSample (const VertexPtr &oldSample)
Remove an unconnected sample.

void addVertex (const VertexPtr &newVertex, bool removeFromFree)
Add a vertex to the tree, optionally moving it from the set of unconnected samples.

unsigned int removeVertex (const VertexPtr &oldSample, bool moveToFree)
Remove a vertex from the tree, can optionally be allowed to move it to the set of unconnected samples if may still be useful.

void assertValidSample (const VertexConstPtr &sample, bool mustBeNew)

void setRewireFactor (double rewireFactor)
Set the rewiring scale factor, s, such that r_rrg = s r_rrg*.

double getRewireFactor () const
Get the rewiring scale factor.

void setUseKNearest (bool useKNearest)
Enable a k-nearest search for instead of an r-disc search.

bool getUseKNearest () const
Get whether a k-nearest search is being used.

void setJustInTimeSampling (bool useJit)

bool getJustInTimeSampling () const
Get whether we're using just-in-time sampling.

void setDropSamplesOnPrune (bool dropSamples)
Set whether unconnected samples are dropped on pruning.

bool getDropSamplesOnPrune () const
Get whether unconnected samples are dropped on pruning.

void setTrackApproximateSolutions (bool findApproximate)
Set whether to track approximate solutions during the search.

bool getTrackApproximateSolutions () const
Get whether approximate solutions are tracked during the search.

template<template< typename T > class NN>
void setNearestNeighbors ()
Set a different nearest neighbours datastructure.

unsigned int numFreeSamples () const
The number of free samples (size of freeStateNN_).

unsigned int numConnectedVertices () const
The number of vertices in the tree (Size of vertexNN_).

unsigned int numStatesGenerated () const
The total number of states generated (numSamples_).

unsigned int numVerticesConnected () const
The total number of vertices added to the graph (numVertices_).

unsigned int numFreeStatesPruned () const
The number of states pruned (numFreeStatesPruned_).

unsigned int numVerticesDisconnected () const
The number of tree vertices disconnected (numVerticesDisconnected_).

unsigned int numNearestLookups () const
The number of nearest neighbour calls (numNearestNeighbours_).

unsigned int numStateCollisionChecks () const
The number of state collision checks (numStateCollisionChecks_).

## Detailed Description

A conceptual representation of samples as an edge-implicit random geometric graph.

Short Description
An edge-implicit representation of a random geometric graph.

Definition at line 64 of file ImplicitGraph.h.

## ◆ setJustInTimeSampling()

 void ompl::geometric::BITstar::ImplicitGraph::setJustInTimeSampling ( bool useJit )

Enable sampling "just-in-time", i.e., only when necessary for a nearest-neighbour search.

Definition at line 1486 of file ImplicitGraph.cpp.

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