Skip to main content

Section 5.1 The Localization Problem and Odometry Drift

To navigate autonomously, a robot must answer two fundamental questions: "Where am I?" (Localization) and "What does the world look like around me?" (Mapping).
The simplest way for a robot to track its movement is through Odometry (also called Dead Reckoning). Wheel encoders measure how many times the drive wheels rotate, and using the kinematic formulas from Chapter 2, the onboard computer estimates the robot’s current position \((x, y, \theta)\text{.}\)
Imagine commanding a robot to drive straight for exactly 10.0 meters. In an ideal world with no drift, the robot’s estimated position and its actual position both land right at the 10.0 meter mark. In the real world, small errors accumulate along the way, so by the time the encoders report 10.0 meters traveled, the robot may actually be sitting at 9.2 meters and rotated slightly off its intended heading.
Figure 5.1.1. Wheel slip and sensor noise cause real-world odometry estimates to drift from the robot’s actual position and heading.

Subsection 5.1.1 The Problem of Cumulative Encoder Drift

While odometry works well over short distances, it suffers from unbounded cumulative error (drift):
  1. Wheel Slip: Acceleration, quick turns, or slick floor surfaces cause wheels to spin without moving the chassis.
  2. Surface Imperfections: Bumps, floor seams, or worn tire treads alter the effective wheel radius over time.
  3. Integration Error: Because position is calculated by continuously adding up small changes over time, small errors at step 1 accumulate into massive positional errors by step 100.

Subsection 5.1.2 Real-World & VEX Robotics Examples

  • Real-World Example (Mars Rovers & Autonomous Forklifts): NASA’s Mars rovers driving across sandy terrain frequently experience up to 40% wheel slip. If rovers relied solely on wheel encoders, they would quickly drift hundreds of meters off target and potentially drive into hazardous ravines. Similarly, warehouse forklifts driving over polished concrete lose accuracy within seconds without external reference tracking.
  • VEX Robotics Example (VEX Shaft Encoders in Autonomous Matches): In VEX competitions, driving over field foam tiles introduces wheel friction variations. If your autonomous code relies purely on VEX Optical Shaft Encoders, your robot might execute a perfectly programmed turn on tile A, but land 10 centimeters off target by the time it reaches tile D due to accumulated encoder drift.

Subsection 5.1.3 Section 5.1 Interactive Exercises

Subsubsection 5.1.3.1 Exercise 5.1.2: CodeLens Trace β€” Odometry Error Accumulation

Step through the execution below to observe how a small 5% distance under-estimation error compounds over multiple motion steps.

Reading Questions 5.1.4 Reading Questions

Check your understanding

1. Exercise 5.1.1: Encoder Drift Conceptual Check.

Why is wheel encoder odometry alone insufficient for long-duration autonomous robot navigation?
  • Wheel encoders provide absolute global position coordinates that never drift.
  • Incorrect. Encoders measure relative wheel rotation, not absolute global position.
  • Encoder drift stays constant over time and can be removed with a fixed subtraction formula.
  • Incorrect. Drift continuously accumulates over time rather than remaining constant.
  • Small measurement errors, wheel slip, and surface friction accumulate over time, causing unbounded positional drift.
  • Correct! Odometry integrates small changes over time, meaning wheel slip and surface imperfections cause positional errors to accumulate without bound.
  • Wheel encoders automatically correct for wheel slip when driving on smooth surfaces.
  • Incorrect. Encoders cannot detect when a wheel spins without gripping the floor surface.
You have attempted of activities on this page.