GoalDescribe how an autonomous robot uses sensors and a program to decide and act, and trace its choices.
New words
autonomous robot · a robot that works on its own with little or no help from peoplesensor · a device that measures something in the surroundings, such as distance, light or touchdecision · a choice that the program makes using the data from the sensorscycle · a set of steps that repeats again and again
Explanation
Some robots need a person to control every move. Autonomous robots do not. They use sensors to collect data about their surroundings. The program uses this data to decide what to do, and then the motors act. This cycle of sense, decide and act repeats many times every second. A lawn-mowing robot is quite simple. Its sensors tell it when it hits something and it turns away. A self-driving vehicle is much more complex, because it uses many sensors and artificial intelligence to decide in real time. An autonomous robot is still following a program that people designed, and people must test it and keep it safe.
Worked examples
This flowchart is for a lawn-mowing robot. It repeats while its battery is above 20%. When the bump sensor is pressed, it backs up and turns. When the battery is low it goes to the charger.
A floor robot follows the rule ‘move forward; if the next square is blocked, turn right on the spot’. The edge of the grid counts as blocked. After 6 forward moves from A3 (facing right), it has followed the route in the picture.
Sensor
What it measures
Possible action
touch sensor
a bump
back up and turn
distance sensor
how far away an object is
stop before the wall
light sensor
how bright it is
switch on a lamp
moisture sensor
how wet the soil is
water the plant
Each sensor measures one thing, and the program turns that data into an action.
Class activity
Be the robot (no computer): lay out a grid of paper squares on the floor and put two books on it as obstacles. A player is the robot and follows only this rule card: ‘walk forward one square; if the next square has a book or is outside the grid, turn right and then walk on’. Before you start, draw the route that you expect on a copy of the grid. Then run it and compare. Next change the rule to ‘turn left’ and predict again. Finally write a rule card for a plant-watering robot that uses a moisture sensor. Do not use water for this game.
Practice
1
What does the greenhouse robot do when the soil is wet?
The condition ‘soil dry?’ is false, so the robot takes the no path and waits 10 minutes, and the flowchart ends. A real robot runs these steps again and again.
2
The robot starts at A4 facing right. Rule: move forward; if the next square is blocked or is the edge, turn right on the spot. Where is it after 5 forward moves?
It moves to B4 (move 1). The next square C4 is blocked, so it turns to face down and moves to B3, B2 and B1 (moves 2, 3 and 4). The next square is the edge, so it turns to face left and moves to A1 (move 5). It is at A1.
3
Name one autonomous robot that works in a home or a hospital, and two sensors that it could use.
For example, a delivery cart in a hospital that uses a distance sensor and a camera to move around people. A lawn-mowing robot that uses a bump sensor and a rain sensor is also a good answer.
4
Why does an autonomous robot repeat the sense–decide–act cycle many times every second?
Its surroundings can change at any moment, for example when a person steps in front of it. It must check the sensors again and again to decide in time.