Chapter 59: local localization

Odometry Counting steps to know where the robot is

A robot that drives away from its starting point has to keep answering one question: where is it now, compared with where it started? This page shows the most common answer, odometry, starting with a person counting steps and ending with robots that count wheel turns, compare laser scans or match camera pictures.

Words used on this page (open this if a word is new)
poseWhere the robot is (x, y) and which way it faces.
local localizationFinding the pose compared with the starting point.
speedMetres covered in each second (m/s).
accelerationChange of speed in each second (m/s²).
travel distanceAll the metres covered since the start.
odometryCurrent position from the start plus the measured motion.
frame O (odom)The frame at the starting point, the zero position.
frame RThe frame on the robot (or walker), moving with it.
radius rFrom the centre of a wheel to its edge.
π (pi)About 3.1416: how many diameters fit around a circle.
circumferenceThe distance around a circle, 2 × π × r.
laser scannerA sensor that measures distances with flashes of light.
scanOne full turn of the laser: a distance for each direction.
featureA spot in a picture that is easy to find again.
01

The local localization challenge

A robot drives away from its starting point. To know where it is now, it keeps track of its own motion. Use Next and Back, the sliders and the buttons. Point at a coloured word to light up its part of the picture.

Key idea. Local localization means estimating the current pose of the robot compared with where it started. The robot tracks its motion: speed, acceleration and travel distance, and turns them into a pose.

Quick check

02

Odometry: counting steps

The usual way to solve local localization is odometry. It works just like counting steps while walking. Use Next and Back, the sliders and the buttons. Point at a coloured word to light up its part of the picture.

Key idea. Odometry finds the current position from the known start and the motion measured over time. Counting steps of 1 m, one per second: after 3 steps the walker is 3 m in front of O, and 3 m ÷ 3 s = 1 m/s.

Quick check

03

Wheel odometry: counting wheel turns

A robot counts its steps with sensors. For a robot with wheels, the steps are the turns of its wheels. Use Next and Back, the sliders and the buttons. Point at a coloured word to light up its part of the picture.

Key idea. One wheel turn moves the robot by the circumference of the wheel, 2 × π × r. Counting turns and multiplying by 2 × π × r gives the distance: that is wheel odometry.

Quick check

04

Laser odometry: comparing two scans

A robot without wheels, or one that wants a second opinion, can use a laser scanner instead. Use Next and Back, the sliders and the buttons. Point at a coloured word to light up its part of the picture.

Key idea. A laser scanner measures distances all around the robot. Laser odometry compares two consecutive scans and finds the transformation that lays one on the other: it matches the motion of the robot in the time between the two scans.

Quick check

05

Visual odometry: matching pictures

A camera can do the same job with pictures instead of distances. Use Next and Back, the sliders and the buttons. Point at a coloured word to light up its part of the picture.

Key idea. Visual odometry finds the same features in two consecutive camera pictures. The transform that brings the matched features together matches the motion of the camera in the time between the two pictures.

Quick check

06

Summary and quiz

Key takeaways

  1. Local localization means estimating the pose of the robot compared with the place where its motion started.
  2. To do it, the robot tracks its own motion: speed, acceleration and travel distance, plus the direction.
  3. The usual way is odometry: start from the known starting position and add up the motion measured over time.
  4. It is like counting steps: steps of 1 m, one per second, give 3 m in front of O after 3 steps, at 3 m ÷ 3 s = 1 m/s.
  5. Robots count their steps with sensors, and the method depends on the sensors and on how the robot moves.
  6. Wheel odometry counts wheel turns: one turn moves the robot by 2 × π × r.
  7. Laser odometry finds the transformation that overlaps two consecutive laser scans.
  8. Visual odometry matches the same features in two consecutive camera pictures and finds the transform that overlaps them.

Quiz