The answersDownload the PDF
Worksheet

7.4 The kicker

Hands and feet · Robot club · about 15 min

BugBotLab
NameClassDate

What this lesson is about

kick(): aiming, and how far the ball goes.

Questions 7 marks in all

  1. [1 mark]The kicker's servo is a continuous-rotation servo. What does servo(1, 90) do to it?

    1. AStops it turning
    2. BTurns it to the 90 degree position
    3. CSpins it at full speed
    4. DFires one kick
  2. [1 mark]Every kick goes about 45 cm. How do you change where the ball ends up?

    1. AChange where you kick from and which way you face
    2. BPass a power, such as kick(30)
    3. CUse servo(1, 180) for a harder kick
    4. DWait longer before calling kick()
  3. [1 mark]Put the three steps that kick() does underneath in order.

    Number the lines 1 to 3 to put them in the right order.

    1. servo(1, 90)
    2. wait(1)
    3. servo(1, 91)
  4. [1 mark]Which of these are true about the kicker?

    Tick every answer that is true.

    1. AIt fires straight ahead, along the way the robot faces
    2. BIt works on a ball held in the jaws
    3. CIt aims itself at the nearest ball
    4. DLeft to keep turning, it fires again every turn
    5. EIt sends the ball about 45 cm
  5. [1 mark]What does this program print?

    width = 23
    print(round(4 * 92 / width), "cm")
  6. [1 mark]The robot faces up the mat. The target zone is 30 degrees to its left. Which line aims the kick?

    1. Aturn_left(30, angle=30)
    2. Bturn_right(30, angle=30)
    3. Cservo(1, 30)
    4. Dkick() then turn_left(30, angle=30)
  7. [1 mark]One turn of the kicker takes about 1 s and fires once, half a second in. You run servo(1, 91), wait 3 s, then servo(1, 90). How many times does it fire?

The task: kick it

The ball lies 8 cm away, straight towards the green zone, but you are facing 30 degrees to the right of it, so it is not in front of the kicker yet. Turn to face the zone, then kick so the ball stops in it. Do not drive.

# the two lines every program starts with: the commands, then the robot
from bugbot import *
connect()

# kick: one turn of the kicker winds the spring and lets it go
kick()
# pause 4 s (the robot keeps doing what it was told)
wait(4)

Plan your program here, then type it in and press Run.

QR code
Do it on the robot
www.bugbotlab.com/learn/7-4-the-kicker/
The simulator checks it and tells you when it passes. Nothing to install, no account.

Challenges

  1. Turn the kicker yourself with servo(1, 91) and leave it turning for three seconds before servo(1, 90): how many times does it fire?
  2. Turn 45 degrees left, kick, and say where the ball ended up (watch the mat).
  3. Kick the ball, chase it, grip it, and kick it again.