Skip to content

NavigationDriving and Dead Reckoning

Odometry

Update the pose each step: x += d cos θ, y += d sin θ, θ += Δθ.

Not started Jump to practice

With no GPS indoors, a robot can still keep track of itself by adding up its own small moves. This is odometry, or dead reckoning.

Key idea

Each loop, the encoders give a distance $d$ and a turn $\Delta\theta$. Update the pose: $x \leftarrow x + d\cos\theta$, $y \leftarrow y + d\sin\theta$, then $\theta \leftarrow \theta + \Delta\theta$. Small loops make this simple rule accurate.
The true path and the odometry estimate. Watch them slowly separate.

Why it works

Each step is a tiny straight move along the current heading, which is the coordinate-frames rule with the robot's own forward direction. But every step's small error is kept forever: slipping wheels, a slightly wrong wheel size. So odometry drifts, and the error grows the farther the robot goes.

Worked example: One step

Pose $(1.0, 2.0)$, heading $60^\circ$, move $0.5$ m.
  1. $x = 1 + 0.5\cos 60^\circ = 1.25$.
  2. $y = 2 + 0.5\sin 60^\circ \approx 2.43$.

Answer: (1.25, 2.43).

Common mistake

Updating the heading before moving when the rule says move first, or forgetting that small errors grow with every meter.

Hands-on: drive a square

Program your robot to drive a 1-meter square using encoder odometry, and mark where it ends. Repeat five times. The gap between start and finish shows your odometry's drift. Try slower turns, or measuring your wheel size more carefully, and see what helps.

Practice

Pass with 3 right answers, the last 2 in a row. Each right answer earns 3 XP.

Loading practice…

Builds on

Leads to

Sources and further reading

  • Roland Siegwart, Illah R. Nourbakhsh and Davide Scaramuzza, Introduction to Autonomous Mobile Robots, 2nd ed. (MIT Press, 2011)
  • Sebastian Thrun, Wolfram Burgard and Dieter Fox, Probabilistic Robotics (MIT Press, 2005)