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

amcl with rotated map

asked 2018-06-20 21:07:35 -0500

dan gravatar image

updated 2018-06-20 21:08:24 -0500

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?

edit retag flag offensive close merge delete

Comments

I wonder if thats important since amcl needs the initial pose anyway.

Humpelstilzchen gravatar image Humpelstilzchen  ( 2018-06-21 02:38:41 -0500 )edit

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.

dan gravatar image dan  ( 2018-06-21 12:05:36 -0500 )edit

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.

billy gravatar image billy  ( 2018-06-23 12:08:50 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-08-18 15:31:10 -0500

Bogdar_ gravatar image

updated 2018-08-18 15:34:15 -0500

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_im... ). 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.
edit flag offensive delete link more

Question Tools

Stats

Asked: 2018-06-20 21:07:35 -0500

Seen: 1,248 times

Last updated: Aug 18 '18