Where you are. You can compute where the 2-link arm’s fingertip goes for any pair of joint angles. This lesson asks the reverse question one step early: which points can it get to at all, and how many of those are actually useful.
String, pencil, bench
You have bolted an arm to a bench. The datasheet says its reach is 1.70.
So take a piece of string 1.70 long, pin one end at the base of the arm, tie a pencil to the other, and sweep a circle onto a sheet of paper taped to the bench. That circle is where you plan to put the parts bin, the fixture, and the camera stand.
Now do the honest version. Tape a fresh sheet down. Drive the arm to a few hundred joint angles at random and mark the paper wherever the gripper tip ends up. Come back in twenty minutes and look at what you have.
It is not a disc. There is a hole punched in the middle: a region near the arm’s own base, well inside your string circle, where no combination of joint angles will put the gripper. And along the rim, where you had planned to put the far corner of the bin, every mark comes from an arm that is dead straight; you will discover over the next two lessons that this is the worst place on the bench to ask the arm to move.
Two sheets of paper, same machine, and the datasheet number was true and useless.
The idea in one paragraph
The workspace of a robot is the set of poses it can reach: the image of forward kinematics over every joint configuration the machine allows. For the 2-link planar arm this is an annulus, a flat ring, whose outer edge is the arm fully extended and whose inner edge is the arm folded back on itself. Joint limits erode it, and which joint you clamp determines whether you lose a ring of area or a whole wedge of directions. And the whole question has a second, sharper version that catches people out: the set of points the gripper can touch is much larger than the set of points it can touch while facing the way you need. Every failure mode of inverse kinematics, which is two lessons away, is a case of asking for something outside one of these sets.
Why it is a ring
Take the forward kinematics from the last lesson and ask only how far the fingertip is from the base. Square and add:
The bracket collapses because , and here is just . So:
Read it in words: the distance from the base depends on the elbow angle alone. has vanished from the equation entirely, which makes sense the moment you see it - turning the shoulder swings the whole arm about the base like a hand on a clock, and swinging something about a point does not change its distance from that point.
Wider than the screen; scroll it sideways.
That leaves a one-dimensional question. Cosine runs from +1 to -1, so runs between two values:
- , cosine at +1, arm dead straight: . With our links, 1.70. The outer rim.
- , cosine at -1, link 2 folded straight back along link 1: . With our links, 0.30. The inner rim.
Everything between is reachable, and spins that whole picture around the base, so the reachable set is the full ring.
The area of that ring is , which simplifies to . Two consequences worth carrying. First, our arm’s usable area is 8.80 square units, against 9.08 for the whole disc inside the outer rim: the hole costs only about 3%, because it is small. Second, and more useful when you are choosing hardware, for a fixed total reach the product is largest when the two links are equal. Splitting 1.70 as 0.85 and 0.85 gives 9.08 square units, which is the full disc, because equal links close the hole entirely; splitting it as 1.50 and 0.20 gives 3.77. Same reach on the datasheet, less than half the usable area.
What joint limits actually do
Real joints have hard stops. A servo horn hits the link, a cable runs out of slack, a mechanical design decides that the elbow may fold one way and not the other. The workspace is the image of forward kinematics over the allowed configurations, so limits carve into it.
They do not all carve the same way, and this is where intuition usually goes wrong.
Wider than the screen; scroll it sideways.
The arm in this course’s code has an asymmetric elbow, allowed to run from -137.5° to +13.8°, with the shoulder free to spin all the way round. You might expect a bite taken out of one side of the ring. You do not get one. Because still covers a full turn, the result is still perfectly circular: the elbow limit stops the arm folding all the way back, so the inner rim moves out from 0.30 to 0.68, and the ring loses about 13% of its area. Symmetric in, symmetric out.
Clamp the shoulder instead and the shape changes character. Restrict to plus or minus 90 degrees and no amount of elbow travel gets the gripper round to the back: the far side is simply gone, the arm never reaches past , and what remains is a kidney rather than a ring.
Reachable is not the same as useful
Now the sharper version of the question. You do not usually want the gripper at a point. You want it at that point, pointing down, so it can pick something up.
Count degrees of freedom. The 2-link arm has two joints, so it can control two numbers. Planar task space has three: x, y, and heading. Spend both joints on position, and heading is whatever falls out. At the target from the last lesson, the two elbow branches give headings of +97.9° and -30.5°. That is your entire menu: two options out of 360. Ask for the gripper at that point pointing at, say, 0°, and there is no solution, even though the point is comfortably inside the workspace.
Wider than the screen; scroll it sideways.
Add a third joint, a short wrist of length 0.40, and the count works out. Three joints, three task numbers, so orientation becomes something you can request. But only in part of the workspace, and there is a clean rule for which part.
Fix the target point and the hand heading you want. That pins down where the wrist joint has to be: a fixed distance back along the heading. Sweep the heading through a full turn and the wrist traces a circle of radius around the target. For every heading to work, that whole circle has to fit inside the ring the first two links can reach.
Do that arithmetic for links of 1.00, 0.70 and 0.40 and the dexterous workspace is the ring from 0.70 to 1.30. It is 3.77 square units against a reachable disc of 13.85: 27% of what the arm can touch. There is also a pinprick disc of radius 0.10 right at the base, where the wrist circle wraps entirely around the inner hole rather than avoiding it; it is a curiosity rather than a place to put a bin, but it falls straight out of the same rule.
Three arms, side by side, with every number in this lesson:
| Arm | outer rim | inner rim | reachable area | where every orientation works |
|---|---|---|---|---|
| 2 links: 1.00, 0.70 | 1.70 | 0.30 | 8.80 | nowhere; two headings per point |
| the same, elbow clamped -137.5° to +13.8° | 1.70 | 0.68 | 7.64 | nowhere, and only one elbow branch below |
| 3 links: 1.00, 0.70, 0.40 | 2.10 | no hole | 13.85 | the ring 0.70 to 1.30, worth 3.77, plus a pinprick at the base |
Hold on to the three ways a request can fail, because they are exactly the three failure modes of inverse kinematics: the target is outside the reachable set and there is no answer at all; the target sits on a rim, where the answers collapse together and the arm can no longer move freely in every direction; or the target is reachable but the orientation you asked for is not. The next two lessons are about what happens at the rim, and the one after that is about what a solver does when you ask for the impossible.
Review
The workspace is a ring with a hole in it
The workspace of a robot is the set of poses it can reach: the image of forward kinematics over every joint configuration the machine allows. For the two-link planar arm that is an annulus, a flat ring, whose outer edge is the arm fully extended and whose inner edge is the arm folded back on itself. The hole is the part people forget, and it is why a target can be too close to reach as well as too far. Joint limits then erode the ring, and which joint you clamp decides what you lose: clamping one takes away a band of area, clamping the other takes away a whole wedge of directions.
Reachable is not the same as useful
The question has a second and sharper version that catches people out. The set of points the gripper can touch is much larger than the set of points it can touch while facing the way you need. Those are two different sets: the reachable workspace is every point the end-effector can be placed at in some orientation, and the dexterous workspace is every point it can be placed at in any orientation. The second is a subset of the first, usually a small one, and frequently empty. Every failure mode of inverse kinematics is a case of asking for something outside one of these sets, which is why it is worth computing them before designing a task rather than after the solver starts refusing.
Check yourself
1. Why does θ1 not appear in the formula for how far the fingertip is from the base?
Because turning the shoulder rotates the entire arm rigidly about the base, and a rotation about a point preserves distance from that point. Only the elbow changes the shape of the triangle formed by the two links and the line back to the base, so only the elbow changes . Algebraically, cancels out of through the identity .
2. An arm with equal links, l1 = l2, has no hole. Is that strictly better?
For area, yes: is zero, so the ring becomes a full disc, and for a fixed total reach equal links maximise . But the centre becomes a point the arm can only reach with the elbow folded exactly back on itself, which is a degenerate configuration where control behaves badly, and where the two elbow branches merge. You have swapped an honest hole for a bad point in the middle of your workspace. That is why this course uses unequal links.
3. The elbow is clamped to a range but the shoulder can spin freely. Is the workspace still a ring?
Yes. The distance from the base depends only on the elbow, so the elbow limits set a new pair of minimum and maximum radii, and the free shoulder sweeps that radius band all the way around. With the limits in this course’s code the inner rim moves from 0.30 out to 0.68 and the ring loses about 13% of its area, but it stays a ring. To get an asymmetric shape you have to limit the shoulder, which removes whole directions rather than whole radii.
4. Why is “reach: 1.70” a poor summary of an arm’s capability?
It quotes one boundary of a set and implies the set is a disc. It hides the inner hole, hides everything joint limits remove, and says nothing about orientation. Task feasibility is a set-membership question: is this point in the reachable set, and is the orientation I need available there. A single maximum distance cannot answer either half.
5. A point sits comfortably inside the 2-link arm’s workspace, but the solver returns nothing for the pose you asked for. What is the most likely explanation?
You specified an orientation. With two joints, position uses up both degrees of freedom, so heading is determined by which of the two elbow branches you take: two values out of 360, and nothing else is available. The point is reachable; the pose is not. Either drop the orientation constraint, or add a joint.
6. A three-link arm has links 1.00, 0.70 and 0.40. Why is its dexterous workspace the ring from 0.70 to 1.30 rather than the whole thing?
Pick a target and a heading, and the wrist must sit exactly 0.40 back along that heading. Sweeping the heading through a full turn traces a circle of radius 0.40 around the target, and every point of that circle has to be reachable by the first two links, whose own ring runs from 0.30 to 1.70. The circle fits only when the target is at least from the base and at most . Beyond 1.30 the circle pokes out past the outer rim; inside 0.70 it clips the inner hole.
Do this
Back to code/fk_2link.py, which you completed in the last lesson. About twenty minutes.
-
Run
python fk_2link.py --workspace. It sweeps both joints on a grid, runs your forward kinematics on every pair, and scatter-plots the results intoworkspace_full.png. Open it. The ring should run from 0.30 to 1.70; measure the hole against the axes and confirm it. -
Run
python fk_2link.py --workspace --limits, which repeats the sweep using theLIMITSconstant at the top of the file. Before you look at the image, write down what you expect. Then compare: the outer rim is unchanged at 1.70, the inner rim has moved out to 0.68, and the shape is still a perfect ring rather than the bite most people predict. -
Make it asymmetric. Set
LIMITS = ((-np.pi/2, np.pi/2), (-np.pi, np.pi)), swapping which joint is clamped: the shoulder now runs only from -90° to +90° and the elbow is free. Run it again. Now you get a kidney rather than a ring: the outer rim survives only on the half you kept, the arm never reaches past , and two round lobes appear on the far side where the elbow folds the hand back across the base. PutLIMITSback afterwards. -
On paper, place a bin. Your gripper needs to come in pointing straight down. Using the dexterous-workspace rule from this lesson, work out where on the bench you would put the bin for a three-link arm with lengths 1.00, 0.70 and 0.40, and write one sentence on what happens if you put it at radius 1.50 instead: reachable, or not, and with which orientations available.
What you can now do
You can derive the 2-link arm’s reachable set from its forward kinematics, state both of its radii and its area, and explain why the shoulder angle does not appear in either. You can predict how a limit on the elbow differs from a limit on the shoulder, and why one leaves a ring while the other does not. And you can separate the question “can the gripper get there” from “can it get there facing the way I need”, which is the distinction that decides where the parts bin goes.