Navigation · Local Planning and Obstacle Avoidance · M6-L3 · Intermediate
Avoid a Moving Obstacle
10:50. A porter pushes a linen trolley across the corridor just as Scout arrives with the lab samples. Scout either stops dead twenty metres away for a porter who would have passed behind it, or drives on and clips the trolley. The tracker knows where the porter is and how fast. The robot has to turn that into a decision.
You will predict when and whether two moving discs touch, choose the highest speed that keeps a safe gap at the closest approach, and then protect against the porter doing something else than walking straight on.
Your task
Lab complete: post-mortem
You have passed every stage. Now connect it back to the theory and move on:
Output
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.