Skip to content

Path Planning: D*#59

Merged
ShisatoYano merged 6 commits intoShisatoYano:mainfrom
guilyx:feat/dstar
Mar 20, 2026
Merged

Path Planning: D*#59
ShisatoYano merged 6 commits intoShisatoYano:mainfrom
guilyx:feat/dstar

Conversation

@guilyx
Copy link
Contributor

@guilyx guilyx commented Feb 9, 2026

Summary

  • Implement the original D* path planning algorithm (Stentz, 1994) — not D* Lite — with full RAISE/LOWER cost propagation, configurable heuristic weight for A*-like informed search, and incremental replanning when obstacles are injected at runtime.
  • Add a two-GIF simulation: dstar_search.gif animates the grid-based search, obstacle injection (old path greys out), and replanned path; dstar_navigate.gif shows a car following the initial course via PurePursuit, then seamlessly switching to the replanned course when the dynamic obstacle appears.
  • Add unit tests covering initial search (empty/gapped/blocked grids), replanning correctness, goal preservation, and heuristic efficiency; plus an integration test that runs the full simulation.

New files

File Lines Purpose
dstar_path_planner.py Core D* algorithm: grid loading, backward search from goal, update_obstacles(), replan(), path extraction, visualization
dstar_path_planning.py Simulation driver: builds grid, runs D*, injects dynamic obstacle, generates search GIF + car-following navigate GIF with _ReplanPurePursuit controller
dstar_search.gif Search animation (7 phases: expand → path → hold → obstacle + grey → replan → new path → hold)
dstar_navigate.gif Car navigation animation (PurePursuit switches course mid-drive)
test_dstar_path_planning.py Integration/simulation test

Test plan

  • pytest test/test_dstar_path_planning.py — simulation integration test
  • python src/simulations/path_planning/dstar_path_planning/dstar_path_planning.py — visual check: both GIFs generate, search GIF shows greyed old path + green new path from start, navigate GIF shows car switching courses with correct red/grey path swap

@guilyx
Copy link
Contributor Author

guilyx commented Feb 9, 2026

Need to fix obstacles, seems like I don't count inflation as an obstacle and I should.

@guilyx
Copy link
Contributor Author

guilyx commented Feb 20, 2026

Need to fix obstacles, seems like I don't count inflation as an obstacle and I should.

Resolved

@ShisatoYano ShisatoYano self-requested a review March 7, 2026 09:00
@ShisatoYano ShisatoYano added the enhancement New feature or request label Mar 7, 2026
@ShisatoYano
Copy link
Owner

Sorry for late reviewing this PR and I left the above comment. Please modify README according to it.

guilyx added 6 commits March 16, 2026 18:18
Implements the original D* algorithm (Stentz, 1994) with
configurable heuristic weight for informed search.
Two-GIF simulation: grid search/replan animation and
car-following navigation with dynamic obstacle replanning.
@guilyx
Copy link
Contributor Author

guilyx commented Mar 16, 2026

@ShisatoYano done

@ShisatoYano ShisatoYano merged commit afaf227 into ShisatoYano:main Mar 20, 2026
3 checks passed
@ShisatoYano
Copy link
Owner

I reviewed and merged! Huge thanks to your implementation!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants