Drive Systems and Kinematics

Robotics Fundamentals

Course 1 · Chapter 4 · Drive Systems and Kinematics

Robotics Fundamentals 3 chose a motor, a gearbox and a wheel, and showed how much force and torque it takes to move a robot. This chapter is about how those wheels are arranged and what the arrangement lets the robot do. Two wheels driven at different speeds steer a robot; a car steers by turning its front wheels; a wheel with rollers round its rim lets a robot slide sideways. Each layout has a short piece of geometry attached, called its kinematics: the relationship between wheel speeds and the motion of the robot, with no forces in it. Kinematics works in both directions. Forward kinematics turns wheel speeds into robot motion, and when you add up that motion over time it becomes odometry, the robot's own running estimate of where it is. Inverse kinematics turns a wanted motion into the wheel speeds that produce it. We then look at why odometry drifts, compare tracks with wheels, and take a first look at legs.

Dimensions, slip factors, encoder counts and pressures in this chapter are typical, approximate or illustrative values from memory, chosen to make the arithmetic clear. Real robots vary, so measure yours (the chapter ends with how). The formulas themselves are standard geometry and are exact for the idealised models described.

1. Holonomic and non-holonomic motion

A robot on a flat floor has a pose of three numbers: its position (x, y) and its heading θ. Robotics Fundamentals 1 counted degrees of freedom, and a ground robot has three. What matters for a drive system is how many of those three the robot can change independently, at any moment.

  • A holonomic drive (in the robotics sense) can move in any direction, and rotate, independently and instantly. It controls all three: forward speed, sideways speed and turning rate. Omni-wheel and mecanum robots are holonomic.
  • A non-holonomic drive cannot move sideways. A differential-drive robot and a car each control only two velocities (forward speed and turning rate, or forward speed and steering angle). The constraint is that the wheels will not slide sideways, which in symbols says the velocity along the axle direction is zero.

A non-holonomic robot can still reach any pose, but it cannot go there directly. A car cannot slide into a parking space beside it: it must go forward and back with the wheels turned (parallel parking), which is the classic non-holonomic manoeuvre. A holonomic robot would simply slide across. The price of that freedom is extra complexity, lower grip and more motors.

Robot frame: x forward, y to the LEFT, theta counter-clockwise from the world x axis (the usual convention; a different one only changes signs). Velocities the robot body can have: vx (forward) vy (sideways, left positive) omega (turning rate, counter-clockwise positive) Differential drive and car: two controllable velocities, and the constraint vy = 0 (no sideways skidding) non-holonomic Omni and mecanum: all three controllable holonomic

2. The drive types

DriveHow it steersHolonomic?ActuatorsStrengthsDrawbacks
Differential driveTwo driven wheels at different speeds, plus a caster or two for balanceNo2 motorsSimplest; can spin on the spot (zero turning radius); easy to model and to buildCannot go sideways; the caster adds drag; a straight line needs matched wheels or feedback (Robotics Fundamentals 7)
Car-style (Ackermann)Front wheels turn; rear (or front) wheels driveNo1 or 2 drive motors, 1 steering servoStable at speed; good for outdoor and larger robots; familiarCannot turn on the spot; a minimum turning radius; reversing out of a tight spot takes planning
Skid-steer and tracksLeft side and right side driven at different speeds; the wheels or tracks slide sideways in a turnNo2 motors (or 4 with one per wheel)Robust; good on loose ground; no caster; can spin on the spotTurning needs a lot of force and wears the tyres; odometry from wheel speed is unreliable (section 9)
Omni wheels (3 or 4)Each wheel drives in one direction and rolls freely across it, so the robot can go any wayYes3 or 4 motorsMoves in any direction at once; compactLow grip; bumpy ride from the rollers; vibration; each motor needs its own speed control
Mecanum wheels (4)Angled rollers; the four wheel speeds combine into any directionYes4 motorsSideways and diagonal motion; the robot keeps its heading while movingLower efficiency and grip than ordinary wheels; flat floor only; needs matched left and right wheel types (section 8)
Swerve and synchroEvery wheel has its own drive motor and its own steering motorYes8 for four wheelsHolonomic motion with full-size wheel gripComplex, heavy and costly; mostly seen in larger competition robots
LegsLegs lifted and placed in a repeating pattern (gait)Depends on the designabout 3 per legCope with steps, gaps and rough groundMany actuators, complex control, slow and energy-hungry on flat floors (section 10)
Which one for a first robot?
Differential drive, nearly every time: two motors, one or two casters, and the simplest mathematics. It is also where the formulas below are easiest to learn. The other layouts then become variations: the same idea of "wheel speeds from body motion, and back again", with more terms.

3. Differential drive: forward kinematics

Let the two wheels be a distance L apart (the track width, measured between the contact points) and have ground speeds vR and vL (metres per second at the rim, positive when driving the robot forward). The robot body moves at the average of the two, and it turns at the difference divided by the wheel spacing.

Forward speed of the robot centre: v = (vR + vL) / 2 Turning rate (counter-clockwise +): omega = (vR - vL) / L Wheel ground speed from wheel rpm: v(wheel) = pi D n / 60 = omega(wheel) r (Robotics Fundamentals 3) Turning radius (centre to the point the robot circles about): R = v / omega = (L / 2) (vR + vL) / (vR - vL) R is positive when the centre of the circle (the ICC) is on the left (vR greater than vL), negative on the right. vR = vL: R is infinite (a straight line). vR = -vL: R = 0 (spinning on the spot). vL = 0: R = L / 2 (pivoting about the stopped wheel). Why: both wheels travel round circles about the same point, the instantaneous centre of curvature (ICC), on the line through the two wheel contact points. The wheel nearer the ICC has the smaller radius, so it goes slower, in the ratio of the radii: vL / vR = (R - L/2) / (R + L/2) Worked example: L = 0.15 m, vR = 0.60 m/s, vL = 0.40 m/s. v = (0.60 + 0.40) / 2 = 0.500 m/s omega = (0.60 - 0.40) / 0.15 = 1.333 rad/s = 76.4 deg/s (one full circle takes 2 pi / 1.333 = 4.71 s) R = (0.15 / 2)(1.00 / 0.20) = 0.375 m (check: v / omega = 0.5 / 1.333 = 0.375 m) The left wheel's circle has radius 0.375 - 0.075 = 0.300 m and the right wheel's 0.375 + 0.075 = 0.450 m, and 0.40 / 0.60 = 0.300 / 0.450. Correct. The axle line, seen from above (left turn, one character is 0.0075 m; the robot faces out of the page, towards you): *---------------------------------------L---------C---------R |<--------------0.300 m---------------->| |<-----------------R = 0.375 m------------------->| |<------------------------0.450 m-------------------------->| ICC left wheel centre right wheel

The table below fixes vR at 0.50 m/s and slows the left wheel, with L = 0.15 m. Notice how quickly the radius shrinks once the wheel speeds differ a lot, and that a stopped wheel gives a pivot, not a spin.

vL (m/s) vL/vR omega (rad/s) omega (deg/s) Turning radius R (m) Motion +0.50 1.00 0.000 0.0 infinite straight line +0.45 0.90 0.333 19.1 1.425 gentle curve +0.40 0.80 0.667 38.2 0.675 curve +0.25 0.50 1.667 95.5 0.225 tight curve +0.00 0.00 3.333 191.0 0.075 pivot about the left wheel (R = L/2) -0.25 -0.50 5.000 286.5 0.025 ICC between the wheels, inside the track -0.50 -1.00 6.667 382.0 0.000 spin on the spot (R = 0)

4. Differential drive: inverse kinematics

Planners and controllers think in v and ω ("go at 0.4 m/s and turn at 2 rad/s"), but the motors need wheel speeds. Solving the two forward equations for the wheel speeds gives the inverse.

vR = v + omega L / 2 vL = v - omega L / 2 (check: their average is v, and (vR - vL) / L = omega) Wheel angular speed: omega(wheel) = v(wheel) / r rpm = 60 v(wheel) / (2 pi r) Encoder rate wanted: ticks per second = v(wheel) / d(tick) (d(tick) from section 5) Worked example (L = 0.15 m, wheel radius r = 0.0325 m): v = 0.40 m/s, omega = 2.0 rad/s (a quick left curve) vR = 0.40 + 2.0 x 0.075 = 0.55 m/s rpm(R) = 60 x 0.55 / (2 pi x 0.0325) = 161.6 rpm vL = 0.40 - 2.0 x 0.075 = 0.25 m/s rpm(L) = 60 x 0.25 / (2 pi x 0.0325) = 73.5 rpm Spin on the spot at omega = 3.0 rad/s (v = 0): vR = +0.225 m/s, vL = -0.225 m/s 66.1 rpm each, in opposite directions When a wheel runs out of speed. Suppose v = 0.5 and omega = 3.0: vR = 0.5 + 0.225 = 0.725 m/s, vL = 0.5 - 0.225 = 0.275 m/s. If the wheels can do at most 0.60 m/s, do NOT just clip vR (that changes the turn radius, and the robot veers off its path). Scale BOTH commands by 0.60 / 0.725 = 0.828: vR = 0.600, vL = 0.228, so v = 0.414 m/s, omega = 2.48 rad/s. The robot follows the same path (the same R = v / omega = 0.167 m), only more slowly.

5. Encoders, distance and odometry

How does the robot know the wheel speeds? A wheel encoder produces a number of pulses (or ticks) for each turn of its shaft, and counting them measures how far the wheel has turned. Robotics Fundamentals 6 treats encoders properly (how they work, direction sensing, resolution); here we only need the arithmetic. An encoder is usually on the motor shaft, before the gearbox, so each wheel revolution corresponds to the gear ratio times as many ticks.

Distance per tick: d(tick) = 2 pi r / (CPR x gear ratio) CPR = counts per revolution of the encoder shaft (as counted by your software) Distance from a count: d = ticks x d(tick) = 2 pi r ticks / (CPR x gear ratio) Ticks per wheel revolution: CPR x gear ratio Worked example: wheel diameter 65 mm (r = 0.0325 m), encoder 12 counts per motor revolution (typical for a small magnetic encoder counted on both edges of one channel), gearbox 50:1. Ticks per wheel revolution: 12 x 50 = 600 Wheel circumference: 2 pi x 0.0325 = 0.2042 m Distance per tick: 0.2042 / 600 = 0.000340 m = 0.340 mm 1200 ticks: 2.0 wheel revolutions = 0.408 m 1500 ticks: 2.5 revolutions = 0.511 m Resolution of heading: one tick of difference between the wheels turns the robot by d(tick) / L = 0.000340 / 0.15 = 0.00227 rad = 0.13 deg.

Resolution is therefore rarely the limit with a geared encoder: a tick is a third of a millimetre. The errors that matter come from the model (the wheel diameter and track width you assumed) and from the floor (slip), as section 6 shows.

The pose update

Odometry keeps a running pose (x, y, θ). At each update (typically 20 to 100 times a second) it reads how many ticks each wheel has counted since the last update, converts them to distances ΔdL and ΔdR, and moves the pose. Over one short step the wheel speeds are constant, so the robot moves along a circular arc (section 3), and the exact update follows from the arc geometry.

Step distances: dL = ticksL x d(tick) dR = ticksR x d(tick) Centre travel, turn: ds = (dR + dL) / 2 dtheta = (dR - dL) / L (the forward kinematics of section 3, applied to distances) Exact (arc) update: R = ds / dtheta x(new) = x + R ( sin(theta + dtheta) - sin(theta) ) y(new) = y - R ( cos(theta + dtheta) - cos(theta) ) theta(new) = theta + dtheta If dtheta is nearly 0: x(new) = x + ds cos(theta) y(new) = y + ds sin(theta) (straight line; avoids dividing by zero) Common shortcut (midpoint): x(new) = x + ds cos(theta + dtheta/2) y(new) = y + ds sin(theta + dtheta/2) It is simple and very close for short steps. The crudest version, x + ds cos(theta) with the OLD heading, drifts when turning and is best avoided. Worked example, starting at (0, 0) facing along x (theta = 0), with the robot of section 5 (L = 0.15 m, d(tick) = 0.340 mm): ticksL = 1200, ticksR = 1500 (a deliberately long step, so that the differences show) dL = 1200 x 0.0003403 = 0.4084 m dR = 1500 x 0.0003403 = 0.5105 m ds = 0.4595 m dtheta = (0.5105 - 0.4084) / 0.15 = 0.6807 rad = 39.0 deg R = ds / dtheta = 0.675 m Arc: x = 0.675 x sin(0.6807) = 0.4248 m y = -0.675 x (cos(0.6807) - 1) = 0.1504 m theta = 39.0 deg Midpoint: x = 0.4595 cos(19.5 deg) = 0.4331 m y = 0.4595 sin(19.5 deg) = 0.1534 m (8.8 mm from the arc answer, 2 % of the step) Old-heading shortcut: x = 0.4595, y = 0 (15 cm from the arc answer: far too crude for a turn) A second step, both wheels 0.300 m: straight, so x = 0.4248 + 0.300 cos(39 deg) = 0.6579, y = 0.1504 + 0.300 sin(39 deg) = 0.3392, theta stays 39.0 deg.

Here is the update as short, hardware-neutral Python-style pseudocode (real board code, with its timers and interrupts for the encoders, is left to the course Programming for Robotics):

def update_pose(x, y, theta, ticks_l, ticks_r, d_tick, track): d_l = ticks_l * d_tick # distance each wheel rolled since the last update d_r = ticks_r * d_tick ds = (d_r + d_l) / 2 # distance moved by the robot centre dtheta = (d_r - d_l) / track # change of heading (radians, counter-clockwise +) if abs(dtheta) < 1e-6: # driving straight x += ds * cos(theta) y += ds * sin(theta) else: # moving along an arc of radius R R = ds / dtheta x += R * (sin(theta + dtheta) - sin(theta)) y -= R * (cos(theta + dtheta) - cos(theta)) theta = wrap_to_pi(theta + dtheta) # keep the heading between -pi and +pi return x, y, theta # call it every loop with the ticks counted SINCE THE LAST CALL (read, then reset or difference the counters)
Odometry is a running total, so its mistakes only grow
Every update adds a small error and nothing ever subtracts one. The pose is accurate over a short distance and becomes unreliable over a long one, which is the subject of the next section. Robotics Fundamentals 6 adds sensors (an inertial unit for heading, for example) that correct it, and Robotics Fundamentals 5 covers sensors that look at the world.

6. Odometry drift: where the errors come from

Odometry assumes that the wheel diameter, the track width and the wheel-on-floor contact are exactly what the software believes. Each can be a little wrong, and each gives a different kind of error. The errors that come from the robot's own dimensions are systematic: the same every time, so they can be measured and removed. The errors from slip and bumps are random: different every time, so they can only be reduced (by feedback from sensors), not calibrated away.

Error sourceKindEffectRemedy
Wheel diameters not equal (tyre wear, tolerance, load)SystematicA straight command curves; heading and position driftCalibrate each wheel's effective diameter; use heading feedback (Robotics Fundamentals 6)
Wheel diameter different from the assumed valueSystematicAll distances scaled wrongly (both wheels the same way)Drive a measured straight line and rescale
Track width different from the assumed value (the contact points are not where you measured)SystematicAll turns scaled wrongly, so every heading is offSpin a measured number of turns and rescale
Wheel slip (acceleration, wet floor, collisions, skid-steer turning)RandomThe wheels turned more than the robot movedGentle acceleration; better tyres; extra sensors
Uneven floor, bumps, a lifted wheelRandomWheel travel differs from ground travelSensors that look at the world
Encoder resolution and missed counts, and update rateSmall, randomRounding, and an arc approximated by a straight stepHigher resolution; use the arc update; read counters fast

Worked example 1: one tyre 1 % too big

A robot with L = 0.15 m is told to drive 3.0 m straight. The software believes both wheels are the same size, so it runs both until each encoder has counted a distance of 3.0 m. The right tyre is in fact 1 % bigger than the left one, so its wheel rolls 1 % further for the same number of ticks.

What odometry thinks: both wheels 3.000 m, heading change 0, pose (3.000, 0.000, 0 deg) What really happens: left wheel 3.000 m, right wheel 3.000 x 1.01 = 3.030 m centre travel ds = 3.015 m heading change dtheta = (3.030 - 3.000) / 0.15 = 0.200 rad = 11.46 deg circle radius R = ds / dtheta = 15.075 m (check: (L/2)(vR + vL)/(vR - vL) = 0.075 x 6.03 / 0.03 = 15.075 m) true position: x = R sin(0.2) = 2.995 m y = R (1 - cos(0.2)) = 0.300 m Error: the robot is 0.30 m to one side of where odometry says, and pointing 11.5 degrees off, after only 3 m of "straight" driving. Rule of thumb for this robot: heading error per metre = 0.01 / 0.15 = 0.0667 rad = 3.8 deg per metre of travel, and the sideways error grows with the SQUARE of the distance (about 0.0667 x 3.0^2 / 2 = 0.30 m for 3 m).

Worked example 2: track width 3 % out

The software uses L = 0.150 m but the true effective track width is 0.155 m (the tyre contact patches are further apart than the hubs). The robot is told to rotate on the spot through 360 degrees, which, by the software's belief, needs each wheel to roll once round a circle of radius L / 2, in opposite directions.

Each wheel must roll (in opposite directions): (L(assumed) / 2) x 2 pi = 0.075 x 6.2832 = 0.4712 m (the wheel travels a circle of radius L/2) True rotation achieved: dtheta = (dR - dL) / L(true) = (0.4712 + 0.4712) / 0.155 = 6.0805 rad = 348.4 deg Error: 11.6 degrees short, every full turn. The ratio is L(assumed) / L(true) = 0.150 / 0.155 = 0.968. Four commanded quarter-turns (a square path) add up to the same 11.6 degrees, so after a lap the robot is not facing as it started.

Calibration

Because these errors are systematic, two measured tests remove most of them. Do each several times on the real floor and average.

  1. Straight line, for wheel diameters. Drive a long, measured straight line and measure how far each wheel's distance was wrong and which way the robot curved. Scale each wheel's effective diameter by (true distance / odometry distance); the curve vanishes once the two wheels agree.
  2. On-the-spot turn, for track width. Command a rotation of several full turns and measure the real angle (a marked floor works). Then L(effective) = L(assumed) × (angle by odometry) / (true angle). In worked example 2: 0.150 × 360 / 348.4 = 0.155 m.

A well-known refinement, the UMBmark test, drives a square clockwise and then anticlockwise and uses the two sets of end-point errors to separate the diameter error from the track error (the details are from memory, so look the method up before relying on it). Even after calibration the random errors remain, so a long-running robot needs another source of position information.

Odometry is for the short term
Dead reckoning is an excellent estimate over a metre or a few seconds, and an increasingly poor one over minutes. Good designs use it as the short-term source and correct it with something that does not drift: a heading sensor, a wall or a landmark, or a map. Robotics Fundamentals 6 develops this idea, and Robotics Fundamentals 8 returns to mapping and localisation.

7. Car-style (Ackermann) steering

When a car turns, all four wheels must travel round circles about the same point, or some wheel would have to slide sideways. The rear wheels are fixed, so the centre of the circle lies on the line through the rear axle, and each front wheel must point at right angles to the line from that centre to it. That means the two front wheels turn by different angles: the inner wheel more than the outer. A linkage that does this is called Ackermann steering, and many hobby robots use a simple version of it, or a single steering servo with the two front wheels turned equally (which is only approximately right and scrubs the tyres a little).

The "bicycle model": merge the two front wheels into one wheel at the middle of the front axle, steered by the angle delta. F front wheel, steered by the angle delta R_f = W / sin(delta) / | / | W = wheelbase / | / | / | *-----------------------------------+ rear axle centre ICC R = W / tan(delta) (distance from the ICC to the rear axle centre) Turn radius of the rear axle centre: R = W / tan(delta) Turn radius of the front axle centre: R_f = W / sin(delta) (always larger than R) Turning rate: omega = v tan(delta) / W (v = speed of the rear axle centre) Pose update for a short step ds: dtheta = ds tan(delta) / W Minimum turning radius: R(min) = W / tan(delta(max)) A car cannot turn tighter than this, however hard the driver tries. A differential drive has R(min) = 0. Two front wheels (track T between the steered wheels), turning about a centre at distance R from the rear axle centre: inner: delta(i) = atan( W / (R - T/2) ) outer: delta(o) = atan( W / (R + T/2) ) Ackermann condition: cot(delta(o)) - cot(delta(i)) = T / W (the exact condition is what the linkage geometry approximates) Worked example: W = 0.25 m, T = 0.15 m, bicycle-model steering angle delta = 20 deg, speed v = 0.5 m/s. R = 0.25 / tan(20 deg) = 0.25 / 0.3640 = 0.687 m R_f = 0.25 / sin(20 deg) = 0.731 m omega = 0.5 x 0.3640 / 0.25 = 0.728 rad/s = 41.7 deg/s inner wheel: atan(0.25 / (0.687 - 0.075)) = atan(0.4085) = 22.2 deg outer wheel: atan(0.25 / (0.687 + 0.075)) = atan(0.3281) = 18.2 deg Check: cot(18.2 deg) - cot(22.2 deg) = 3.048 - 2.448 = 0.600 = T / W = 0.15 / 0.25. Correct. At a maximum steering angle of 30 deg: R(min) = 0.25 / tan(30 deg) = 0.433 m (front axle centre circles at 0.25 / sin(30 deg) = 0.500 m)

8. Omni and mecanum wheels: holonomic drives

Omni wheels

An omni wheel has small rollers around its rim, with their axes at right angles to the wheel's axle. The wheel drives the robot along the direction it points, but the rollers let it slide freely across that direction. With three omni wheels at 120 degrees to each other (a "kiwi" drive) or four at 90 degrees, the sum of the wheels' pushes can point anywhere. The standard inverse kinematics for a robot with wheels at angles φi (the angle of each wheel's position, measured from the robot's x axis; each wheel drives tangentially, counter-clockwise) and distance Rb from the centre is:

Wheel i angular speed: omega(i) = ( -sin(phi_i) vx + cos(phi_i) vy + R_b omega_robot ) / r Three wheels at 0, 120, 240 deg, wheel radius r = 0.03 m, moving straight forward at vx = 0.30 m/s (vy = 0, no rotation): wheel at 0 deg: -sin(0) x 0.30 / 0.03 = 0.00 rad/s (it points along y, so it just rolls freely sideways) wheel at 120 deg: -sin(120) x 0.30 / 0.03 = -8.66 rad/s wheel at 240 deg: -sin(240) x 0.30 / 0.03 = +8.66 rad/s Every wheel's speed has the robot's turning term in it, so spinning is just R_b omega_robot / r added to all three wheels.

Mecanum wheels

A mecanum wheel has rollers set at 45 degrees to its axle, so the wheel's push on the floor points diagonally. Four of them, fitted so the roller pattern is a mirror image front to back and left to right, give the robot a push in any direction by choosing the four speeds: if the diagonal components cancel, the robot goes forward; if the forward components cancel, it goes sideways.

Four mecanum wheels seen from above (the line in each wheel is the roller touching the floor; the front of the robot is at the top): FL [ / ] [ \ ] FR [ / ] [ \ ] RL [ \ ] [ / ] RR [ \ ] [ / ] Each wheel pushes along its roller line, so FL and RR push forward-right, FR and RL push forward-left (this is the layout the equations below assume). Inverse kinematics. vx forward, vy to the left, omega counter-clockwise; k = lx + ly (lx = half the wheelbase, ly = half the track width); r = wheel radius: FL = ( vx - vy - k omega ) / r FR = ( vx + vy + k omega ) / r RL = ( vx + vy - k omega ) / r RR = ( vx - vy + k omega ) / r (wheel angular speeds in rad/s, positive = rolling the robot forward) Forward kinematics (the inverse of the above, with k = lx + ly): vx = (r / 4) ( FL + FR + RL + RR ) vy = (r / 4) ( -FL + FR + RL - RR ) omega = (r / (4 k)) ( -FL + FR - RL + RR ) What the four wheels do (+ forward, - backward, 0 stopped): Robot motion FL FR RL RR Forward + + + + Backward - - - - Slide left (vy +) - + + - Slide right (vy -) + - - + Rotate counter-clockwise - + - + Diagonal forward-left 0 + + 0 (vx = vy: two wheels do all the work) Worked example: r = 0.04 m, lx = 0.10 m, ly = 0.09 m (k = 0.19 m); vx = 0.30 m/s forward, vy = 0.20 m/s left, omega = 0.50 rad/s counter-clockwise. k omega = 0.19 x 0.50 = 0.095 m/s FL = (0.30 - 0.20 - 0.095) / 0.04 = 0.125 rad/s FR = (0.30 + 0.20 + 0.095) / 0.04 = 14.875 rad/s RL = (0.30 + 0.20 - 0.095) / 0.04 = 10.125 rad/s RR = (0.30 - 0.20 + 0.095) / 0.04 = 4.875 rad/s Check with the forward equations: sum = 30.0 so vx = 0.04 / 4 x 30.0 = 0.30 m/s -FL+FR+RL-RR = 20.0 so vy = 0.01 x 20.0 = 0.20 m/s -FL+FR-RL+RR = 9.5 so omega = 0.04 x 9.5 / (4 x 0.19) = 0.50 rad/s All three match.
Check the sign convention on your own wheels
Mecanum wheels come in left-hand and right-hand versions, and different libraries and books define the axes and the signs differently. The equations above are the commonly used set for the roller layout drawn; if your robot slides left when you ask for right, the roller handedness (or a motor direction) is the opposite of what the equations assume. Test each motion with the robot on blocks before putting it on the floor. As with differential drive, if one wheel needs more than its maximum speed, scale all four commands down together so the direction of travel is kept.

Holonomic drives are attractive but have costs. Mecanum and omni wheels are less efficient and grip less than ordinary tyres (the rollers slip a little in the very act of moving sideways), so their odometry is more error-prone and they push less hard (Robotics Fundamentals 3 gave traction as Fmax = μ N); mecanum wheels work well only on flat, smooth floors; and each wheel needs its own motor and speed control. They suit a robot that must move sideways in a tight space, such as a competition robot lining up on a target. A differential drive remains the better choice for most others.

9. Skid-steer, tracks and wheels

A skid-steer robot (four or six wheels, or two tracks, with the left side driven separately from the right side) has no caster and no steering. To turn, the two sides run at different speeds, and since the wheels or tracks cannot turn to follow the curve, they slide sideways over the ground. The simple differential formulas from section 3 then misreport the turn, because the effective turning geometry is wider than the geometry of the wheels.

Effective track width: L(eff) = alpha x L(geometric) alpha about 1.3 to 2 on hard floors for typical skid-steer robots (approximate; larger on grippy ground, so it must be MEASURED) Turning rate: omega = (vR - vL) / L(eff) (use L(eff) in the odometry update too) Worked example: tracks with a geometric track width of 0.20 m, alpha = 1.6 (illustrative), so L(eff) = 0.32 m. Spin command, vR = +0.30 and vL = -0.30 m/s: the simple differential model says omega = 0.60 / 0.20 = 3.00 rad/s, in reality omega = 0.60 / 0.32 = 1.875 rad/s (only 62.5 % as much) Odometry that trusts the geometric width would over-estimate every turn by 1.6 times. The force needed to turn. When the robot pivots, the whole footprint slides sideways. For a footprint of contact length Lc carrying weight m g evenly, the friction moment resisting the turn is about M(turn) = mu m g Lc / 4 (a standard approximation for a rectangular footprint sliding while rotating) The drive must supply it as a couple: opposite pushes F on the two sides: F x L(eff) = M(turn), so F = M(turn) / L(eff) Worked example: m = 2 kg, mu = 0.8, Lc = 0.20 m, L(eff) = 0.32 m: M(turn) = 0.8 x 2 x 9.81 x 0.20 / 4 = 0.785 N m F = 0.785 / 0.32 = 2.45 N at each side, in opposite directions Compare the whole rolling resistance of this robot in a straight line (Crr = 0.03): 0.03 x 2 x 9.81 = 0.59 N. So turning on the spot takes about four times the force of rolling straight, per side, and wears the tracks or tyres.
Wheels (differential, with a caster)Tracks or skid-steer
Ground pressureHigh: the weight is on a few small contact patches (illustratively, a 2 kg robot on about 4.5 cm² of contact is about 44 kPa)Low: the weight is spread (the same robot on two tracks, each 20 cm long and 3 cm wide, 120 cm² of contact in all is about 1.6 kPa, roughly 27 times less)
Soft ground, sand, mud, snowSinks and slipsMuch better: floats and grips
Obstacles and stepsA wheel climbs a step of up to a fraction of its radiusA long track climbs steps and gaps larger than a small wheel can, especially with a sloping front
Efficiency on a hard floorBest: low rolling resistanceLower: track friction and scrub, plus the turning force above
TurningSmall force; the caster needs littleNeeds a lot of force and slides; harsh on floors and on the drive train
Odometry qualityGood (calibrate it)Poor: slip on every turn, so lean on other sensors
Weight, noise, cost, maintenanceLight, quiet, cheapHeavier, noisier, dearer, with tracks that can come off

The choice follows the terrain: wheels indoors and on hard flat ground, tracks (or large, grippy wheels, or a skid-steer with a lot of grip) outdoors on soft or loose ground. Four-wheel skid-steer robots are a common middle way: easy to build and tough, with the same odometry caveat.

10. Legs, briefly

Legs deal with ground that wheels cannot: stairs, rubble, gaps, a stepping stone. A leg only needs isolated footholds, where a wheel needs a continuous surface. The cost is complexity. A walking robot typically needs about three actuators per leg (a hip swing, a hip lift and a knee), so the actuator count and the control problem grow quickly.

RobotLegs or wheelsActuators (approx.)Notes
Differential-drive robot2 drive wheels + caster2Chapter 3 and this chapter
Mecanum robot4 wheels4Holonomic
Biped2 legs10 to 12 (about 5 or 6 per leg)Balance is an active control problem
Quadruped4 legs12 (3 per leg)Can stand still stably on three legs while one steps
Hexapod6 legs18 (3 per leg)Tripod gait: three legs always on the ground
  • Gait. A gait is the repeating pattern in which legs lift and land. A hexapod's usual tripod gait moves three legs at once (the front and back legs on one side and the middle leg on the other) while the other three support the body, then swaps. The body is always supported by a triangle of feet.
  • Static stability. A robot is statically stable when its centre of gravity (Robotics Fundamentals 2) lies over the polygon formed by the feet on the ground. Hexapods and slow quadrupeds can stay inside this polygon all the time; faster walking and running rely on dynamic balance, in which the robot is only stable because it keeps moving.
  • Kinematics. A leg is a small arm: its foot position follows from its joint angles by the same forward and inverse kinematics as a robot arm, and Robotics Fundamentals 9 works through them for a two-link arm, which is the basis of a leg.
  • Cost. Legs are slower and use more energy per metre than wheels on flat ground, because they lift and lower the body at every step. They are worth it only when the terrain demands them.

11. Challenges

Challenge 1: Differential-drive kinematics and odometry
A differential-drive robot has track width L = 0.20 m and wheels of diameter 0.08 m. Each wheel's encoder gives 600 ticks per wheel revolution (20 counts per motor revolution through a 30:1 gearbox). (a) Find the distance per tick. (b) In one update the left encoder counts 450 ticks and the right counts 700. Find the left and right distances, the centre travel ds, the heading change (radians and degrees) and the turning radius. (c) The robot starts the update at pose (0.50 m, 0.20 m) with heading 90 degrees. Find the new pose using the exact arc update, and then using the midpoint shortcut, and say how far apart they are. (d) Using inverse kinematics, find vR and vL for v = 0.30 m/s and omega = -1.50 rad/s (which way does it turn?), the wheel speeds in rpm and the encoder rates in ticks per second. (e) To spin on the spot at 90 degrees per second, what ground speed, rpm and tick rate does each wheel need, and how long does a full turn take? (f) For vR = 0.40 and vL = 0.30 m/s, find v, omega and the turning radius, and say on which side the centre of the circle lies.
View solution
Challenge 2: Ackermann and mecanum geometry
A car-style robot has wheelbase W = 0.30 m and a front track T = 0.18 m. (a) For a bicycle-model steering angle of 15 degrees, find the turn radius of the rear axle centre, the radius of the front axle centre, and the turning rate at 0.80 m/s. (b) With a maximum steering angle of 28 degrees, find the minimum turning radius. (c) For a turn of radius 1.00 m about the rear axle centre, find the bicycle-model angle and the inner and outer front wheel angles, and verify the Ackermann condition cot(outer) - cot(inner) = T / W. A mecanum robot has wheel radius 0.05 m, lx = 0.12 m and ly = 0.10 m. (d) Find the four wheel speeds (rad/s and rpm) for vx = 0.40 m/s, vy = -0.20 m/s (to the right) and omega = 0.80 rad/s. (e) Check them with the forward equations. (f) The wheels can do at most 12 rad/s: scale the command and give the speed, sideways speed and turning rate that actually result.
View solution
Challenge 3: Odometry drift, calibration, and tracks
A differential-drive robot assumes wheels of diameter 0.070 m and a track width of 0.180 m. In fact its right tyre has diameter 0.0707 m (the left is 0.0700 m) and the true effective track width is 0.186 m. (a) The robot is commanded to drive 4.00 m straight by odometry (each wheel's encoder says 4.00 m). Find the distance each wheel really rolls, the real heading change (radians and degrees), the circle radius, and the robot's real position relative to where odometry says it is (taking odometry's answer as (4.00, 0)). (b) It is commanded to spin through 360 degrees by odometry. How far does it really turn, and by how many degrees is it short? (c) Give the correction factors that calibration should apply to the right-wheel diameter and to the track width. (d) The robot is rebuilt with tracks with a geometric track width of 0.16 m and an effective width factor alpha = 1.7. If the software trusts the geometric width, how many degrees does the robot actually turn when odometry says it turned 90 degrees? (e) For a 3 kg tracked robot (friction coefficient 0.9, contact length 0.22 m), find the turning moment and the force each side must supply to spin on the spot, and compare it with the force needed to roll the whole robot straight (rolling-resistance coefficient 0.03).
View solution

Quick reference

  • Holonomic: can move in any direction independently (omni, mecanum, swerve). Non-holonomic: no sideways motion (differential drive, car): two controllable velocities, three pose variables.
  • Differential drive: v = (vR + vL) / 2; ω = (vR − vL) / L; R = (L / 2)(vR + vL) / (vR − vL); inverse: vR = v + ω L / 2, vL = v − ω L / 2; if a wheel saturates, scale both.
  • Encoders: d(tick) = 2 π r / (CPR × gear ratio); ticks per wheel revolution = CPR × gear ratio; heading resolution per tick = d(tick) / L.
  • Odometry update: ds = (dR + dL) / 2; dθ = (dR − dL) / L; arc: x += R(sin(θ + dθ) − sin θ), y −= R(cos(θ + dθ) − cos θ) with R = ds / dθ; straight if dθ is about 0.
  • Drift: diameter and track-width errors are systematic (calibrate with a straight run and an on-the-spot turn); slip and bumps are random; a 1 % wheel mismatch on a 0.15 m track gives about 3.8 degrees of heading error per metre.
  • Ackermann: R = W / tan(δ); Rfront = W / sin(δ); ω = v tan(δ) / W; Rmin = W / tan(δmax); inner and outer wheels: atan(W / (R − T/2)) (inner) and atan(W / (R + T/2)) (outer); cot(outer) − cot(inner) = T / W.
  • Mecanum: FL = (vx − vy − kω) / r, FR = (vx + vy + kω) / r, RL = (vx + vy − kω) / r, RR = (vx − vy + kω) / r with k = lx + ly; check the signs on your own wheels.
  • Skid-steer and tracks: L(eff) = α L (about 1.3 to 2, measure it); turning moment about μ m g Lc / 4; low ground pressure and good on soft ground, but poor odometry and costly turning.
  • Legs: about 3 actuators per leg; tripod gait; statically stable if the centre of gravity is over the support polygon; a leg is a small arm.

Next, Robotics Fundamentals 5 turns to sensors, the robot's way of seeing the world: distance sensors (ultrasonic, infrared, time-of-flight and lidar), line, bump and light sensors, a first look at cameras, and the ideas of accuracy, noise and range that decide which sensor to choose. Odometry told the robot where it thinks it is; sensors begin to tell it what is actually around it.