The answersDownload the PDF
Worksheet

U3.5 A fix from a landmark

Odometry and drift · University · about 30 min

BugBotLab
NameClassDate

What this lesson is about

Dead reckoning between landmarks, and a reset whenever something known comes into view.

Questions 6 marks in all

  1. [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?

  2. [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))
  3. [1 mark]Dead reckoning with a fix every so often. What does a plot of the position error against time look like?

    1. AA sawtooth: growing between fixes and dropping to nearly nothing at each one
    2. BA straight line that grows all run, only more slowly
    3. CA square root curve that levels off without any fixes
    4. DFlat at zero, because each fix removes the error for good
  4. [1 mark]When is replacing the estimate with the fix, rather than blending, the right choice?

    1. AWhen the fix is far better than the estimate
    2. BAlways, because a fix comes from outside the robot
    3. CWhen the fix is noisy, so that its noise is removed at once
    4. DWhen the tag is far away, since a distant tag covers more of the mat
  5. [1 mark]Which of these are reasons in the lesson to distrust a fix?

    Tick every answer that is true.

    1. AThe tag is far away
    2. BThe tag is seen at a sharp angle
    3. CIt is a single detection
    4. DThe id does not match the landmark you think it is
    5. EThe same id has been detected on two ticks in a row
  6. [1 mark]Watching the printout, each fix makes a bigger jump in the estimate than the last. What does that tell you?

    1. AThe dead reckoning error between fixes is growing, which points to a bias such as an uncalibrated gyro
    2. BThe tag is moving
    3. CThe fixes are getting noisier as the robot gets closer
    4. DThe blend weight is too high

The task: a fix from a tag

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.0

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

QR code
Do it on the robot
www.bugbotlab.com/learn/u3-5-a-fix-from-a-landmark/
The simulator checks it and tells you when it passes. Nothing to install, no account.

Challenges

  1. Blend the fix at 0.2 instead of replacing, and compare the error.
  2. Only accept a fix when the tag is within 100 cm. Does that help or hurt?
  3. Print the size of the jump at each fix. What does a growing jump tell you about your dead reckoning?