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

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

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

Diagnose Drifting Odometry

You drive a wheeled robot around a 3 m square marked on the floor. It finishes exactly on the start mark. Its own odometry insists it is nearly a metre away and facing the wrong way.

Nothing is broken. You will find out which parameter is responsible, measure the parameters properly with two simple tests, and see what remains.

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 a controlled experiment: switch off one error source at a time to see which one matters. Stage 2 asks you to write the calibration; it is graded on square loops in both directions that you never see. Stage 3 shows the limit of calibration. The simulator keeps the true wheel sizes and wheelbase private; your code only sees the two test results.

    Theory for this lab

    SLAM Foundations labs

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

    Educational simplification: a differential-drive robot with three systematic parameters (left and right wheel size, wheelbase) and small random encoder noise, calibrated from a straight test and a spin test. Real calibration also deals with slip, tyre deformation and non-uniform floors; UMBmark (Borenstein and Feng, 1996) is the standard method, and this lab uses a simpler pair of tests.

    Get the next lab

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