0
$\begingroup$

Rosanswers logo

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


Originally posted by Peter1 on ROS Answers with karma: 38 on 2018-03-01

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Oscar Lima with karma: 831 on 2018-03-04

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

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