ImplicitGraph.cpp
146 }
151 }
159 ImplicitGraph::updateStartAndGoalStates(const ompl::base::PlannerTerminationCondition &terminationCondition,
166 // First update the goals. We have to call inputStates->nextGoal(terminationCondition) at least once
167 // (regardless of the return value of inputStates->moreGoalStates()) in case the termination condition
171 // Get a new goal. If there are none, or the underlying state is invalid this will be a nullptr.
191 {
197 // If we added a new start and have previously pruned goals, we might want to add the goals back.
201 std::vector<std::vector<std::shared_ptr<Vertex>>::iterator> revivedGoals;
211 heuristicCost, objective_->motionCostHeuristic(start->getState(), (*it)->getState()));
229 }
231 // If we added a new goal and have previously pruned starts, we might want to add the starts back.
244 heuristicCost = objective_->betterCost(
255 }
306 if (objective_->isCostBetterThan(objective_->combineCosts(costToCome, costToGo), solutionCost_))
330 newSamples_.emplace_back(std::make_shared<Vertex>(spaceInformation_, problemDefinition_, batchId_));
339 } while (!spaceInformation_->getStateValidityChecker()->isValid(newSamples_.back()->getState()));
472 // Check if the combination of the admissible costToCome and costToGo estimates results in a path
481 prunedGoalVertices_.emplace_back(vertex);
487 verticesToBePruned.emplace_back(vertex);
523 }
527 // Each sampled state is checked for collision. Only sampled states are checked for collision (number of
535 }
545 (sampler_->getInformedMeasure(solutionCost_) /
PlannerTerminationCondition plannerAlwaysTerminatingCondition()
Simple termination condition that always returns true. The termination condition will always be met.
Definition: PlannerTerminationCondition.cpp:190
bool haveMoreStartStates() const
Check if there are more potential start states.
Definition: Planner.cpp:339
void setRewireFactor(double rewireFactor)
Set the rewiring scale factor, s, such that r_rrg = s \times r_rrg*.
Definition: ImplicitGraph.cpp:1525
A shared pointer wrapper for ompl::base::SpaceInformation.
Helper class to extract valid start & goal states. Usually used internally by planners.
Definition: Planner.h:141
void setUseKNearest(bool useKNearest)
Enable a k-nearest search for instead of an r-disc search.
Definition: ImplicitGraph.cpp:1543
bool getUseKNearest() const
Get whether a k-nearest search is being used.
Definition: ImplicitGraph.cpp:1566
void log(const char *file, int line, LogLevel level, const char *m,...)
Root level logging function. This should not be invoked directly, but rather used via a logging macro...
Definition: Console.cpp:120
Definition of a cost value. Can represent the cost of a motion or the cost of a state.
Definition: Cost.h:111
void setup(const ompl::base::SpaceInformationPtr &spaceInformation, const ompl::base::ProblemDefinitionPtr &problemDefinition, CostHelper *costHelper, SearchQueue *searchQueue, const ompl::base::Planner *plannerPtr, ompl::base::PlannerInputStates &inputStates)
Setup the ImplicitGraph, must be called before use. Does not take a copy of the PlannerInputStates,...
Definition: ImplicitGraph.cpp:91
double unitNBallMeasure(unsigned int N)
The Lebesgue measure (i.e., "volume") of an n-dimensional ball with a unit radius.
Definition: GeometricEquations.cpp:55
Encapsulate a termination condition for a motion planner. Planners will call operator() to decide whe...
Definition: PlannerTerminationCondition.h:127
const State * nextStart()
Return the next valid start state or nullptr if no more valid start states are available.
Definition: Planner.cpp:228
const State * nextGoal(const PlannerTerminationCondition &ptc)
Return the next valid goal state or nullptr if no more valid goal states are available....
Definition: Planner.cpp:265
A shared pointer wrapper for ompl::base::ProblemDefinition.
void updateStartAndGoalStates(ompl::base::PlannerInputStates &inputStates, const base::PlannerTerminationCondition &terminationCondition)
Adds any new goals or starts that have appeared in the problem definition to the vector of vertices a...
Definition: ImplicitGraph.cpp:365
bool haveMoreGoalStates() const
Check if there are more potential goal states.
Definition: Planner.cpp:346
std::pair< unsigned int, unsigned int > prune(double prunedMeasure)
Prune the samples to the subproblem of the given measure. Returns the number of vertices disconnected...
Definition: ImplicitGraph.cpp:628
ImplicitGraph(const ompl::base::Cost &solutionCost)
Constructs an implicit graph.
Definition: ImplicitGraph.cpp:146
Main namespace. Contains everything in this library.
Definition: MultiLevelPlanarManipulatorDemo.cpp:65