FixTheRobot Explore Robotics / Navigation / M7 / M7-L1

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

Navigation · Safety, Uncertainty and Recovery · M7-L1 · Beginner

Size the Safety Margin

11:20. Scout rounds the corner by the pharmacy at full speed and meets a porter with a trolley. The brakes work, the sensors saw the trolley at once, and Scout still touches it. Nothing is broken: the speed limit was set for a different corridor.

You will compute how far Scout travels before it stops, turn that around into a speed limit for the distance it can see, and then add a person who keeps walking while Scout brakes.

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 stopping distance: the distance travelled during the latency plus the braking distance. Stage 2 inverts it: the highest speed from which the robot can always stop inside the distance it can see, which is the rule behind slowing for blind corners. Stage 3 adds an oncoming person who covers distance of their own while the robot brakes.

    Grading is result-based: your functions are run on the practice example and on freshly generated hidden cases, and the speeds you return are checked against the stopping distance, not only against one formula.

    Theory for this lab

    Safety, Uncertainty and Recovery labs

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

    Educational simplification: constant deceleration on a flat floor, a fixed command latency, a known sight distance and a person who walks at constant speed. This lab teaches an engineering calculation. It is not a safety certification guide and does not replace a hazard analysis or the standards that apply to your robot (lesson M7-T1).

    Get the next lab

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