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

translate a map from map server

asked 2018-03-01 07:44:43 -0500

Peter1 gravatar image

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 flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-03-04 18:12:05 -0500

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.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-03-01 07:44:43 -0500

Seen: 231 times

Last updated: Mar 04 '18