The answersDownload the PDF
Worksheet

U7.3 Moving the cloud

Localisation · University · about 30 min

BugBotLab
NameClassDate

What this lesson is about

The motion update: every particle drives, and every particle's own error goes with it.

Questions 6 marks in all

  1. [1 mark]A motion update moves every particle by the measured motion with no random term. What goes wrong?

    1. AThe cloud keeps its shape for ever, so the filter claims to be as certain after ten metres as at the start
    2. BThe cloud spreads without limit and the estimate becomes vague
    3. CThe particles drift away from the robot's true motion
    4. DThe weights stop summing to one
  2. [1 mark]The noise added per step is much smaller than the robot's real motion error. What is the likely result?

    1. AAn over-confident cloud that shrinks onto a wrong answer and refuses to be corrected
    2. BA vague estimate because the cloud spreads faster than readings can pull it in
    3. CExactly the same estimate, since the measurement update corrects it every tick
    4. DThe effective sample size rises towards N
  3. [1 mark]Each particle gets independent noise with standard deviation 0.35 cm per step. After 40 steps, what spread (standard deviation) should the cloud have, in cm to two decimal places?

  4. [1 mark]You double the per-step noise standard deviation. What happens to the spread of the cloud after 5 seconds?

    1. AIt doubles
    2. BIt quadruples
    3. CIt grows by a factor of sqrt(2)
    4. DIt stays the same, because it depends only on the number of steps
  5. [1 mark]A Kalman filter for the same robot would use a process noise Q of 0.16 cm squared per step. What standard deviation, in cm, is a reasonable starting point for the per-particle motion noise?

  6. [1 mark]Which of these belong in the motion update of a particle filter?

    Tick every answer that is true.

    1. ASpeed proportional to the command, with a dead band
    2. BMore error when turning than when driving straight
    3. CRemoving any particle that would pass through a wall
    4. DWeighting each particle by how well it predicts the distance reading

The task: move the cloud

Start every particle at zero, move them with the flow sensor plus their own noise as the robot drives at least 40 cm, plot mean y and spread y, and print both at the end.

from bugbot import *
import random
connect()

DT, N = 0.1, 300
ys = [0.0] * N

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

QR code
Do it on the robot
www.bugbotlab.com/learn/u7-3-moving-the-cloud/
The simulator checks it and tells you when it passes. Nothing to install, no account.

Challenges

  1. Run it with no random term at all. What does the spread do, and why is that a lie?
  2. Double the noise and compare the spread at the end. Does it double?
  3. Start every particle at 40, where the robot starts on the mat, so the cloud is in mat coordinates. Drive on towards the far wall and kill any particle that goes past 200. How many do you lose, and when?