What Is a Robot?

Robotics Fundamentals

Course 1 · Chapter 1 · What Is a Robot?

Basic Electronics ended with a promise: the parts you learned (sensors, motor drivers, boards, batteries) are the building blocks of a robot. This course explains the robot itself. Each chapter takes one subsystem (the frame, the drive train, the sensors, the controller, the arm, the power supply), says what it does and why it is designed that way, and puts numbers on it. This first chapter gives the overall picture: what makes a machine a robot, the loop at the heart of every robot, the main kinds of robot, how to count the ways a mechanism can move, and how a small robot is laid out, with each part pointing to the chapter of this course that explains it.

You are assumed to have finished Basic Electronics, or to know the same ground (Ohm's law, motors and H-bridges, ADC and PWM, a microcontroller board). No mechanics or control theory is assumed. The history dates and the figures for typical robots below are from memory and approximate: they are there to give a sense of scale and order, so check a source before quoting one.

1. What makes a machine a robot?

There is no single agreed definition, but most share three ideas: a robot is a machine that senses its surroundings, decides what to do using a program, and acts physically on the world, and it does so as a repeating cycle, not as a single fixed sequence. Leave out any one and you have something else.

MachineSenses?Decides?Acts physically?A robot?
Radio-controlled carNo (the human watches)No (the human decides)YesNo: a remote-controlled machine. The thinking is in the driver's head.
Washing machineA little (water level, door, temperature)A fixed programme with a few branchesYes (drum, pump, valve)Borderline: an automatic machine. It does not adapt to the world beyond a few switches.
Thermostat and boilerYes (temperature)Yes (on or off)Yes (heat)Usually not called one, but it is the same loop at its smallest: sense, compare, act.
Robot vacuum cleanerYes (bumpers, cliff, wall and dirt sensors)Yes (cleaning pattern, obstacle behaviour)Yes (wheels, brushes, fan)Yes.
Industrial arm on an assembly lineSome (encoders, safety scanners)A stored, repeated pathYesYes: a programmable manipulator, though it adapts little.
Self-driving carYes (cameras, radar, lidar)YesYes (steering, throttle, brake)Yes.
A useful test
Ask: if the world changed during the task (a chair moved, a wheel slipped, a load was heavier than expected), would the machine notice and behave differently? The more it does, the more robot-like it is. Robots sit on a scale, not on one side of a line.

2. The sense-think-act loop

Every robot, from a toy buggy to a Mars rover, runs the same cycle many times a second:

+---------+ +---------+ +---------+ +---> | SENSE | ---> | THINK | ---> | ACT | ---+ | | sensors | | program | | motors | | | +---------+ +---------+ +---------+ | | | ^ | +--------------- the world (it changes) ---------------+ SENSE: turn a physical quantity into a number (distance, angle, light, battery voltage) THINK: compare the numbers with the goal, and decide what to do next ACT: turn the decision into a physical effect (motor speed, servo angle, a light) The world then changes, partly because of the action, and the cycle begins again.

The loop is closed through the world: what the robot does changes what it next senses. That is why a robot can correct its own mistakes (the line curved, so turn more) and also why it can go wrong in ways a fixed machine cannot (it turns too much, senses the line on the other side, turns back, and oscillates). Chapter 7 of this course, Robotics Fundamentals 7, is about making that loop behave.

The loop in pseudocode

This is deliberately hardware-neutral. The function names stand for whatever your board's library calls them (Basic Electronics 10 covered the reading and driving side). Real board code belongs to the planned course Programming for Robotics.

# One robot, one loop. All names are placeholders. LOOP_PERIOD = 0.05 # seconds: 20 times a second (20 Hz) STOP_DISTANCE = 0.30 # metres while True: t_start = now() # SENSE: read the world into numbers distance = read_distance_sensor() line = read_line_sensors() # THINK: decide if distance < STOP_DISTANCE: left, right = 0.0, 0.0 # something is close: stop else: left, right = follow_line(line) # otherwise steer along the line # ACT: send the decision to the motors set_motor_speeds(left, right) # keep a steady rate: wait out the rest of this period wait_until(t_start + LOOP_PERIOD)

Three things are worth noticing already. The program is just three steps in a loop. The quality of the robot is in the details of each step (how good the sensors are, how smart the decision is, how well the motors respond). And the loop has a rate, which the next section shows is a safety number, not a detail.

Loop rate and reaction distance

A robot does not react instantly. Between something happening in the world and the robot's response taking effect, time passes in four places: the sensor takes a while to produce a reading, the reading waits for the next pass of the loop (up to one whole period), the program takes time to compute, and the motors and driver take time to respond. In the worst case the delays add:

Loop rate and period: f = 1 / T T = 1 / f 20 Hz -> T = 50 ms Worst-case latency: t(lat) = t(sensor) + T + t(compute) + t(actuator) Reaction distance: d(react) = v x t(lat) (how far it travels before the response even begins) Braking distance: d(brake) = v^2 / (2 a) (a = the deceleration the robot can achieve; derived from v^2 = 2 a d) Stopping distance: d(stop) = d(react) + d(brake) Worked example: a robot at 0.5 m/s, 20 Hz loop, sensor delay 30 ms, compute 5 ms, motor response 20 ms, brakes at a = 2 m/s^2 t(lat) = 30 + 50 + 5 + 20 = 105 ms = 0.105 s d(react) = 0.5 x 0.105 = 0.0525 m = 52.5 mm d(brake) = 0.5^2 / (2 x 2) = 0.25 / 4 = 0.0625 m = 62.5 mm d(stop) = 52.5 + 62.5 = 115 mm (it must see the wall more than 115 mm ahead, so choose a stop distance bigger than that) The same robot at 4 times the speed (2 m/s): d(react) = 2 x 0.105 = 0.21 m d(brake) = 2^2 / (2 x 2) = 4 / 4 = 1.0 m d(stop) = 1.21 m (the speed is 4 times larger, the stopping distance 10.5 times larger)

The lesson is the square in the braking distance: doubling the speed quadruples the braking distance, while the reaction part only doubles. A faster loop shortens the reaction distance, but at high speed the braking dominates, and the real fix is to slow down, brake harder, or see further. The same arithmetic is behind the stopping distances in the Highway Code.

Levels of autonomy

LevelWho senses and decides?The human's jobExample
TeleoperatedThe human, through the robot's cameras and controlsEverything except the physical doingA bomb-disposal robot; a surgical robot arm (the surgeon drives it)
Supervised or sharedThe robot handles the details, the human the goalsChoose the target, watch, step inA drone flying to a waypoint; a robot vacuum with a phone app
AutonomousThe robotSet the task, maintain itA warehouse robot moving shelves; a Mars rover between commands

3. The main kinds of robot

Robots are named by how they move or what they do. Each type is a different answer to the same question: how do you get a controllable body to move through (or work on) the world?

TypeHow it movesStrengthsWeaknessesExample
Arm (manipulator)A fixed base; a chain of joints and links moves a hand or toolFast, precise, strong; mature technologyCannot go anywhere; limited reachFactory welding or pick-and-place arm (Robotics Fundamentals 9)
WheeledWheels or tracks on flat or rough groundSimple, efficient, cheap, stable; the easiest to buildStairs, steps and soft ground defeat itRobot vacuum, line follower, warehouse rover (Robotics Fundamentals 4)
LeggedLegs that lift and place the feetRough terrain, stairs, stepsComplex, costly in energy, harder to controlFour-legged inspection robots, hexapod kits
Aerial (drone)Propellers that hold the body in the airFast, unaffected by ground obstacles, wide viewShort endurance, constantly fighting gravity, small payloadQuadcopters (multirotors)
HumanoidTwo legs, two arms, a head: the human shapeFits spaces and tools designed for peopleThe hardest balance, the highest cost and complexityResearch and developing commercial humanoids
OthersSwimming, crawling, climbing, rollingSuited to one environmentNarrowUnderwater vehicles, pipe crawlers, snake robots
Why this course concentrates on wheels and arms
A wheeled robot and a small arm teach almost every idea the other types use (drives, sensors, feedback, control, behaviour, power) with the least cost and the fewest things to go wrong. Legs, rotors and the humanoid shape are variations on those ideas with harder mechanics and control. You build the skill on the simple types first.

4. Degrees of freedom

The degrees of freedom (DOF) of a body or mechanism is the number of independent numbers needed to say where every part of it is. It is the first number to ask about any robot, because it says how many things the robot can do, how many motors it needs, and how hard the control will be.

A free body

  • A rigid body on a flat floor (a plane) has 3 DOF: two for its position (x and y) and one for its heading (θ).
  • A rigid body in space has 6 DOF: three positions (x, y, z) and three rotations (roll, pitch, yaw).

A drone is a 6-DOF body. A robot arm's hand needs 6 DOF to be put at any position and any orientation within reach, which is why industrial arms usually have six joints. An arm with fewer joints cannot reach every pose; one with seven or more is redundant (it has spare freedom, useful for avoiding obstacles).

Counting a mechanism: Gruebler's formula

A mechanism is a set of rigid links connected by joints, with one link fixed (the ground). Each link added is a free body; each joint removes freedom. For a mechanism that lies in a plane, Gruebler's formula (also called the Chebyshev-Gruebler-Kutzbach criterion) counts the result:

Planar mechanism: M = 3 (n - 1) - 2 j1 - j2 n = number of links, INCLUDING the fixed ground link j1 = number of joints that allow one motion (revolute: a hinge; prismatic: a slider) j2 = number of joints that allow two motions (a cam, a rolling-and-sliding contact; rare in robots) M = degrees of freedom (the number of independent motors needed to drive the mechanism) Why: each moving link is a planar body with 3 DOF, so (n - 1) links give 3 (n - 1); each one-motion joint removes 2 of them, each two-motion joint removes 1. Spatial mechanism (all joints revolute or prismatic): M = 6 (n - 1) - 5 j1 (a one-motion joint removes 5 of the 6) Worked examples: Two-link planar arm (ground, upper arm, forearm; 2 hinges): n = 3, j1 = 2: M = 3 x 2 - 2 x 2 = 6 - 4 = 2 (two motors place the hand at any point (x, y) in reach) Three-link planar arm (ground + 3 links; 3 hinges): n = 4, j1 = 3: M = 3 x 3 - 2 x 3 = 9 - 6 = 3 (position and the angle of the hand) Four-bar linkage (ground, crank, coupler, rocker; 4 hinges): n = 4, j1 = 4: M = 9 - 8 = 1 (one motor drives the whole motion) Triangle of three links (3 hinges): n = 3, j1 = 3: M = 6 - 6 = 0 (a rigid structure, which is why trusses use triangles) Six-joint spatial arm (ground + 6 links; 6 hinges): n = 7, j1 = 6: M = 6 x 6 - 5 x 6 = 36 - 30 = 6 (position and orientation anywhere in reach)
Gruebler's formula counts, it does not check
The formula assumes the constraints are independent. Some special arrangements (for example a parallelogram linkage whose links happen to be equal and parallel) can move more than the formula says, so treat the result as a first count and confirm with a sketch or a model. It is also not the way to count a wheeled robot, whose wheels roll on the ground: the table below covers that case.

Degrees of freedom of robots

For a robot we separate two numbers: the DOF of the whole body in the world (how it can be placed), and the number of actuators (motors) it has. When actuators are fewer than the body's DOF, the robot is underactuated.

RobotBody DOFActuatorsComment
Two-wheeled differential drive on the floor3 (x, y, θ)2 (one per wheel)It can reach any pose but cannot slide sideways: a non-holonomic constraint. Parking takes a manoeuvre (Robotics Fundamentals 4).
Omni-wheel or mecanum platform33 or 4Can move in any direction at once, at the cost of complex wheels (holonomic).
Six-joint industrial arm6 (the hand)6Fully actuated: one motor per DOF. A gripper adds one more.
Quadcopter64 (rotors)Underactuated: it cannot move sideways without first tilting, and the controller handles that for you.
Quadruped with 3 joints per leg6 for the body + 12 joints = 1812The body's own 6 DOF are not directly driven: they are controlled through the feet's push on the ground.
Humanoid (a typical research design)6 for the trunk + the joints (often 20 to 30)20 to 30Many actuators, and balance on two feet is the hardest part.

More DOF means more capability, and more cost, weight, wiring, power and control effort. A good robot has just the freedom the task needs: a line follower has two driven wheels, not six.

5. Autonomy, endurance and availability

Autonomy means little if the robot is flat. The energy budget of Basic Electronics 11 (E = V × C, usable energy 0.8 × E, runtime = energy / power) applies to every robot, and two more numbers follow from it: how long a robot works on a charge, and what fraction of the time it is ready.

Runtime: t(run) = E(usable) / P E(usable) = 0.8 x V x C Availability: A = t(run) / ( t(run) + t(recharge or battery swap) ) the fraction of the time the robot is working Illustrative figures (typical orders of magnitude, from memory; real robots vary widely): a 50 Wh pack, so E(usable) = 0.8 x 50 = 40 Wh Wheeled rover average 20 W t(run) = 40 / 20 = 2.0 h (120 min) Legged robot average 80 W t(run) = 40 / 80 = 0.5 h (30 min) Quadcopter hover average 200 W t(run) = 40 / 200 = 0.2 h (12 min) Availability: Rover, 1 h to recharge: A = 2 / (2 + 1) = 0.667 (66.7 %) Quadcopter, 45 min to recharge the pack: A = 12 / (12 + 45) = 0.211 (21.1 %) Quadcopter, swapping to a charged pack in 2 min: A = 12 / (12 + 2) = 0.857 (85.7 %) The same battery gives the rover ten times the working time of the drone, because staying in the air costs ten times the power. A drone is made practical by spare batteries, not by one big one.

6. A short history

The dates below are from memory and are approximate to the year; they show the order in which the ideas appeared, not exact records.

WhenWhatWhy it mattered
1921Karel Capek's play R.U.R. introduces the word “robot” (from the Czech robota, forced labour; the word is credited to his brother Josef)The name and the long-lasting idea of artificial workers
Late 1940sW. Grey Walter's “tortoises” in Bristol: small wheeled robots with a light sensor, a bump sensor and a few vacuum-tube circuitsShowed that a few simple reactions could produce lifelike behaviour (seeking light, returning to a charger)
1950s to 1961George Devol patents a programmable arm; the Unimate, built with Joseph Engelberger, starts work in a General Motors plant in 1961The first industrial robot: a repeatable, programmable arm
Late 1960s to early 1970s“Shakey” at the Stanford Research Institute: a wheeled robot with a camera and a range finder that planned its own movesAn early robot that sensed, planned and acted, and a source of path-planning ideas still in use
1970sElectric arms such as the Stanford Arm and the PUMA; the first humanoid-style research robots in JapanSmaller, electrically driven, computer-controlled arms became the industrial standard
1997NASA's Sojourner rover explores Mars (Mars Pathfinder mission)A robot working millions of kilometres from any human; semi-autonomous because radio signals take minutes
2000 to 2005Honda's ASIMO humanoid walks in public; the iRobot Roomba (2002) brings robots into homes; a Stanford vehicle wins the DARPA Grand Challenge (2005)Walking, mass-market cleaning robots and long-distance driverless vehicles all became practical
2010s to nowLarge warehouse fleets (Amazon bought Kiva Systems in 2012), commercial legged robots, cheap drones, low-cost kits and open-source softwareRobots in logistics and inspection, and robotics reachable by hobbyists and students

7. Anatomy of a small robot

Here is a small two-wheeled robot of the kind you will design on paper through this course and build in Robotics Fundamentals 10: a chassis carrying two geared motors, a controller board, an ultrasonic distance sensor, three line sensors, two wheel encoders and a battery. Look at its parts as the three steps of the loop plus the power that feeds them.

SENSE THINK ACT distance sensor ---+ +--> left motor driver --> left motor line sensors (3) --+ | wheel encoders (2) +--> microcontroller ------+ battery monitor ---+ (Pico-class board) | +--> right motor driver --> right motor | +--> status LED and buzzer POWER battery --> fuse --> switch --+--> 5 V regulator ------> controller board and sensors | +--> motor drivers (battery voltage) --> motors

Each subsystem and where it is covered

SubsystemWhat it doesParts in the small robotCovered in
StructureHolds everything in place, takes the loads, sets the stabilityChassis plate, motor mounts, standoffs, fasteners, a casterRobotics Fundamentals 2
Actuation and transmissionTurns electrical energy into motion with the right torque and speedTwo geared DC motors, wheelsRobotics Fundamentals 3, with the motor model from Basic Electronics 9
Drive systemArranges the wheels so that the robot can steer and its motion can be calculatedDifferential drive (two powered wheels, one free caster)Robotics Fundamentals 4
SensorsMeasure the world and the robot itselfUltrasonic distance, line sensors, bumper switchesRobotics Fundamentals 5, with ADC and analogue signals from Basic Electronics 7
Position and feedbackTell the robot how far and how fast it moved, and which way it facesWheel encoders; an optional inertial sensorRobotics Fundamentals 6
ControlMakes a motor or the robot follow a target by correcting the errorA speed loop on each wheel, a steering loop for the lineRobotics Fundamentals 7
BehaviourChooses what to do now: follow the line, avoid an obstacle, stopA small state machine in the programRobotics Fundamentals 8
Manipulator (if fitted)Reaches out and handles objectsNot on this robot; a servo arm could be addedRobotics Fundamentals 9
Power and safetySupplies energy, protects people and partsBattery, fuse, switch, regulator, battery monitor, an emergency stopRobotics Fundamentals 10, with Basic Electronics 9 and Basic Electronics 11
The controllerRuns the loopA Pico-class board (Basic Electronics 10 and Basic Electronics 11 explain the choice)Programmed in the planned course Programming for Robotics

Notice how the subsystems depend on each other: the motors chosen in Robotics Fundamentals 3 decide how heavy the battery must be (Robotics Fundamentals 10), which changes the weight the structure carries (Robotics Fundamentals 2). Robot design is mostly a loop of its own: choose, calculate, discover a conflict, change. This course keeps one small robot in mind through every chapter so that those links are visible.

8. Challenges

Challenge 1: Count the degrees of freedom
Use Gruebler's formula to find the DOF of each mechanism, and say how many motors fully drive it. (a) A planar five-bar linkage (ground and four moving links, joined in a closed loop by five hinges). (b) A slider-crank (ground, crank, connecting rod and a slider that moves along a straight guide: three hinges and one prismatic joint). (c) A planar arm with ground plus three links and three hinges. (d) A spatial arm with ground plus four links and four hinges. (e) A planar triangle (ground plus two links, joined by three hinges) and a planar square frame (ground plus three links, joined by four hinges): which is a rigid structure and which can move? Then state the body DOF, the number of actuators and whether the robot is underactuated for: (f) a quadruped with three joints per leg; (g) a differential-drive robot on the floor.
View solution
Challenge 2: Loop rate and stopping distance
A small robot drives at 0.8 m/s. Its loop runs at 25 Hz, its distance sensor adds 25 ms, the program takes 5 ms and the motors and driver need 30 ms to respond. It can brake at 1.5 m/s². (a) Find the worst-case latency, the reaction distance, the braking distance and the stopping distance. (b) The sensor reliably sees 0.5 m ahead. Find the highest speed at which the robot can still stop within that range (solve v × t + v²/(2a) = 0.5), and then the speed if you allow only half the range (0.25 m) as a safety margin. (c) The loop is rewritten to run at 100 Hz. Find the new latency and the new stopping distance at 0.8 m/s, and say how much distance the faster loop saves compared with the braking distance. (d) In one sentence, say what you would change first to make the robot safer at high speed.
View solution
Challenge 3: Anatomy, endurance and availability
(a) A robot vacuum cleaner: list four things it senses, what its thinking step must decide, and two things it acts with, then name which chapter of this course covers each subsystem. (b) A 36 Wh battery pack gives 0.8 × 36 usable energy. Find the runtime of a 15 W robot vacuum, a 25 W wheeled rover and a 90 W legged robot. (c) The vacuum takes 3 h to recharge; the legged robot has a 1-minute battery swap. Find the availability of each. (d) The legged robot walks at 0.7 m/s and the rover drives at 1.2 m/s. Find the energy each uses per metre and how far each travels on one charge. (e) In one sentence, say what the results show about choosing a legged robot over a wheeled one.
View solution

Quick reference

  • A robot: senses, decides with a program, and acts physically, in a repeating loop closed through the world
  • The loop: sense, think, act, then wait for the next period; the loop rate is f = 1/T
  • Latency: t(lat) = t(sensor) + T + t(compute) + t(actuator); reaction distance = v × t(lat); braking distance = v²/(2a); doubling the speed quadruples the braking distance
  • Types: arm, wheeled, legged, aerial, humanoid, others; a wheeled robot and a small arm teach most of the ideas
  • DOF: a rigid body has 3 (plane) or 6 (space); planar mechanisms M = 3(n − 1) − 2 j1 − j2; spatial M = 6(n − 1) − 5 j1; underactuated means fewer actuators than DOF
  • Endurance: t(run) = 0.8 × V × C / P; availability A = t(run) / (t(run) + t(recharge or swap))
  • Anatomy: structure (2), motors and gears (3), drive (4), sensors (5), feedback (6), control (7), behaviour (8), arms (9), power, safety and the build (10)

Next, Robotics Fundamentals 2 turns to the body of a robot: frames and materials, levers, linkages and joints, why centre of gravity decides whether a robot tips over, and how 3D-printed and laser-cut parts are designed and joined with fasteners.