0
$\begingroup$

Rosanswers logo

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!


Originally posted by gong on ROS Answers with karma: 164 on 2011-06-18

Post score: 5

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Ivan Dryanovski with karma: 4954 on 2011-06-18

This answer was ACCEPTED on the original site

Post score: 25


Original comments

Comment by sam on 2012-03-16:
Why gmapping move odom frame can correct the drift of odometric sensors? How to say correct? Thank you~

$\endgroup$
0
$\begingroup$

Rosanswers logo

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.


Originally posted by Dan Lazewatsky with karma: 9115 on 2011-06-18

This answer was NOT ACCEPTED on the original site

Post score: 17

$\endgroup$

Your Answer

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