One path to the tool

Four numbers or a screw

An arm can be written down as four numbers a joint or as a line in space with a pitch on it. Both are minimal, both describe the same machine to the last bit, and one of them jumps by three hundred and fifty thousand when an axis is tilted by a millionth of a radian.

Assumes The chain that does not close and Every motion is a screw.

There are two ways to write an arm down, they are both minimal, and they disagree about almost nothing. The disagreement is the subject of this essay because of where it falls: exactly on the arms that get built.

The classical description is a Denavit–Hartenberg table, published in 1955 and in every textbook since. Between each pair of consecutive joint axes there is a common perpendicular — the shortest line meeting both — and four numbers say everything about the relation: how long that perpendicular is, how far the axes twist across it, where along the first axis it meets, and at what angle round that axis it sits.

The description this site uses is the joint screw: an axis direction and a point on that axis, given once in the arm’s home configuration, with the pose a product of exponentials.

SCARA, as four numbers a joint. A Denavit–Hartenberg table describes each joint by the common perpendicular between its axis and the next one: how long it is, how much the axes twist across it, where along the first axis it meets, and at what angle. 3 of these 3 rows have no answer for the last two, because the axes they describe are parallel and two parallel lines have infinitely many common perpendiculars, all the same length, at every point along them. The arm is perfectly ordinary; it is the description that has run out.
Fig. 1 A SCARA arm’s table, computed from its axes rather than transcribed from a book. Three rows, and all three have no answer in two of their four columns: the axes they describe are parallel, two parallel lines have infinitely many common perpendiculars — all the same length, at every point along them — and no construction picks one out. The arm is perfectly ordinary. It is the description that has run out.

They describe the same arm exactly

Before anything is said against the table, the equivalence should be earned, because a comparison between two descriptions is worthless if one of them is a worse description of the machine.

A planar three-link arm was built twice: once from three joint screws — three parallel axes through three points — and once from a three-row DH table with a equal to each link length and everything else zero. Twenty postures were run through both. The two forward maps agree in every entry of every transform to exactly zero: not to 101610^{-16}, to zero, because the two products contain the same numbers multiplied in the same order once the algebra is unwound.

That is the strongest form the claim can take. These are the same arm, and everything that follows is about the coordinates the arm is written in rather than about the arm.

The nudge

Here is the measurement. Take an arm with two parallel consecutive axes — a SCARA, a planar arm, the shoulder and elbow of almost every industrial robot — and tilt one of those axes by 10610^{-6} radians. That is a fifth of an arcsecond; it is smaller than the thermal growth of the casting the joint is bolted into. Then ask each description how far it moved.

One nudge, two descriptions. One joint axis of SCARA is tilted by a millionth of a radian, and each description of the arm is asked how far it moved — as a multiple of the nudge, so a well-behaved description scores about one. The screws score 1.00, because they are the axes. The DH offset scores 3.5e+11 when the tilt is along the line joining the two axes, and zero when it is across — so the ill-conditioning has a direction, and in the bad one a published parameter moves by 349969 for a change nobody could measure. The arm did not move; the foot of the common perpendicular slid along it.
Fig. 2 One nudge, two descriptions, on a logarithmic scale. The screws move by exactly the size of the nudge, because they are the axes: a tilt of 10⁻⁶ changes a unit vector by 10⁻⁶. The table’s offset moves by 3.5 × 10¹¹ times the nudge in one direction and by nothing at all in the other. The arm did not move; the foot of the common perpendicular slid along it.

The number on that bar is not a scaled quantity or a residual. It is the parameter itself: dd comes back as −349,969 on an arm whose longest link is 0.35, and it is not a bug. It is the correct answer. Two axes at 10610^{-6} radians to each other, offset by 0.35, have exactly one common perpendicular, and its foot is 349,969 units away down the axis, because that is where two lines at a millionth of a radian to one another get close enough to touch. Tilt the axis back and the foot goes to infinity.

The same measurement on the six-joint arm gives −899,920 at its shoulder-and-elbow pair, and on the planar arm −1,599,858. Different arms, same behaviour, and in each case the parameter is a perfectly correct description of a geometry nobody is interested in.

The ill-conditioning has a direction

The bar chart carries a second finding, and it took a failed check to notice.

The first version of this measurement tilted the axis in one direction, chosen by a rule about which way was convenient, and reported that the DH offset had not moved at all. The check failed — it is written to insist that the parameter does jump — and the failure was correct: the tilt had been made in the direction that does nothing.

A tilt across the line joining the two axes leaves the common perpendicular exactly where it was. A tilt along that line sends its foot sliding. Both nudges are the same size; one of them moves a published parameter by three hundred and fifty thousand and the other by zero, and which is which depends on the arrangement of the two axes rather than on anything about the nudge.

That is the same shape as a finding the practice field made about overconstrained mechanisms — that an exact-geometry mechanism tolerates error in some directions and not others, by three orders of magnitude — and it is worth naming as a pattern. A sensitivity is a direction before it is a number. Quoting the worst case as though it were the whole story overstates it; quoting the best case as though it were representative, which is what the failed check did, understates it to nothing.

One nudge, two descriptions. One joint axis of planar 3R is tilted by a millionth of a radian, and each description of the arm is asked how far it moved — as a multiple of the nudge, so a well-behaved description scores about one. The screws score 1.00, because they are the axes. The DH offset scores 1.6e+12 when the tilt is along the line joining the two axes, and zero when it is across — so the ill-conditioning has a direction, and in the bad one a published parameter moves by 1599858 for a change nobody could measure. The arm did not move; the foot of the common perpendicular slid along it.
Fig. 3 The same nudge on the planar arm, whose axes are all parallel by construction. The ratio between the two directions is 1.6 × 10¹², and the same story holds: nothing across, everything along. A description that is discontinuous on a set of measure zero would be a curiosity; this one is discontinuous on the set of arms that people build.

Why the table is like that, and why it was right anyway

It is easy to make this sound like a mistake somebody made in 1955, and it was not. The table is the natural thing to write and it was the right thing to write for what it was for.

A line in space has four degrees of freedom, so four numbers per joint is minimal — the table wastes nothing. A joint screw also has four, once its direction is normalised and its point is taken as the one nearest the origin, so the two descriptions are the same size. The difference is not how many numbers but what kind of object the numbers are coordinates on.

The table is a chart: a coordinate system on the space of pairs of lines, and like every chart it has places where it breaks down. Parallel axes are its pole. The screws are an embedding: the axis is given as a direction and a point, which is six numbers for a four-dimensional object, and the redundancy is exactly what buys the continuity.

This site has met that trade three times now and it is worth listing them together, because they are the same trade and they do not look it:

  • Euler angles have a pole where two of the three axes align, and the rate map from angles to angular velocity loses rank there — gimbal lock, which is a fact about the description and not about the body.
  • The logarithm of a rotation has a branch near a half-turn, where the axis has to come from the symmetric part rather than the skew part, and a guard written for that branch fired near zero instead and reported the right magnitude about an invented axis.
  • The DH table has a pole at parallel axes, and it is here.

And the reason for the table is entirely practical: with the frames attached its way, each joint’s transform is a product of four elementary rotations and translations, which is something a person can multiply out by hand and did, for twenty-five years before anyone had a machine to do it. The screws need a matrix exponential, and a matrix exponential is not a thing anyone does on paper.

elbow arm, as four numbers a joint. A Denavit–Hartenberg table describes each joint by the common perpendicular between its axis and the next one: how long it is, how much the axes twist across it, where along the first axis it meets, and at what angle. 1 of these 5 rows have no answer for the last two, because the axes they describe are parallel and two parallel lines have infinitely many common perpendiculars, all the same length, at every point along them. The arm is perfectly ordinary; it is the description that has run out.
Fig. 4 The six-joint arm’s own table, and it is mostly well behaved — four of five rows have every parameter defined, with the right angles that make the wrist a wrist. One row is the shoulder-and-elbow pair, and it is the row that has no d and no θ. This is the usual case: an arm is not badly described everywhere, it is badly described at the one joint pair whose parallelism is the whole point of the design.

Where it stops being a curiosity

An undefined parameter that nobody looks at costs nothing, and if the table were only a way of tabulating a design it would be fine. It is not only that. It is what a calibration fits.

A calibrated arm is one whose model has been adjusted to match measurements of where its tool actually goes, and the model is a parameter list. Fit a discontinuous parameterisation and two things happen, both bad. The fit becomes ill-conditioned exactly where the design is best — an arm with deliberately parallel axes is easier to build accurately, and harder to identify. And a small physical change, of the kind a calibration exists to find, produces an enormous change in the fitted numbers, so the numbers stop being comparable between one calibration and the next.

This is not a hypothetical; it is why the robotics literature has a family of “complete and parametrically continuous” models — the S-model, the CPC model, the product-of-exponentials model — all of which exist because of this one property of the classical table. What a calibration cannot see takes that up with the rank of an identification matrix, which is where the argument gets its number.

SCARA at a postureSCARA, drawn from 4 joint values through a product of 4 exponentials — no equation is solved anywhere in this picture, because an open chain has none to solve. The thin lines are the joint axes at this configuration, which are also the columns of the arm's Jacobian: the tool's velocity is a sum of turns about exactly those lines. Here the smallest singular value of that Jacobian is 0.1024 and the largest is 1.809, so the arm is comfortably away from a configuration where a direction of motion is lost. Drag θ₁.θ₁θ₂d₃θ₄toolσ_min 0.1024 · condition 17.7the pose is a product of exponentials, not a solve
Fig. 5 The SCARA whose table has no answers, moving perfectly well. Two parallel vertical axes, a slide and a roll, and the parallelism is not an accident — it is what makes the arm stiff in the one direction an assembly machine has to be stiff in, and what makes its inverse problem a two-link planar solve. The design and the description are at odds precisely because the design is good.

Two conventions with one name

There is a second trap in the classical table and it has nothing to do with conditioning. It is worse in practice, because it produces answers that are wrong rather than answers that are undefined.

There are two Denavit–Hartenberg conventions in common use, and they are not compatible. The original attaches frame i to the far end of link i, so a row reads Rotz(θi)Transz(di)Transx(ai)Rotx(αi)\mathrm{Rot}_z(\theta_i)\,\mathrm{Trans}_z(d_i)\,\mathrm{Trans}_x(a_i)\,\mathrm{Rot}_x(\alpha_i) — the form this site’s dh helper implements, because it is the form the classical spatial linkages were published in. The modified convention, which most robotics teaching now uses, attaches frame i to the near end and reads Rotx(αi1)Transx(ai1)Rotz(θi)Transz(di)\mathrm{Rot}_x(\alpha_{i-1})\,\mathrm{Trans}_x(a_{i-1})\,\mathrm{Rot}_z(\theta_i)\,\mathrm{Trans}_z(d_i).

Both are correct. Both give four numbers a joint. The four numbers are different numbers, and a table written in one and read in the other produces an arm that is subtly the wrong shape — link lengths attached to the wrong joints, twists off by one — which is a family of errors that survives casual checking because the arm still moves and still looks like an arm. The site’s own tables here are computed from the axes rather than transcribed, which sidesteps the trap entirely; a reader taking numbers off a manufacturer’s datasheet does not have that option and has to find out which convention it is in.

The screws have no equivalent ambiguity, and the reason is worth naming. There is no frame attached to a link at all. A joint is a line in space and a pitch; nothing has to be decided about where a coordinate system sits on the link before the arm can be written down, so there is nothing for two conventions to disagree about.

planar 3R, as four numbers a joint. A Denavit–Hartenberg table describes each joint by the common perpendicular between its axis and the next one: how long it is, how much the axes twist across it, where along the first axis it meets, and at what angle. 2 of these 2 rows have no answer for the last two, because the axes they describe are parallel and two parallel lines have infinitely many common perpendiculars, all the same length, at every point along them. The arm is perfectly ordinary; it is the description that has run out.
Fig. 6 The planar arm’s table, where every row is a parallel pair and therefore every row is undefined in two columns. An arm made entirely of parallel axes is the extreme case, and it is also the commonest shape in the world: every SCARA, every palletiser, every excavator arm, every planar linkage on this site.

The parameter neither description mentions

Both accounts above are short by one number per joint, and the missing one is where a great deal of practical trouble lives.

An arm’s encoder does not read zero at the home configuration. It reads whatever it reads, and the difference — the joint offset — is a fifth parameter per revolute joint that is neither in the four DH numbers nor in the screw. It has to be somewhere, because a controller commanding zero and an arm standing at its home pose are two different statements.

It is the parameter that changes most often, too: it moves whenever a motor is re-mounted, a belt slips a tooth, or an encoder is replaced, and it moves without anything about the geometry changing. Most of what a working robot’s “calibration” adjusts week to week is six offsets and nothing else. The geometry underneath — where the axes are — is set by the castings and changes only if something is bent.

That gives the identification problem its natural layering, and it is why the count in the next essay but eleven is what it is: four geometric parameters and one offset per revolute joint, six more for where the arm is bolted down and six for where the tool sits. Not all of them can be found, and which cannot is a rank question rather than a matter of instrument quality.

What the screws cost

Fairness cuts the other way too, and there are three things the table does better.

The table is smaller on paper. Four numbers in a row against a direction, a point and a convention about which is which. For a human transcribing a datasheet, the table wins.

The table has a canonical form. Given an arm, its DH parameters are determined once the conventions are fixed — except where they are not, which is the whole essay. The screws are determined only up to the choice of home configuration and the choice of which point on each axis to name, and two engineers describing one arm with screws will write different numbers that mean the same thing. That is the price of an embedding.

The table separates the joint variable cleanly. A revolute joint adds to θ\theta and a sliding joint adds to dd, and the rest of the row is constant. In the exponential form the joint variable multiplies its screw, which is just as clean, but the screw itself is expressed in the base frame and therefore looks like it depends on where the base is. It does — and so does everything else in a frame-dependent description.

What the screws buy in exchange is continuity, and the figures on this site. The dashed lines in every arm picture in this field are the parameters, drawn where the parameters say they are, so a figure and a computation cannot disagree about where a joint is. There is no frame attached to link three sitting invisibly off to one side, and no convention deciding where its origin went.

planar 3R at a postureplanar 3R, drawn from 3 joint values through a product of 3 exponentials — no equation is solved anywhere in this picture, because an open chain has none to solve. The thin lines are the joint axes at this configuration, which are also the columns of the arm's Jacobian: the tool's velocity is a sum of turns about exactly those lines. Here the smallest singular value of that Jacobian is 0.3779 and the largest is 4.150, so the arm is comfortably away from a configuration where a direction of motion is lost. Drag θ1.θ1θ2θ3toolσ_min 0.3779 · condition 11.0the pose is a product of exponentials, not a solve
Fig. 7 The same arm drawn from its screws. The three dashed lines are the parameters — three parallel axes, given as a direction and a point each — and they move continuously as the arm does. Nothing in this picture jumps when two of them become parallel, because they were parallel to begin with and the description never divided by the angle between them.

Store in a chart, compute in the object

The three instances — Euler angles, the DH table, and the third the essay names — share a shape, and the rule they suggest is short enough to state and general enough to use.

A chart is a coordinate system on a space that has no global coordinate system, so it is fine everywhere except where it is not, and where it is not is a set of configurations rather than an error. The trouble never arrives from writing a configuration down; it arrives from moving one. Four numbers describe a pair of nearly-parallel axes perfectly well, and the description is exact; what fails is the derivative of the description with respect to the thing being described.

That splits the uses cleanly. Storing a configuration, printing it, comparing two of them, handing one to a machine’s controller — all of these evaluate the chart at a point and none of them differentiates it, so the chart is the right representation and its compactness is a real advantage. Estimating a configuration, optimising over one, propagating an uncertainty, taking a Jacobian — all of these move within the chart, and every one of them meets the singularity as an infinity.

So the working rule is: parameterise for storage, compute in the ambient object. A calibration should be formulated on the screws, where the quantity being adjusted is a direction and a point and both vary continuously with the arm; and if a DH table is wanted at the end, it should be produced by one conversion from the fitted screws rather than fitted directly. One conversion evaluates the chart once, at a configuration, which is the use it is good at.

The same rule sorts the other two instances the same way. Euler angles are an excellent way to write an orientation on a drawing and a poor state for an estimator, which is why rotation estimation is done on quaternions or on rotation matrices and reported in degrees. And the general form covers cases this site has not met: any time a minimal parameterisation is being searched over rather than read, the minimality is a liability rather than an economy.

There is a corollary about testing that is worth having, because it is what would catch this in a codebase rather than in an essay. A model formulated in a chart passes every test at every configuration a test happens to visit, and fails only near the chart’s singularity — which is a measure-zero set that random test configurations miss. The test has to be aimed at the singularity deliberately, which means knowing where it is, which means knowing that the representation has one.

The check that has to exist

A site whose habit is to compute rather than to assert has an obligation here that a textbook does not, and it is the one that found the direction.

The claim being made — the DH parameters are ill-conditioned where the screws are not — is a comparison of two sensitivities, and either half can be got wrong in a way that leaves the conclusion standing. So the check insists on both: the screws must move by about the nudge, and the table must move by far more than the nudge, and separately the tame direction must move by far less. Dropping the last of those three is what let the first version report a pass that was a fail.

What a calibration can and cannot see. The singular values of SCARA's identification Jacobian — the matrix of how the tool pose moves when each model parameter is nudged, over 11 postures. There are 26 parameters and only 20 of them can be found: the last 6 directions come out at 1.6e-8, which is the difference noise, against 6.2e-3 for the weakest real one — a gap of 4e+5. And 20 is exactly 4R + 2P + 6 for this arm's 3 turning and 1 sliding joints, which is a count from the literature meeting a rank measured from the arm's own arithmetic.
Fig. 8 And a look ahead at where all this lands. The singular values of the SCARA’s identification matrix — how well a measurement can see each parameter of its model — with twenty of the twenty-six identifiable and six that no measurement will ever separate. That number is not an artefact of the parameterisation; it is 4R + 2P + 6 for an arm with three turning joints and one sliding one, and it is the same for every description of the same arm. Which parameters are unidentifiable depends on the description. How many is a property of the machine.

That last distinction is the one to carry out of this essay. Choosing a parameterisation does not change what an arm is or what can be learned about it. It changes whether the learning is numerically possible, and it changes it most on exactly the arms whose geometry was chosen with care.

The next essay leaves description behind and asks the first question with a physical answer: given the arm, where can the hand actually go.

What this makes readable

Essays that name this one as a prerequisite.

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.

Common normalConditioningDenavit–Hartenberg parametersForward kinematicsOpen chainParameterisationProduct of exponentialsScrewSerial manipulatorTwist