AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Digital data and robots

Week 27 · Unit 11: Autonomous robots · 3 lessons
2

Robots that decide

Computing 6: Unit 11, pp. 150–161
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.

sensedecideact
Worked examples
Startbattery above 20%?yesmove forwardbump sensor pressed?yesnoback up and turncarry onnodrive to the chargerEnd
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.
ABCDE4321
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.
SensorWhat it measuresPossible action
touch sensora bumpback up and turn
distance sensorhow far away an object isstop before the wall
light sensorhow bright it isswitch on a lamp
moisture sensorhow wet the soil iswater 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?
Startread the moisture sensorsoil dry?yesnowater the plantwait 10 minutesEnd
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?
ABCD4321
3
Name one autonomous robot that works in a home or a hospital, and two sensors that it could use.
4
Why does an autonomous robot repeat the sense–decide–act cycle many times every second?