Vision · University · about 50 min
Three identical shapes, one job, and a task the depth sensor cannot begin.
[1 mark]Three identical balls differ only in colour. Why can the depth sensor not pick out the green one?
[1 mark]The survey finds three 6 cm balls. What does this print?
import math
F, R = 92.4, 3.0
seen = {"red": (100, 14), "green": (200, 28), "blue": (250, 9)}
for colour, (cx, width) in seen.items():
got = 2 * R * F / width, math.degrees(math.atan((cx - 160) / F))
print(colour, "%.0f cm at %.0f degrees" % got)[1 mark]Why turn to the green ball's bearing and servo on its apparent size, rather than work out its coordinates and drive there open loop?
[1 mark]Why must the survey be a separate phase before the approach?
[1 mark]The approach should stop 20 cm from a 6 cm ball. About how many pixels wide should it look, to 1 decimal place, with f = 92.4?
[1 mark]Which choices help the robot stop short of the ball without touching it?
Tick every answer that is true.
Survey all three balls and print red:, green: and blue:, the range in centimetres to each. Then drive to the green ball and stop within reach of it without touching it. position() is not allowed: the robot has to find it by looking.
from bugbot import * import math connect() F, R = 92.4, 3.0 TARGET = "green"
Plan your program here, then type it in and press Run.
d^2 prediction?