ImplicitGraph.h
49 // I am member class of the BITstar class (i.e., I am in it's namespace), so I need to include it's definition to be
50 // aware of the class BITstar. It has a forward declaration to me and the other helper classes but I will need to
77 void setup(const ompl::base::SpaceInformationPtr &si, const ompl::base::ProblemDefinitionPtr &pdef,
void nearestSamples(const VertexPtr &vertex, VertexPtrVector *neighbourSamples)
Get the nearest unconnected samples using the appropriate "near" definition (i.e.,...
Definition: ImplicitGraph.cpp:346
Random number generation. An instance of this class cannot be used by multiple threads at once (membe...
Definition: RandomNumbers.h:90
std::shared_ptr< SearchQueue > SearchQueuePtr
An search queue shared pointer.
Definition: BITstar.h:246
void addVertex(const VertexPtr &newVertex, bool removeFromFree)
Add a vertex to the tree, optionally moving it from the set of unconnected samples.
Definition: ImplicitGraph.cpp:805
std::function< std::string()> NameFunc
A utility functor for ImplicitGraph and SearchQueue.
Definition: BITstar.h:249
void setDropSamplesOnPrune(bool dropSamples)
Set whether unconnected samples are dropped on pruning.
Definition: ImplicitGraph.cpp:1466
unsigned int numStatesGenerated() const
The total number of states generated (numSamples_).
Definition: ImplicitGraph.cpp:1550
void setRewireFactor(double rewireFactor)
Set the rewiring scale factor, s, such that r_rrg = s \times r_rrg*.
Definition: ImplicitGraph.cpp:1390
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 a...
Definition: ImplicitGraph.cpp:454
void setTrackApproximateSolutions(bool findApproximate)
Set whether to track approximate solutions during the search.
Definition: ImplicitGraph.cpp:1487
A shared pointer wrapper for ompl::base::SpaceInformation.
Helper class to extract valid start & goal states. Usually used internally by planners.
Definition: Planner.h:142
VertexPtrVector::const_iterator goalVerticesBeginConst() const
Returns a const-iterator to the front of the goal-vertex vector.
Definition: ImplicitGraph.cpp:1321
VertexPtrVector::const_iterator goalVerticesEndConst() const
Returns a const-iterator to the end of the goal-vertex vector.
Definition: ImplicitGraph.cpp:1326
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...
Definition: ImplicitGraph.cpp:838
void setup(const ompl::base::SpaceInformationPtr &si, const ompl::base::ProblemDefinitionPtr &pdef, const CostHelperPtr &costHelper, const SearchQueuePtr &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,...
Definition: ImplicitGraph.cpp:145
unsigned int numConnectedVertices() const
The number of vertices in the tree (Size of vertexNN_).
Definition: ImplicitGraph.cpp:1545
bool hasAGoal() const
Gets whether the graph contains a goal or not.
Definition: ImplicitGraph.cpp:1306
void setUseKNearest(bool useKNearest)
Enable a k-nearest search for instead of an r-disc search.
Definition: ImplicitGraph.cpp:1408
void getGraphAsPlannerData(ompl::base::PlannerData &data) const
Adds the graph to the given PlannerData struct.
Definition: ImplicitGraph.cpp:383
bool getUseKNearest() const
Get whether a k-nearest search is being used.
Definition: ImplicitGraph.cpp:1431
Definition of a cost value. Can represent the cost of a motion or the cost of a state.
Definition: Cost.h:111
VertexPtrVector::const_iterator startVerticesEndConst() const
Returns a const-iterator to the end of the start-vertex vector.
Definition: ImplicitGraph.cpp:1316
unsigned int numVerticesDisconnected() const
The number of tree vertices disconnected (numVerticesDisconnected_).
Definition: ImplicitGraph.cpp:1565
Object containing planner generated vertex and edge data. It is assumed that all vertices are unique,...
Definition: PlannerData.h:238
double getInformedMeasure(const ompl::base::Cost &cost) const
Query the underlying state sampler for the informed measure of the problem.
Definition: ImplicitGraph.cpp:1341
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...
Definition: ImplicitGraph.cpp:439
void nearestVertices(const VertexPtr &vertex, VertexPtrVector *neighbourVertices)
Get the nearest samples from the vertexNN_ using the appropriate "near" definition (i....
Definition: ImplicitGraph.cpp:366
double distanceFunction(const VertexConstPtr &a, const VertexConstPtr &b) const
The distance function. Calculates the distance directionally from the given state to all the other st...
Definition: ImplicitGraph.cpp:325
unsigned int numVerticesConnected() const
The total number of vertices added to the graph (numVertices_).
Definition: ImplicitGraph.cpp:1555
VertexConstPtr closestVertexToGoal() const
IF BEING TRACKED, returns the closest vertex in the tree to the goal.
Definition: ImplicitGraph.cpp:1346
A shared pointer wrapper for ompl::base::ProblemDefinition.
unsigned int numStateCollisionChecks() const
The number of state collision checks (numStateCollisionChecks_).
Definition: ImplicitGraph.cpp:1575
unsigned int numFreeSamples() const
The number of free samples (size of freeStateNN_).
Definition: ImplicitGraph.cpp:1540
unsigned int numFreeStatesPruned() const
The number of states pruned (numFreeStatesPruned_).
Definition: ImplicitGraph.cpp:1560
unsigned int numNearestLookups() const
The number of nearest neighbour calls (numNearestNeighbours_).
Definition: ImplicitGraph.cpp:1570
bool hasInformedMeasure() const
Query whether the underlying state sampler can provide an informed measure.
Definition: ImplicitGraph.cpp:1336
bool getJustInTimeSampling() const
Get whether we're using just-in-time sampling.
Definition: ImplicitGraph.cpp:1461
double smallestDistanceToGoal() const
IF BEING TRACKED, returns the how close vertices in the tree are to the goal.
Definition: ImplicitGraph.cpp:1357
bool getTrackApproximateSolutions() const
Get whether approximate solutions are tracked during the search.
Definition: ImplicitGraph.cpp:1516
ompl::base::Cost minCost() const
Get the minimum cost solution possible for this problem.
Definition: ImplicitGraph.cpp:1331
bool getDropSamplesOnPrune() const
Get whether unconnected samples are dropped on pruning.
Definition: ImplicitGraph.cpp:1482
std::shared_ptr< const Vertex > VertexConstPtr
A constant vertex shared pointer.
Definition: BITstar.h:222
void setNearestNeighbors()
Set a different nearest neighbours datastructure.
Definition: ImplicitGraph.cpp:1522
unsigned int getConnectivityK() const
Get the k of this k-nearest RGG.
Definition: ImplicitGraph.cpp:1368
void addSample(const VertexPtr &newSample)
Add an unconnected sample.
Definition: ImplicitGraph.cpp:771
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 con...
Definition: ImplicitGraph.cpp:745
void removeSample(const VertexPtr &oldSample)
Remove an unconnected sample.
Definition: ImplicitGraph.cpp:787
VertexPtrVector::const_iterator startVerticesBeginConst() const
Returns a const-iterator to the front of the start-vertex vector.
Definition: ImplicitGraph.cpp:1311
std::shared_ptr< NearestNeighbors< VertexPtr > > VertexPtrNNPtr
The OMPL::NearestNeighbors structure.
Definition: BITstar.h:240
void setJustInTimeSampling(bool useJit)
Definition: ImplicitGraph.cpp:1436
void addNewSamples(const unsigned int &numSamples)
Increase the resolution of the graph-based approximation of the continuous search domain by adding a ...
Definition: ImplicitGraph.cpp:706