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

Implementing costmap_2d layer with pre-Hydro costmap.

asked 2015-07-06 16:17:21 -0500

mattc_vec gravatar image

The project I'm working on uses a costmap that was created before the new costmap_2d implementation. I'm working in Indigo now, but the costmap hasn't been upgraded at all since the ROS version switch. I'd like to implement a new layer, so I'm just trying to get the tutorial Grid Layer set up. I worked through the 'Creating a New Layer' tutorial, but I'm not really sure what else I'll have to add in order to implement this new layer. I know the new code compiled during the catkin_make, but I'm not sure where to add the new layer. Will I need something in the C++ code that creates the original costmap object? Any yaml or xml changes that need to be made? Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-07-06 23:55:22 -0500

mgruhler gravatar image

Well, the layers need to be added in your configuration file. See the tutorial here on how to do this.

edit flag offensive delete link more


Yeah, I completed that tutorial. I've managed create the new layer by specifying a plugins array in a .yaml file I load in the roslaunch file. This plugins array overwrites the existing one, and erases the static, inflation, and obstacle layers.

mattc_vec gravatar image mattc_vec  ( 2015-07-08 10:34:46 -0500 )edit

Is there any way to add the new layer to the existing plugins array? If I specify these layers in the yaml as well, they use the default cost_scaling_factor and inflation radius, which I don't want.

mattc_vec gravatar image mattc_vec  ( 2015-07-08 10:36:00 -0500 )edit

There is no way to just add to the existing plugins. However, if you start the costmap without using the new yaml file, it will set up your parameter space with the new style parameters, listing the existing layers and moving the parameters for cost_scaling_factor, etc. Copy that to your launch file

David Lu gravatar image David Lu  ( 2015-07-08 10:55:46 -0500 )edit

Question Tools

1 follower


Asked: 2015-07-06 16:17:21 -0500

Seen: 554 times

Last updated: Jul 06 '15