As built

The error that is an integral

A tolerance on a link length moves an output by a bounded amount. A tolerance on a wheel radius moves a vehicle by an amount that grows with how far it has driven: one per cent of mismatch between two wheels bends a commanded straight line onto a 30 m radius, and a four-metre square comes back 1.60 m from where the machine thinks it is.

Assumes A length is a range and A constraint that takes nothing away.

Every tolerance argument on this site so far has had the same shape. A mechanism’s lengths have ranges; the output is a function of the lengths; differentiate, and the output’s range follows. A four-bar’s coupler point moves by so many microns per micron of link length; a gear ratio has no stack at all, because none of the tolerated quantities appear in it.

In every case the answer is a bound. The mechanism can be out by this much and no more, and running it for longer does not make it worse.

A wheeled mechanism does not work that way, and the reason is that its output is an integral of its input rather than a function of it.

The square a robot thinks it drove, and the two it drove. A differential drive with wheels one per cent apart in radius, sent round a four-metre square twice — once clockwise and once anticlockwise. What it believes is the square; what it did closes 1.60 m out one way and 1.40 m out the other, and the errors point different ways. A wrong track width instead gives 0.177 m and 0.177 m — the same both ways round. That difference is why the test is run in both directions: one run cannot tell the two errors apart and two runs can.
Fig. 1 A differential drive with wheels one per cent apart in radius, sent round a four-metre square twice — once clockwise, once anticlockwise. The grey square is what it believes it did. The two coloured paths are the same command, and they end 1.60 m and 1.40 m from the belief, in different directions.

Why the stack does not bound

A wheeled vehicle knows where it is by integrating what its wheels did. Wheel speeds give a body twist through the wheel matrix; the twist is integrated to give a pose; and the pose is what the machine believes.

Every step of that is a computation on the machine’s assumed geometry — the radii it thinks its wheels have, the track it thinks they are on — and the actual motion happens with the geometry the wheels actually have. So an error in the geometry produces a small error in the twist at every instant, and the pose error is the integral of the twist error over the whole journey.

An integral of a constant grows linearly. An integral of a heading error grows quadratically in the distance, because a heading error tilts the direction of travel and the lateral displacement is the heading error times the distance. So the error budget of a rolling mechanism has terms that grow as ss and as s2s^2 where every other field on this site has terms that are constant.

That is not a defect in any wheel. It is the arithmetic consequence of the mechanism’s position being reached rather than solved for, which is the field’s premise turned into an error budget.

The two systematic errors

For a differential drive with wheel radius rr and track bb, two geometric quantities are assumed and two can be wrong.

Unequal wheel radii. Command both wheels at the same speed and the vehicle does not go straight; it drives an arc of curvature

κ=Δrrˉb.\kappa = \frac{\Delta r}{\bar r\, b}.

At r=50r = 50 mm, b=300b = 300 mm and one per cent of mismatch, that is κ=0.0333\kappa = 0.0333 per metre — a 30 m radius. Over a four-metre straight run the heading has turned by 4/30=0.1334/30 = 0.133 rad, which is 7.64°, and the lateral drop is 42 ⁣/(2×30)=0.2674^2\!/(2\times 30) = 0.267 m.

Four such runs, one per side of a square, and the heading is out by 30.56° before any turn has been mis-executed.

A wrong track width. Command a turn and the vehicle turns through a different angle than it believes. The error is proportional to the commanded turn, so it accumulates once per corner rather than continuously — a 1% track error gives 1% of every turn, which over four right-angles is 3.6°.

Both are deterministic. Neither is noise, neither averages out, and neither is visible to a machine that only knows what it commanded.

The measurement, and the thing that separates them

Drive a four-metre square, and drive it again the other way round. The comparison is the whole point.

error closure clockwise closure anticlockwise heading error cw heading error ccw
1% radius mismatch 1.599 m 1.400 m +30.56° +30.56°
1% track error 0.177 m 0.177 m +3.56° −3.56°

The heading is the discriminator, and the signature is which one reverses.

A radius mismatch bends the vehicle’s path in the vehicle’s own frame — always to the same side of itself — so driving the square the other way round accumulates the same heading error with the same sign. Its two closure errors point 90° apart and have different magnitudes.

A track error scales every commanded turn, and driving the square the other way reverses every turn, so the heading error reverses exactly. Its two closure errors are mirror images of identical length.

One run cannot tell them apart: a single closure error is one vector and there are two unknowns. Two runs can, and the algebra is a two-by-two solve. That is why the standard bidirectional square test exists and why running it in one direction is worth much less than half of running it in both.

What a rolling wheel forbids, and what it permits. The constraint rows above and the permitted directions below, at one configuration. The two were written from opposite ends of the same geometry — the rows from what may not happen, the fields from what may — and the largest product between any row and any field is 0.0e+0. That is this field's version of the two routes the rest of the site runs on, and every figure here rests on it: the pictures are drawn by integrating the fields and captioned with what the rows forbid.
Fig. 2 Where both errors enter. The two field rows are the wheels, and the numbers in them are the radii and the track — so an error in either is an error in the fields, which is an error in every velocity the machine integrates. There is nothing in the constraint row itself to be wrong, which is why a rolling mechanism’s error budget is entirely a budget on its drive.

The size of it, against what a machinist would expect

A one per cent difference in wheel radius is half a millimetre on a 50 mm wheel. On a linkage that would be a coarse tolerance and its effect would be a fraction of a millimetre at the output.

Here it is 1.6 m over 16 m of travel — ten per cent of the distance driven. Three orders of magnitude worse than the same fractional error would produce anywhere else on this site, and the reason is entirely structural: the error enters the heading, the heading multiplies the distance, and the distance is unbounded.

The design consequences follow directly and they are not the obvious ones.

A tighter tolerance buys linearly, not quadratically. Halving the radius mismatch halves the curvature and halves the error at every distance. There is no square root to hide behind, and worst case and quadrature do not help, because these errors do not combine like independent random ones — a systematic bias in one direction is the same bias every time.

Calibration beats manufacture. The curvature is a function of the ratio of the radii, so measuring the ratio once and correcting for it in software removes the whole term without touching the wheels. That is what the bidirectional square test is for: it is a calibration procedure, and its output is two numbers that go into the odometry.

And the calibration is only as good as the surface. The radius that matters is the effective rolling radius, which depends on the tyre’s compression and on the floor. A machine calibrated on smooth concrete and run on carpet has a different pair of radii and its calibration is spent.

The tracks a differential drive leaves. Each wheel's own path, drawn as the integrator produced it. Every one of them is tangent to its own wheel at every instant, because that is the only motion the constraint rows permit — and the residual along this whole history is 0.0e+0, which is the integrator's error and not the mechanism's. The tracks are what the mechanism can be identified from afterwards, and two of the essays in this field do nothing but read them.
Fig. 3 The tracks a differential drive leaves. Each wheel’s own track is what the odometry integrates, and the difference between the two tracks is the whole of the heading information — so a machine with two nearly-identical wheels is measuring its heading as a small difference between two large numbers, which is where the sensitivity comes from.

Reading the two errors off one picture

The bidirectional square is a calibration procedure and it is worth setting out as one, because the arithmetic that turns two closure vectors into two corrections is short and is the whole reason for driving the square twice.

Let εr\varepsilon_r be the radius ratio error and εb\varepsilon_b the track error. Each contributes a heading error per lap, and the two contributions are

Δθcw=aεr+bεb,Δθccw=aεrbεb,\Delta\theta_{\text{cw}} = a\varepsilon_r + b\varepsilon_b, \qquad \Delta\theta_{\text{ccw}} = a\varepsilon_r - b\varepsilon_b,

with aa and bb decided by the square’s side and the vehicle’s track. Adding and subtracting gives each error on its own:

εrΔθcw+Δθccw,εbΔθcwΔθccw.\varepsilon_r \propto \Delta\theta_{\text{cw}} + \Delta\theta_{\text{ccw}}, \qquad \varepsilon_b \propto \Delta\theta_{\text{cw}} - \Delta\theta_{\text{ccw}}.

The sum isolates the error that does not reverse and the difference isolates the one that does. With the numbers above: the sum is 61.1°61.1° and the difference is 00 for a pure radius error, and the sum is 00 and the difference is 7.1°7.1° for a pure track error. Two measurements, two unknowns, one two-by-two solve, and no iteration.

What makes it work is that the two errors have opposite parities under reversing the lap. That is a structural fact about which of them lives in the vehicle’s own frame and which lives in the commanded turns, and it would fail if a third systematic error shared a parity with one of them — which is why a third error, if there were one, would need a third experiment rather than a longer version of this one.

How many shuffles half a metre takes. A car with a five-metre turning radius, asked to move half a metre sideways, with each shuffle limited to the room in front of and behind it. The count is not proportional to the room: it goes as the inverse square, so the last few centimetres of a tight bay are worth far more than the first. Halving the room from 0.60 m to 0.30 m takes the job from 4 shuffles to 14, and the distance driven from 9.6 m to 16.8 m.
Fig. 4 The other place a wheeled machine’s error becomes a distance. Every shuffle of a parking manoeuvre is a small commanded motion and every one of them carries the same fractional error — so a manoeuvre that needs fourteen cycles carries fourteen times the accumulated bias of one that needs four, for the same gain.

What cannot be calibrated away

Two things, and they are what set the floor.

Slip. The rolling constraint is an assumption, and a wheel that slips has broken it. Slip is not systematic, does not reverse with direction, and does not average out either — it is a one-way loss, since a wheel that slips always over-reports distance. It is also the only term here that depends on what the vehicle is doing rather than on what it is: accelerating, braking and turning tightly all produce more of it than driving straight.

The unmodelled third wheel. Most differential-drive machines have a castor, and a castor that is being dragged sideways while it swivels is scrubbing, which perturbs the vehicle’s heading by an amount that depends on which way the castor happened to be pointing when the manoeuvre started. That is a state the odometry does not carry, and it produces errors that are repeatable within a run and not between runs.

Both are outside this field. Slip is a friction question and castor scrub is a force question, and what this essay contributes to either is the observation that they enter the same integral and are therefore subject to the same accumulation.

What each of them can reach. Nine hundred control histories of four legs each, from the same starting configuration, with the resulting position plotted. The wheel's cloud is two-dimensional and fills the region; the trolley's is one-dimensional and lies exactly on its rail — the same number of coordinates, the same number of constraints, the same count of freedoms, and a reachable set of a different dimension. Nothing here is a matter of degree.
Fig. 5 The reachability that makes accumulation possible in the first place. A mechanism confined to a surface has its error confined too — it can be wrong along the surface and never off it — and a mechanism that fills its space has no such fence anywhere.

What a straight line costs to check

There is a cheaper experiment than the square and it is worth describing, because it isolates one of the two errors without any algebra at all.

Command a straight line and measure how far the vehicle has moved sideways at the end. The lateral drop is s2κ/2s^2\kappa/2 with κ\kappa the curvature the radius mismatch produced, so

Δrrˉ  =  2bys2.\frac{\Delta r}{\bar r} \;=\; \frac{2 b\,y}{s^2}.

Four metres of travel and a 267 mm drop, at b=0.3b = 0.3 m, gives one per cent. The measurement needs a chalk line and a tape and it returns the ratio directly, because the track width does not appear in a straight run at all — no turn is commanded, so a wrong track produces no error.

That asymmetry is the same one the square test exploits and it is worth naming as a principle rather than a trick: a systematic error is isolated by an experiment that does not excite the others. A straight run excites the radius ratio alone; a pure spin on the spot excites the track alone; the square excites both and needs two runs to separate them.

The reason the square is the standard test anyway is that a machine that has to be sent out and brought back is testing the thing it actually does, and a closure error is a single number that a floor and a tape measure can produce. The two-run version buys the separation for the price of running it twice.

The tracks a rolling wheel leavesEach wheel's own path, drawn as the integrator produced it. Every one of them is tangent to its own wheel at every instant, because that is the only motion the constraint rows permit — and the residual along this whole history is 0.0e+0, which is the integrator's error and not the mechanism's. The tracks are what the mechanism can be identified from afterwards, and two of the essays in this field do nothing but read them.1 wheel · positioned by solving, not by drawingevery point reached by integrating a permitted velocity
Fig. 6 The straight-line experiment, in the form the error takes. A commanded straight line is a curve, and how much of a curve is the whole measurement. Drag along the history and the drop accumulates as the square of the distance rather than in proportion to it.

The general statement

Strip out the wheels and what is left is a distinction that applies to any mechanism.

A mechanism whose configuration is the solution of an equation has a bounded error budget: perturb the parameters, and the solution moves by a bounded amount determined by the Jacobian, however long the mechanism runs.

A mechanism whose configuration is the result of an integration has an unbounded one. The error at the end is the integral of the error along the way, and no property of the mechanism bounds it — only the length of the journey does.

Every field on this site until this one is in the first category, which is why every tolerance essay before this one reports a bound. This field is in the second, and it is the same structural difference that makes its mobility count two numbers instead of one: a mechanism with no closure equation has nothing to hold it to a nominal, in either sense.

Two numbers, and where they differ. Every mechanism in this field, with what its constraints leave and what its brackets fill. On every mechanism without a rolling contact the two columns are the same number, which is why nobody had to say which one mobility meant. Here only the rail agrees with itself — and the rail is the one mechanism in the table that cannot go anywhere new.
Fig. 7 The mechanisms whose error budgets are integrals. Every row here reaches more dimensions than its constraints leave, which is the same statement as this mechanism’s position is a history rather than a solution — and a history is exactly the thing an error accumulates along.

Why this field’s mechanisms have no nominal

One more difference from the rest of the site is worth drawing, because it explains why the word tolerance has to be used slightly differently here.

Everywhere else, a mechanism has a nominal: the linkage as drawn, with its stated lengths, and a real one differs from it by a stack. The nominal is a real object — it is the thing the solver solves — and every tolerance argument is a statement about the neighbourhood of it.

A wheeled mechanism’s pose has no nominal. There is no configuration the machine is supposed to be in, because the configuration is wherever the history took it. What has a nominal is the machine’s own geometry — the radii, the track — and the tolerance stack propagates from there into a pose through an integral rather than through a solve.

So the quantity that has a range here is not the output; it is the map from commands to motion, and everything downstream inherits the range and multiplies it by distance. That is why the essay’s numbers are given as errors per metre or per lap rather than as absolute bands, and why a specification for such a machine is written as a drift rate rather than as a positional tolerance.

How many wiggles it takes. The growth vector: how many independent directions are available after one bracket, two, three. The first number is what the constraints leave and the last is the dimension of the configuration space, so the length of the row is how deep the manoeuvring has to go. A car needs one bracket more than a trolley and a car with a trailer one more again — and the ball changes by one depending only on whether it may be twisted.
Fig. 8 The mechanisms whose poses have no nominal. Every row that grows is a mechanism reaching configurations no equation places, which is the same property that leaves its error nothing to be bounded against.

The heading grows linearly and the position quadratically

The essay’s headline compares an error against a distance driven — 1.6 m over 16 m, ten per cent — and that ratio is not a constant. It is worth separating the two errors by how they grow, because the separation says what a longer run costs and the ratio does not.

Heading error is linear in distance. A curvature error κ\kappa turns the vehicle by κs\kappa s over a run of length ss, so a straight line commanded for twice as long ends up pointing twice as far wrong. That is the 30.56° after four sides of the square, and it is the quantity that accumulates cleanly.

Position error is quadratic. The vehicle follows an arc, so its lateral departure from the commanded straight line is (1cosκs)/κ(1-\cos\kappa s)/\kappa, which for small κs\kappa s is κs2/2\kappa s^2/2. At κ=0.0333\kappa = 0.0333 per metre and s=4s = 4 m that is 0.267 m, which is the drop measured in the straight-line test.

So the ten per cent is a fact about sixteen metres and not about the machine. Double the run and the drop quadruples while the distance only doubles, so the fraction of distance driven grows linearly — twenty per cent at thirty-two metres, forty at sixty-four. A specification quoting a percentage of distance is quoting the value of a growing function, which is the same species of error this site’s wrong field collects, arriving here in a robot’s data sheet.

The quadratic does not grow for ever, and where it stops is worth knowing. The path is a circle of radius 1/κ1/\kappa, so the departure saturates at 2/κ2/\kappa — 60 m for the one-per-cent machine — and beyond that the vehicle is going round in circles rather than getting further from the line. That is not a consolation: a machine that has completed a lap of a 30 m circle has a bounded position error and a heading error that has passed through every value, and it is lost in the way that matters.

The design reading follows from the exponent rather than from either number. Errors that accumulate in heading are the expensive ones, because position error is the integral of heading error and therefore always one power worse. Anything that resets the heading — a wall to square against, a docking station, a single bearing to a landmark — buys more than anything that corrects position, and it buys it at the lower power.

That is also why the two-run square test is worth its cost. It measures the heading discrepancy, which is the linear quantity and therefore the one that separates cleanly from noise over a modest run, rather than the position closure, which is quadratic and mixes the two errors together at every distance.

What a bounded version would look like

The way out is not a better wheel; it is a second source of information, and it is worth saying what kind.

Anything that measures the vehicle’s pose against the world rather than against its own wheels turns the unbounded error into a bounded one: a wall it can touch, a mark on the floor it can see, a magnet in the ground. Each of those is an equation the vehicle can solve rather than a rate it has to integrate, and each brings the error budget back into the first category above.

Which of them to use, how often, and how to combine a measurement with an integration is estimation, and it belongs to whoever owns estimation. The kinematic statement this field can make is the one that says why it is necessary: a wheeled machine’s belief about where it is has no fixed point of its own, and something outside it has to supply one.

About the same objects

Not linked from either essay — found by the objects both name.

What links here

Essays that link to this one from their own argument.

The objects this essay names

Each one links to every other essay that touches it.

AccumulationCalibrationDead reckoningRolling constraintSensitivitySystematic errorToleranceTwo-degree of freedomWheel radiusWorst case