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

rotation of map in slam_gmapping - how to de-rotate? [closed]

asked 2016-06-06 16:22:37 -0600

billy gravatar image

I have a map produced by slam_gmapping. It looks pretty good. Straight edges, good loop closure, etc. I started the mapping on a hardwood floor (and have tuned odom on a hardwood floor) but in the middle of mapping I have to pass a carpeted area where Z drifts until I get back to wood again. The drifting Z did not screw-up up the shape of the map at all, but it did cause the entire map to rotate (I was watching as the map was built and it didn't start to rotate until I got to the carpet). It means the wall that was supposed to lie along x axis is at 20 degrees or so.

Is there a way to correct this at the map level or will I need to insert a transform to rotate it back? Of course you already know the next question: how would that transform look?

Thanks in advance for help.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by billy
close date 2016-06-22 00:31:05.083614

Comments

Why do you want to rotate the map at all? The localization and navigation algorithms don't really care about the map orientation.

ahendrix gravatar image ahendrix  ( 2016-06-06 16:31:36 -0600 )edit

I guess that is a fair question. Fits easier (larger image with complete map) when map edges align with edges of screen and setting up the initial pose seems more complicated with an arbitrarily rotated map.

billy gravatar image billy  ( 2016-06-06 23:24:07 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-06-07 13:00:08 -0600

ahendrix gravatar image

If you're only worried about the aesthetics of the map, you can open the pgm file in an image editor (such as gimp) and rotate and crop the image to your liking.

edit flag offensive delete link more

Comments

Thanks Hendrix. The time I opened the map the orientation was perfect so I didn't need to do anything.

billy gravatar image billy  ( 2016-06-22 00:30:29 -0600 )edit

Question Tools

Stats

Asked: 2016-06-06 16:22:37 -0600

Seen: 1,013 times

Last updated: Jun 07 '16