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

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

Localization & SLAM · LiDAR SLAM · M5-L1 · Intermediate

Fix Point-Cloud Preprocessing

The mapping run produces a map with bent walls, and the registration is slow. Nothing is wrong with the lidar: the cloud that reaches the matcher is smeared by motion, polluted by the robot’s own body and the ground, and far too dense.

You fix the front of the pipeline in the order the data flows: deskew, filter, downsample.

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 motion compensation (M5-T1, M5-T2) on hidden rooms: your function receives the points with their timestamps and the velocities, and is graded against the true undistorted room, which stays in the simulator. Stage 2 is a frame bug that deletes real structure, graded on what survives and what does not. Stage 3 is the voxel trade-off measured on the same cloud.

    Why it matters

    Every later step, from feature extraction to loop closure, inherits the quality of this one. A deskew with a wrong sign gives a map that looks fine on straight roads and bends on every turn.

    Theory for this lab

    LiDAR SLAM labs

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

    Educational simplification: a 2D sweep slowed to 0.5 s, constant velocity and yaw rate, no noise on the velocities; a synthetic street cloud with a flat ground at a known height and ideal voxel centroids. Real systems interpolate full 6-DOF poses from the IMU, fit the ground, and use hashed voxel structures.

    Get the next lab

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