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

the tf between /map and /odom is not static?

asked 2011-06-18 08:37:53 -0600

gong gravatar image

updated 2011-06-18 08:43:10 -0600

Hello everybody! This is a map in RVIZ. With the robot moving, the tf between /map and /odom is changing. And the tf change is not a gradual process, its change have an interval. In my opinion, the tf betweeen /map and /odom should be static. But it is not. Why? What's the difference between /odom and /map?

image description

Thank you for your attention!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
25

answered 2011-06-18 09:27:14 -0600

updated 2012-03-09 18:42:38 -0600

You are seeing the correct behavior. You can take a look at the REP for Coordinate Frames for more information about the frame conventions.

In a nutshell, the odom frame contains the pose of the robot in the world as reported by some odometry sensor. The odom pose is continuous; however, due to errors in odometry, it accumulates error over time.

To correct for the drift of odometric sensors, packages such as slam_gmapping introduce a transform between map --> odom. This transform is the correction that has been computed, based on sensor input such as laser scanners. It is not continuous (it can jump at various time intervals) because slam_gmapping usually computes corrections at a lower frequency.

If you have a perfect odometry sensor and a "perfect" laser, the map --> odom tf will always be 0.

edit flag offensive delete link more

Comments

1

Why gmapping move odom frame can correct the drift of odometric sensors? How to say correct? Thank you~

sam gravatar image sam  ( 2012-03-16 04:42:19 -0600 )edit
17

answered 2011-06-18 09:21:46 -0600

updated 2011-06-18 09:31:06 -0600

To figure out what's going on, it's important to understand a little bit about how gmapping works. Gmapping maintains a particle filter where each particle represents a tuple containing a possible map, as well as the robot's pose in that map. As the robot moves about and makes observations, gmapping updates the particles in its particle filter, and resamples. When you see the transform between /odom and /map change, the resampling step has caused a different particle to have the highest probability. Because rviz can only display a single map at any given time, it's showing you this one particle with the highest probability, and because there's no particular relation between the particles, this change can manifest itself as the /odom -> /map transform jumping around.

For more detail, you can check out the paper where this algorithm was proposed: Improved Techniques for Grid Mapping with Rao-Blackwellized Particle Filters.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2011-06-18 08:37:53 -0600

Seen: 8,412 times

Last updated: Mar 09 '12