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 <PlannerTerminationCondition.h>
Public Member Functions | |
virtual bool | eval (void) const |
The implementation of some termination condition. By default, this just calls fn_(). | |
bool | operator() (void) const |
Return true if the planner should stop its computation. | |
PlannerTerminationCondition (const PlannerTerminationConditionFn &fn=PlannerTerminationConditionFn()) | |
Construct a termination condition. By default, eval() will call the externally specified function fn to decide whether the planner should terminate. The function fn does not always need to be specified, if a different implementation of eval() is provided by a derived class. | |
virtual void | terminate (bool flag) |
Notify that the condition for termination should become true, regardless of what eval() returns. | |
virtual | ~PlannerTerminationCondition (void) |
Protected Attributes | |
PlannerTerminationConditionFn | fn_ |
Function pointer to the piece of code that decides whether a termination condition has been met. | |
bool | terminate_ |
Flag indicating whether the user has externally requested that the condition for termination should become true. |
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 64 of file PlannerTerminationCondition.h.
ompl::base::PlannerTerminationCondition::PlannerTerminationCondition | ( | const PlannerTerminationConditionFn & | fn = PlannerTerminationConditionFn() |
) | [inline] |
Construct a termination condition. By default, eval() will call the externally specified function fn to decide whether the planner should terminate. The function fn does not always need to be specified, if a different implementation of eval() is provided by a derived class.
Definition at line 71 of file PlannerTerminationCondition.h.
virtual ompl::base::PlannerTerminationCondition::~PlannerTerminationCondition | ( | void | ) | [inline, virtual] |
Definition at line 75 of file PlannerTerminationCondition.h.
virtual bool ompl::base::PlannerTerminationCondition::eval | ( | void | ) | const [virtual] |
The implementation of some termination condition. By default, this just calls fn_().
Reimplemented in ompl::base::PlannerThreadedTerminationCondition, ompl::base::PlannerOrTerminationCondition, and ompl::base::PlannerAndTerminationCondition.
bool ompl::base::PlannerTerminationCondition::operator() | ( | void | ) | const [inline] |
Return true if the planner should stop its computation.
Definition at line 80 of file PlannerTerminationCondition.h.
virtual void ompl::base::PlannerTerminationCondition::terminate | ( | bool | flag | ) | [virtual] |
Notify that the condition for termination should become true, regardless of what eval() returns.
Reimplemented in ompl::base::PlannerThreadedTerminationCondition.
Function pointer to the piece of code that decides whether a termination condition has been met.
Definition at line 94 of file PlannerTerminationCondition.h.
bool ompl::base::PlannerTerminationCondition::terminate_ [protected] |
Flag indicating whether the user has externally requested that the condition for termination should become true.
Definition at line 97 of file PlannerTerminationCondition.h.