One path to the tool

Eight ways to hold the same tool

A six-joint arm asked to put its tool at one place, held one way, has eight answers. Not approximately eight and not eight found by looking — two for the base, two for the elbow, two for the wrist, each exact to a hundredth of a femtometre, and a search from six hundred starting postures finds those eight and no ninth.

Assumes The chain that does not close and Where the hand can go.

Put a tool at a point, held at an angle. Ask the arm what its joints should read.

8 postures, one tool pose. The tool is at one place, held one way. Eight different sets of joint values put it there, and this is all of them at once: two ways for the base joint to face the target, two for the elbow, and two for the wrist — two by two by two. Every posture here came out of a closed form and was checked by running the arm forward again; the worst disagreement is below 10⁻¹⁴ of a metre. Which of them a machine can actually use is a separate question, and it is answered by the joint limits rather than by the geometry.
Fig. 1 Eight answers, drawn on top of each other. The tool is at one place, held one way, in all of them; the arm is folded eight different ways to get there. Every one of these came out of a construction rather than a search, and every one was then run forward through the same product of exponentials to check that the tool really lands where it was asked — the worst disagreement across all eight is 1.8 × 10⁻¹⁵ of a metre.

This is the reversal the parallel field named and it has come round the other way. There, a platform’s forward problem had forty solutions and its inverse problem was a subtraction and a square root per leg. Here the forward problem is a product of six matrices with one answer, and the inverse problem has eight.

Where the eight come from

They are not eight of a kind. They are two, twice, twice, and the three binary choices are about three different parts of the machine.

Two for the base. The arm’s shoulder and elbow swing in a plane, and that plane is set to one side of the base axis by the shoulder offset — 0.18 m on this arm. So the wrist centre’s position, seen from above, fixes the angle of that plane only up to a reflection: the arm can face the target, or it can turn round and reach for it over its own shoulder. Algebraically, sin(φθ1)=d2/r\sin(\varphi - \theta_1) = d_2 / r has two solutions, and they merge when r=d2r = d_2 — which is the shoulder singularity and the surface of the cylindrical hole the arm cannot reach into.

Two for the elbow. Inside that plane the problem is a triangle: the upper arm, the forearm, and the line from shoulder to wrist centre. The cosine rule gives the angle between the first two up to a sign, and the sign is elbow up or elbow down. It is exactly the two-link problem the planar arm has, and exactly the two assembly branches a four-bar has, arrived at from a third direction.

Two for the wrist. Once the wrist centre is placed, three intersecting axes have to supply whatever rotation is left. Reading three angles off a rotation is a z-y-z Euler problem, and it has two branches: the middle angle can be taken positive or negative, with the outer two shifted by π to compensate. Both give the same tool orientation with the wrist folded the other way, which is why a robot can hold a tool one way with its wrist “up” and the same way with it “down”.

Two times two times two. Nothing about the number eight is an approximation, a count of what was found, or a property of these particular link lengths.

One set of lengths, two mechanisms. The same four bars pinned in the same order and the same crank angle, assembled two ways. B sits 5.42 units apart between them. Both satisfy the loop-closure equations exactly, so neither is more correct — and a built mechanism is in one branch permanently, because getting to the other requires taking a pin out. The solver reaches whichever branch its starting guess is nearer, which is why a sweep carries the previous position forward rather than starting fresh.
Fig. 2 The two-answer case this site has drawn since its first field: a four-bar at one crank angle, assembled two ways. The arm’s eight are the same phenomenon three times over — and the four-bar’s two are, exactly, the elbow-up and elbow-down of its own two-link sub-problem.

The decoupling that makes it possible

None of the above would work if the three wrist axes did not meet at a point.

The construction starts by finding the wrist centre: back off from the target along the tool’s own axis by the tool length. That is only legitimate because the last three joints cannot move the wrist centre — they all pass through it — so the wrist centre’s position depends on the first three joints alone. Three equations, three unknowns, and a triangle to solve them with. Then the orientation is whatever is left, and three intersecting axes can supply any of it.

That property is Pieper’s condition and it is the whole reason industrial arms are built the way they are. It is the next essay, because it deserves one: it is a design decision made for the sake of an equation, and the equation is solved on a machine that runs the control loop a thousand times a second.

Without it, the six-joint inverse problem is a genuinely hard piece of elimination theory. The general 6R arm has sixteen solutions — the result is Lee and Liang’s and Raghavan and Roth’s, from the late 1980s, and it was open for a long time before that. This site does not compute it. Its algebra field has the machinery in principle, and saying so is not the same as having done it; the honest position is that the count of sixteen is a result obtained by people who did that work, and what is computed here is the decoupled case.

The second route, and what a search can know

A construction cannot check its own count. If a branch were missing, the seven remaining answers would each be perfect, the round trip would pass, and nothing in the arithmetic would notice. So the count is checked by a method that knows nothing about wrists.

Damped least squares, from six hundred scattered starting postures, each iterating until the tool arrives or two hundred steps have gone by.

Counted twice. Damped least squares from 600 scattered starting postures. 522 of them converge, and they land on exactly 8 distinct sets of joint values — every one of which is one the closed form returns. That agreement is evidence and not proof: a search reports a lower bound on how many solutions a problem has, exactly as the six hundred starts that found sixteen poses of a Gough platform did. What makes it worth running is that a construction cannot check its own count — a missing branch returns seven perfect answers and nothing in the arithmetic notices.
Fig. 3 522 of the 600 starts converge, and they land on exactly eight distinct sets of joint values — every one of which is one of the construction’s eight. The disagreement is zero and the count is confirmed, with one caveat that has to be stated: a search reports a lower bound. It found eight; it cannot prove there is no ninth. That is the same caveat the parallel field put on sixteen platform poses found from six hundred starts, against a known count of forty.

The 78 starts that do not converge are not failures of the arm. They are seeds from which the damped iteration wanders into a region where the step it wants is enormous and the damping refuses it, and it runs out of iterations. Nothing is lost — the eight are all found many times over — but it is worth noticing, because it is the shape of what happens when an arm is asked for a pose near a singularity and the answer is not to iterate harder.

Why a machine wants the construction

For a figure on this page, eight postures found by either method would do. For the machine the difference is decisive, and there are three reasons.

Speed. The construction is a few dozen floating-point operations. The search is 522 successful Newton runs of up to 200 steps each, and every step is a 6 × 6 solve. A controller closing its loop at a kilohertz has a millisecond, and it is not spending it here.

Determinism. The iteration’s answer depends on its seed. Seed it with the arm’s current posture and it returns the nearest solution, which is usually what is wanted and is occasionally catastrophic — a path that passes near a singularity can hand the iteration to a different branch without anything in the software noticing that the arm has just been asked to turn itself inside out.

Naming. The construction returns eight postures labelled: front or back, elbow up or down, wrist or flipped. A machine chooses among them by rules — this one’s cables will not take the flipped wrist, that one’s base cannot swing to the back configuration, the elbow-down solution puts the upper arm through the fixture — and rules need names. A search returns eight arrays of six numbers.

elbow arm at a postureelbow arm, drawn from 6 joint values through a product of 6 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.1060 and the largest is 2.576, so the arm is approaching a configuration where a direction of motion is lost. Drag θ₁ base.θ₁ baseθ₂ shoulderθ₃ elbowθ₄ roll θ₅ θ₆toolσ_min 0.1060 · condition 24.3the pose is a product of exponentials, not a solve
Fig. 4 One of the eight on its own: the back, elbow down posture, reaching for the same target over its own shoulder with the base at −1.77 rad instead of 0.40. It is a perfectly valid solution to the equations and most machines cannot use it — the base would have to swing 124° to get here from the front solution, sweeping the whole cell on the way. Which of the eight are usable is a fact about the installation rather than about the arm.

Exact, and out of reach

Every one of the eight satisfies the equations. A built arm has hard stops, and a posture outside them is a solution to the equations and not to the problem.

So the eight were counted again with limits on — a base that swings most of a turn, a shoulder and elbow that cannot fold back through the arm’s own structure, wrists stopped short of a full turn by the cables running through them. Three hundred and forty-five reachable poses, each with all eight postures constructed exactly.

Exact, and out of reach. 345 poses of the six-joint arm, each with all eight postures constructed exactly, sorted by how many of the eight lie inside a plausible set of joint limits. The mean is 3.23; the number worth reading is the first bar, which is 39 poses — 11% — that the arm can reach in eight ways and hold in none. That is the same shape the synthesis field found in Burmester's construction: exactness is not the scarce quantity, and a solution that satisfies every equation can still be a solution to nothing.
Fig. 5 How many of the eight the machine can hold. The mean is 3.23, and the mean is the least interesting number here. The first bar is thirty-nine poses — eleven per cent — that the arm can reach in eight different ways and hold in none of them: every solution exact, every solution outside a stop. Not one pose in the survey keeps all eight.

That is a familiar shape and it belongs to a different field of this site. The synthesis field measured 1,176 exactly correct three-position linkages of which 176 could actually be built, the rest disqualified by branch, circuit and order defects that the construction cannot see. Here the construction returns eight exact postures and the machine can use three of them, and at one pose in nine it can use none.

Exactness is not the scarce quantity. In both cases the construction is doing its job perfectly and the shortfall is somewhere the construction has no access to — there, whether the linkage can travel between the prescribed positions without disassembly; here, whether the joints can get to the values the answer asks for. A solution that satisfies every equation can still be a solution to nothing, and the only way to find out is to ask a question the equations do not contain.

What the branches are, in the site’s own vocabulary

By now this site has met multi-valued solutions four times, and it is worth putting them beside one another, because they are the same phenomenon and the vocabulary has drifted.

  • A four-bar’s two assemblies: for one crank angle, two positions of the coupler. Reflections about the diagonal.
  • A 3-RRR platform’s six assembly modes: for one triple of actuator angles, six poses of the platform.
  • A Gough platform’s forty poses: for one set of six leg lengths, forty poses in the complex numbers, sixteen of them found real by search.
  • An arm’s eight postures: for one tool pose, eight sets of joint values.

The first three are all forward problems and the last is an inverse one, which is why the vocabulary drifted. But every one of them is the same statement: a fibre of the map between joint space and task space has more than one point in it. And every one of them has the same practical consequence, which is that a mechanism cannot pass from one to another without going through a configuration where two of them have merged — a singularity.

That last sentence is the thread this whole field is strung on, and it is made exact in the space of configurations, which shows the branches to be connected components of one set and the singularities to be where components meet.

Bézout's number, and the answer. 3 polynomial systems, each solved by tracking every one of Bézout's paths. The Bézout column is what the shape of the system permits; the solutions column is what it has. four-bar coupler pin: 4 → 2; 3-RPR platform: 16 → 6; Gough, generic: 1458 → 80. The last column is how many paths were tracked per solution found.
Fig. 6 Where the counts come from when they are not two or eight. The algebra field computes root counts for mechanisms whose closure conditions are polynomial systems, and a decoupled arm is the case where elimination is unnecessary — the geometry splits the system by hand. The general six-joint arm is not on this table and its count of sixteen is quoted from the literature rather than computed here.

When eight is not eight

The count is not eight everywhere. It is eight for a general reachable pose, and the exceptions are where the interesting geometry is.

On the boundary of the workspace, elbow up and elbow down have merged: the arm is straight and there is one solution where there were two. On the shoulder cylinder, front and back have merged. At a wrist singularity the two wrist branches have merged, and worse — the fourth and sixth joints have become the same axis, so only their sum is determined and there is a one-parameter family of answers rather than a discrete pair.

That last case is not a mathematical curiosity. It is what a real arm meets when it is asked to point its tool straight along its forearm, which is a completely ordinary thing to ask, and the reason a controller near it either refuses or moves very slowly indeed. The demand it makes on joint rates is measured in a straight line at constant speed and it goes as one over the distance.

Outside the workspace the count is zero, and the construction says so rather than returning the nearest thing: the cosine rule’s argument leaves [1,1][-1, 1], and there is no triangle. That refusal is the arm’s equivalent of a closure equation with no solution, and it is the only place in this field where the geometry can refuse anything.

Reachable, and dexterous. A 3-link planar arm with links 1.6, 1.2, 0.7. The outer region is everywhere the tool can be put: an annulus from 0.00 to 3.50. The inner region is everywhere it can be put at every tool angle — from 1.10 to 2.10, which is 26% of the area. Both are measured by counting cells on a 260 × 260 grid and both agree with the area computed from the radii to 0.06%, which is what makes the picture a measurement.
Fig. 7 The planar rehearsal of all of it. Inside the outer annulus every point has two postures; on its edge they have merged into one; outside it there are none. The inner annulus is where the tool can additionally be held at any angle, and for the six-joint arm that is the region where all eight branches exist for every orientation rather than for some.

The tool sticking out is what makes it a problem

One detail of the construction is easy to skip past and it is where a good deal of practical error lives: the first step backs off from the target along the tool’s own axis, by the tool’s length.

If the tool were at the wrist centre — a spot welder’s tip exactly at the intersection of the last three axes — the position problem would not involve the orientation at all. Ask for a position, solve three joints; ask for an orientation, solve three more; the two halves would not talk to each other in either direction.

Real tools stick out. A gripper’s fingers are 200 mm beyond the flange, a welding torch further, a deburring spindle further still, and the moment the tool has length, where the wrist centre has to be depends on which way the tool is pointing. That is what the back-off step encodes, and it is why the same arm reaching the same point with two different tools needs two different postures.

It is also where the tool length itself enters as a number that has to be right. An error in it does not move the tool by that error; it moves the wrist centre target by that error, and the whole posture changes to suit. The error budget treats that properly — a tool offset is one more parameter in the model, and it is one of the ones a calibration can actually find.

Reachable, and dexterous. A 3-link planar arm with links 1.6, 1.2, 0.7. The outer region is everywhere the tool can be put: an annulus from 0.00 to 3.50. The inner region is everywhere it can be put at every tool angle — from 1.10 to 2.10, which is 26% of the area. Both are measured by counting cells on a 260 × 260 grid and both agree with the area computed from the radii to 0.06%, which is what makes the picture a measurement.
Fig. 8 Outside the reachable annulus the count is zero, and the construction says so rather than returning the nearest thing: the cosine rule’s argument leaves [−1, 1] and there is no triangle. That refusal is the only place in this field where the geometry can decline to answer, and it is the arm’s equivalent of a closure equation with no solution.

The check that would catch a missing branch

Three assertions guard the eight, and they fail in different ways, which is the point of having three.

Every solution reproduces the target. Run each of the eight forward and compare with the pose asked for: worst case 1.8×10151.8 \times 10^{-15}. This catches a sign error in a branch, which otherwise produces a plausible arm holding the tool somewhere else entirely.

The posture the target was made from is among them. Each test target is generated by picking joint values and running the arm forward, so one particular answer is known in advance and must appear in the list. This catches a construction that is self-consistent and wrong — eight postures that all satisfy each other and none of which is the arm the target came from.

There are eight, at every test pose. Not “at least two”, not “several”: eight, four times over, at four different targets. This is the one that would catch a missing branch, and it is the one the search backs up independently.

None of the three is sufficient alone, and the second is the one most easily left out. It is also the one that fails first when a convention drifts — when a joint’s zero is redefined, or an angle is measured from the wrong reference — because the construction goes on being internally consistent while ceasing to describe the arm the figures draw.

The posture label is a component, not a preference

The eight come out labelled — front or back, elbow up or down, wrist flipped or not — and those labels are more than a convenience for a controller. They are the discrete part of the arm’s state, and treating them as a choice made once rather than as a variable is what makes an arm’s motion planning tractable.

Move the arm continuously and the labels cannot change. Getting from elbow-up to elbow-down means passing through the configuration where the two merge, which is the arm straight, which is exactly the boundary singularity. So a continuous path within the workspace stays in one posture, and the eight postures are eight connected components of the solution set — the same object a four-bar’s branches are, arriving in an inverse problem instead of a forward one.

That has a consequence a planner cannot avoid. A path from one pose to another is not a path between two poses; it is a path between two poses in the same posture. Compute the eight solutions at the start and the eight at the end, match them by label, and plan within one label — because a plan that silently changes label is a plan that passes through a singularity, and a singularity is where the arm loses a freedom and the joint rates go to infinity.

Deliberate reconfiguration is therefore a separate manoeuvre with its own rules. An arm that must change posture has to be taken to a singular configuration on purpose, slowly, usually with the tool clear of anything, and brought out the other side — which is why industrial controllers treat it as a distinct command rather than as part of a move, and why a robot occasionally straightens its arm entirely in the middle of a cycle for no reason a bystander can see.

It also explains the value of computing all eight rather than one. The controller does not need seven of them for the move it is making; it needs them to know which postures the target admits, so it can choose one that is reachable throughout the whole path rather than one that is fine at the endpoints and runs into a limit in between. That is a question about eight components, and having the labels is what makes it answerable without searching.

Which is the sharpest statement of what the construction buys over the iteration. A search returns postures; the construction returns postures with their labels, and the labels are the component structure. One of those is a list of answers and the other is a map of the solution set.

What the eight are worth knowing

There is a use for all eight beyond choosing one, and it is the reason a good controller computes them rather than the nearest.

An arm working near a limit can often reach the same pose in another posture that is nowhere near it. An arm whose path is about to pass through a wrist singularity can sometimes step around it by switching branches while the tool is stationary — which cannot be done, because switching branches means passing through the singularity, and that is precisely the finding this field keeps arriving at from different directions. The branches are separate for a reason, and the reason has a shape.

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

The 8 of 20 essays linking to this one that name the most of the same objects.

The objects this essay names

Each one links to every other essay that touches it.

Assembly branchClosed formInverse kinematicsJoint limitsNewton–RaphsonOpen chainPieper conditionRoot countSerial manipulatorWorkspace