Class PlannerTerminationCondition
Defined in File PlannerTerminationCondition.h
Inheritance Relationships
Derived Type
public ompl::base::CostConvergenceTerminationCondition
(Class CostConvergenceTerminationCondition)
Class Documentation
-
class PlannerTerminationCondition
Encapsulate a termination condition for a motion planner. Planners will call operator() to decide whether they should terminate before a solution is found or not. operator() will return true if either the implemented condition is met (the call to eval() returns true) or if the user called terminate(true).
Subclassed by ompl::base::CostConvergenceTerminationCondition
Public Functions
-
PlannerTerminationCondition(const PlannerTerminationConditionFn &fn)
Construct a termination condition. By default, eval() will call the externally specified function fn to decide whether the planner should terminate.
-
PlannerTerminationCondition(const PlannerTerminationConditionFn &fn, double period)
Construct a termination condition that is evaluated every period seconds. The evaluation of the condition consists of calling fn() in a separate thread. Calls to eval() will always return the last value computed by the call to fn().
-
~PlannerTerminationCondition() = default
-
inline bool operator()() const
Return true if the planner should stop its computation.
-
inline operator bool() const
Cast as true if the planner should stop its computation.
-
void terminate() const
Notify that the condition for termination should become true, regardless of what eval() returns. This function may be called while the condition is being evaluated by other threads.
-
bool eval() const
The implementation of some termination condition. By default, this just calls fn_()
-
PlannerTerminationCondition(const PlannerTerminationConditionFn &fn)