-
-
Notifications
You must be signed in to change notification settings - Fork 164
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
I’d like to add a sampling-based planner: RRT (Rapidly-exploring Random Tree) for 2D path planning. This would complement the existing grid planners (A*, Dijkstra) with a continuous-space method and a tree-growth animation.
Why this fits the repo
- Beginner-friendly algorithm with visual intuition (tree expansion).
- Uses only Python + NumPy + Matplotlib (and optionally SciPy, but not required).
- Adds a new planning approach without changing existing code.
Proposed plan
-
Add a planner component:
- New module:
src/components/plan/rrt/rrt_path_planner.py - Inputs similar to A*:
start,goal,map_file,x_lim,y_lim - Parameters:
step_size,goal_radius,max_iters,seed - Collision checking on the occupancy grid by sampling along each edge.
- Treat any grid cell > 0 as blocked (same semantics as A*).
- New module:
-
Add a simulation:
- New folder:
src/simulations/path_planning/rrt_path_planning/ - Script:
rrt_path_planning.py - Build the same obstacle map as A* using
BinaryOccupancyGrid - Run RRT, save path to
path.json - Generate
rrt_search.gifshowing tree growth and final path - (Optional) Use
CubicSplineCourse+PurePursuitControllerto createrrt_navigate.gif
- New folder:
-
Add unit tests:
test/test_rrt_path_planning.py- Disable animation via a
show_plotflag - Use a fixed RNG seed
- Assert: path starts near start, ends near goal, and edges are collision-free.
-
Update README:
- Add RRT under Path Planning with GIF(s)
Testing
python -m pytest test/test_rrt_path_planning.py -vrun_test_suites.sh/run_test_suites.bat
Question
Does this plan look OK? Any preferences on parameters, file layout, or the animation style?
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request