Looking at this OMPL optimization tutorial, there is the line:
ob::PlannerStatus solved = planner->solve(1.4/*seconds timeout*/);
With this PlannerStatus
definition.
However, I am using the RRT# algorithm with a certain cost threshold, let's say 10.0
for the sake of argument. If I set it too low, the algorithm by design aborts after 1.4 second with the best value found so far, and prints a message:
Info: ... Final solution cost 17.071
Info: Solution found in 1.418528 seconds
And returns ob::PlannerStatus::EXACT_SOLUTION
- I suppose I do have an exact, but perhaps not optimal solution.
If I run with a different set of data, I can see something like:
Info: ... Final solution cost 9.543
Info: Solution found in 0.003216 seconds
That also, however, returns ob::PlannerStatus::EXACT_SOLUTION
.
So, how can I differentiate between a timeout solution and a threshold-matching solution?