FixTheRobot Explore Robotics / Navigation / M4 / M4-L1

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

Navigation · Sampling-Based and Kinodynamic Planning · M4-L1 · Intermediate

Collision-Check a Footprint

14:05. Scout is towing a linen cart down the service corridor. The cart is wider than the robot and trails a metre behind it. The planner calls the route free, and the cart clips a pillar by the lift.

The planner checked the robot's centre, not the cart. You will check the whole footprint at one pose, then a straight edge between two poses, then a path whose heading turns.

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 exact test of a rectangle against a circle: move the circle into the robot frame, clamp its centre to the rectangle, compare the distance with the radius. Stage 2 checks an edge by sampling, where the spacing must be smaller than the smallest obstacle the robot cannot step over. Stage 3 poses the footprint along a path with the heading of each segment.

    Grading is result-based: your functions are run on the practice example and on freshly generated hidden rooms, and compared with exact geometry.

    Theory for this lab

    Sampling-Based and Kinodynamic Planning labs

    1. M4-L1: Collision-Check a Footprint: this lab.
    2. M4-L2: Grow an RRT
    3. M4-L3: Rewire to a Better Path with RRT*
    4. M4-L4: Park the Car-Like Robot

    Educational simplification: a flat room, circular obstacles, a footprint made of rectangles, straight edges for a round robot, and a heading that follows the path. Grazing contacts are left out of the hidden tests so that the answer does not depend on the last millimetre.

    Get the next lab

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