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

How to specify map topic for ros navigation static_layer (global costmap)?

asked 2020-05-20 04:06:19 -0500

Yehor gravatar image


I have a /map topic where I have my initial map launched by map_server. But I want to change the topic for the map to /filtered_map. I want to do it because I make some restrictions on the map and publish a new map to another topic.

How can I change the map topic for navigation stack (global costmap)?

Thank you in advance!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-05-20 10:56:53 -0500

If you have specified your costmap layers using the hydro+ API, you can set the map_topic parameter under the static_map plugin namespace in your navigation configuration files. See the staticmap page for more information.

You can learn more about the hydro version of the costmap_2d stack here

This would often get placed in the costmap_common_parameters.yaml file in a hydro setup. You can see an example of that here on a branch I have worked on.

Note that in the above case, you would add the following lines to the costmap_common_params.yaml file:

    map_topic: /map_filtered

because the staticmap plugin was specified to be in the static_layer namespace in the global_costmap_params.yaml file on the same branch.

edit flag offensive delete link more


@maxsvetlik Thank you

Yehor gravatar image Yehor  ( 2020-05-21 01:16:27 -0500 )edit

Question Tools

1 follower


Asked: 2020-05-20 04:06:19 -0500

Seen: 442 times

Last updated: May 20 '20