FixTheRobot Explore Robotics / Localization & SLAM / M2 / M2-L3

This lab works on phones, but writing code is much easier on a laptop.

Localization & SLAM · Mathematical Foundations · M2-L3 · Intermediate

Understand Pose Uncertainty

A robot that says “I am at (3.2, 1.7)” has told you little. A robot that says “I am at (3.2, 1.7), give or take 4 cm sideways and 12 cm along the corridor” has told you how much to trust it.

You will compute that “give or take” as the robot drives, shrink it with a landmark measurement, and learn to test whether the filter’s claims are honest.

Your task

    Simulation
    solution.pyLoading Python…
    Ctrl+Enter runs
    What Python can I use?

    Plain Python with math and, for matrices, slamkit (matmul, transpose, solve, inverse, identity). The data arrive as the dictionary D. There is no NumPy, random, json or copy in the browser runtime. Your code runs locally and never leaves this page.

    Hints

    What this lab teaches

    Stage 1 is the covariance propagation of M2-T4 and M2-T6, checked two ways: against the analytic result and against a cloud of simulated robots that never saw your code. Stage 2 is the EKF update, graded against a reference including a landmark behind the robot, where an unwrapped bearing breaks it. Stage 3 asks the engineering question: is the filter overconfident? The NEES statistic gives the answer.

    Theory for this lab

    Mathematical Foundations labs

    1. M2-L1: Transform Points Between Coordinate Frames
    2. M2-L2: Diagnose a Pose-Transformation Error
    3. M2-L3: Understand Pose Uncertainty: this lab.
    4. M2-L4: Match Observations to Landmarks

    Educational simplification: a 3-state pose EKF, known landmarks with known identities, Gaussian noise and a single landmark per update. Real SLAM filters carry the map in the state (Module 3), handle association errors (M2-T7) and test consistency with NIS because ground truth is unavailable.

    Get the next lab

    Get notified when new robotics labs are released. One email per new lab, nothing else.