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

How to make custom global planner plugin communicate with local planner?

asked 2016-04-09 08:10:05 -0600

Megacephalo gravatar image

Hi all,

Recently I have been developing my own global planner plugin for research purpose, but since I adapted source code from 3rd party projects, it turns out to be a collage and I may have miss something. I followed the tutorial Writing a global path planner as plugin in ROS and can successfully compile and plan paths as a goal is given via Rviz. There is no issue on TF frames nor any plugin loading problem, global and local costmap can be loaded and shown on Rviz, except that there is no local costmap update at the local planner side. My question is then, what are the crucial components to make both planners communicate ? Why can't my global planner plugin sends anything at all to the local planner? Where and how can I start digging in? Thank you in advance !

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2016-04-09 09:40:40 -0600

spmaniato gravatar image

move_base ( ) is responsible for "coordinating" the different components, such as the global and local planner plugins, the recovery behaviors, and the layered costmaps.

Make sure you are actually loading and parametrizing a local planner and a local costmap. move_base will then pass the plan generated by your global planner to the local planner for execution.

Check out this tutorial as well:

edit flag offensive delete link more


Thank you spmaniato! I wemt through the 2 tutorials and I did load both parameter files. The problem is that local costmap doesn't pop up, and there is a significant error on localization using AMCL. Is there a corelation between localization and proper functioning of local costmap?

Megacephalo gravatar image Megacephalo  ( 2016-04-12 02:08:40 -0600 )edit

Hmm. Maybe rostopic echo /move_base/local_costmap and check if (i) it's being published and (ii) whether it's all zeros or not. If it's all zeros (for whatever reason) then it won't show up in RViz.

spmaniato gravatar image spmaniato  ( 2016-04-12 08:49:04 -0600 )edit

I did check and strangely, it does not graphically show itself on Rviz, but now, I am sure it publishes values other than zeros. And I did resolved the problem. Thank you !

Megacephalo gravatar image Megacephalo  ( 2016-04-12 09:12:31 -0600 )edit

Awesome. Glad I could help a bit :-)

spmaniato gravatar image spmaniato  ( 2016-04-12 10:20:59 -0600 )edit

answered 2016-04-12 09:10:01 -0600

Megacephalo gravatar image

updated 2016-04-12 09:12:58 -0600

Right ! I finally resolved the problem! And yes, you gotta make sure that all global and local planner parameter files have been loaded in. What got me stuck on my tracks was that I did not load the correct /odom topic for move_base, that is why the entire system could not function properly. The lesson learned is to always make sure that the node gets all its necessary topics. Now, it is the localization issue which troubles me but that is for another discussion.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-04-09 08:10:05 -0600

Seen: 1,949 times

Last updated: Apr 12 '16