Ask Your Question
1

Switching between Two Local Planners in Navigation

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

ROSCMBOT gravatar image

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

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
2

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

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 imageROSCMBOT ( 2014-10-13 18:41:13 -0600 )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 imageROSCMBOT ( 2014-10-13 19:03:19 -0600 )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 imageMartin Peris ( 2014-10-13 19:59:19 -0600 )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 imageROSCMBOT ( 2014-10-13 20:36:58 -0600 )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 imageMartin Peris ( 2014-10-14 18:44:40 -0600 )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

1 follower

Stats

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

Seen: 433 times

Last updated: Oct 13 '14