ParallelPlan.cpp
42 : pdef_(pdef), phybrid_(std::make_shared<geometric::PathHybridization>(pdef->getSpaceInformation()))
79 ompl::base::PlannerStatus ompl::tools::ParallelPlan::solve(double solveTime, std::size_t minSolCount,
82 return solve(base::timedPlannerTerminationCondition(solveTime, std::min(solveTime / 100.0, 0.1)), minSolCount,
86 ompl::base::PlannerStatus ompl::tools::ParallelPlan::solve(const base::PlannerTerminationCondition &ptc, bool hybridize)
91 ompl::base::PlannerStatus ompl::tools::ParallelPlan::solve(const base::PlannerTerminationCondition &ptc,
160 OMPL_DEBUG("ParallelPlan.solveOne: Solution found by %s in %lf seconds", planner->getName().c_str(), duration);
169 void ompl::tools::ParallelPlan::solveMore(base::Planner *planner, std::size_t minSolCount, std::size_t maxSolCount,
187 OMPL_DEBUG("ParallelPlan.solveMore: Solution found by %s in %lf seconds", planner->getName().c_str(), duration);
195 attempts += phybrid_->recordPath(std::static_pointer_cast<geometric::PathGeometric>(path.path_), false);
201 OMPL_DEBUG("ParallelPlan.solveMore: Spent %f seconds hybridizing %u solution paths (attempted %u connections "
PlannerTerminationCondition timedPlannerTerminationCondition(double duration)
Return a termination condition that will become true duration seconds in the future (wall-time)
Definition: PlannerTerminationCondition.cpp:216
void solveMore(base::Planner *planner, std::size_t minSolCount, std::size_t maxSolCount, const base::PlannerTerminationCondition *ptc)
Run the planner and collect the solutions. This function is only called if hybridize_ is true.
Definition: ParallelPlan.cpp:169
void addPlannerAllocator(const base::PlannerAllocator &pa)
Add a planner allocator to use.
Definition: ParallelPlan.cpp:57
Encapsulate a termination condition for a motion planner. Planners will call operator() to decide whe...
Definition: PlannerTerminationCondition.h:127
A class to store the exit status of Planner::solve()
Definition: PlannerStatus.h:112
std::function< PlannerPtr(const SpaceInformationPtr &)> PlannerAllocator
Definition of a function that can allocate a planner.
Definition: Planner.h:501
void solveOne(base::Planner *planner, std::size_t minSolCount, const base::PlannerTerminationCondition *ptc)
Run the planner and call ompl::base::PlannerTerminationCondition::terminate() for the other planners ...
Definition: ParallelPlan.cpp:144
ParallelPlan(const base::ProblemDefinitionPtr &pdef)
Create an instance for a specified space information.
Definition: ParallelPlan.cpp:41
void clearHybridizationPaths()
Clear the set of paths recorded for hybrididzation.
Definition: ParallelPlan.cpp:69
void addPlanner(const base::PlannerPtr &planner)
Add a planner to use.
Definition: ParallelPlan.cpp:48
void terminate() const
Notify that the condition for termination should become true, regardless of what eval() returns....
Definition: PlannerTerminationCondition.cpp:172
duration seconds(double sec)
Return the time duration representing a given number of seconds.
Definition: Time.h:128
base::PlannerStatus solve(double solveTime, bool hybridize=true)
Call Planner::solve() for all planners, in parallel, each planner running for at most solveTime secon...
Definition: ParallelPlan.cpp:74