Skip to content
Technology and Engineering

The six-axis robot arm: joints, degrees of freedom and forward kinematics

A factory robot arm brings its gripper to a point by turning six joints. Using an arm you can play with, we explain what a joint is, why there are exactly six (degrees of freedom) and how to work out where the gripper is from the joint angles (forward kinematics).

By Kuazara Bilim EkibiPublished: Updated: 10 min read

In this article · 9 sections

On the welding line of a car factory, orange arms repeat the same movement one after another: they bring the welding tip to a point, wait a few seconds, then move on to the next. In an electronics factory a smaller arm picks up a chip and sets it down on a circuit board. Most of these arms have one thing in common: six joints. In this post we open up, step by step, how a robot arm thinks, that is, how it works out where its gripper is from its joint angles. In the drawing below you can turn the arm yourself and watch the numbers.

What is a joint?

A robot arm is made of rigid pieces connected by joints. The pieces are called links, and the moving connections between them are called joints. Two kinds of joint are most common in industrial arms:

  • Revolute joint: two pieces turn relative to each other about an axis. A door hinge or your own elbow is an example. The state of the joint is described by an angle.
  • Prismatic joint: one piece slides along a straight line over the other. A drawer runner is an example. The state of the joint is described by a length.

All six joints of a six-axis arm are revolute. Each joint is turned by a small electric motor, and an encoder behind the motor tells the controller the joint’s current angle. So at every moment the arm knows six numbers: six joint angles.

Degrees of freedom: why exactly six?

How many numbers does it take to describe fully where an object is and how it is turned? Think of a pen on a table.

  1. To say where the tip of the pen is, you need three numbers: forwards-backwards (x), left-right (y) and up-down (z).
  2. That is not enough. At the same point the pen could stand upright, lie flat or lean. To describe which way it points you need three more numbers: how far it is turned about its own axis (roll), how far its tip is tilted down (pitch) and which direction it faces (yaw).

Six numbers in total. This count is called the degrees of freedom: an object moving freely in space has six degrees of freedom, three for position and three for orientation. For a robot arm to bring its gripper to any point at any angle, it needs at least six independent movements. Each revolute joint adds one degree of freedom, so six joints do the job. An arm with fewer joints (a four-axis packing robot, for example) gives up some orientations; an arm with more joints can reach the same point in different postures. The human arm, with three movements at the shoulder, one at the elbow and three at the wrist, is usually counted as having seven degrees of freedom. That is why you can move your elbow while keeping your hand still on the table.

Six joints, six jobs

In industrial arms the joints are usually arranged the same way. From the base to the tip:

  1. Base (J1): turns the whole arm about a vertical axis. It decides which way the arm faces.
  2. Shoulder (J2): tilts the upper arm forwards and backwards.
  3. Elbow (J3): raises and lowers the forearm.
  4. Forearm roll (J4): turns the forearm about its own axis.
  5. Wrist pitch (J5): tilts the gripper up and down.
  6. Flange roll (J6): turns the gripper about its own axis.

The first three joints carry the tip of the arm to a point in space; the last three, because their axes meet at a single point in the wrist, set which way the gripper faces at that point. This arrangement is called a spherical wrist. Engineers love this split because it breaks one hard problem into two small ones: first bring the wrist centre to the right place, then turn the wrist.

Play with the arm

The arm below is a simplified teaching model of a real industrial arm. The shoulder axis is 200 mm above the bench; the upper arm is 220 mm, the forearm 210 mm, and from the wrist centre to the point between the gripper’s two fingers (the TCP, tool centre point) is 90 mm. Each square of the grid on the bench is 50 mm.

Try these:

  • Turn only J1. The height of the TCP (z) does not change at all; x and y travel round a circle.
  • Set J2 to 30°. The tool point moves forwards and down. You should see the same numbers as in the worked example below.
  • First set J5 to 0°, then turn J4 and J6 one at a time. Both do the same thing: the gripper turns about the same axis. We come back to this below.
  • Type an x, y, z into the Target point boxes and watch the arm go there with angles it finds for itself.

Forward kinematics: from angles to a point

Forward kinematics answers this question: if I know the joint angles, where is the gripper and which way does it point? The answer is to apply two kinds of step in order from the base to the tip: a rotation at every joint and a translation (a shift) along every link.

Start with the simplest case: let the base (J1), forearm roll (J4), wrist (J5) and flange (J6) stay at zero, and let only the shoulder (q2) and elbow (q3) move. Then the arm stays in one vertical plane and behaves like a two-link pendulum. The forearm, wrist and gripper lie on one line, so we can treat them as a single piece: from the elbow to the TCP is 210 + 90 = 300 mm.

Measure the angles like this: q2 is how far the upper arm tilts forwards from vertical, and q2 + q3 is how far the forearm tilts down from horizontal. Then:

  • The elbow is 220 · sin q2 forwards and 200 + 220 · cos q2 up
  • The TCP is a further 300 · cos(q2 + q3) forwards and 300 · sin(q2 + q3) down from the elbow

Worked example

Let q2 = 30° and q3 = 0°.

  1. Elbow: forwards 220 · sin 30° = 220 · 0.5 = 110 mm; up 200 + 220 · cos 30° ≈ 200 + 220 · 0.866 ≈ 390.5 mm.
  2. The forearm tilts 30° down: forwards 300 · cos 30° ≈ 259.8 mm, down 300 · sin 30° = 150 mm.
  3. Add them up: x ≈ 110 + 259.8 = 369.8 mm, z ≈ 390.5 − 150 = 240.5 mm, y = 0.

In the figure, setting J2 to 30° gives the reading “x 370 · y 0 · z 241 mm”. Now turn J1 to 90°: the arm swings to the left, x and y swap places (x ≈ 0, y ≈ 370) and z stays at 241. The base rotation turns the result in the plane round a circle: x = r · cos q1, y = r · sin q1, where r is the TCP’s horizontal distance from the base axis.

All six joints: a chain of matrices

When every joint moves, the hand calculation gets longer, but the idea is the same. Each rotation and each translation is written as a transformation matrix with four rows and four columns. These matrices are multiplied in order from the base to the tip; the single matrix that comes out gives both the position of the TCP (x, y, z) and the orientation of the gripper. A common convention in robotics for writing this chain is the DH parameters proposed by Jacques Denavit and Richard Hartenberg in 1955: each joint is described by four numbers (two angles and two lengths). The arm in the figure does the same job in a more readable way, with one rotation per joint and one translation per link; the x, y, z and the roll, pitch and yaw in the panel are the result of this product.

Inverse kinematics: from a point to angles

In real work we usually want the opposite: “The part is over there, take the gripper to it.” Which angles give that point? This is called inverse kinematics, and it is harder than forward kinematics:

  • There may be several solutions. The same point can be reached with the elbow up or with the elbow down. The controller has to pick one.
  • There may be no solution. If the point is too far away, or the joint limits do not allow it, the arm cannot get there.
  • Some postures are unstable. These are called singularities. In the figure, when J5 = 0° the axes of J4 and J6 fall on the same line; the two joints make the same movement and the arm temporarily loses a degree of freedom. Real arms slow right down near these postures or avoid them.

The spherical wrist helps here again. As Donald Pieper showed in 1968, for arms in which three consecutive joint axes meet at a single point, inverse kinematics can be solved with closed-form formulas: first the position of the wrist centre is found with the first three joints, then the last three joints set the orientation. The Target point box in the figure follows this route: with the gripper pointing straight down, it finds the base angle from the direction of the point, the shoulder and elbow angles from the triangle of the two links (the law of cosines), and the wrist angle from the condition “forearm + wrist = straight down”.

Reach: where can the arm get to?

The region made up of every point the arm can reach is called its workspace. Its outer boundary is easy to find: fully stretched, the arm reaches 220 + 210 + 90 = 520 mm from the shoulder. The TCP can never leave this sphere centred on the shoulder; the faint circle and the dashed arc in the figure show it. The real region is smaller, because:

  • the joints have rotation limits (cables and gears do not allow endless turning),
  • the arm must not hit itself or its surroundings (the bench, a wall, other machines),
  • if the gripper has to arrive at a particular angle, the reach shrinks further.

If you bring the arm too close to the bench in the figure, a warning appears. On a real robot the controller would refuse the move in the first place.

Robot arms in the real world

The powerful robot arms in factories do not work in the same space as people; they are fenced off or surrounded by light curtains. The safety rules for industrial robots are set out in the international standard ISO 10218. Collaborative robots (cobots), which have spread in recent years, are designed with limited force and speed so that they can work next to people.

The quality of a robot arm is also described by two separate numbers: repeatability says how closely the arm returns to the same point again and again; accuracy says how close it really gets to a calculated point. Industrial arms are usually far more repeatable than they are accurate, which is why arms are often programmed “by showing” (taking the arm to a point and recording it).

If you want to build your own arm

Between understanding a robot arm on paper and building one lie many steps: choosing motors, gear ratios, wiring and programming. Kuazara is preparing a course that will teach these steps hands-on: Building a six-axis robot arm. Its first topic will be the joints, degrees of freedom and forward kinematics you have seen in this post.

Frequently asked

4 questions

What are degrees of freedom?

The number of independent values needed to describe fully where an object is and how it is turned. A free object in space has six degrees of freedom: three for position (x, y, z) and three for orientation (roll, pitch, yaw).

Why do robot arms usually have six axes?

Bringing the gripper to a point in the workspace at any desired angle takes six independent movements. Each revolute joint adds one degree of freedom, so six joints do the job.

What is the difference between forward and inverse kinematics?

Forward kinematics works out where the tool point is and which way it faces from the joint angles; it has a single answer. Inverse kinematics looks for the angles needed for a desired position and direction; it can have several solutions or none.

What is a singularity?

A posture in which two of the arm's axes line up or the arm cannot move in some direction. In that posture the arm temporarily loses a degree of freedom; for example, with the wrist straight, forearm roll and flange roll make the same movement.

Sources

6 sources
  1. 1.Craig, J. J. — Introduction to Robotics: Mechanics and Control, Pearson
  2. 2.Lynch, K. M., Park, F. C. (2017) — Modern Robotics: Mechanics, Planning, and Control, Cambridge University Press
  3. 3.Siciliano, B., Sciavicco, L., Villani, L., Oriolo, G. (2009) — Robotics: Modelling, Planning and Control, Springer
  4. 4.Denavit, J., Hartenberg, R. S. (1955) — A kinematic notation for lower-pair mechanisms based on matrices, Journal of Applied Mechanics, 22
  5. 5.Pieper, D. L. (1968) — The Kinematics of Manipulators Under Computer Control, PhD thesis, Stanford University
  6. 6.ISO 10218-1 and ISO 10218-2 — Robotics: safety requirements for industrial robots
  • #robotics
  • #robot arm
  • #degrees of freedom
  • #forward kinematics
  • #inverse kinematics
  • #engineering
  • #trigonometry