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

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

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

Match Observations to Landmarks

The robot sees seven blobs. It has eight landmarks on its map and a rough idea where it is. Which blob is which landmark, and which blobs are nothing at all?

You write the matcher, make it refuse to guess when two landmarks fit, and find the gate size that keeps the filter 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 standard gated nearest-neighbour matcher built on the Mahalanobis distance of M2-T7. Stage 2 adds the safeguard that matters in dense scenes: do not decide when the data cannot. Stage 3 runs a whole filter and shows how the gate size trades missed detections for wrong matches. The simulator knows which detection came from which landmark; your code only sees the numbers.

    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
    4. M2-L4: Match Observations to Landmarks: this lab.

    Educational simplification: point landmarks with known identities in the map, Gaussian sensor noise, uniform clutter, a pose-only filter and a greedy one-to-one assignment. Production systems also use appearance cues, joint compatibility (JCBB) or RANSAC, and track many hypotheses.

    Get the next lab

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