Rosanswers logo


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!

Originally posted by Yehor on ROS Answers with karma: 166 on 2020-05-20

Post score: 0


1 Answer 1


Rosanswers logo

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.

Originally posted by maxsvetlik with karma: 161 on 2020-05-20

This answer was ACCEPTED on the original site

Post score: 1

Original comments

Comment by Yehor on 2020-05-21:
@maxsvetlik Thank you


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.