One path to the tool

A straight line at constant speed

Run every joint from its start value to its end value and the tool bows 402 mm off the line between them. Insist on the line instead and the arm will follow it — until the path passes near a singularity, where the joint rates a metre a second demands grow as one over the distance, measured at an exponent of −1.010.

Assumes Where the arm loses a direction and Two routes to a Jacobian.

Move the arm from here to there. There are two obvious ways to say it and they produce two different motions, neither of which is wrong and only one of which can fail.

Joint space. Every joint runs from its start value to its end value at a constant rate. Six numbers interpolated linearly, and the tool goes wherever that puts it.

Task space. The tool travels on the straight line between the two positions, at constant speed, and the joints do whatever that requires.

How far a joint-space move bows off the line. Every joint runs from its start value to its end value at a constant rate — the simplest possible move, and the one that can never be refused, because every point along it is a set of joint values and every set of joint values is a pose. The tool does not travel in a straight line while it happens. It bows away by 402 mm over a move of 1223 mm, which is 32.9% of the distance travelled and enough to hit something that the straight line would have missed.
Fig. 1 What the first one costs. Every joint of this arm runs linearly from one posture to another, and the tool’s distance from the straight line joining its endpoints is plotted along the move. It reaches 402 mm on a move of 1,223 — a third of the distance travelled — and comes back to zero at both ends, so a check at the start and the finish would report a perfect straight line.

Why a joint-space move can never fail

The joint-space path has a property that sounds trivial and is the whole reason it is used: every point on it exists.

An open chain has no closure equation. Every set of joint values is a posture and every posture has a pose, so an interpolation in joint space cannot pass through anything unreachable, cannot be refused by an inverse solver, and cannot be trapped by a singularity — the arm may pass through one, and nothing about the motion notices. Give it two postures inside the joint limits and the path between them is inside the limits too, because a box is convex.

That is a genuinely strong guarantee. It is why a robot’s “move to home” is a joint move, why teach-pendant jogging is joint-wise, and why the first motion after a fault is almost always a joint-space one: the machine may not know where it is well enough to trust an inverse solve, but it always knows what its encoders read.

What it does not give is control over where the tool goes in between. The 402 mm bow above is not an error — it is the correct tool path for that joint motion — and it is the reason a joint move is never used near anything.

Why a task-space move can

The task-space path holds the tool on the line, which the measurement confirms: the bow is below 10910^{-9} m, because the path is defined by interpolating the position and the arm is solved to land on it.

Every step of it is an inverse solve, and an inverse solve can fail in three ways this site has already met. The pose may be outside the workspace. It may be inside the workspace and outside the joint limits, which happens to eleven per cent of reachable poses on this arm. Or the arm may be near a singularity, where the solve converges to something and the rates required to get there are the problem.

So the straight line is a stronger request than it looks. A joint move is a promise the arm can always keep; a task move is a request it may not be able to.

Three shortest paths. The tool's route between the same two poses, under three interpolations. The straight one is position interpolated along a line with the rotation carried separately, which is what most controllers do. The screw path is the single turn about a single axis that Chasles's theorem says takes any pose to any other — the only one of the three that mentions no coordinate system — and it is 18.0% longer. The joint-space path is what the arm does when nobody asks for anything in particular, and it is 26.8% longer again. The screw axis itself is drawn: pitch -0.096 m per radian.
Fig. 2 Three routes between the same two poses. The straight one is the task-space move; the other two are what happens when “shortest” is defined differently — a single screw motion, and joint-space interpolation. They separate by hundreds of millimetres in the middle of a move whose endpoints they share exactly.

Is a third of the distance typical?

One pair of endpoints proves nothing. A bow of 33% could be a lucky choice, and an essay that quoted it as though it were representative would be doing exactly what this site spends its time objecting to.

So the same measurement was run over sixty pairs of ordinary postures. The bow runs from 11.6% of the distance travelled to 82.4%, with a median of 29.9%. A third is not a lucky pair; it is the middle of the distribution, and the worst case is a move whose tool path strays by four fifths of the distance between its own endpoints.

Every joint move bows, and most of them go through a singularity. 60 moves between pairs of ordinary postures, each with every joint run linearly from one value to the other. The bow off the straight line runs from 11.6% to 82.4% of the distance travelled, with a median of 29.9% — so a third of the distance is typical rather than a lucky pair of endpoints. The vertical axis is the other half: 55 of these 60 moves pass within σ_min 0.05 of a singularity and one gets to 1.7e-5, and not one of them is affected by it in the slightest. The same moves demanded in task space would have been impossible.
Fig. 3 Sixty joint moves. Horizontally, how far each bows; vertically, the smallest singular value met anywhere along the way. The two have nothing to do with each other, which is the finding: a joint move’s positional cost and its proximity to a singularity are independent, so neither can be used to predict the other.

Joint moves go through singularities constantly

The vertical axis of that figure carries the second measurement, and it is the more surprising one.

Fifty-five of those sixty moves pass within σ_min = 0.05 of a singularity — a fifth of the value at an unremarkable posture — and one of them gets to 1.7×1051.7 \times 10^{-5}, which is essentially through it. Not one of the sixty is affected in the slightest. The joints keep moving linearly, the tool keeps moving smoothly, and nothing anywhere in the computation notices that the arm passed through a configuration where a direction of motion did not exist.

That is the guarantee restated as a measurement, and it makes the trade concrete. Those same fifty-five moves, demanded in task space, would have run into the rate demand below. The two descriptions of the same motion are not equally easy; they are not even comparably easy, and the difference appears exactly where the arm is least able.

It also disposes of an intuition worth disposing of: that singularities are rare places a machine mostly avoids. They are not rare. A random pair of postures has a joint-space path through the neighbourhood of one nine times in ten, and the only reason robots work at all is that most of what they do is either far from one or expressed in a coordinate system that does not care.

What a straight line costs near a singularity

Now the measurement this essay is for.

Put the arm at distance ε\varepsilon from its wrist singularity — ε\varepsilon being the fifth joint’s angle, which is what the distance is here — and ask the tool to move at unit speed in the direction the arm is worst at. Solve Jθ˙=x˙J\dot{\boldsymbol\theta} = \dot{\mathbf x} for the joint rates that would produce it, and record the largest.

ε (rad) 0.4 0.2 0.1 0.05 0.02 0.01 0.005
joint rate 3.4 7.2 14.4 28.9 72.3 144.5 289.1

At a quarter of a degree from the singularity, one metre per second of tool speed costs 289 radians a second of joint rate — about 2,760 rpm at a joint that a real machine turns at perhaps 100. The arm cannot do it, and nothing about the path says so: the tool is travelling in a straight line at a constant speed through the middle of an ordinary working volume.

What the last millimetre costs. At each distance ε from the wrist singularity, the tool is asked to move at unit speed in the direction the arm is worst at, and the largest joint rate that requires is recorded. The points lie on a line of slope -1.010 in the logs, so the demand goes as ε to that power — one over the distance, measured rather than quoted. The check on the fit is the other exponent: σ_min itself goes as ε to the power 1.008, and the two must be equal and opposite. At ε = 0.005 rad, a quarter of a degree, the arm needs 289 radians per second of joint rate for one metre per second of tool speed.
Fig. 4 The same numbers in logarithms, and the law fitted rather than quoted. The points lie on a line of slope −1.010, so the demand goes as ε to that power — one over the distance, measured. The check on the fit is the other exponent: σ_min itself goes as ε to the power +1.008, and the two must be equal and opposite or the arithmetic has drifted. Textbooks say 1/ε; this says −1.010 and shows its working.

Fitting the exponent rather than quoting it is the point. A least-squares line through seven points will return some slope whatever the data does, so the fit alone proves nothing; what makes it evidence is that σ_min’s own exponent was measured independently and came out at the reciprocal. Two fits, one relationship, and they agree to two parts in a thousand.

It is also the one number in this field that transfers between arms. A joint rate is in radians per second, a σ_min is in mixed units, a condition number depends on whether the arm was written in metres or millimetres — but an exponent is a ratio of ratios and is the same in every unit system there is. This site has used that escape before: a Panhard rod’s error is second order and a Watt linkage’s fifth, fitted at 2.001 and 5.011, and those two are comparable across two mechanisms of different sizes precisely because they are exponents.

What controllers actually do, and what each one gives away

There is no way to have the straight line and the bounded rates. Every method in service is a choice about which to give up, and it is worth naming them because the kinematics can price each one.

Damp the inverse. Add a small term to the solve so that the joint rates stay finite near a singularity. The rates are then bounded and the tool does not go where it was told — the damping works precisely by not delivering the demanded motion. The error is largest in the direction the arm is worst at, which is the direction the task most needed.

Project the demand. Ask only for the part of the motion the arm can produce, dropping the component along the lost direction. The tool follows a path that is not the one requested, and the discrepancy is again in the constrained direction, but the machine is at least doing the best it can rather than something arbitrary.

Refuse and stop. Detect that σ_min has fallen below a threshold and halt. Honest, safe, and infuriating to the person who wrote the program, because the arm stops in the middle of a move that looked reasonable.

Re-plan through a different branch. Reach the same pose with a different one of the eight postures, which may be nowhere near a singularity. This is the only one that solves the problem rather than pricing it, and it works only when the pose has another usable posture — which on this arm is often, but at 11% of poses is not.

The kinematics can say what each of those costs. It cannot say which to choose, because that is a question about the job.

The bow is not a defect either

It is worth resisting a natural reading of the first figure. The 402 mm bow is not the joint-space path being bad; it is the tool path a linear joint motion produces, and any other tool path would require the joints to do something other than run linearly.

Which of the two is preferable depends entirely on what is around the arm. In free space the bow is irrelevant and the joint move is better — smoother in joint rates, immune to singularities, impossible to refuse. Inside a fixture the bow is everything, and it is the reason a robot’s approach and retract moves are always task-space and the long transfer between them is usually not.

That is a genuine engineering statement and it drops out of the geometry: the two coordinate systems are related by a map whose non-linearity is the whole subject of this field, and “straight” is a property of the coordinates it is measured in.

Four routes, four lengths. The distance the tool travels between the same two poses, under three interpolations and against the straight line for comparison. The screw motion — the one Chasles's theorem says is a single turn about a single axis, and the only one here that mentions no coordinates — is 18.0% longer than the straight line, and the joint-space path is 26.8% longer. None of them is wrong. They are answers to three different questions that all get asked with the word "shortest".
Fig. 5 And a reminder that even the straight line is one answer among several. The three interpolations take tool paths of 1.223, 1.443 and 1.550 metres between the same two poses, and every one of them is somebody’s definition of the shortest way. Which is right depends on a choice nobody made explicitly, and the next essay is about why the choice cannot be avoided.

How the task path is computed, and why it may return nothing

The task-space path in these figures is not an analytic object. It is thirty-six inverse solves, one per sample, each seeded from the answer before it — continuation, which is what a real machine does and what this site does everywhere it sweeps a mechanism.

Seeding from the previous solution matters for a reason the four-bar’s sweep established long ago: it keeps the answer on one branch. Seeded independently, each step would return whichever of the eight postures the seed happened to be nearest, and the path would jump between branches mid-move — drawing an arm that turns itself inside out between one frame and the next, which is a motion no machine can make and which the figure would present as smooth.

And the solve is allowed to fail. taskPath returns a null where the arm could not arrive, rather than the nearest posture it managed, because returning a near miss is the failure this site keeps finding elsewhere: a computation that produces a plausible number for a question with no answer. The assertion behind the figures requires every step to have been solved, so a path with a hole in it stops the build rather than being drawn with a kink.

That is why the straight-line path here can be asserted straight to 10910^{-9} rather than described as straight. It is straight because thirty-six separate inverse solves each landed on the line, and if one of them had not, there would be no figure.

The rotation has to be interpolated too

A pose is a position and an orientation, and everything above has been about the position. The orientation cannot be linearly interpolated — the average of two rotation matrices is not a rotation matrix — so something has to be chosen, and the choice is not free of consequence.

What the task path here does is carry the orientation along the shortest arc: take the rotation that turns the start orientation into the end one, take its axis and angle, and turn through a fraction of that angle at each step. It is the only interpolation of a rotation that mentions no coordinate system, and it is what quaternion slerp computes by another route.

The alternative — interpolating three Euler angles linearly, which a surprising amount of software does — produces a different path through orientation space, one that depends on which three angles were chosen and which speeds up and slows down through the move even when the endpoints are evenly spaced. It also inherits the parameterisation’s pole: a move whose orientations pass near it demands enormous angle rates from an arm that is not being asked for anything unusual, which is the coordinate singularity doing damage rather than merely existing.

So there are two independent choices in “move the tool from here to there in a straight line” — how the position is interpolated and how the orientation is — and the next essay is about the fact that there is no way to make them one choice.

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.3450 and the largest is 2.483, so the arm is comfortably away from a configuration where a direction of motion is lost. Drag θ₂ shoulder.θ₁ baseθ₂ shoulderθ₃ elbowθ₄ roll θ₅ θ₆toolσ_min 0.3450 · condition 7.2the pose is a product of exponentials, not a solve
Fig. 6 One end of the move, with the second joint driven and the tool’s path traced. Every point of that trace is a pose the arm can hold, obtained by evaluation rather than by solving, and the whole curve took no iterations at all. The straight line between the two ends took thirty-six inverse solves and could have failed at any of them.
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. 7 Why the rotation cannot simply be interpolated component by component: the same small displacement described two ways, and the two descriptions do not agree about what a straight line between them is. A task-space path is a path in a space that has to be chosen before it can be walked.

What was left out

Three things a reader who works with robots will notice are missing, and they are all outside this site’s boundary rather than overlooked.

Time. Everything here is about the path — the set of poses the tool passes through — and not the trajectory, which is the path with a schedule on it. Acceleration limits, jerk limits, and the trapezoidal or S-curve profiles that respect them are real and they are dynamics: they involve masses.

Blending. Real machines do not stop at every waypoint; they round the corners, and how much they round depends on a tolerance the programmer sets. The geometry of that is a curve-fitting problem in joint space or task space and it is entirely kinematic — it is a genuine gap in this field rather than a boundary, and it is named as one.

Obstacles. A path that avoids something is the subject of the last essay in this field, and only half of it: whether a route exists is a question about the configuration space, which is kinematics, and finding one is a search, which belongs to algorithms-data-structures.com.

The rate diverges and the travel barely does

The exponent of 1-1 says the joint rates are unbounded near a singularity, and it is worth asking what the whole traverse costs, because the two answers are different and only one of them is the binding constraint.

Take a straight-line path that passes at closest distance ε\varepsilon from a singularity. Near the closest approach the smallest singular value behaves like σε2+(ks)2\sigma \approx \sqrt{\varepsilon^2 + (ks)^2} for ss the distance along the path, so the joint rate goes as 1/σ1/\sigma and the total joint travel over the traverse is

dsε2+k2s2    1klog1ε.\int \frac{\mathrm{d}s}{\sqrt{\varepsilon^2 + k^2 s^2}} \;\sim\; \frac{1}{k}\log\frac{1}{\varepsilon}.

Logarithmic. So halving the closest approach adds a constant to the total joint motion, while it doubles the peak rate. At ε=104\varepsilon = 10^{-4} the peak rate is ten thousand times the nominal and the total travel is about nine times it.

That settles which quantity a machine actually fails on. Motors have a speed limit, and the peak rate exceeds it long before anything else is troubled: 289 radians per second for a metre per second of tool speed is a demand no servo will meet, and it arrives at a quarter of a degree from the singularity. The total joint travel over the same traverse is a few times the ordinary amount, which no machine notices.

So the failure is a rate failure and not a travel one, and every remedy in the list is a rate remedy — damp the inverse, project the demand, refuse and stop. Each of them caps the peak and each accepts a path error in exchange; none of them is trying to reduce how far the joints go, because how far they go was never the problem.

It also explains why passing through a singularity is possible at all, which the 1/ε1/\varepsilon figure makes sound impossible. A path that goes straight through has ε=0\varepsilon = 0 and an infinite peak rate at one instant — and a logarithmically divergent travel, which is to say the joints still move a finite amount if the traverse is taken slowly enough near the crossing. That is exactly what a controller doing a deliberate reconfiguration does: accept an unbounded rate demand for an instant by slowing the tool to nothing, and let the joints take the finite motion the geometry requires.

The general shape

Two coordinate systems, a non-linear map between them, and the observation that a straight line in one is not a straight line in the other. That is the whole of this essay, and it is the same observation that a cam’s motion law makes about displacement and acceleration, and that a quick-return mechanism makes about crank angle and slider position.

What is different here is that the non-linearity has somewhere to become infinite. A cam’s follower moves through its whole stroke for every turn of the shaft and there is no configuration at which the relation breaks down. An arm has three, and near them the map from joint rates to tool velocity is not merely non-linear but singular — which is why this field spends four essays on them and the cam field spends none.

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.

ConditioningInterpolationInverse kinematicsJacobianJoint spaceSerial manipulatorSingularityTask spaceTrajectoryVelocity ratio