Skip to content
Tutorials Center
My learning

Topics

Lesson 9 of 38 · Kinematics

Mobile Robot Kinematics

Model wheeled robots: differential-drive and bicycle kinematics, turning radius, dead-reckoning odometry from wheel encoders, and why odometry drifts, with Python plots.

An arm's base never moves, but a mobile robot's does. Its configuration is a pose (x, y, θ): position in the plane and heading. Kinematics here answers two questions: given the wheel speeds, how does the pose change (forward), and what wheel speeds produce a desired motion (inverse)? Then odometry reverses the logic to estimate where the robot went from wheel counts, the foundation of localization.

Differential drive

A differential-drive robot has two independently driven wheels on a common axle and a caster for balance. Let the wheel radius be r, the distance between the wheels L (the track), and the wheel angular speeds ωR and ωL. Each wheel's ground speed is vR = r ωR, vL = r ωL. The robot's forward speed v and turning rate ω are

Text
v = (vR + vL) / 2
ω = (vR - vL) / L

If both wheels go the same speed, the robot drives straight. If they go opposite speeds, it spins on the spot. In between it follows a circle with radius R = v / ω. The pose then evolves as

Text
ẋ = v cos θ
ẏ = v sin θ
θ̇ = ω

Going the other way, to get speed v and turn rate ω, command vR = v + ωL/2 and vL = v - ωL/2.

Python Simulating a differential-drive robot

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Odometry from wheel encoders

You rarely know the wheel speeds in continuous time; you read encoders that count wheel rotation. Between two readings the left and right wheels travelled ΔsL and ΔsR (ticks times distance per tick). Then

Text
Δs = (ΔsR + ΔsL) / 2
Δθ = (ΔsR - ΔsL) / L
x ← x + Δs cos(θ + Δθ/2)
y ← y + Δs sin(θ + Δθ/2)
θ ← θ + Δθ

Using the midpoint heading θ + Δθ/2 is a better approximation of the arc than using the old heading. This is dead reckoning: the pose is built by adding small increments, with no outside reference.

Python Dead reckoning with encoder ticks and why it drifts

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

A 0.6 percent difference between wheels is tiny, yet the robot does not come back to its start. Errors in heading are worst, because a small angle error grows into a large position error over distance. That is why real robots correct odometry with other sensors, as in sensor fusion and later localization.

Car-like (bicycle) model

A car cannot spin in place or move sideways; it steers its front wheels. The bicycle model collapses the two front wheels into one steered wheel at angle δ and the two rear wheels into one, a distance W (wheelbase) apart. For rear-axle reference point,

Text
ẋ = v cos θ
ẏ = v sin θ
θ̇ = (v / W) tan δ

The minimum turning radius is W / tan δmax, so a car with a long wheelbase and limited steering needs room to turn. This is why parallel parking is a hard planning problem: the car is non-holonomic and must wiggle. See Degrees of Freedom.

Python Bicycle model: the turning circle

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Other wheel layouts

  • Omnidirectional (mecanum) wheels: rollers at 45 degrees let a robot move in any direction; the wheel speeds are a linear combination of vx, vy and ω. It is holonomic, but wheels slip more and are less efficient.
  • Tricycle and Ackermann steering: like cars, with geometry so each front wheel follows its own circle.
  • Skid steer: four or six wheels (or tracks) with no steering; turning drags the wheels sideways. Kinematics are approximate and slip is large, so the effective track width is measured empirically.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. A differential-drive robot has vR = 0.4 m/s and vL = 0.2 m/s with L = 0.4 m. What is its angular speed?

    omega = (vR - vL) / L = 0.2 / 0.4 = 0.5 rad/s.
  2. 2. What is dead reckoning?

    Odometry adds up small movements, so errors accumulate.
  3. 3. Why does heading error hurt odometry so much?

    Position is integrated along the heading, so an angle error grows with the distance travelled.
  4. 4. Why is a car-like robot called non-holonomic?

    It can reach any pose, but not along any path: sideways velocity is forbidden.

Summary

  • A mobile robot's pose is (x, y, θ); differential drive turns by speed difference: v = (vR+vL)/2, ω = (vR−vL)/L.
  • Encoder odometry integrates wheel motion with a midpoint-heading update.
  • Odometry always drifts, mostly through heading errors, so it needs correction from other sensors.
  • The bicycle model describes car-like robots and gives their minimum turning radius.

Next: Sensors and Noise