5Where is the hand? Forward kinematics
Tell a robot its joint angles and it can tell you, without looking, exactly where its hand is. Do the sum yourself and put the hand on a star.
This assumes: Degrees of freedom. About 7 minutes of reading.
Close your eyes and touch your nose. You will very likely manage it, and the interesting part is how. You never saw your hand on the way. You knew how far your shoulder had turned and how much your elbow was bent, and from those facts alone your brain worked out where your fingertip was. A robot does the same thing, with arithmetic, many times a second.
Forward kinematics is the name for working out where the hand is from the angle at every joint and the length of every link, the rigid pieces between the joints. Kinematics is the geometry of movement, leaving out the forces that cause it. Forward, because the working runs the way the arm is built: from the base, along one link after another, out to the hand. It always gives exactly one answer, and this module is about why.
How the working goes
Every link on an arm is rigid: it neither stretches nor bends. So once you know which way a link is pointing, you know where its far end is: exactly one link-length from its near end, in that direction. That is the whole trick, applied once per link.
Start at the base, which is bolted down, so you always know where it is. The shoulder's angle tells you which way the upper arm is pointing, and the upper arm's length tells you how far to go that way. Do that, and you are standing at the elbow.
The elbow's angle tells you which way the forearm is pointing, but it tells you relative to the upper arm. The elbow rides on the end of the upper arm, so when the shoulder turns, the elbow and everything beyond it swing along, and the elbow's own angle, the bend between the two links it joins, does not change. So the forearm's direction is the shoulder's angle plus the elbow's angle. Go one forearm-length that way and you are at the wrist. Add the wrist's angle, go one more link, and you are at the hand.
Three joints, three steps. When a link points straight up or straight out, a step is easy to do in your head: all of its length goes into height, or all of it goes forward. When a link is tilted, part of its length goes forward and part goes up, and finding how much of each takes a little trigonometry, which the robot's computer does in a microsecond and this course will never ask of you. It is a fixed calculation, not a guess: given the three angles and the three lengths, the hand can only be in one place.
Try it
The arm in the box is the three-joint arm you counted degrees of freedom on, and this time all three joints are switched on from the start. Its upper arm is 30 cm long, its forearm 26 cm, and the last link, from the wrist joint to the hand, 14 cm. The shoulder joint sits 8 cm above the floor. Beside each slider is a readout saying where that joint is right now, in degrees, and a blue trace shows where the hand has been. Reset puts the arm back the way it started.
Under the sliders is the working itself, as a table that changes while you drag. One row per joint: its angle; its direction, every angle so far added up, which is the way the link beyond it points; that link's length; and how far the link goes forward and up. A link pointing back or down gives a negative number in that column, and the sum works the same. The bottom row adds the steps and gives the hand's place, x forward of the base and z above the floor. A last line says which way the hand points and how far it is from the shoulder. A star floats in the box, at the one place a particular set of angles puts the hand; the second try asks you to find that set.
One convention. Every joint counts the same way: a positive angle bends the link beyond it forward, the way the shoulder swings the arm forward and down, and a negative angle bends it back the other way.
This is easier on a larger screen, but it works here too.
What you saw
Standing straight up, every angle was 0 and the hand was 8 + 30 + 26 + 14 = 78 cm above the floor, directly over the base: the whole table in the up column. With the shoulder at 90 the whole arm lay flat, because the elbow and wrist were still at 0, so every direction read 90 and every length moved into the forward column. The hand was 70 cm out, at the shoulder's own height of 8 cm. Somewhere in between, at 45, you could see each link's length split between the two columns, which is the trigonometry the computer does for you.
Then you turned the elbow to −90, and if you did the working first you knew the answer before the arm moved. Negative bends the forearm back, so from lying flat it swings up until it stands straight up from the end of the upper arm: the elbow's direction column, which is the shoulder's 90 plus the elbow's angle, read 0 while you dragged it there. The upper arm still points out, 30 cm. The forearm and last link now point up, 26 + 14 = 40 cm, from the shoulder's height of 8. So x 30, z 48. The star was there because the working said so.
The three small turns showed something else. Turn the shoulder and everything beyond it swings, 70 cm of arm, and 10 degrees carried the hand about 12 cm. The elbow swings only the 40 cm beyond it: about 7 cm. The wrist swings 14 cm of arm: about 2. Each joint carries the hand along a circle centered on that joint, with a radius equal to the distance from the joint to the hand. The same slice of a turn is a longer arc on a bigger circle: five times the radius, five times the step.
And however far you wandered after that, setting the sliders back to 90, −90 and 0 put the hand back on the star. Not near it, on it. Same numbers, same place, every time, and the path you took to get there made no difference.
Why a robot cares
A robot arm has no eyes on its hand. What it has is a small sensor inside every joint that reports how far that joint has turned, and a record of its own link lengths, and with those it runs this working over and over. When a robot's screen reports where its tool is, in millimeters, that number was worked out from the joints, not seen by a camera.
It is also why robots are so repeatable: send a factory robot back to the same six joint angles and its hand returns to the same spot, within a fraction of a millimeter, thousands of times a day. The same fact has a sharp edge: the working is only as good as what goes into it. If a link is a little longer than the robot believes, or a joint's sensor reports an angle a degree from the truth, every hand position it works out is off too, and it has no way to notice on its own.
The question the other way round
In the second try you were given the angles and found the place. A working robot almost always faces the opposite problem: it is given the place, the cup or the bolt or the star, and has to find the angles. That direction has no tidy step-by-step working. Sometimes there are two answers, elbow up or elbow down; sometimes a whole family, as you found when three joints could all reach one star; sometimes none, because the place is out of reach. That is the next module's problem. This one gave you the easy direction, and the hard one is built on it: to check any guess at the angles, a robot runs the working forward and sees where the hand lands.
Watch
Fanuc Jogging in World Mode — Andrew Dahlen (5:23 of it, starting at 0:46)
- Why this video
- It puts a real robot's two descriptions of one pose side by side. The teach pendant shows every joint at about zero degrees; then, at the press of one key, the same pose appears as millimeters — x 580, y 0, z 280 — without the robot moving. The controller worked those millimeters out from the joint angles and its own dimensions; nobody measured them. Then the instructor takes a tape measure to the robot and finds the hand really is where the sum said.
- What to watch for
- At 1:20 the screen flips from joint angles to millimeters and the robot does not move: same pose, two ways of writing it down. At 2:21 he says where the millimeters are counted from, a line through the second joint. From 4:26 he draws that line on the real robot, and at 4:55 holds a tape measure from it to the center of the tool and reads about 23 inches, which is the 580 mm the controller predicted, then checks the 280 mm of height the same way.
Words introduced
- forward kinematics
- Working out where the hand is from the angle at every joint and the length of every link, stepping along the arm from the base outward. There is always exactly one answer.
Where next
Suggested next: 6. Frames: where "left" is depends on who you ask
