ViewWiki

The world, a little closer

Robotics.

A factory robot arm puts each part on the same spot, every time. Turn its joints yourself, and see why its controller has to work backwards.

Explore the scene Interactive article

01 / The experiment

One point, two ways to reach it.

Turn the base, shoulder and elbow, then switch on Show the workspace to see everywhere the gripper can reach and the second pose that reaches the same point.

Still of the Robotics 3D scene, which explores: If you know where the gripper has to go, how do you find the joint angles that put it there?
Interactive scene

Loading the interactive version…

The explanation below is available while the scene loads.

The shoulder sits 80 cm above the floor, the upper arm is 42 cm long and the forearm 36 cm. The wrist keeps the gripper pointing straight down. Positions are in metres from the floor under the base, x to the right, y towards you and z up.Joint limits are any base angle, shoulder from −30° to 150° above level and elbow from −150° to 150°. The arm jumps straight to each pose. The model checks joint limits but not whether the arm would hit itself, and it ignores the weight of the links and the strength of the motors.

02 / Three targets

Two answers, one, or none.

The same arm, asked to put its wrist on three points: inside its reach, on the edge and beyond it.

Most places01

Inside the reach

The triangle of upper arm, forearm and shoulder-to-point line can flip, so the elbow can sit above the line or below it.

Poses that reach it
2
Elbow
Bent one way or the other
Like
A part on the table
Arm stretched out02

On the edge

The two poses meet: the arm is straight and cannot move any further outwards, a pose engineers call a singularity.

Poses that reach it
1
Elbow
Straight
Like
The far edge of the table
Too far away03

Out of reach

No angles put the gripper there. The point lies outside the workspace, and the arm can only point at it.

Poses that reach it
0
Elbow
No angle works
Like
A shelf across the room
The big idea

Turning joint angles into a position always has one answer. Turning a position back into angles, inverse kinematics, can have two answers, one, or none, and the controller has to choose.

d ≤ L₁ + L₂

An industrial robot arm is a chain of rigid links joined by joints that turn. The arm in the scene has a base that turns about an upright axis, then a shoulder and an elbow that swing the arm up and down within one upright plane. A fourth joint at the wrist tilts the gripper so it always points straight down, the way it would to pick a part off a table.

Each joint is driven by its own servo motor: a motor with an encoder that reports the joint’s angle, and a small controller that keeps nudging the motor until the angle matches the one it was asked for. Every joint is a little feedback loop of its own.

From angles to a position

If you know the joint angles, finding where the gripper ends up is straightforward. Start at the shoulder and add each link’s length in the direction it points: the upper arm at the shoulder’s angle, the forearm at the shoulder’s angle plus the elbow’s bend. Then drop down to the fingertips and turn the whole plane by the base angle. This is forward kinematics, and it always has exactly one answer: one set of angles, one gripper position.

With the shoulder level and the elbow straight, the arm reaches 78 cm out from its base, the two link lengths added together.

From a position to angles

A factory job is not written as angles. It is written as places: pick the part up here, put it down there. So the controller has to run the sum backwards, from a position to the angles that reach it. This is inverse kinematics, and it is harder, because a position can have more than one answer, or none.

For the shoulder and elbow the answer comes from a triangle. Its sides are the upper arm, the forearm and the straight line from the shoulder to the wrist. Three known sides fix every angle of a triangle, so the distance to the wrist fixes how far the elbow must bend. But the triangle can be flipped over that straight line: the elbow can sit above it or below it. These two poses, elbow up and elbow down, put the gripper on exactly the same point.

Try it: choose On under Show the workspace, then move Elbow slowly towards 0°. The ghost arm in the other pose closes in on the real one, and at 0° the two become one with the gripper on the edge of the shell.

Back to the experiment

The base adds two more answers. Turn it half a turn and the arm can reach over its own back to the same point, elbow up or down again. A controller picks among the answers: one that keeps every joint within its limits, avoids obstacles, and moves the joints least from where they are now. When the ghost turns red, its pose would need the shoulder past its limit, so only one of the two is really available.

The workspace

Everywhere the gripper can reach together makes the arm’s workspace. Its outer edge is the arm stretched straight, so it is close to a sphere with a radius of the two links added together, centred on the shoulder and lowered by the gripper’s length. Near the shoulder there is a hollow, because the elbow cannot fold all the way back on itself, and the shoulder’s limits trim the shape further.

Outside the shell there is no pose at all. On its outer edge there is exactly one, with the arm straight, and the arm there cannot move any further outwards. Engineers call such poses singularities and plan paths that keep clear of them, because near one, a small step of the gripper needs a large, fast swing of the joints.

What this model leaves out

The arm jumps straight to each pose; a real controller plans a smooth path and limits how fast each joint speeds up. It does not check whether the arm would strike its own pedestal or the floor. The links have no weight and the motors no torque limit, so every pose inside the workspace counts as reachable even if a real motor could not hold it there. Real industrial arms have six joints, so they can also choose how the gripper is turned and tilted; this one has three, plus a wrist that only keeps the gripper pointing down. The workspace’s outline is traced on a grid of 1 centimetre squares.

Reuse with credit to ViewWiki and a link to this page.

04 / Learn this in a course

Practise it, step by step.

This lesson teaches the topic with checked questions.

  1. A robot arm Computer science · Computing in the real world