Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always planning up to solving time #1096

Closed
mojervico opened this issue Sep 1, 2023 · 2 comments
Closed

Always planning up to solving time #1096

mojervico opened this issue Sep 1, 2023 · 2 comments

Comments

@mojervico
Copy link

Hi,

I'm using the simple planners such as RRT/RRTConnect/PRM etc, an i'm calling the function solve from the simpleSetupPtr like thata ss->solve(solving_time).

My probem/doubts is that no matter the value of solving_time I choose, the planner always reach its maximum solving_time. I mean if I choose a solvin time of 1 second, the planner is able to solver the problem in 1 second. However, if for the same problem (same states and seed) I choose I solving time of 10 seconds, it takes up to 10 seconds to solve a problem that can be solve in 1. I would like the planner to return as soon as it finds the solution. Am I missing anything?

Best Regards

@IEI245MU5
Copy link

Hello,

By default the planner always terminates after finding the first solution.

Although when the planner reaches its maximum solving time, it sometimes approximates the solution path and solve() returns true even when these approximated solution might not actually be correct. If you want to have an exact solution you most likely have to increase the solving time and use

if (ss.solve(solving_time)==ompl::base::PlannerStatus::EXACT_SOLUTION)

Best Regards
Kaiwen

@zkingston
Copy link
Member

The above comment is correct. You should check if you are getting exact solutions or approximate solutions - the behavior described (if you are not using an AO planner) sounds like the planner is failing to find a solution and is returning an approximate solution. If you are using an AO planner (one with a * after the name, e.g., PRM*), these planners will use the entire allocated solution time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants