FixTheRobot Explore Robotics / Navigation / M7 / M7-L2

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

Navigation · Safety, Uncertainty and Recovery · M7-L2 · Intermediate

Plan with Pose Uncertainty

13:10. Near the glass atrium Scout's localizer wanders by a third of a metre. The planner does not know that. It chooses the shortest path, hugs the glass at the planned distance, and the robot's real position touches it.

You will read how uncertain Scout is in the direction of the wall, convert a risk you accept into a margin, and give the planner a margin that depends on where it is.

Your task

    Simulation
    solution.pyLoading Python…
    Ctrl+Enter runs
    What Python can I use?

    Plain Python with math and heapq. Your code runs in a background worker: an endless loop is stopped after a few seconds and the page stays usable. It runs in your browser and is never sent anywhere.

    Hints

    What this lab teaches

    Stage 1 is the spread of a two-dimensional Gaussian along a direction, uᵀΣu, which is what a covariance means for a nearby wall. Stage 2 turns "no more than a 1% chance" into a number of standard deviations and a margin in metres, using a normal table. Stage 3 plans on a grid in which every cell has its own margin, so that the planner takes the longer corridor where localization is good.

    Grading is result-based: your path is checked cell by cell against the local margin and compared in length with the shortest safe path, on the practice map and on freshly generated hidden maps.

    Theory for this lab

    Safety, Uncertainty and Recovery labs

    1. M7-L1: Size the Safety Margin
    2. M7-L2: Plan with Pose Uncertainty: this lab.
    3. M7-L3: Build a Recovery Behavior Tree
    4. M7-L4: Detect and Escape a Stuck Robot

    Educational simplification: a position error that is Gaussian with a known covariance, a margin added to the robot radius, one-sided tail probabilities and a planner without heading. Real localizers are often over-confident, so real margins carry extra allowance, and none of this is a safety case (lesson M7-T3).

    Get the next lab

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