Robotics Fundamentals · Lesson 03
Joints, Links & DOF
Est. 50–65 min
Why
Why counting freedoms is the first design decision
Every robot design starts with one question: how many independent ways does it need to move? That number is its degrees of freedom (DOF). Too few, and the robot cannot reach the pose the job needs. Too many, and you pay for extra motors, weight, wiring, calibration and control complexity. Modern Robotics defines DOF precisely: the smallest number of real-valued coordinates needed to represent the robot’s configuration. The door needs one; the coin on the table needs three.
By the end you will be able to: name the common joint types (R, P, H, C, U, S) and how many freedoms each allows; tell a link from a joint on any machine; count DOF of open chains by counting joints; use Grübler’s formula for closed chains like a four-bar linkage; explain why a free rigid body has 6 DOF in space and 3 in a plane; and say why a 6-DOF arm can place its gripper in any position *and* orientation within reach.

Concept
Joints, links and degrees of freedom in plain words
Look at your own arm. Your upper arm, forearm and hand are rigid pieces — robotics calls them links. The places where they move relative to each other — shoulder, elbow, wrist — are joints. Your elbow is a hinge: it bends one way only, so it gives one freedom. Your shoulder is a ball-and-socket: it can swing forward, swing sideways and twist, so it gives three. Robots copy these ideas with simpler, stronger parts.
The joint menu
| Joint | Symbol | Motion allowed | Freedoms f | Everyday example |
|---|---|---|---|---|
| Revolute (hinge) | R | Rotation about one axis | 1 | Door hinge, servo joint |
| Prismatic (sliding / linear) | P | Translation along one axis | 1 | Drawer slide, 3D-printer axis |
| Helical (screw) | H | Rotation and translation tied together | 1 | Bottle cap, lead screw |
| Cylindrical | C | Independent rotation + translation on one axis | 2 | Telescope tube that also turns |
| Universal | U | Rotation about two perpendicular axes | 2 | Car steering-shaft joint |
| Spherical (ball-and-socket) | S | Rotation about three axes | 3 | Your shoulder, a gear-stick ball |
Modern Robotics adds a rule worth remembering: every joint connects exactly two links. Hobby and industrial arms use almost only R and P joints, because one motor can drive one freedom simply and stiffly. A “spherical wrist” on an industrial arm is usually three R joints whose axes meet at one point — it behaves like an S joint but each freedom has its own motor.
Why 6 is the magic number in space
A free rigid body in three-dimensional space has six freedoms: three to say *where* it is (x, y, z) and three to say *which way* it points (roll, pitch, yaw). On a flat table (a plane) it has three: x, y and one turning angle — exactly the coin. So if a gripper must reach any position *and* any orientation in its workspace, the arm generally needs at least six independent joints. That is the reason for “6DOF” in your arm’s name.
| Where the body moves | Position freedoms | Orientation freedoms | Total |
|---|---|---|---|
| Along a line (a bead on a wire) | 1 | 0 | 1 |
| In a plane (a coin on a table) | 2 (x, y) | 1 (θ) | 3 |
| In 3-D space (a gripper, a drone) | 3 (x, y, z) | 3 (roll, pitch, yaw) | 6 |
Counting DOF: open chains and Grübler’s formula
For an open chain (a serial arm: base → joint → link → joint … → gripper), every joint is driven and the count is easy: DOF = sum of the joints’ freedoms. Six R joints → 6 DOF. For closed chains (loops, like a four-bar linkage or the Stewart platform used in flight simulators), joints constrain each other and you need Grübler’s formula:
DOF = m (N − 1 − J) + Σ fᵢ
- m = 3 for planar mechanisms, 6 for spatial; N = number of links including the ground; J = number of joints; fᵢ = freedoms of joint i. Modern Robotics notes the formula assumes the joint constraints are independent — special geometry can break that.
Planar four-bar
N = 4 links (ground + 3), J = 4 R joints, m = 3. DOF = 3(4 − 1 − 4) + 4 = 1. One input crank sets the whole linkage — that is why car wipers and pliers-style grippers use linkages.
Planar 2R arm
N = 3, J = 2, m = 3. DOF = 3(3 − 1 − 2) + 2 = 2 — same as counting joints, as expected for an open chain.
Stewart platform
N = 14, J = 18 (six legs, each U–P–S), Σf = 6×(2+1+3) = 36, m = 6. DOF = 6(14 − 1 − 18) + 36 = 6. Six legs, six freedoms for the top plate.

Visual
Visualise it: move one joint at a time
Move one joint at a time and watch the arm. Each slider is **one degree of freedom**. Notice how the tip’s position depends on *all* the joints before it — that is what makes an open chain.
Interactive · DOF & joint explorer
Degrees of freedom
2
For a serial chain of 1-DOF joints, DOF ≈ joint count (planar teaching model).
Code lab
Code lab: Grübler’s formula for ten mechanisms
This script stores each joint type’s freedoms (from Modern Robotics Table 2.1) and computes DOF for ten mechanisms, from a door to a Stewart platform. Run it with python3 dof_counter.py and check each answer against your own hand calculation.
"""dof_counter.py - Grubler's formula from Modern Robotics (Lynch & Park), Section 2.2.
dof = m(N - 1 - J) + sum(f_i)
m = 3 for planar mechanisms, 6 for spatial; N = links including ground; J = joints; f_i = freedoms of joint i."""
JOINT_F = {"R": 1, "P": 1, "H": 1, "C": 2, "U": 2, "S": 3} # MR Table 2.1
def grubler(m, n_links, joints):
return m * (n_links - 1 - len(joints)) + sum(JOINT_F[j] for j in joints)
MECHANISMS = [
# name, m, N (incl. ground), joint list
("Door on a hinge", 6, 2, ["R"]),
("Planar 2R arm (shoulder + elbow)", 3, 3, ["R", "R"]),
("Planar 3R arm", 3, 4, ["R", "R", "R"]),
("SCARA (R R P R)", 6, 5, ["R", "R", "P", "R"]),
("Cartesian gantry (P P P)", 6, 4, ["P", "P", "P"]),
("6R industrial-style arm", 6, 7, ["R"] * 6),
("7R arm (redundant)", 6, 8, ["R"] * 7),
("Planar four-bar linkage", 3, 4, ["R"] * 4),
("Slider-crank", 3, 4, ["R", "R", "R", "P"]),
("Stewart platform (6 x U-P-S legs)", 6, 14, ["U"] * 6 + ["P"] * 6 + ["S"] * 6),
]
print(f"{'Mechanism':38s} m N J sum(f) dof")
for name, m, n, joints in MECHANISMS:
f = sum(JOINT_F[j] for j in joints)
print(f"{name:38s} {m} {n:2d} {len(joints):2d} {f:5d} {grubler(m, n, joints):3d}")
print("\nOpen chain shortcut: for a serial arm, dof = number of 1-dof joints.")
print("Task space for a pose in 3-D is 6, so the 7R arm has 1 extra (redundant) dof.")Output (run with python3 dof_counter.py)
Mechanism m N J sum(f) dof Door on a hinge 6 2 1 1 1 Planar 2R arm (shoulder + elbow) 3 3 2 2 2 Planar 3R arm 3 4 3 3 3 SCARA (R R P R) 6 5 4 4 4 Cartesian gantry (P P P) 6 4 3 3 3 6R industrial-style arm 6 7 6 6 6 7R arm (redundant) 6 8 7 7 7 Planar four-bar linkage 3 4 4 4 1 Slider-crank 3 4 4 4 1 Stewart platform (6 x U-P-S legs) 6 14 18 36 6 Open chain shortcut: for a serial arm, dof = number of 1-dof joints. Task space for a pose in 3-D is 6, so the 7R arm has 1 extra (redundant) dof.
How it works: grubler() is one line of maths. JOINT_F[j] looks up each joint’s freedoms and sum() adds them. For open chains, N − 1 − J is always 0 (one more link than joints, counting the ground), so the formula collapses to “add up the joints”.
Real world
Joints and DOF in real robots
- Industrial 6R arms: six revolute joints so the tool can reach a position and orientation — Modern Robotics uses a spray-painting 6R arm as an example.
- SCARA robots: R R P R, 4 DOF, for fast flat pick-and-place.
- Cartesian gantries and 3D printers: three P joints for x, y, z — OSHA lists these as Cartesian (linear, gantry) robots.
- 7-DOF arms: one more joint than the 6 a pose needs — *kinematically redundant* (Modern Robotics), so the elbow can move while the tool stays still, like your own arm.
- Flight simulators: Stewart platforms — a closed chain with 6 DOF from six legs.


Bench build
Bench build: a cardboard 2R arm and a four-bar linkage
Feel DOF with your hands. Cut strips of thick cardboard (or use ice-cream sticks) and join them with paper fasteners (split pins) — each fastener is one R joint.
Build a 2R arm
Pin a 12 cm strip to the table edge (the base) and a 10 cm strip to its end. Hold the base fixed. You can set the shoulder and elbow angles independently: 2 DOF.
Trace its reach
Put a pencil through a hole at the tip and trace every point you can reach. You get a ring shape — we will use it in Lesson 9.
Close the loop
Add a third strip and pin its far end to the table, making a four-bar loop (ground + three strips, four pins).
Feel the constraint
Move one strip. The other two follow — you can no longer set angles independently. Grübler said 1 DOF; your hands agree.
Label everything
Write L0, L1, L2… on each link and J1, J2… on each joint. This is the naming you will use in kinematics (Stage 8).
Debugging
Debugging your DOF count
| Mistake | Why it happens | Fix |
|---|---|---|
| Forgetting the ground link in N | The base doesn’t look like it “moves” | Always count the fixed base as link 1 |
| Grübler gives 0 or negative | A structure, not a mechanism — or a counting error | Recount joints; a triangle of three links really has 0 DOF |
| Getting 2 for a hinge-and-slider joint | Treating one cylindrical joint as two joints (or vice versa) | Use the joint menu: C = 2 freedoms in one joint |
| Counting the gripper motor in arm DOF | Kit names include it | Separate “pose DOF” from “tool DOF” |
| Formula disagrees with the model | Special geometry makes constraints dependent | Trust the physical model; note the exception (Modern Robotics warns about this) |
Think
Think about it
Think
Meera’s arm kit is called “6DOF”. It has six servos: base rotation, shoulder, elbow, wrist pitch, wrist roll and gripper open/close. Can it place a pencil tip at any point within reach *with any orientation*? Explain using DOF.
Experiment
Try it in the lab: count DOF on paper, in code and with your hands
Thirty minutes with the joint explorer, the Grübler script and your cardboard models. You will count the same mechanism three ways and make sure all three agree.
Experiment
Count DOF on paper, in code and with your hands
You will need
- DOF joint explorer (below, runs in your browser)
- Cardboard strips and paper fasteners
- Notebook
- Optional: `dof_counter.py`
Steps
- In the explorer, move each joint alone and describe what the tip does. Write “R” or “P” for each joint.
- Lock one joint (don’t touch its slider) and move the others. How many freedoms remain?
- Build the cardboard 2R arm and four-bar. Count DOF with Grübler on paper, then by feel. Do they agree?
- Run `dof_counter.py`. Add your cardboard four-bar as a new line and check the script prints 1.
- Look at the SCARA and Cartesian photos and write their joint strings (like “RRPR”).
Interactive · DOF & joint explorer
Degrees of freedom
2
For a serial chain of 1-DOF joints, DOF ≈ joint count (planar teaching model).
Open chains: DOF = number of driven joint freedoms. Closed chains: use Grübler, and check with a model. Six DOF is what a tool needs for full position and orientation in space.
Knowledge check
Check your understanding
Knowledge check
1. Degrees of freedom are the…
2. How many freedoms does a spherical (ball-and-socket) joint allow?
3. A coin lying on a table has how many DOF?
4. A free rigid body in 3-D space has…
5. Using Grübler, a planar four-bar linkage (N = 4, J = 4 revolute) has…
6. A SCARA robot’s joint string is usually…
7. A 7R arm doing a 6-DOF task is called…
8. For an open-chain (serial) arm, the DOF equals…
9. Your kit has six servos, one of which opens the gripper. How many DOF move the tool’s pose?
10. Grübler gives 0 for three links pinned into a triangle. This means…
Mini assignment
Hands-on assignment
Mini assignment
DOF detective: five machines, three methods
Count the DOF of five real mechanisms around you using joint counting, Grübler’s formula and a model, and decide how many motors each would need.
Deliverables
- A table of five mechanisms (for example: a door, scissors, a desk lamp, a folding chair, an umbrella) with N, J, joint types, DOF and number of motors needed.
- Photos of your cardboard 2R arm with its traced reach, and of the four-bar.
- Your edited `dof_counter.py` with at least two new mechanisms and its output.
- One paragraph: does your 6DOF arm kit really have 6 pose DOF? Justify it from its joint list.
Do this, step by step
- Choose five mechanisms around you (door, scissors, desk lamp, folding chair, umbrella or similar).
- For each, count links N (including the ground) and joints J, and note each joint’s type and freedoms.
- Work out DOF with Grübler’s formula (planar m = 3, spatial m = 6) and check it by moving the real object.
- Add at least two of your mechanisms to
dof_counter.py, run it and compare with your hand results. - Build the cardboard 2R arm and the four-bar, photograph them, and write one paragraph on whether your 6DOF kit really has 6 pose DOF.
Stuck? Hints, one at a time
- Hint 1: Find the part that stays still. That is the ground link — count it.
- Hint 2: Every place two parts rotate or slide relative to each other is a joint. Decide R, P, U, S… using the joint menu.
- Hint 3: Is there a loop (can you trace a path through links and back to where you started)? If yes, use Grübler; if no, just add up joint freedoms.
- Hint 4: Planar or spatial? If every part moves in parallel planes, use m = 3.
Challenges (pick by level)
- 🟢 Easy: Write the joint string for your own arm (shoulder, elbow, wrist).
- 🟢 Easy: Explain to a friend why a coin has 3 DOF on a table but 6 in the air.
- 🟡 Medium: Count the DOF of a pair of scissors with Grübler. *Hint:* planar, two links, one R joint.
- 🟡 Medium: Count the DOF of an adjustable desk lamp. How many knobs or friction joints does it have?
- 🟠 Hard-ish: Use Grübler on a planar slider-crank (like an engine piston). Then explain why one motor turning the crank is enough.
- 🔴 Hard: Find a mechanism where Grübler gives the wrong answer because of special geometry (for example a parallelogram linkage with an extra parallel bar). Explain why.
- ⚫ Expert: Read Modern Robotics Section 2.2 and compute the DOF of a delta robot from its legs. Explain what the parallelograms do to the platform’s orientation.
Next step
You can count freedoms. In Lesson 4 — Configuration Space Intuition you will turn those freedoms into a *space*: every possible set of joint angles as one point on a map — and see where joint limits and obstacles cut holes in it.
Look back: Lesson 2: Robot Systems Recap. Next: Lesson 4: Configuration Space Intuition. Related: Stage 1 — Math for Robotics and Stage 8 — Kinematics & IK.
Sources
- Modern Robotics — K. M. Lynch & F. C. Park (preprint PDF) — Ch. 2: definition of DOF; door and coin examples; rigid body 6 DOF in space, 3 in the plane; joint types R, P, H, C, U, S and Table 2.1; Grübler’s formula and its independence assumption; open vs closed chains; kinematically redundant arms; spray-painting 6R example.
- OSHA Technical Manual, Section IV Chapter 4 — robot structures: articulated (at least three rotary joints), SCARA (two parallel rotary joints), Cartesian (linear/gantry), parallel.
- Canadian Space Agency: Canadarm2 and Wikipedia: Mobile Servicing System — 17.6-metre arm with seven motorised joints; identical Latching End Effectors at each end; moves end-over-end between grapple fixtures.
- Photos: Wikimedia Commons (credits under each image).
Self-attested for now — keep artifacts in your lab notebook.
Complete
Today's goal
0 of 1 done today
Mark this lesson complete when you have worked the experiment, knowledge check, and assignment (even roughly).