Localisation · University · about 25 min
Tracking against global localisation, and why one Gaussian is not enough for the second.
[1 mark]Why can a Kalman filter not represent the belief of a robot that has just woken up somewhere unknown on the mat?
[1 mark]The robot roughly knows where it is and only wants to keep knowing, with a small error and a single blob of belief. What does the page call this localisation problem?
[1 mark]The robot faces the far wall and reads its distance. Which set of places on the mat is consistent with that single reading?
[1 mark]What does this program print?
measured = 130.0
possible = 0
for gy in range(0, 200, 10):
for gx in range(0, 200, 10):
if abs((200 - gy) - measured) < 8:
possible += 1
print(possible)
20
Only gy = 70 gives a predicted reading within 8 cm of 130 (60 and 80 are 10 cm out), and every one of the 20 values of gx at that row fits, so 20 places.
[1 mark]A robot sits in one corner of a square room with four identical corners. What resolves which corner it is in?
[1 mark]Which of these beliefs can a single Gaussian represent without behaving badly?
Tick every answer that is true.
Standing still, print reading:, the distance the robot measures ahead, and possible:, how many positions on a 10 cm grid across the mat would give that same reading to within a few centimetres.
from bugbot import * connect() readings = []
The hint students can ask for: The mat is 200 by 200 and the robot faces along +y, so the wall ahead is at y = 200 and the reading tells you y and nothing about x. Step a grid of candidate positions and count the ones whose predicted reading is within a few centimetres of what you measured.
from bugbot import *
connect()
readings = []
for i in range(20):
readings.append(distance())
wait(0.1)
measured = sum(readings) / len(readings)
print("reading:", round(measured, 1))
# every candidate (x, y) on a 10 cm grid, facing the same way
possible = 0
for gx in range(0, 200, 10):
for gy in range(0, 200, 10):
predicted = 200 - gy
if abs(predicted - measured) < 6:
possible += 1
print("possible:", possible)
Any program that meets the task's checks is marked correct in the simulator; this is one way, not the only way.