Hands and feet · Robot club · about 20 min
Rolling, friction, bouncing, and measuring power against distance.
[1 mark]The box is 23 to 31 cm ahead of the ball, closer than a kick goes. What is the right tool?
[1 mark]Why does every kick travel about the same distance?
kick() measures the distance and brakes the ball[1 mark]What does this program print?
for width in [46, 23]:
print(width, "px ->", round(4 * 92 / width), "cm")[1 mark]You carry the ball and stop with the robot's centre 22 cm up the mat, then open the jaws. About how far up the mat is the ball, in whole cm?
[1 mark]A wall returns the ball with about half its speed, and how far a ball rolls is proportional to its speed. A ball hits the wall moving fast enough to roll another 20 cm. About how far does it roll back, in whole cm?
[1 mark]A friend measured 45 cm on their smooth mat. Your mat is carpet. What kick distance should your program use?
The box is 23 to 31 cm ahead of the ball, closer than a kick goes. Get the ball to stop in it: carry it there with the gripper and let go.
# 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 5 s (the robot keeps doing what it was told) wait(5)
Plan your program here, then type it in and press Run.
carry_to(cm) that carries the ball a given distance ahead and lets go, and test it on the box.