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

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?

edit retag close merge delete

Sort by » oldest newest most voted

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.

more

1

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

( 2012-03-16 04:42:19 -0500 )edit

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.

more

## Stats

Seen: 7,229 times

Last updated: Mar 09 '12