-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Collaborative astar #1247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Collaborative astar #1247
Conversation
docs/modules/5_path_planning/time_based_grid_search/time_based_grid_search_main.rst
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors single-agent planners into a common interface, adds a new multi-agent priority-based planner, and modularizes plotting and testing.
- Refactored
SpaceTimeAStar
andSafeIntervalPathPlanner
intoSingleAgentPlanner
subclasses with staticplan
methods - Introduced
PriorityBasedPlanner
for multi-agent path planning with priority ordering - Extracted plotting logic into
Plotting.py
and updated tests and documentation accordingly
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
tests/test_space_time_astar.py | Updated to call static SpaceTimeAStar.plan and adjusted assertions |
tests/test_safe_interval_path_planner.py | Updated to call static SafeIntervalPathPlanner.plan |
tests/test_priority_based_planner.py | Added tests for PriorityBasedPlanner |
docs/.../time_based_grid_search_main.rst | Documented priority-based planning and added paper reference |
PathPlanning/TimeBasedPathPlanning/SpaceTimeAStar.py | Refactored into SingleAgentPlanner , static plan , improved API |
PathPlanning/TimeBasedPathPlanning/SafeInterval.py | Refactored into SingleAgentPlanner , static plan , improved API |
PathPlanning/TimeBasedPathPlanning/PriorityBasedPlanner.py | New multi-agent PriorityBasedPlanner implementation |
PathPlanning/TimeBasedPathPlanning/Plotting.py | New plotting utilities for single- and multi-agent paths |
PathPlanning/TimeBasedPathPlanning/Node.py | Introduced shared Node and NodePath dataclasses |
PathPlanning/TimeBasedPathPlanning/GridWithDynamicObstacles.py | Added NARROW_CORRIDOR arrangement and reservation APIs |
PathPlanning/TimeBasedPathPlanning/BaseClasses.py | Added SingleAgentPlanner and MultiAgentPlanner base classes |
Comments suppressed due to low confidence (2)
tests/test_space_time_astar.py:23
- The comment indicates 28 entries but the assertion checks for 31. Update the comment to match the expected path length or adjust the expected value if it changed intentionally.
# path should have 28 entries
PathPlanning/TimeBasedPathPlanning/GridWithDynamicObstacles.py:23
- No tests cover the new
NARROW_CORRIDOR
arrangement. Consider adding unit tests to validate its behavior.
NARROW_CORRIDOR = 2
Returns the re-ordered StartAndGoal combinations, and a list of path plans. The order of the plans | ||
corresponds to the order of the `start_and_goals` list. | ||
""" | ||
print(f"Using planner: {single_agent_planner_class}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider logging single_agent_planner_class.__name__
instead of the full class object for cleaner output.
print(f"Using planner: {single_agent_planner_class}") | |
print(f"Using planner: {single_agent_planner_class.__name__}") |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind - mypy didn't like this:
https://github.com/AtsushiSakai/PythonRobotics/actions/runs/16242140076/job/45860004917?pr=1247
Reference issue
What does this implement/fix?
This PR implements a simple priority based planner. It plans paths for multiple agents in an environment with dynamic obstacles. It plans in descending order of distance from start position to goal. Once a path is planned for an agent, all future plans will avoid that path.
The algorithm outlined in section III of this paper: https://pure.tudelft.nl/ws/portalfiles/portal/67074672/07138650.pdf
Additional information
PR to gifs repo: AtsushiSakai/PythonRoboticsGifs#8
CheckList