FixTheRobot Explore Robotics / Localization & SLAM / M1 / M1-L1

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

Localization & SLAM · SLAM Foundations · M1-L1 · Beginner

Understand Localization, Mapping, and SLAM

A robot can be asked three different questions. Where am I, given a map? What is out there, given where I was? And, on a first visit, both at once?

You solve the first two in Python on hidden test scenarios, then run an experiment that shows why the third is harder than the other two put together.

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

    The lab follows the loop Problem → Experiment → Diagnose → Fix → Evaluate → Understand three times: localization from landmarks (rigid alignment), mapping with known poses (averaging sightings), and the failure of mapping with drifting poses. Your code runs in your browser and is checked on hidden scenarios whose true poses and landmark positions your code never sees.

    Theory for this lab

    SLAM Foundations labs

    1. M1-L1: Understand Localization, Mapping, and SLAM: this lab.
    2. M1-L2: Diagnose Drifting Odometry
    3. M1-L3: Fix Incorrect Coordinate Frames

    Educational simplification: a 2D world, landmarks with known identities, Gaussian noise and a closed-form pose solution. Production systems estimate uncertainty, reject wrong matches and work in 3D (Modules 2, 3 and 4).

    Get the next lab

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