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

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

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

Fix Incorrect Coordinate Frames

The lidar works. The robot knows where it is. And yet the walls on the map are doubled, smeared, and rotated away from where they should be.

Nothing is wrong with the data: a point has been put in the wrong frame. You will fix the chain, learn to read frame bugs from their symptoms, and publish the transform that keeps odometry smooth while localization corrects it.

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 builds the chain lidar → base → map and is graded by how close your points land to the real walls on paths you never see. Stage 2 trains the diagnostic habit: test a transform at several poses and recognise which bug leaves which signature. Stage 3 is the map → odom transform of the ROS convention, graded against a later odometry pose so that a lucky answer cannot pass.

    Theory for this lab

    SLAM Foundations labs

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

    Educational simplification: planar SE(2) poses and a 2D lidar rigidly mounted on the base. Real systems add 3D rotation (SE(3)), time-varying transforms and extrinsic calibration (Module 2).

    Get the next lab

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