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

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

Localization & SLAM · Visual and Visual-Inertial SLAM · M6-L4 · Advanced

Diagnose Camera–IMU Synchronization Errors

The visual-inertial system is accurate on the bench and drifts on the robot. Its estimated gyro bias flips sign with every turn, a pattern that no real bias has.

You measure the time offset between the camera and the IMU, apply it where the gyro is integrated, and find why the bench never showed the problem.

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 estimates the offset by sliding two angular-speed signals against each other, graded against the hidden true offset. Stage 2 uses the offset where it matters, in the integration window between two exposures, graded against the true rotation. Stage 3 sizes the damage: pixels of disagreement as a function of offset and rotation intensity (M6-T8).

    Why it matters

    Estimators explain what they are given. An unmodelled delay becomes a fictitious bias, and the system seems fine until the robot rotates quickly.

    Theory for this lab

    Visual and Visual-Inertial SLAM labs

    1. M6-L1: Diagnose Feature-Tracking Failure
    2. M6-L2: Understand Visual Odometry Drift
    3. M6-L3: Investigate ORB-SLAM Failure Modes
    4. M6-L4: Diagnose Camera–IMU Synchronization Errors: this lab.

    Educational simplification: planar yaw only, a constant offset, smooth sum-of-sinusoids motion, white gyro noise and magnitude signals for the offset search. Real systems estimate the offset in 3D alongside biases and extrinsics, and the offset can drift.

    Get the next lab

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