Navigation · Trajectories and Path Following · M5-L1 · Intermediate
Smooth a Jagged Path
10:20. The tray on Scout rattles all the way from the pharmacy to ward 3. The planner's path is correct, and it is made of forty tiny steps, each one a turn of 90 degrees. The robot slows down for every one of them and the cart tinkles on every corner.
You will write the collision test that every smoother needs, shortcut the staircase down to a handful of straight lines, and then pull the remaining path straight with a gradient smoother that is not allowed to move the start, the goal or a wall.
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.