0
$\begingroup$

Rosanswers logo

Hi,

I want to set up a system in which I can navigate using different global planners depending on the occasion. I was plannig to use the simpler carrot planner for a reactive navigation (following a user), and use the default navfn planner for the more complex plans.

However, as far as I've read, there's no way to tell move_base to switch planners so I'm thinking of having two instances of move_base running in different namespaces and sending goals to one or the other depending on the planner I want to use. Also, I'd be using the shutdown_costmaps option to avoid wasting too much resources.

I would like to know if this approach seems reasonable to you, and if anyone has suggestions for a better way to achieve this.


Originally posted by Miguel Prada on ROS Answers with karma: 1071 on 2011-05-03

Post score: 6


Original comments

Comment by 2ROS0 on 2014-08-02:
Were you able to achieve that? And do you have your code open to share or know any open source code that implements multiple base planners on top of move_base? Thank you.

Comment by rajnunes on 2017-12-10:
Hi have you been able to implement switching global planners at runtime?

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

Instead of running two separate instances of move_base, why not write your own BaseGlobalPlanner that is essentially a supervisor for navfn and the carrot planner? This supervisory planner could have instances of both planners you want to switch between and can implement the logic required to know when to switch, then forward any of standard calls move_base makes (such as the call to make a plan) to the appropriate planner. Then just have a single instance of move_base load up your supervisory planner.


Originally posted by Eric Perko with karma: 8406 on 2011-05-04

This answer was ACCEPTED on the original site

Post score: 6


Original comments

Comment by eitan on 2011-05-05:
I like the idea of implementing this outside of move_base because it allows this type of global planner to be used in any code that uses the BaseGlobalPlanner interface. This makes it much more useful than if the feature were just packed into move_base itself.

Comment by Miguel Prada on 2011-05-04:
I agree with this being the best overall solution, but unfortunately my schedule is quite tight and I won't be able to do it the right way. Maybe something quick with the two planners hardcoded. Also, don't you think it would be better to implement this directly into move_base?

Comment by eitan on 2011-05-04:
I like this solution a lot actually, and think it could probably work out pretty well. There's probably even a generic way to do this where you write planner that is capable of loading a number of pre-specified planners and switching between them on the fly. Thumbs up!

Comment by Miguel Prada on 2011-05-04:
I've considered implementing planner switching functionality into move_base and I like your idea better, but in both cases it would require much more work than simply creating an appropriate launch file. If my approach doesn't work I'll surely try this afterwards.

$\endgroup$
0
$\begingroup$

Rosanswers logo

Currently, you're right, there's no way to tell move_base to switch planners once the node is up and running. Running two instances of move_base with different configurations in separate namespaces seems like a reasonable way to work around this limitation. In fact, I've done this in the past when I needed to do something similar.

Hope this helps.


Originally posted by eitan with karma: 2743 on 2011-05-04

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by Miguel Prada on 2011-05-04:
Thanks. I started testing it this afternoon and still haven't made it work. I'll let you know if I succeed.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.