ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A
Ask Your Question

How can I change a map while ROS is running?

asked 2011-12-20 23:16:16 -0500

madmax gravatar image


right now I am navigating through a map.
But I want to change this map while ROS is running due to a floor change. Is there a way, for example in C++, to change the map in code?

regards max

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2011-12-21 00:52:10 -0500

DimitriProsser gravatar image

updated 2011-12-21 00:56:51 -0500

If you're using Electric, the navigation stack supports dynamic_reconfigure. That's probably the easiest way to do what you want to do.

If you're using Diamondback, you might have a lot more difficulty. Most of the parameters of move_base in Diamondback are a one-time read, and thus require a restart of the node to re-initialize.

edit flag offensive delete link more


If using a C++ node is there a way to use dynamic_reconfigure to change the map? So far I have only been able to do that from Python.
Thomas D gravatar imageThomas D ( 2011-12-22 02:44:27 -0500 )edit
Dynamic reconfigure can be done with C++. costmap_2d is a good example if you're looking to see some code implemented.
DimitriProsser gravatar imageDimitriProsser ( 2011-12-22 03:20:19 -0500 )edit

answered 2012-05-12 23:29:29 -0500

madmax gravatar image

Well, our best solution was to move 2 maps in 1. So the map.png has 2 maps in it and when you want to change the map you simply set a new position to the other map.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2011-12-20 23:16:16 -0500

Seen: 534 times

Last updated: May 12 '12