First I will explain the role of odometry within a mobile robot base. According to MIT CSAIL course material,
Odometry is the use of motion sensors
to determine the robot's change in
position relative to some known
position. For example, if a robot is
traveling in a straight line and if it
knows the diameter of its wheels, then
by counting the number of wheel
revolutions it can determine how far
it has traveled.
Robot odometry (usually the "/odom" topic in ROS) is important as it enables the robot to "track" it's x and y position in the map relative to an arbitrary point.
Solely relying on robot odometry for localization is known as Dead Reckoning and is subject to cumulative errors during prolonged use. To quote Wikipedia's article on Dead Reckoning:
For precise positional information, both speed and direction must be accurately known at all times during travel. Most notably, dead reckoning does not account for directional drift during travel through a fluid medium. These errors tend to compound themselves over greater distances, making dead reckoning a difficult method of navigation for longer journeys.
In order to account for cumulative errors from odometry drift, we can rely on data that is known to be closer to the "ground truth" of the environment. Assuming that your robot base has a lidar, we are then able to base our localization off the laser data (published as the "/scan" topic) from the lidar. To understand the fundamentals of AMCL, please watch this primer.
During robot motion, AMCL uses the "/scan" topic to correct for any odometry drift from dead reckoning, therefore giving rise to the transformation shown under "AMCL Map Localization".
If you would like to learn more about how the different components of autonomous navigation ties in together, do take a look at links below:
- What is Autonomous Navigation
- Modern Robotics - Odometry