0
$\begingroup$

Rosanswers logo

I know this was asked previously, but since there was no answer, I hope it is OK to ask.

I would like to align my map xy axes by specifying an origin in the map's yaml file. However, AMCL does not track location when a yaw is put into the map origin. Is there a way to use AMCL with a rotated map?


Originally posted by dan on ROS Answers with karma: 875 on 2018-06-20

Post score: 0


Original comments

Comment by Humpelstilzchen on 2018-06-21:
I wonder if thats important since amcl needs the initial pose anyway.

Comment by dan on 2018-06-21:
It is helpful when debugging since the map's x and y axes will line up with amcl's. For example, look at rviz and see that when the axes are aligned, the grid lines are parallel to the walls of the map, which is helpful with debugging localization errors.

Comment by billy on 2018-06-23:
I can't answer your question about the YAML file, but you could always modify the map directly in a photo editor. Cut Paste-rotate.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I find this an interesting question. I have used rotated maps in the past and I did not experiment a great localization error.

I also rather prefer to have an aligned map because of tracking of pose components is much simpler than taking into account the rotation of the map. Though, not always is possible to create a live map that would satisfy this.

I think first you should evaluate effect of rotation of your map on the localization. It depends on grid scale, map size,...

In map_server documentation (http://wiki.ros.org/map_server) it is told that the .pgm file is processed by SDL_image (http://www.libsdl.org/projects/SDL_image/docs/index.html). Map server converts pixel color into occupancy value, so I guess that if you modified the map in a photo editor (like InkScape/Gimp/...) as long as size matches with metadata yaml file I do not see any problem. I guess that what is more likely to happen when editing manually is that your origin point would move sligthly to the one you record. I did not try but I will and update with conclusions.

Maybe it is just that I am not aware of inner effects on AMCL, but I do not see problems with working with rotated maps more than is more difficult to perform tests/pose debugging. You can always make use of AMCL parameters to handle initial mean hypothesis condition as launch param or directly on the ParameterServer:

~initial_pose_x (double, default: 0.0 meters)

Initial pose mean (x), used to initialize filter with Gaussian distribution. 

~initial_pose_y (double, default: 0.0 meters)

Initial pose mean (y), used to initialize filter with Gaussian distribution. 

~initial_pose_a (double, default: 0.0 radians)

Initial pose mean (yaw), used to initialize filter with Gaussian distribution.

Originally posted by Bogdar_ with karma: 136 on 2018-08-18

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

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