ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org

# translate a map from map server

I want to reuse a map for localization. I load a saved map from the map server. Idealy i would like the map to be at the fixed coordinate origin(0,0). When I start the server though the upper left corner of the saved map is put into the origin. How can I move the map. In the corresponding yaml file I find a value for origin: [0.0, 0.0, 0.0] In the documentation I see that this the value of the lower left corner of the map. However if I edit this value, the map doesnt translate in the visualization.

What would be the way to go here? I could publish a static transform for the map frame. But then I would like to publish this only once at start up or at certain circumstances ?For example if my localization in the map is too far off. I cant see how I to realize this in code. It seems to me to be a very standard problem maybe someone here can help me. Thanks

edit retag close merge delete

Sort by » oldest newest most voted

The way to go is with the origin: [0.0, 0.0, 0.0] parameter defined inside map.yaml, set to a negative number (in meters) such as origin: [-8.0, -8.0, 0.0] . If you have changed this value and it does not translate on rviz then ensure that "Global options" -> "Fixed Frame" is set as "map". You could post a link to your code or more details to reproduce the error, for me moving altering origin works.

more