One path to the tool

The space of configurations

A two-joint arm's configurations are a torus, and drawing one on a page turns it into a square whose opposite edges are secretly the same line. Count the free space on the square and get three pieces; count it on the torus and get one. Eighty single-obstacle arrangements were tried and not one of them cut the torus in two — what does that is a pair of hard stops.

Assumes The freedom that does nothing and Where the hand can go.

Every configuration of a two-joint arm is a pair of angles, so the set of all of them is a circle times a circle: a torus. That is not a metaphor and it is not a convenience. It is the shape of the set, and this essay is about the two things that follow from it.

The free configurations, with joint limits. Every point is a pair of joint angles for a two-link arm; the pale region is the configurations at which neither link touches an obstacle, and the dark one is where something is in the way. The free space is in 2 pieces. The arm's joints cannot turn all the way round, so the edges of the square are edges — and now the barrier separates. The two crosses put the tool at exactly the same point, and the arm cannot get from one to the other at all.
Fig. 1 The free configurations of a two-link arm with a fence of obstacles in front of it and hard stops on both joints. Every point is a pair of joint angles; the pale regions are where neither link touches anything. The two crosses put the tool at exactly the same point in space, and the arm cannot get from one to the other at all — they are in different pieces of the set.

Drawing a torus is drawing a lie

A torus does not fit on a page, so it is drawn as a square with its opposite edges identified: leave by the right-hand edge and arrive at the left, leave by the top and arrive at the bottom. Every figure of a configuration space ever drawn does this, and it is the source of the essay’s first measurement.

Take one disc obstacle in front of the arm. Count the connected pieces of the free space on the square, treating its edges as edges: three. Count them on the torus, joining the edges as they actually are: one.

The difference is not subtle and it is not an artefact. Two regions that look separate in the drawing are joined round the back, and a reader who takes the picture at face value concludes that the arm cannot get from one to the other when in fact it can, easily, by turning a joint past the edge of the page.

The equation whose roots are the assemblies. Hold the platform's angle and each leg says the platform's centre lies on a circle; two legs then fix the centre to one of two points, and the third leg becomes this single number — how far it is from being its own length. Its zeros are the assemblies, and there are 6 of them at 216°, 48°, 144°. The two curves are the two ways the first pair of circles can meet, and the gaps are angles at which they do not meet at all, so no platform pose exists there whatever the third leg does.
Fig. 2 The parallel field’s version of the same object: the curve of platform poses that satisfy one leg’s constraint. Every mechanism whose mobility is one has a configuration space that is a curve, and every branch of it is a component — which is the observation this essay’s last section is entirely about.

And an obstacle does not cut it

That leads to a stronger statement, and it wanted testing rather than asserting.

Eighty single-disc arrangements were tried — four radii, twenty positions — and not one of them left the free space in more than one piece. Three of the eighty blocked the arm entirely, which is a different kind of failure. The other seventy-seven all gave exactly one connected component.

Then a fence: thirteen discs on an arc at the edge of the arm’s reach, arranged so that the arm cannot be straight in any direction it might want to point. Free space 81.4%, and still one component.

The reason is legible once it is looked for. To get from any posture to any other, the arm can fold: bring the second link back along the first, so the tool sits near the base, and then turn the whole thing about the shoulder to wherever it needs to be. Those folded configurations are a band of the torus that runs all the way round in the first joint, and a disc out in the workspace does not touch them. An obstacle that did block them would be sitting on the base, and would then block the first link in most other configurations too — which is the three that came back entirely blocked.

So an obstacle in front of an arm makes some postures unavailable. It does not make them unreachable, and the difference is the whole subject of this essay.

Joint limits are what separate

Now put hard stops on: a shoulder that swings from −57° to +69° and an elbow that swings ±149°, which is the ordinary state of a real machine.

The square is now a square. Its edges are edges rather than identifications, because the arm genuinely cannot turn past them, and the way round the back is gone.

The same fence now cuts the free space into two components of very nearly equal size. And the two postures that reach one particular tool position — elbow up and elbow down, the two answers to a two-link inverse problem — are in different ones.

The arm can put its tool at that point two ways, and it cannot get from one to the other. Not slowly, not by a clever route: there is no path in the set.

That is the finding, and it is the reverse of the intuition. The obstacle is not what traps the arm. The joint limits are — the obstacle merely decides where the resulting wall lies.

The free configurations, on the torus. Every point is a pair of joint angles for a two-link arm; the pale region is the configurations at which neither link touches an obstacle, and the dark one is where something is in the way. The free space is in 1 piece. One, however the barrier is arranged: to get from one posture to another the arm can always fold right back and swing round behind, and the folded configurations are off the top of the square and back on at the bottom, where the picture cannot show them.
Fig. 3 The same fence with the joint limits taken away. One component, 81.4% free, and the two crosses are joined: the folded band across the middle of the picture runs the whole width, wraps round, and connects everything to everything. What has been removed to produce this figure is not an obstacle but a pair of hard stops.

What a component is worth knowing

Being in the same component is a kinematic fact and it is the strongest kind of negative result a geometry can supply.

If two configurations are in different components, no planner will ever join them. Not a better planner, not a longer search, not a finer discretisation: there is no path, and the question is closed. That is worth having before any search is run, and it is the half of the motion-planning question this site owns.

The other half — finding a route when one exists — is a search problem and belongs to algorithms-data-structures.com. There is no planner in this field: no roadmap, no tree, no heuristic, no A*. What is here is a flood fill, which is a way of counting the pieces of a set rather than a way of getting anywhere.

The boundary is drawn there because it is where the subject changes. Whether the set is connected is a property of the mechanism and its surroundings. How to get from one point of it to another is a property of an algorithm, and the two have different literatures for good reason.

The four-bar has one too

The reason this essay is in the arm’s field and not in a field of its own is that the object is not new. Every mechanism on this site has a configuration space, and the ones with loops have particularly clean ones.

The configuration space of a crank rocker. Every point of the square is a pair of angles — the crank's and the rocker's — and the curve is where the coupler is exactly the right length to join them. That curve is the mechanism: one equation in two angles leaves one freedom, which is the mobility. It has 2 components, and that is the two assembly branches. A built linkage cannot cross between them, because there is no path in the set to cross by — and each goes all the way round, which is what makes the crank a crank. The square's left and right edges are the same line, and so are its top and bottom.
Fig. 4 A four-bar’s configuration space, on the torus of its crank angle and its rocker angle. The curve is where the coupler is exactly the right length to join them: one equation in two angles, leaving one freedom, which is the mobility. It has two components — and those are the two assembly branches this site has been landing on since its first phase.
The configuration space of a change point. Every point of the square is a pair of angles — the crank's and the rocker's — and the curve is where the coupler is exactly the right length to join them. That curve is the mechanism: one equation in two angles leaves one freedom, which is the mobility. It has 1 component, and that is the two branches joined at the limit positions. The crank cannot turn all the way round: this component reaches 360° and turns back, and the turning-back is the same event a sweep of the solver reports as a refusal. The square's left and right edges are the same line, and so are its top and bottom.
Fig. 5 The same picture on lengths where the two branches meet. The space is one curve with a crossing rather than two closed curves, and the crossing is the configuration where the linkage can change branch.

A four-bar has two moving angles and one closure equation, so its configuration space is a curve on the torus rather than a region. The curve has two components for a Grashof linkage and one for a non-Grashof one, the branches join at the limit positions, and a component that goes all the way round in the crank angle is what makes a crank a crank.

That is the subject of the last essay in this phase, which is where all of this gets collected. What matters here is the sameness: an arm’s free space and a four-bar’s closure curve are the same kind of object, computed by the same code, differing in dimension because one mechanism has a loop and the other does not.

6 ways to assemble the same three actuator angles. The actuators are at 216°, 48°, 144° in every panel, so the three elbows are at the same three points throughout and only the platform differs. Each pose satisfies all three legs to 6.7e-16. Found by reducing the problem to one equation in the platform angle and scanning it at 0.100° — exhaustive to that resolution and no further, which is the honest thing to say about a root count. Over a survey of 6750 actuator triples this mechanism ranges from none to 6.
Fig. 6 Six poses of a platform for one triple of actuator angles — a fibre with six points in it, each in its own component. The count is finite because the mechanism has mobility zero once its actuators are fixed; an arm among obstacles has a region because nothing fixes anything. Same definition, different dimension.
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. 7 What the space is for. A path between two configurations is a path in this picture, and whether one exists at all is a question about components rather than about the mechanism’s dimensions.

What every mechanism on this site has

The word is used loosely enough to be worth pinning down against the site’s own objects, because the shapes are all different and the definition is one definition.

mechanism its configuration space
a two-joint arm the torus: two angles, every pair admissible
a six-joint arm a six-torus; with limits, a box
a four-bar a curve on a torus — one equation, two angles
a four-bar with a coupler point the same curve; the point adds no freedom
a 3-RRR platform a curve in a higher-dimensional space, several components
a Gough platform, legs fixed forty points, sixteen of them real
a redundant arm holding a pose a circle, one per branch

The pattern is: an open chain’s space is its whole joint space, and a loop’s is a slice of it. Each closure equation cuts a dimension away, which is why a mechanism with a mobility of one has a one-dimensional configuration space — a curve — however many joints it has.

That also explains the difference between this essay’s two figures. The arm’s free space is a region, because nothing constrains its configurations and an obstacle only removes some; the four-bar’s is a curve, because its closure equation constrains them and the obstacle-free case is already one-dimensional. Same object, different codimension.

Where a singularity is in this picture

Everything this field has said about singularities has a home here, and it is the sharpest way to say what a singularity is.

The map from the configuration space to the task space — joint values to tool pose — is what a mechanism is. A singularity is a configuration at which that map is not locally invertible: nearby configurations do not cover nearby poses in a one-to-one way, and the Jacobian’s rank drop is the analytic statement of it.

Three things this field measured are consequences of that, and they stop being separate facts:

  • Branches merge at singularities. Two of the eight postures become one, because two sheets of the map’s inverse touch. That is why the count drops from eight to four at the elbow and shoulder.
  • A component boundary is a singular set. The workspace’s edge is the image of singular configurations, because a fold in the map is where the image has a boundary.
  • A path between branches must pass through one. There is no way from elbow-up to elbow-down that does not go through the straight posture, because that posture is where the two sheets are joined.

None of those needed a configuration space to be measured — they were each measured directly, several essays ago. What the space provides is the sentence that makes them one observation.

How the free space is computed

Sampled, not traced, because it is a region: an open chain admits every configuration, so the whole torus is admissible until something is put in the way, and what an obstacle produces is a hole rather than a constraint.

Each cell asks whether either link’s segment comes within a disc — a segment-to-point distance, computed exactly. The obvious alternative is to test a few points along each link, and it lets a thin obstacle slip between samples: the symptom is speckle in the picture and a component count that changes with the grid, which is a measurement of the sampler rather than of the arm.

The fill is four-connected rather than eight. An eight-connected fill leaks diagonally through a one-cell barrier, which turns a wall into a doorway and quietly merges two components that are genuinely separate — the same failure as the sampled link, one level up.

The barrier’s discs were then tuned, and what they were tuned for is worth being precise about because the obvious reading is wrong.

disc radius components free space the two postures
0.18 216 62.3% separated
0.20 26 59.5% separated
0.22 14 57.6% separated
0.26 2 54.1% separated
0.28 2 52.6% separated

The separation happens at every radius. What changes is how many other components there are, and the extra ones are single free cells trapped between neighbouring discs — pockets rather than doorways, which is why they never join the two large regions however many of them there are.

That distinction is the useful one to carry away. A gap between two obstacles in the workspace is not a passage in configuration space: getting through it might require the arm to be somewhere it cannot be, and the free cells corresponding to it can be an isolated island. Thirteen discs of radius 0.28 is simply where the count becomes two and the figure’s caption stops needing an asterisk.

What is not being claimed

Three limits, stated because a configuration space invites over-reading.

This is a two-joint arm. Its space is two-dimensional and can be drawn. A six-joint arm’s is six-dimensional and cannot be, and everything about counting its components by sampling becomes impractical — a grid of 240 per axis is 2.4×10142.4 \times 10^{14} cells. The concepts transfer exactly; the pictures do not, and the algorithms that cope are somebody else’s subject.

The obstacles are discs and the arm is a line. Real links have width, real obstacles have shapes, and the free space is correspondingly more complicated. The practice field built convex-body clearance for exactly that kind of question and it would apply here directly; it has not been done, and that is a gap rather than a boundary.

Self-collision is not modelled. A real arm can hit itself, and for a two-link arm that is a band around θ2=π\theta_2 = \pi that no obstacle put there. Adding it would cut the folded band — which is precisely the band this essay found to be keeping the torus connected, so a self-colliding arm may well be separated by an obstacle after all. That is a genuinely interesting consequence and it is named rather than measured.

Why the limits win, and what that means for a design

The finding at the top of this essay — that hard stops rather than obstacles are what separate postures — has a consequence a designer can act on, and it is worth drawing out.

An arm with joints that turn all the way round is very hard to trap. It can always fold up small and turn round, so a cell full of obstacles reduces what it can do without reducing what it can reach from where it is. An arm with limits is easy to trap, and the traps are invisible in the workspace: nothing about the tool’s position says that the arm has ended up on the wrong side of a wall in a space nobody drew.

That is a real failure mode of real installations. A programme runs for months and then a part is presented at an orientation that needs the other elbow configuration, and the machine cannot get there — not because the pose is unreachable, which it is not, but because the route is. The symptom is a fault at a waypoint the machine has reached a thousand times, and the cause is a component boundary.

The mitigations are all geometry. Widen the joint limits, which usually means routing cables differently. Move the fixture so the required postures fall on one side. Or add a joint: a redundant arm has a curve of postures for each pose instead of a point, and a curve has a much better chance of crossing a wall than a point does — which is one of the less-advertised reasons seven-joint arms are used in cluttered cells.

Which properties survive the drawing and which do not

The square is a lie about the torus in one specific respect, and it is worth stating the respect precisely, because half of what a reader computes on the square is perfectly sound.

Local properties transfer. Whether a particular configuration is free, how far it is from the nearest obstacle, whether the free space has a boundary through a given cell, what the Jacobian is doing there — all of these are computed from a neighbourhood, every configuration has a neighbourhood in the square that matches its neighbourhood on the torus except at the edges, and the edges are a set of measure zero that can be handled by wrapping the neighbourhood.

Global properties do not. How many connected components there are, whether two configurations can be joined, whether a region encloses another, what the free space’s topology is — every one of those is a statement about paths, the square is missing the paths that leave one edge and re-enter at the other, and the answers are simply different.

The direction of the error is always the same, and this is the part worth carrying. Gluing edges together can merge components and can never split one, so the count on the square is an upper bound on the count on the torus. Three on the square and one on the torus; never the other way round. A reader who computes on the square and gets one component has proved there is one; a reader who gets three has proved nothing except that there are at most three.

That is a usable rule rather than a warning. An upper bound from the drawing is free and a lower bound is not, so a square-based computation can certify connectedness and cannot certify separation. Every claim in this essay about a free space being cut into two had to be made on the torus, and the joint-limited case is the one where it can be made on the square — because with hard stops the square is the configuration space and there is nothing glued.

The same asymmetry explains why the fence had to be tuned rather than merely drawn. Producing a barrier that separates the torus means producing one that survives the gluing, and the gluing is exactly what a picture makes invisible. A fence that looks convincing on the square may be a fence with a way round it through an edge, and the only way to know is to count on the torus.

The picture and the space

The last thing to take from this is a habit rather than a result.

The square is drawn because a torus will not fit on a page, and every conclusion read off the square has to be checked against the space it stands for. The component count is the sharpest case — three against one — but it is not the only one: a straight line on the square is not a shortest path on the torus, a region’s area is right and its shape is not, and two points that look far apart may be adjacent.

That is the same warning this site’s projection figures carry about drawing a spatial mechanism on a flat page, and it has the same remedy: compute on the object, draw the picture afterwards, and say in the caption which one the numbers came from.

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 16 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 branchConfiguration spaceConnected componentFree spaceInverse kinematicsJoint limitsObstacleOpen chainTorusWorkspace