Odometry and drift · University · about 30 min
Dead reckoning between landmarks, and a reset whenever something known comes into view.
[1 mark]Tag 7 is 165 cm up the mat from the start, and the robot, facing it, reads it at 40 cm. What y does the fix give, in cm?
[1 mark]The estimate is y = 120 and three fixes in a row all say 130. The estimate is blended as in the lesson. What does this print?
y = 120.0
for fixed in (130.0, 130.0, 130.0):
y = 0.8 * y + 0.2 * fixed
print(round(y, 2))[1 mark]Dead reckoning with a fix every so often. What does a plot of the position error against time look like?
[1 mark]When is replacing the estimate with the fix, rather than blending, the right choice?
[1 mark]Which of these are reasons in the lesson to distrust a fix?
Tick every answer that is true.
[1 mark]Watching the printout, each fix makes a bigger jump in the estimate than the last. What does that tell you?
Tag 7 is on the far wall, 165 cm up the mat from the start. Drive at least a metre towards it, dead reckoning as you go, take a fix when the tag is close enough to be worth having, and print my y: at the end.
from bugbot import *
connect()
set_cv("apriltag")
TAG_Y = 165.0Plan your program here, then type it in and press Run.