Learn robotics, step by step

← Robot list · 3D robot arm →

12 short lessons, about 50 minutes in total. Read them in order, answer the question at the end of each one, then tick it. Your progress is saved in this browser and shows on the roadmap of the home page. When you finish, longer courses go deeper (see the cards above): maths, full modelling, singularities, control, perception and AI, and the real world.

How to study

  1. Read one lesson (2 to 10 minutes).
  2. Answer the “Check yourself” questions before opening the answers.
  3. Tick the lesson, then try the linked robot page.
1

What is a robot?

3 min
You will learn

what a robot is made of, and the three jobs every robot does.

A machine that senses its world, decides what to do, and acts on it. Three parts always work together: sensors (see), a controller (think), and actuators (move).

A vacuum robot is a good example: its sensors detect walls, its controller plans the path, and its motors turn the wheels.

Key terms

  • sensor
  • controller
  • actuator
The essentials
  • A robot senses (sensors), decides (computer) and acts (motors), again and again.
  • It is programmable: the same robot can do a new task with a new program.
  • A washing machine follows a fixed cycle; a robot adapts what it does to what it measures.
The loop of every robot: sense → decide → act, then sense again.

Worked exercises

Do each exercise on paper first, then type your answer (a small error is accepted) or pick an option. Open the hint if you are stuck, then read the solution: every step is explained.

Level 1 · Beginner1

Which machine is a robot?

  1. A toaster with a timer.
  2. A vacuum cleaner that maps the room and goes around the chairs.
  3. A ceiling fan.

Solution

Only the vacuum cleaner senses (it maps the room), decides (where to go) and acts (it moves). The toaster and the fan just follow a fixed program, without measuring anything.

Level 2 · Intermediate2

A robot repeats its sense–decide–act loop every 4 ms. How many times per second?

Hint

1 s = 1000 ms.

Solution

Number of loops = 1000 ms ÷ 4 ms = 250 times per second (we say 250 Hz).

Level 3 · Professional3

In the loop of a robot that picks parts, which part is the "decide" step?

  1. The camera that takes a picture.
  2. The program that computes where the gripper must go.
  3. The motor of the shoulder.

Solution

The camera senses, the motor acts; the program that turns the picture into a position for the gripper is the decide step.

Check yourself
  1. Which part of a robot is the “brain”?

    The controller. Sensors only measure, actuators only move.

  2. Which one is NOT a robot?

    1. A toaster with a timer
    2. A robot vacuum cleaner
    3. A welding arm in a car factory

    A robot senses, decides and acts. The toaster only follows a timer: it senses nothing.

  3. What are the 3 steps of every robot?

    1. Sense → think → act
    2. Paint → cut → weld
    3. Charge → wait → stop

    Sensors give information, the controller decides, the motors act.

2

Links and joints

3 min
You will learn

how a robot arm is built, piece by piece.

A robot arm is a chain of rigid pieces called links, connected by joints. The first link is fixed to the ground (the base). The last one holds the tool.

Think of your own arm: the shoulder, elbow and wrist are joints, and the bones between them are links.

Key terms

  • link
  • joint
  • base
The essentials
  • A link is a rigid piece; a joint connects two links and lets them move relative to each other.
  • A robot arm is a chain: base – joint – link – joint – link … – tool.
  • In a serial arm, n joints connect n + 1 links (the base counts as link 0).
Two links (orange) and two joints (circles): the chain of a simple arm.

Worked exercises

Do each exercise on paper first, then type your answer (a small error is accepted) or pick an option. Open the hint if you are stuck, then read the solution: every step is explained.

Level 1 · Beginner1

A serial arm has 6 joints. How many links does it have, counting the base?

Solution

Each joint adds one link after the base: 6 joints → 6 links + the base = 7 links.

Level 2 · Intermediate2

Which part is a link?

  1. The forearm of the robot.
  2. The elbow motor axis.
  3. The program.

Solution

The forearm is a rigid piece: a link. The elbow axis is where a joint is.

Level 3 · Professional3

A robot has a base, 4 links after the base and a tool fixed on the last link. How many joints?

Solution

Each link after the base needs one joint to move: 4 joints. The tool is fixed (no joint).

Check yourself
  1. A robot arm has 3 joints. How many links does it have, counting the base?

    Four: the base, then one link after each joint.

  2. What is a "link"?

    1. A rigid part of the robot (like a bone)
    2. A motor
    3. A cable

    Links are the rigid parts; joints connect them and let them move.

  3. In a simple chain, joints and links are…

    1. alternated: link, joint, link, joint…
    2. all joints first, then all links
    3. the same thing

    Each joint sits between two links, so n joints need n + 1 links (with the base).

3

Two kinds of joints

4 min
You will learn

to tell a rotating joint from a sliding joint, and to write a robot as letters.

Revolute joint (R): it rotates, like your elbow. Its value is an angle, in degrees.

Prismatic joint (P): it slides in a straight line, like a drawer. Its value is a distance, in metres.

A robot can be described by its joint letters. A SCARA is R-R-P-R.

Key terms

  • revolute (R)
  • prismatic (P)
  • joint variable
The essentials
  • A revolute joint (R) turns, like an elbow; we measure an angle θ in degrees or radians.
  • A prismatic joint (P) slides, like a drawer; we measure a distance d in metres.
  • A robot is named by its joints from the base: a SCARA is R-R-P-R, a gantry is P-P-P.
The two basic joints: one gives an angle, the other a distance.

Worked exercises

Do each exercise on paper first, then type your answer (a small error is accepted) or pick an option. Open the hint if you are stuck, then read the solution: every step is explained.

Level 1 · Beginner1

Convert 90° into radians (π ≈ 3.1416).

Hint

rad = deg × π / 180.

Solution

90 × π / 180 = π / 2 ≈ 1.571 rad.

Level 2 · Intermediate2

A gantry robot (P-P-P) moves its three axes by 0.3 m, 0.4 m and 0 m from the origin. How far is the tool from the origin?

Hint

Pythagoras in 3D: √(x² + y² + z²).

Solution

√(0.3² + 0.4² + 0²) = √(0.09 + 0.16) = √0.25 = 0.5 m.

Level 3 · Professional3

A link of length 0.6 m turns by 30° around a revolute joint. How long is the arc drawn by its tip?

Hint

Arc = radius × angle (in radians).

Solution

30° = π/6 ≈ 0.5236 rad. Arc = 0.6 × 0.5236 ≈ 0.314 m.

Check yourself
  1. What letters describe a 3D printer with three sliding axes?

    P-P-P: three prismatic joints. This is a Cartesian gantry.

  2. A drawer that slides out is like which joint?

    1. Prismatic (P)
    2. Revolute (R)

    It slides in a straight line: prismatic.

  3. Your elbow is like which joint?

    1. Revolute (R)
    2. Prismatic (P)

    It turns around an axis: revolute.

See P-P-P on the Cartesian gantry page →

4

Degrees of freedom (DOF)

4 min
You will learn

why industrial arms have exactly six axes.

The number of independent movements the robot can make. Usually one joint = one DOF.

To place a tool anywhere in space, with any orientation, you need 6 DOF: 3 for position (x, y, z) and 3 for orientation. That is why industrial arms have 6 axes.

Key terms

  • DOF
  • position
  • orientation
The essentials
  • The degrees of freedom (DOF) are the independent movements a body can make.
  • A free object in space has 6 DOF: 3 positions (x, y, z) and 3 orientations.
  • A serial arm usually has as many DOF as joints: 6 joints are needed to place a tool anywhere with any orientation.
A free object: 3 ways to move, 3 ways to turn.

Worked exercises

Do each exercise on paper first, then type your answer (a small error is accepted) or pick an option. Open the hint if you are stuck, then read the solution: every step is explained.

Level 1 · Beginner1

How many DOF does a gantry robot with 3 prismatic axes have?

Solution

One DOF per joint: 3 (x, y, z). It can place the tool anywhere in a box, but cannot tilt it.

Level 2 · Intermediate2

A pen lying on a table can slide (x, y) and turn around the vertical axis. How many DOF?

Solution

x, y and the rotation θ: 3 DOF. This is also the case of every car-like or differential robot on the floor.

Level 3 · Professional3

A task needs the tool position (x, y, z) and the full orientation. What is the smallest number of joints a serial arm needs?

Solution

3 positions + 3 orientations = 6 independent values to choose, so at least 6 joints. A 7th joint makes the arm "redundant" (more ways to reach the same pose).

Check yourself
  1. Why can a 3-DOF arm not hold a tool at any angle?

    It uses its 3 DOF to reach a point, so nothing is left to choose the orientation.

  2. How many DOF are needed to place AND orient an object anywhere in space?

    1. 6
    2. 3
    3. 4

    3 for the position (x, y, z) and 3 for the orientation.

  3. A robot with 7 DOF for a 6-DOF task is…

    1. redundant
    2. broken
    3. singular

    It has one extra DOF: it can move its elbow without moving the tool.

Move the 3 joints of the arm →

5

End effector (the tool)

2 min
You will learn

what the robot holds, and what it is for.

What the robot holds at the end of its arm: a gripper, a welding torch, a suction cup, a paint gun, a screwdriver. The robot's job is to move this tool to the right place.

Key terms

  • end effector
  • gripper
  • tool centre point (TCP)
The essentials
  • The end effector is the tool at the end of the arm: gripper, suction cup, welding torch, screwdriver…
  • The robot only moves the tool; the tool does the real job.
  • The TCP (tool centre point) is the point of the tool the robot places: the tip of the torch, the middle of the fingers.
The end effector is bolted on the flange; the robot is programmed for its TCP, here the middle of the fingers.

Worked exercises

Do each exercise on paper first, then type your answer (a small error is accepted) or pick an option. Open the hint if you are stuck, then read the solution: every step is explained.

Level 1 · Beginner1

Which tool would you choose to pick flat cardboard boxes from above?

  1. A suction cup.
  2. A welding torch.
  3. A paint gun.

Solution

A suction cup holds a flat surface from above with vacuum: simple, fast and gentle for boxes.

Level 2 · Intermediate2

The flange of the robot is at height 1.20 m. The gripper is 0.15 m long, pointing down. At what height is the TCP?

Solution

The TCP is 0.15 m below the flange: 1.20 − 0.15 = 1.05 m. If you forget the tool length, the robot misses the part by 15 cm!

Level 3 · Professional3

A suction cup of diameter 40 mm holds a part with a vacuum of 0.6 bar (60 000 Pa). Ideal holding force?

Hint

F = pressure × area, area = π r².

Solution

Area = π × 0.02² = 0.00126 m². F = 60 000 × 0.00126 ≈ 75.4 N (about 7.5 kg). In practice we divide by a safety factor of 2 to 4.

Check yourself
  1. Name two different end effectors and one job for each.

    For example a suction cup to move boxes, and a torch to weld car bodies.

  2. Which end effector is best to pick up a flat sheet of glass?

    1. Suction cups
    2. A welding torch
    3. A two-finger gripper

    Suction holds flat, smooth surfaces without squeezing them.

  3. What does TCP mean?

    1. Tool Centre Point: the point of the tool that does the work
    2. Total Control Power

    The robot is programmed by moving its TCP.

6

The kinematic diagram

4 min
You will learn

to read the drawing that engineers use for every robot.

A simplified drawing that keeps only what matters for movement: the joints and the distances between them. Nothing about shape, weight or colour.

You saw a diagram like this under the 3D arm. It moves when the joints move.

Revolute Prismatic Link Tool

Key terms

  • kinematic diagram
  • symbol
The essentials
  • A kinematic diagram draws a robot with simple symbols: lines for links, circles or rectangles for joints.
  • It keeps only what matters for the motion: the joints, their axes and the distances between them.
  • It is the first thing to draw before any calculation.
The kinematic diagram of a 2-axis arm: links as lines, joints as circles, the angles θ₁ and θ₂.

Worked exercises

Do each exercise on paper first, then type your answer (a small error is accepted) or pick an option. Open the hint if you are stuck, then read the solution: every step is explained.

Level 1 · Beginner1

On a kinematic diagram, what does a small rectangle on a line usually show?

  1. A prismatic joint.
  2. A motor cable.
  3. The weight of the link.

Solution

The rectangle is a slider on a guide: a prismatic joint. A circle is a revolute joint.

Level 2 · Intermediate2

On the diagram of a SCARA, how many revolute joints do you draw (R-R-P-R)?

Solution

R-R-P-R contains three R: 3 revolute joints and one prismatic joint (the vertical quill).

Level 3 · Professional3

Why does a kinematic diagram not show the motors and the cables?

  1. Because they do not change where the tool can go: only joints and distances do.
  2. Because robots have no cables.
  3. To make the drawing nicer.

Solution

The diagram is made to compute motion. Motors and cables matter for the design, not for the geometry of the movement.

Check yourself
  1. What does a circle with a dot inside mean on a diagram?

    A revolute joint whose axis points towards you.

  2. Why draw a kinematic diagram?

    1. To show only the joints and links, without the details of the shape
    2. To make the robot look nicer

    It keeps only what matters for the motion.

  3. On a diagram, a small rectangle sliding on a line is…

    1. a prismatic joint
    2. a revolute joint
    3. a gripper

    The rectangle slides: prismatic.

Read a real diagram on the arm page →

7

Forward kinematics (FK)

5 min
You will learn

to compute where the tool is when the joint values are known.

Question: I know all the joint values. Where is the tool?

The answer is always exactly one position. You find it by following the chain from the base: each link's direction depends on the joints before it. Your arm.html page does this.

Key terms

  • forward kinematics
  • pose
The essentials
  • Forward kinematics (FK): from the joint values, compute where the tool is.
  • For a 2-axis planar arm: x = L₁ cos θ₁ + L₂ cos(θ₁ + θ₂), y = L₁ sin θ₁ + L₂ sin(θ₁ + θ₂).
  • FK always has exactly one answer: one set of angles gives one tool position.
The arm of the exercises: L₁ = 0.5 m, L₂ = 0.4 m, θ₁ = 30°, θ₂ = 45°.

Worked exercises

Do each exercise on paper first, then type your answer (a small error is accepted) or pick an option. Open the hint if you are stuck, then read the solution: every step is explained.

Level 1 · Beginner1

One link of length 0.5 m turned by 60°. What is the x of its tip?

Solution

x = L cos θ = 0.5 × cos 60° = 0.5 × 0.5 = 0.25 m.

Level 2 · Intermediate2

Arm L₁ = 0.5 m, L₂ = 0.4 m, θ₁ = 30°, θ₂ = 45°. Compute x of the tool.

Hint

θ₁ + θ₂ = 75°.

Solution

x = 0.5 cos 30° + 0.4 cos 75° = 0.5 × 0.866 + 0.4 × 0.259 = 0.433 + 0.104 = 0.537 m.

Level 3 · Professional3

Same arm and angles. Compute y of the tool.

Solution

y = 0.5 sin 30° + 0.4 sin 75° = 0.25 + 0.4 × 0.966 = 0.25 + 0.386 = 0.636 m.

Check yourself
  1. For given joint values, how many tool positions are possible?

    Exactly one. That is why forward kinematics is the easy direction.

  2. Forward kinematics goes from…

    1. joint values → tool position
    2. tool position → joint values

    "Forward" = from the motors to the tool. It is always easy and unique.

  3. Arm of 1 m at 0°: where is its end?

    1. (1, 0)
    2. (0, 1)
    3. (1, 1)

    x = 1 · cos 0° = 1, y = 1 · sin 0° = 0.

Change the joints and watch the tool →

8

Inverse kinematics (IK)

5 min
You will learn

why finding the joint values for a target is harder.

Question: I want the tool at this point. What should the joints be?

This is harder. There can be several answers (elbow up or elbow down), or none at all if the point is out of reach.

Key terms

  • inverse kinematics
  • singularity
  • elbow up / down
The essentials
  • Inverse kinematics (IK): from the wanted tool position, find the joint values.
  • It can have 2 answers (elbow up / elbow down), many answers, or none (point out of reach).
  • For 2 links: cos θ₂ = (x² + y² − L₁² − L₂²) / (2 L₁ L₂).
Two answers for the same point: elbow up (orange) and elbow down (blue).

Worked exercises

Do each exercise on paper first, then type your answer (a small error is accepted) or pick an option. Open the hint if you are stuck, then read the solution: every step is explained.

Level 1 · Beginner1

L₁ = 0.5 m and L₂ = 0.4 m. What is the farthest distance the tool can reach from the base?

Solution

Arm stretched out: L₁ + L₂ = 0.5 + 0.4 = 0.9 m. Any point farther has no IK solution.

Level 2 · Intermediate2

Same arm. The tool must go to (0.6, 0.3) m. Compute θ₂ (elbow down, positive), in degrees.

Hint

cos θ₂ = (x² + y² − L₁² − L₂²) / (2 L₁ L₂).

Solution

x² + y² = 0.36 + 0.09 = 0.45. cos θ₂ = (0.45 − 0.25 − 0.16) / (2 × 0.5 × 0.4) = 0.04 / 0.4 = 0.1. θ₂ = arccos 0.1 ≈ 84.3°. The other answer is −84.3° (elbow up).

Level 3 · Professional3

Same arm. Is the point (1.0, 0) m reachable?

  1. No: it is 1.0 m away and the arm reaches at most 0.9 m.
  2. Yes, with θ₂ = 0.
  3. Yes, with two answers.

Solution

Distance = √(1² + 0²) = 1.0 m > L₁ + L₂ = 0.9 m: the formula gives cos θ₂ = (1 − 0.41)/0.4 = 1.475 > 1, which is impossible. No solution.

Check yourself
  1. Why can inverse kinematics have no solution?

    When the target is farther than the arm can stretch, or inside a region it cannot reach.

  2. Inverse kinematics goes from…

    1. tool position → joint values
    2. joint values → tool position

    We give the target of the tool, IK finds the angles of the motors.

  3. A 2-link arm can reach a point "elbow up" or "elbow down". How many solutions?

    1. 2
    2. 1
    3. infinity

    Two postures reach the same point: IK can have several solutions.

Watch inverse kinematics on the SCARA →

9

Workspace

3 min
You will learn

how to picture everything a robot can reach.

All the points the tool can reach. Joint limits and link lengths decide its shape. A SCARA has a flat round workspace, a delta robot a small dome, a gantry a box.

Key terms

  • workspace
  • joint limit
  • reach

Which shape is the workspace?

There is no single formula, and the workspace is not always a disc: its shape depends on the geometry of the robot (lengths, kinds of joints) and on its joint limits. For the planar 2-link arm, there is a simple relation:

| L1 − L2 | ≤ √( x² + y² ) ≤ L1 + L2

  • Without joint limits it is a ring (a disc with a hole in the middle).
  • It is a full disc only if L₁ = L₂: the inner radius is then 0.
  • With joint limits it is only a part of the ring, bounded by arcs of circles.
Top view of four workspaces. The orange dot is the base. The dashed circle shows the ring the same arm would have without joint limits.
RobotShape of the workspace
1 revolute jointa circle (only its edge, not the disc)
Planar 2-link arma ring between |L₁ − L₂| and L₁ + L₂ (a full disc if L₁ = L₂)
Gantry (P-P-P)a box: each axis has its stroke
SCARAa ring extruded in height (a thick tube), often cut by the joint limits
The essentials
  • The workspace is the set of all points the tool can reach.
  • For a 2-link arm it is a ring: outer radius L₁ + L₂, inner radius |L₁ − L₂|.
  • Joint limits and obstacles make it smaller.
Workspace of a 2-link arm (L₁ = 0.5 m, L₂ = 0.4 m): a ring of radii 0.1 m and 0.9 m.

Worked exercises

Do each exercise on paper first, then type your answer (a small error is accepted) or pick an option. Open the hint if you are stuck, then read the solution: every step is explained.

Level 1 · Beginner1

L₁ = 0.5 m, L₂ = 0.4 m. Inner radius of the workspace?

Solution

|L₁ − L₂| = |0.5 − 0.4| = 0.1 m: the tool cannot come closer than 10 cm to the base.

Level 2 · Intermediate2

Area of this ring (in m²)?

Hint

Area = π (R² − r²).

Solution

π (0.9² − 0.1²) = π × 0.80 ≈ 2.51 m².

Level 3 · Professional3

With L₁ = L₂ = 0.45 m, what is the inner radius, and what does it mean?

  1. 0 m: the tool can reach the base itself, the workspace is a full disc.
  2. 0.45 m: there is a big hole.
  3. 0.9 m.

Solution

|0.45 − 0.45| = 0: equal links can fold completely, so the hole disappears and the workspace is a full disc of radius 0.9 m.

Check yourself
  1. Which robot has a box-shaped workspace?

    The Cartesian gantry, because its three axes slide at right angles.

  2. What is the workspace?

    1. All the points the tool can reach
    2. The room where the robot is

    It depends on the link lengths and the joint limits.

  3. A 2-link arm with L1 = 1 m, L2 = 0.5 m: the workspace is a ring from… to…

    1. 0.5 m to 1.5 m
    2. 0 m to 1 m
    3. 1 m to 2 m

    Folded: |1 − 0.5| = 0.5 m. Stretched: 1 + 0.5 = 1.5 m.

10

Actuators, sensors and control

5 min
You will learn

what makes a joint move, how it knows where it is, and how it is corrected.

Actuators move the joints: electric motors (most common), hydraulic, or pneumatic.

Sensors measure: encoders give joint angles, cameras see, force sensors feel.

Control compares where the joint is with where it should be, and corrects the motor. The most common method is called PID.

Key terms

  • encoder
  • motor
  • PID
The essentials
  • Actuators (motors) make the robot move; sensors measure; the controller compares and corrects.
  • A gearbox slows the motor down and multiplies its torque by the same ratio.
  • Closed loop: measure → compare with the target → correct → measure again.
A closed loop brings the measured angle to the target: a small overshoot, then it settles.

Worked exercises

Do each exercise on paper first, then type your answer (a small error is accepted) or pick an option. Open the hint if you are stuck, then read the solution: every step is explained.

Level 1 · Beginner1

A motor turns at 3000 rpm through a 100:1 gearbox. Output speed?

Solution

3000 ÷ 100 = 30 rpm.

Level 2 · Intermediate2

The motor gives 0.5 N·m. Ideal output torque with the 100:1 gearbox?

Solution

Torque × ratio: 0.5 × 100 = 50 N·m (a real gearbox loses 10–30 % in friction).

Level 3 · Professional3

Target 90°, measured 84°. The controller gives a command proportional to the error with K = 0.2 per degree. Command?

Solution

Error = 90 − 84 = 6°. Command = K × error = 0.2 × 6 = 1.2. When the error becomes 0, the command becomes 0: the robot stops at the target.

Check yourself
  1. Which sensor tells the controller the angle of a joint?

    An encoder, usually fitted on the motor shaft.

  2. What turns the controller's order into motion?

    1. The actuator (motor)
    2. The sensor
    3. The screen

    Actuators act, sensors measure, the controller decides.

  3. Closed loop means…

    1. the controller compares the measure with the target and corrects
    2. the robot is locked in a cage

    Feedback: measure, compare, correct, again and again.

11

DH and DHM: describing a robot with a table

8 min
You will learn

to write any serial robot as a small table of numbers.

Instead of drawing every robot, we describe each joint with 4 numbers, one row per joint:

  • θ — the rotation around the joint axis (this is the variable of a revolute joint).
  • d — the shift along the joint axis (this is the variable of a prismatic joint).
  • a — the distance between two consecutive joint axes (the link length).
  • α — the twist angle between two consecutive joint axes.

Each row becomes a 4×4 matrix. Multiply all the matrices from the base to the tool and you get the tool's position and orientation: that is forward kinematics.

Standard DH puts frame i on the axis of joint i+1. Modified DH (DHM, Khalil–Kleinfinger) puts frame i on the axis of joint i. The tables look different but give exactly the same final matrix. Compare them on the SCARA and arm pages.

Rule of thumb for the frames: z is along the joint axis, and x is along the common perpendicular between two axes.

Key terms

  • DH table
  • DHM table
  • frame
  • homogeneous matrix
The essentials
  • DH describes each link with 4 numbers: θ (turn), d (offset along z), a (length along x), α (twist).
  • One line of the table per joint; for a revolute joint θ is the variable, for a prismatic joint d is.
  • Multiplying the matrices of all the lines gives the position of the tool.
A DH table: one row per joint, four numbers per row. Multiplying the matrices of the rows gives the pose of the tool.

Worked exercises

Do each exercise on paper first, then type your answer (a small error is accepted) or pick an option. Open the hint if you are stuck, then read the solution: every step is explained.

Level 1 · Beginner1

In a DH table, which parameter changes when a revolute joint turns?

  1. θ
  2. a
  3. α

Solution

A revolute joint changes the angle θ; a, α (and d) are fixed by the shape of the link.

Level 2 · Intermediate2

A robot has 6 joints. How many lines in its DH table?

Solution

One line per joint: 6 lines, so 24 numbers in total, of which 6 are the joint variables.

Level 3 · Professional3

Planar 2-axis arm: line 1 is (θ₁, d = 0, a = 0.5, α = 0), line 2 is (θ₂, 0, 0.4, 0). With θ₁ = θ₂ = 0, where is the tool (x)?

Solution

With all angles at 0 the links are aligned along x: x = a₁ + a₂ = 0.5 + 0.4 = 0.9 m, y = 0.

Check yourself
  1. In a DH table, which number changes when a prismatic joint moves?

    The distance d. For a revolute joint the variable is the angle θ.

  2. How many numbers per joint in a DH table?

    1. 4
    2. 6
    3. 2

    4 numbers: two lengths and two angles.

  3. For a revolute joint, which DH number moves?

    1. θ (the joint angle)
    2. a (the length)
    3. α (the twist)

    The motor turns: θ changes, the others are fixed by the shape.

Compare DH and DHM tables on the arm page →

DH and DHM, each explained in full in the maths course →

12

The maths you need (very little)

6 min
You will learn

the only four maths ideas used on the robot pages.

You do not need advanced maths to follow the pages. Four ideas are enough:

  • Angles. Degrees (360° = a full turn) and radians (2π = a full turn). The pages show degrees.
  • Sine and cosine. For a link of length L turned by an angle θ, its end is at x = L·cos θ and y = L·sin θ.
  • Vectors. A position (x, y, z) is a list of three numbers. A frame adds three directions.
  • Matrices. A 4×4 matrix packs a rotation and a shift in one object. Multiplying two matrices chains two movements.

Example: a 2-link arm with L1 = 0.5 m and L2 = 0.4 m, both joints at 0°, reaches x = 0.9 m. Turn the first joint by 90° and the whole arm points straight up.

Key terms

  • radian
  • matrix
  • vector
The essentials
  • Angles: 1 turn = 360° = 2π rad; to convert, rad = deg × π / 180.
  • cos gives the horizontal part, sin the vertical part: a vector of length L at angle θ is (L cos θ, L sin θ).
  • Pythagoras gives a distance: d = √(x² + y²); atan2(y, x) gives the direction.
cos and sin over one turn: values to remember at 0°, 90°, 180°, 270°.

Worked exercises

Do each exercise on paper first, then type your answer (a small error is accepted) or pick an option. Open the hint if you are stuck, then read the solution: every step is explained.

Level 1 · Beginner1

sin 30° = ?

Solution

sin 30° = 0.5 (to remember: 0, ½, √2/2, √3/2, 1 for 0°, 30°, 45°, 60°, 90°).

Level 2 · Intermediate2

A vector of length 2 at 60°. Its y component?

Solution

y = 2 sin 60° = 2 × 0.866 = 1.732.

Level 3 · Professional3

The tool is at (−0.3, 0.3) m. In which direction is it, seen from the base (atan2, in degrees)?

Hint

arctan(y/x) gives −45°, which is the wrong quarter; atan2 looks at the signs.

Solution

x < 0 and y > 0: the point is in the upper-left quarter. atan2(0.3, −0.3) = 135°. (arctan(0.3/−0.3) = −45° would point the wrong way.)

Check yourself
  1. A link of length 1 m is turned by 90°. Where is its end?

    x = cos 90° = 0 and y = sin 90° = 1: one metre straight up.

  2. cos 0° = ?

    1. 1
    2. 0
    3. −1

    At 0° the arm is along x: its full length is on x.

  3. An arm of 2 m at 30°: what is y = L sin θ?

    1. 1 m
    2. 1.73 m
    3. 2 m

    sin 30° = 0.5, so y = 2 × 0.5 = 1 m.

Each of these four ideas has its own lesson in the maths course →

Glossary

All the words of the lessons in one place.

TermMeaning
LinkA rigid piece of the robot between two joints.
JointThe connection between two links that allows one movement.
Revolute joint (R)A joint that rotates; its value is an angle.
Prismatic joint (P)A joint that slides; its value is a distance.
BaseThe fixed first link, attached to the ground.
End effectorThe tool at the end of the arm.
Degrees of freedomThe number of independent movements.
WorkspaceAll the points the tool can reach.
Forward kinematicsJoint values in, tool position out.
Inverse kinematicsTool position in, joint values out.
SingularityA pose where the robot loses a direction of movement.
FrameA set of three axes attached to a link.
DH / DHMTwo conventions to describe a robot with a table of four numbers per joint.
ActuatorA motor or cylinder that moves a joint.
EncoderA sensor that measures the angle of a joint.
PIDA simple and very common way to control a motor.

Sources and references

This course was written from these books, papers, standards and documentation. They are also the best way to go further.

Videos to go further

References

  1. J. J. Craig, Introduction to Robotics: Mechanics and Control, 4th ed., Pearson, 2017. used for: joints, degrees of freedom, frames and the DH table
  2. P. Corke, Robot Academy, Queensland University of Technology, robotacademy.net.au (Introduction to robotics masterclass). used for: videos to discover robotics
  3. K. M. Lynch, F. C. Park, Modern Robotics: Mechanics, Planning, and Control, Cambridge University Press, 2017 (free at modernrobotics.org). used for: degrees of freedom and configuration space, at a beginner level
  4. ISO 8373:2021, Robotics — Vocabulary. used for: the official words of robotics

You know the basics!

Next step: the maths course takes you from zero to a working model of a 2-axis arm. Or go straight to the 3-DOF arm to see it in 3D.

Go to the maths course → Back to the roadmap