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

How can I change a map while ROS is running?

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

madmax gravatar image

Hi,

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
2

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

Comments

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 image Thomas 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 image DimitriProsser  ( 2011-12-22 03:20:19 -0500 )edit
1

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

Question Tools

Stats

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

Seen: 1,360 times

Last updated: May 12 '12