Forward and inverse kinematics
On this page
Bend your shoulder and your elbow by any two angles, and your hand arrives at one definite place. To put your hand on a cup you must answer the opposite question: which two angles? Forward kinematics finds where the hand is from the joint angles, and inverse kinematics finds the joint angles that put the hand at a wanted point.
See it
An arm has two links, 400 mm and 300 mm, joined by an elbow. Its hand must be at one point that is well inside its reach. How many different pairs of joint angles put the hand exactly there?
The sliders are the forward question: you choose the two angles and the hand goes where they send it. The button answers the inverse question for the point the hand is on, and draws the second arm that reaches it. θ2 is measured from the first link, not from the ground.
The idea
The arm has two links (the stiff parts) and two joints (the places that turn). Link 1 has length L1 and turns by θ1 from the x axis. Link 2 has length L2 and turns by θ2 from link 1, so it points at θ1 + θ2. Walk along link 1, then along link 2, and you are at the hand.
ye = L1 sin θ1 + L2 sin(θ1 + θ2)
(xe, ye) is the position of the hand, which engineers call the end effector
That is forward kinematics, and it always has exactly one answer. The inverse direction starts from the point and works back through the triangle made by the two links and the line from the base to the hand. A point inside the reach has two answers, with the elbow on one side of that line or on the other. A point at the edge of the reach has one, with the arm straight. A point beyond the reach has none.
A real arm with six joints follows the same idea, with more answers.
One worked number
An arm has L1 = 400 mm and L2 = 300 mm. The joints are at θ1 = 30° and θ2 = 60°. Where is the hand? Use cos 30° = 0.866 and sin 30° = 0.500.
Show the worked solution, 3 steps
- Walk along link 1 to the elbow
x = 400 × 0.866 = 346.4 mm and y = 400 × 0.500 = 200.0 mm. The elbow is at (346.4, 200.0).
- Find the direction of link 2
θ1 + θ2 = 30° + 60° = 90°. Link 2 points straight up, so it adds 0 mm to x and 300 mm to y.
- Add the two links
xe = 346.4 + 0 = 346.4 mm and ye = 200.0 + 300.0 = 500.0 mm. The figure opens on these angles. Press its button: the angles 80.6° and −60° reach the same point.
The mistake to avoid
A second trap: θ2 is measured from link 1. If you measure it from the ground, every position you compute is wrong.
Check yourself
The same arm (400 mm and 300 mm) has θ1 = 90° and θ2 = −90°. Where is the hand?
The controller of this arm is asked to put the hand on a point 750 mm from the base. What does inverse kinematics return?
A welding arm follows a seam. For each point of the seam the controller solves the inverse problem again. Half way along, it starts to choose the other set of angles. What do you see?
Where you meet it
- A pick and place arm on a packing lineThe camera gives the position of a carton, and inverse kinematics turns it into joint angles many times a second.
- A welding robotForward kinematics, from the measured joint angles, tells the controller where the torch really is.
- An excavatorThe operator moves the boom and the stick by their angles and judges where the bucket goes.
- Forward kinematics: joint angles in, hand position out. Always one answer.
- Inverse kinematics: hand position in, joint angles out. Two answers, one or none.
- Each joint angle is measured from the link before it.
- A path must keep the same set of angles from start to end.
Discussion
No comments yet. Questions, results from your own build, a better way to explain it: all welcome.
My notes on this page
Kept on this device only. Nothing is sent anywhere.
Tip: select words in the lesson, or tap a figure or an equation, to put a note right there.
Notes on earlier wording
The lesson has changed and these words are no longer in it. Your notes are kept, with the words you chose.