Safe Interval Path Planner#1184
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.
PR Overview
This PR implements a safe‑interval path planning algorithm for a 2D grid with dynamic obstacles, aimed at reducing redundant node expansions compared to SpaceTime A*.
- Implements a new SafeIntervalPathPlanner class along with supporting Node, NodePath, and interval utilities.
- Adds a dedicated test file to verify the planner’s functionality.
- Updates the GridWithDynamicObstacles module to provide safe interval computation and fixes a loop iteration issue.
Reviewed Changes
| File | Description |
|---|---|
| PathPlanning/TimeBasedPathPlanning/SafeInterval.py | New implementation of the safe‑interval path planning algorithm using SIPP. |
| tests/test_safe_interval_path_planner.py | Added unittests verifying the correctness of the safe‑interval planner. |
| PathPlanning/TimeBasedPathPlanning/GridWithDynamicObstacles.py | Updates to safe intervals functions and a fix for iterating while modifying a list. |
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
PathPlanning/TimeBasedPathPlanning/SafeInterval.py:49
- For rich comparisons, lt (and similarly eq) should return NotImplemented instead of raising NotImplementedError. This will ensure proper behavior when comparing against other types.
if not isinstance(other, Node): return NotImplementedError(f"Cannot compare Node with object of type: {type(other)}")
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Wow that copilot review is awesome! |
|
could you please fix the conflict? @SchwartzCode |
|
@AtsushiSakai I fixed the conflicts |
There was a problem hiding this comment.
Pull Request Overview
This pull request implements the SafeInterval path planning algorithm for 2D grids with dynamic obstacles and improves dynamic obstacle handling. Key changes include:
- Introduction of the SafeInterval path planner logic in SafeInterval.py.
- Addition of a new test case in tests/test_safe_interval_path_planner.py.
- Modifications and fixes in GridWithDynamicObstacles.py including the addition of the Interval class and a corrected loop for obstacle generation.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/test_safe_interval_path_planner.py | Adds a new test case for the SafeInterval path planner. |
| PathPlanning/TimeBasedPathPlanning/SafeInterval.py | Implements the safe-interval algorithm and supporting classes. |
| PathPlanning/TimeBasedPathPlanning/GridWithDynamicObstacles.py | Introduces Interval type and refactors obstacle generation and safe interval computation. |
Comments suppressed due to low confidence (2)
PathPlanning/TimeBasedPathPlanning/SafeInterval.py:49
- In the lt method, instead of returning a NotImplementedError when comparing with a non-Node object, return NotImplemented. This prevents unexpected exceptions during sorting.
if not isinstance(other, Node):
tests/test_safe_interval_path_planner.py:11
- [nitpick] Consider renaming 'test_1' to a more descriptive name (e.g., 'test_safe_interval_path_planner_basic') to better convey the purpose of the test.
def test_1():
There was a problem hiding this comment.
@SchwartzCode Thank you!!. I have some comments. PTAL.
docs/modules/5_path_planning/time_based_grid_search/time_based_grid_search_main.rst
Outdated
Show resolved
Hide resolved
…_grid_search_main.rst Co-authored-by: Atsushi Sakai <asakai.amsl+github@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@AtsushiSakai Thanks for the review! Addressed/replied to your comments |
What does this implement/fix?
Implements the SafeInterval path planning algorithm as described in this paper
Additional information
PR into the gifs repo:
AtsushiSakai/PythonRoboticsGifs#7
Gifs for reference:

250 obstacles:
Hard-coded obstacle pattern:
SpaceTime A* on this same arrangement:
CheckList