Chapter 63: wheel odometry

Robot Position and Orientation from the Wheels From encoder readings to how far it moved and how much it turned

Chapter 61 turned the wheel readings into speeds. This page goes one step further: how far the robot moved and how much it turned, and how adding those small pieces up gives the pose. The only new maths is the ∫ sign, explained from zero as "add up the slices". BumperBot sizes throughout: wheel radius 0.033 m, wheels 0.17 m apart.

Words used on this page (open this if a word is new)
posePosition (x, y) and orientation (θ) together.
positionWhere the robot is on the floor, in metres.
orientation, θWhich way the robot faces, in radians, left is positive.
encoderA sensor on a wheel that reports how far the wheel has turned.
φR, φLThe angle the right and left wheel have turned since the start, in radians.
ΔφR, ΔφLHow much each wheel turned between two readings.
φ̇R, φ̇LHow fast each wheel turns, in rad/s.
VHow fast the middle of the robot moves forward, in m/s.
ω (omega)How fast the robot turns, in rad/s.
W_rThe wheel radius, 0.033 m.
W_sThe wheel separation, 0.17 m.
∫ (integral)Add up many thin slices: the area under a line.
dtA very thin slice of time.
ΔposHow far the robot moved between two readings.
ΔθHow much the robot turned between two readings.
odometryWorking out the pose by adding up every small move and turn.
01

Where this chapter fits

Chapters 58 to 62 built up odometry piece by piece. One piece is still missing: from the wheel readings to where the robot is and which way it faces. Use Next and Back, the sliders and the buttons. Point at a coloured word to light up its part of the picture.

Key idea. The pose is position (x, y) plus orientation (θ). The robot cannot see it; it only has encoder readings. At every reading it works out how far it moved and how much it turned, then adds that small piece to all the pieces before it.

Quick check

02

Adding up small pieces: the ∫ sign

Speed tells how fast; distance tells how far. To go from one to the other, add up speed × time in thin slices. Maths writes this with one sign, ∫. Use Next and Back, the sliders and the buttons. Point at a coloured word to light up its part of the picture.

Key idea. distance = ∫ V dt means: add up speed × a thin slice of time. On a speed and time graph it is the area under the line. In the same way, the angle turned is ∫ ω dt.

Quick check

03

How far the robot moved

Start from the forward speed formula, add it up over time, and four small moves turn it into a formula that uses the encoder readings directly. Use Next and Back, the sliders and the buttons. Point at a coloured word to light up its part of the picture.

Key idea. Δpos = (W_r ÷ 2) × ΔφR + (W_r ÷ 2) × ΔφL. W_r × Δφ is how far each wheel rolled; the middle of the robot moves the average of the two. No Δt is needed.

Quick check

04

How much the robot turned

The same four moves, starting from the turning speed formula. Use Next and Back, the sliders and the buttons. Point at a coloured word to light up its part of the picture.

Key idea. Δθ = (W_r ÷ W_s) × ΔφR − (W_r ÷ W_s) × ΔφL. The turn is the difference between the two wheel distances, shared over the gap between the wheels. Equal wheel turns: no turn.

Quick check

05

Odometry, one reading at a time

With Δpos and Δθ from every reading, the pose is just a running total. Use Next and Back, the sliders and the buttons. Point at a coloured word to light up its part of the picture.

Key idea. Each reading gives Δpos and Δθ; adding them up, reading after reading, gives how far the robot drove and which way it faces. Every error is added up too, so odometry drifts over time.

Quick check

06

Summary and quiz

Key takeaways

  1. The pose is position (x, y) and orientation (θ). Odometry works it out from the wheel encoders alone.
  2. Distance is speed added up over time: distance = ∫ V dt, the area under the speed line. In the same way, the turn is ∫ ω dt.
  3. Wheel speed added up over time is the angle the wheel turned: ∫ φ̇R dt = φR1 − φR0 = ΔφR.
  4. How far the robot moved between two readings: Δpos = (W_r ÷ 2) × ΔφR + (W_r ÷ 2) × ΔφL, the average of the two wheel distances.
  5. How much it turned: Δθ = (W_r ÷ W_s) × ΔφR − (W_r ÷ W_s) × ΔφL, the difference of the wheel distances over the wheel separation.
  6. Example: ΔφR = 6 rad and ΔφL = 4 rad give Δpos = 0.165 m and Δθ = 0.388 rad (to the left).
  7. Adding Δpos and Δθ reading after reading gives the pose. Small errors such as wheel slip are added up too, so odometry drifts.

Quiz