ompl::base::PlannerTerminationCondition Class Reference

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). More...

#include <ompl/base/PlannerTerminationCondition.h>

Inheritance diagram for ompl::base::PlannerTerminationCondition:

Public Member 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().
 
bool operator() () const
 Return true if the planner should stop its computation.
 
 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_()
 

Detailed Description

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).

Definition at line 127 of file PlannerTerminationCondition.h.


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