Mobile robotics is one of those rare fields where almost every branch of engineering and computer science converges in a single device. A wheeled robot must deal with real-time control, signal processing, geometry, probability, planning, and software architecture — all at the same time, on hardware that may be limited to a single-board computer drawing a few watts. This book focuses exclusively on wheeled platforms: robots that move on wheels, from the simplest differential-drive toy to an omnidirectional industrial AGV. Walking robots, drones, and underwater vehicles are fascinating, but they introduce mechanical and aerodynamic complexities that would double the scope. Wheels are mechanically predictable, well-understood, and widespread in real applications.
The book is structured as a ladder. Each chapter introduces a concept that the next chapter builds on. The first four chapters cover foundations: how wheels work, how motors are driven, how to describe robot motion mathematically, and how to close a feedback loop. Chapters 5–8 cover sensing: extracting useful information from encoders, IR sensors, ultrasound, and cameras. Chapters 9–11 cover navigation algorithms: how a robot decides where to go. Chapters 12–14 address system-level topics: building maps, structuring complex behaviour, and combining sensor readings. Chapter 15 assembles everything into a working autonomous navigation pipeline.
Two deliberate design choices shape every chapter:
It helps to have a mental map of how concepts depend on each other before diving in.
Hardware & Wiring
|
Motor Control (PWM, H-bridge)
|
Kinematics (wheel speeds ↔ robot velocity)
|
PID Control (closing the feedback loop)
|
Odometry (integrating motion → pose estimate)
|
┌──┴──┐
Sensing Planning
(line, (reactive,
sonar, grid,
camera) sampling)
\ /
Behaviour
(FSM / BT)
|
Autonomous
Navigation
You do not need to master every layer before touching the next one, but a gap in a lower layer will eventually surface as a bug in a higher one. This is why the book spends three full chapters on motor control and kinematics before touching a sensor.
Wheeled robots are everywhere:
The hardware platform used in this book is deliberately modest: a small four-wheeled robot that costs well under £100 to assemble. The algorithms, however, are the same ones running in those industrial systems.
You need the following packages. Install them with pip in a virtual environment:
pip install numpy scipy matplotlib opencv-python
# On Raspberry Pi, also install:
pip install RPi.GPIO gpiozero pigpio
Verify the installation with the environment-check script:
See code/00_check_environment.py
import importlib, sys
REQUIRED = {
"numpy": "numpy",
"scipy": "scipy",
"cv2": "opencv-python",
"matplotlib": "matplotlib",
}
for import_name, pip_name in REQUIRED.items():
try:
mod = importlib.import_module(import_name)
version = getattr(mod, "__version__", "unknown")
print(f" OK {pip_name} ({version})")
except ImportError:
print(f" MISSING {pip_name} → pip install {pip_name}")
Run it before starting Chapter 1. If any package is missing the script tells you exactly what to install.
Each chapter has associated code files stored in the code/ subfolder. Those files are complete, runnable Python modules with type hints and docstrings. They are designed to run on a laptop as well as on embedded hardware: where GPIO access is required, the code uses a try/except ImportError guard to substitute a software mock when the real library is absent.
A typical guard looks like this:
try:
import RPi.GPIO as GPIO
except ImportError:
from unittest.mock import MagicMock
GPIO = MagicMock()
This means you can develop and unit-test every module on your development machine, then deploy the same file to the robot without changes.
Several chapters include simple 2-D simulations using matplotlib. These simulations let you validate an algorithm — a PID tuning, a path planner, an odometry integrator — before you risk a hardware run. They are not physics simulators; they do not model wheel slip or motor inertia in detail. They are engineering tools for sanity-checking logic.
When you do move to real hardware, expect surprises. Sensors are noisier than simulations suggest. Motors have dead-bands that shift with battery voltage. Floors that look flat to the eye have enough unevenness to cause measurable odometry error. The gap between simulation and reality is itself one of the most important lessons in robotics, and several chapters address it explicitly.
Wheeled robots have a lot going for them. They are mechanically stable — they will not fall over. Their dynamics are well-approximated by kinematics at low speed; you do not need a full dynamic model to make a robot move accurately at 0.3 m/s. Their motion is planar, which reduces 3-D geometry problems to 2-D ones.
But they are not trivially easy. The main source of difficulty is the non-holonomic constraint: a differential-drive robot cannot slide sideways. Its velocity is always tangent to its heading. This makes certain manoeuvres (parallel parking, for instance) require multi-step sequences rather than a direct straight-line move. Non-holonomic constraints are the reason path planning for wheeled robots is harder than for, say, a drone.
The second major difficulty is sensor noise. Wheel encoders skip ticks on slippery floors. Ultrasound sensors return ghost echoes from oblique surfaces. Cameras lie under bad lighting. Real robotics is the art of making good decisions with imperfect information, and every chapter in the sensing and planning sections deals with this in some way.
With those caveats noted, let us begin. Chapter 1 examines the three main families of wheeled robots and describes the specific hardware platform used throughout the rest of the book.
Navigation: