Odometry Calibration for Differential Drive Robots¶
Source: Robotics_Book odometry chapter
Why This Matters¶
Wheel odometry is one of the first places new robot builders discover that the robot's reported motion and its real motion are different things. The source chapter makes the important point plainly: sensors lie, wheels slip, and software has to work through imperfect measurements.
Distilled Takeaways¶
- Good odometry depends heavily on two effective measurements: wheel diameter and distance between wheels.
- Those are not purely CAD values. Tire wear, tilt, wobble, and surface conditions change the effective measurements.
- Straight-line tests mostly expose wheel-diameter error.
- Spin-in-place tests mostly expose wheel-separation error.
- Odometry parameters used by the driver do not have to be identical to the dimensions used in the URDF.
Practical Calibration Loop¶
- Mark a known start pose.
- Record odometry before motion.
- Move in a controlled way that isolates one parameter.
- Record odometry after motion.
- Measure actual motion.
- Adjust the configured value.
- Repeat until the results are consistently close, not just lucky once.
For wheel-diameter adjustment, the core correction is:
correction_ratio = actual_distance / odometry_distance
Then:
new_wheel_diameter = current_wheel_diameter * correction_ratio
Operational Lessons¶
- Sampling rate matters. Curved motion integrated too slowly becomes wrong quickly.
- Linux scheduling jitter can degrade odometry if the computation loop is not regular enough.
- Better odometry improves mapping and navigation, even when higher-level localization will later correct drift.
- If odometry is far off, localization and navigation may fail before they get a chance to compensate.
When to Read the Original Source¶
Go to the original chapter when you want the full hands-on procedure, example commands, measurement workflow, and explanation of why the effective values often differ from the robot's nominal measurements.