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

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

Localization & SLAM · LiDAR SLAM · M5-L4 · Advanced

Diagnose LiDAR SLAM Drift

After two laps the map has two copies of the same wall. Three people give three explanations: the IMU, the registration, and “it is just drift”. Each would be fixed in a different place.

You settle the argument with the logs, and then repair the path.

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 attribution by comparison (M5-T8, M5-T9): two sensors that should agree are subtracted, and the size of the disagreement identifies and measures the fault. It is graded on hidden runs with different causes, so a rule that happens to work on one run fails the others. Stage 2 turns a loop closure into a trajectory correction that respects how the error grew.

    Why it matters

    “The SLAM drifted” is not a diagnosis. The cause decides whether to recalibrate, change the registration, add a sensor or add a loop closure.

    Theory for this lab

    LiDAR SLAM labs

    1. M5-L1: Fix Point-Cloud Preprocessing
    2. M5-L2: Diagnose Poor Scan Registration
    3. M5-L3: Understand the LOAM Pipeline
    4. M5-L4: Diagnose LiDAR SLAM Drift: this lab.
    5. M5-L5: Investigate a Failed LiDAR Mapping Run

    Educational simplification: planar motion on a square, logs reduced to yaw rates and step lengths, a wheel odometer with no systematic error, a constant bias, and a single loop closure with Gaussian error. Real systems estimate time-varying biases and use full pose-graph optimisation.

    Get the next lab

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