Learning, and the capstone · University · about 90 min
Calibrate, estimate, localise, plan, follow, arrive, and report. One run, everything in it.
[1 mark]Tag 21 is at (100, 195) and tag 22 at (40, 195). The robot measures r1 = 46.1 cm to tag 21 and r2 = 67.3 cm to tag 22. What does this print?
import math x1, x2, wall = 100.0, 40.0, 195.0 r1, r2 = 46.1, 67.3 x = (x1 ** 2 - x2 ** 2 - r1 ** 2 + r2 ** 2) / (2 * (x1 - x2)) y = wall - math.sqrt(r1 ** 2 - (x - x1) ** 2) print(round(x, 1), round(y, 1))
[1 mark]In the two tag fix, why take the negative square root for y?
[1 mark]After calibration a gyro bias of 0.2 degrees per second is left uncorrected. How many degrees of heading error does that build up over 30 s of driving?
[1 mark]A tag fix puts the robot 40 cm from where its estimate says it is. What should the program do?
[1 mark]Only one of the two tags is in view for a frame. How should that frame be used for the fix?
[1 mark]Which belong in a submission that would earn a good mark?
Tick every answer that is true.
Reach the green target through the gap, without touching anything, and print gyro bias:, my x: and my y: from your own estimate. Plot x and y as you go. No position().
from bugbot import *
import math
connect()
DT = 0.1
V_MAX, V_LAT = 20.0, 15.0
START = (30.0, 25.0)
TAGS = {21: (100.0, 195.0), 22: (40.0, 195.0)}Plan your program here, then type it in and press Run.