Skip to content
You Start with one site
Amounts in Start with one site
Mechanisms & Robots · Concept

Forward and inverse kinematics

One idea Intermediate 5 min read
Found this useful?

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.

Angles are knownWhere is the hand? One answer, found by adding the links.Forward kinematics
The point is knownWhich angles reach it? This is the question a controller must answer.Inverse kinematics
How many answers?Two, one or none, depending on the point.The hard direction

See it

Predict first

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?

See it: an arm with two joints

Hand position (x, y)
Distance from the base
Other angles for this point

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.

xe = L1 cos θ1 + L2 cos(θ1 + θ2)
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

The question

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
  1. 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).

  2. 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.

  3. 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 point does not have one set of joint angles. Forward kinematics gives one answer, so people expect the inverse to give one too. It gives two for this arm, and a controller must choose. If it changes its choice in the middle of a path, the hand stays on the path while the elbow swings across to the other side.

A second trap: θ2 is measured from link 1. If you measure it from the ground, every position you compute is wrong.

Check yourself

Question 1

The same arm (400 mm and 300 mm) has θ1 = 90° and θ2 = −90°. Where is the hand?

Question 2

The controller of this arm is asked to put the hand on a point 750 mm from the base. What does inverse kinematics return?

Question 3

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.
Key points
  • 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.
Found this useful?

Discussion

    Comments show your name. Be kind, stay on the topic.