Week 13 · Unit 5: Be a computer scientist · 3 lessons
1
Robots that deliver and drive
Computing 4: Unit 5, pp. 62–73
GoalDescribe how delivery robots and driverless vehicles use sensors and programs to move safely.
New words
drone · a flying robot that has no pilot on boardsensor · a device that detects things such as light, sound, heat, movement or distancedriverless vehicle · a car, bus or train that drives itself using sensors and a programdelivery robot · a robot that carries items from one place to another
Explanation
Some robots carry things from place to place. A drone is a flying robot with no pilot on board. It can carry a small box of medicine to a village that is hard to reach by road. Small delivery robots on wheels roll along paths with parcels. A driverless vehicle drives itself. Its sensors, such as cameras and distance sensors, tell it where the road, the signs and other vehicles are. A program uses this input to decide when to steer, speed up or brake. Aeroplanes also have an autopilot, but pilots still stay on board.
Worked examples
Step
What the drone does
1
picks up the box at the clinic
2
flies along the planned route
3
its sensor sees a tall tree, so the drone flies higher
4
lowers the box at the landing mark and lets go
5
flies back to the clinic
A drone delivers a box of medicine to a village. It follows a plan, and its sensors help it on the way.
Part
What happens
Input
a distance sensor measures how far away the train in front is
Process
the program checks whether the distance is smaller than the safe distance
Output
if it is too small, the brakes slow the train
A driverless train works in three steps: input, process, output. Each step happens again and again, many times every second.
A delivery robot on a school campus follows these commands: forward 2, right, forward 3, left, forward 1, right, forward 1. The crossed squares are a flower bed. The robot stops at the door.
Class activity
Parcel robot (with family or friends): one person is the delivery robot and may only follow the commands forward, back, turn left and turn right. Put out four cushions as obstacles and a box as the door. Another person writes the commands on paper to guide the robot from the start to the door without touching a cushion. Read the commands out one at a time. If the robot bumps into a cushion, find the mistake and fix the commands.
Practice
1
Name two sensors that a driverless car could use. What does each one detect?
For example: a camera sees signs, lights and people. A distance sensor measures how far away other vehicles are.
2
Sort these into input, process and output: A the camera sees a red light, B the program decides to stop, C the brakes slow the car.
input→process→output
A is input, B is process and C is output.
3
The delivery robot starts at the bottom left facing right. The crossed square is blocked. Write commands (F, L, R) that take it to the door D without using the blocked square.
For example: L, F, F, R, F, F, F. This takes 7 commands. Any other correct route is longer.
4
What is the difference between a plane that has an autopilot and a delivery drone?
A plane with an autopilot still has pilots on board, who can take over at any time. A drone has no pilot on board: it follows a program or is controlled from the ground.