Navigation · Sampling-Based and Kinodynamic Planning · M4-L3 · Advanced
Rewire to a Better Path with RRT*
17:10. The RRT route across the dock is 60 percent longer than it needs to be, and the pallets arrive late. Facilities do not care that the route is valid; they want it short, and they are willing to spend more computing time on it.
You will give the tree two new habits: hang each new node from the cheapest neighbour, and let the new node shorten the routes of its neighbours. Then you will watch the cost fall against the number of samples.
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.