Ask Your Question
5

switching global planner

asked 2011-05-03 22:50:52 -0500

Miguel Prada gravatar image

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.

edit retag flag offensive close merge delete

Comments

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.

2ROS0 gravatar image2ROS0 ( 2014-08-02 23:10:20 -0500 )edit

Hi have you been able to implement switching global planners at runtime?

rajnunes gravatar imagerajnunes ( 2017-12-10 08:29:17 -0500 )edit

3 Answers

Sort by » oldest newest most voted
6

answered 2011-05-04 05:52:42 -0500

Eric Perko gravatar image

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.

edit flag offensive delete link more

Comments

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.
Miguel Prada gravatar imageMiguel Prada ( 2011-05-04 08:08:11 -0500 )edit
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!
eitan gravatar imageeitan ( 2011-05-04 10:05:21 -0500 )edit
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?
Miguel Prada gravatar imageMiguel Prada ( 2011-05-04 18:15:28 -0500 )edit
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.
eitan gravatar imageeitan ( 2011-05-05 05:18:23 -0500 )edit
1

answered 2011-05-04 05:33:13 -0500

eitan gravatar image

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.

edit flag offensive delete link more

Comments

Thanks. I started testing it this afternoon and still haven't made it work. I'll let you know if I succeed.
Miguel Prada gravatar imageMiguel Prada ( 2011-05-04 08:09:42 -0500 )edit
0

answered 2014-01-20 23:42:24 -0500

carsten gravatar image

updated 2014-01-20 23:48:53 -0500

Hello, I'm trying something similar and I'm wondering if you made some progress with your switching idea. I want to use two different local_planners (pose_folllower and default base_local_planner/trajectory planner). In case the pose_follower recognizes an obstacle by checking the next velocity command

[ WARN] [1390303422.909850185, 47.940000000]: Invalid Trajectory 0.100000, 0.000000, 0.036346, cost: -1.000000 [ERROR] [1390303422.909936801, 47.940000000]: Not legal (0.10, 0.00, 0.04)

I would like to use the default local_planner to navigate to a pose on the global plan which is free (not rated with high costs). Kind regards.

edit flag offensive delete link more

Comments

2

maybe you should post your doubt as a new question.

Procópio gravatar imageProcópio ( 2014-01-21 00:26:41 -0500 )edit

I was hoping to get some feedback of Miguel if he succeed by following this approach and I was also interested in Eitan's (Marder-Eppstein?) opinion who is the author of nearly all files I'm dealing with.

carsten gravatar imagecarsten ( 2014-01-21 03:05:06 -0500 )edit

@carsten Still in your case, you can open a new question, and refer here from there, which suits the best to this kind of forum :)

130s gravatar image130s ( 2014-01-21 03:48:11 -0500 )edit

Hi, thanks for your hint! In case there will occur any specific question I will open a new question/thread.

carsten gravatar imagecarsten ( 2014-01-21 04:12:01 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2011-05-03 22:50:52 -0500

Seen: 1,960 times

Last updated: Jan 20 '14