ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

Switching between Two Local Planners in Navigation

asked 2014-10-13 18:19:10 -0500

ROSCMBOT gravatar image

updated 2014-10-13 18:19:25 -0500

Hello,

I would like to use both DWAPLanner and my own local planner on a robot, and depending on the situation switch between these two local planners.

Is it a way in Navigation stack to plug two local planners and switch between them?

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
3

answered 2014-10-13 18:26:30 -0500

paulbovbel gravatar image

You can do this using dynamic reconfigure. Try running the gui client alongside the nav stack to see how the switching works. To do the switching programmatically, you can use the official python api or see how people have done it in c++ if necessary.

edit flag offensive delete link more

Comments

Thanks. so I can manually switch the local planners in gui client, right? Since I need to do it programmatically, is there a sample code that I can use or have a look?

ROSCMBOT gravatar image ROSCMBOT  ( 2014-10-13 18:41:13 -0500 )edit

I just tried the gui client, but I couldn't figure out how to plug two local planners at the same time. Currently, in move_base_params.yaml I have set base_local_planner: "dwa_local_planner/DWAPlannerROS"

ROSCMBOT gravatar image ROSCMBOT  ( 2014-10-13 19:03:19 -0500 )edit

You can not "plug" two local planners at the same time, you can switch between one or another using the gui and api that paulbovbel pointed out.

Martin Peris gravatar image Martin Peris  ( 2014-10-13 19:59:19 -0500 )edit

But how can I switch between the two? Currently I can only see DWAPlanner in gui, because I have set base_local_planner: "dwa_local_planner/DWAPlannerROS". and if I want to do this switch programmatically, is there a sample code that I can use?

ROSCMBOT gravatar image ROSCMBOT  ( 2014-10-13 20:36:58 -0500 )edit

You need to make sure that ROS knows how to locate your custom local planner plugin for it to appear on the GUI (take a look at this: http://wiki.ros.org/navigation/Tutori... )

Martin Peris gravatar image Martin Peris  ( 2014-10-14 18:44:40 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-10-13 18:19:10 -0500

Seen: 795 times

Last updated: Oct 13 '14