Repository navigation
Fix target-point arclength interpolation in RRT path smoothing - #1469
Open
Superfast-BS wants to merge 1 commit into
Open
Superfast-BS wants to merge 1 commit into
Superfast-BS wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
get_target_point([[0, 0], [10, 0], [10, 10]], 5)returns[5, 5, -1]: the interpolation uses the previous segment index and a ratio based on the remaining distance. The returned point is off the path. Endpoints and zero-length segments are affected as well.Change
Walk segments using the remaining arclength, interpolate from the containing segment's start, and return that segment's index. Skip zero-length segments and retain the existing signature and shortcutting policy. This does not change collision sampling or add a new planner.
Validation
On Python 3.13.16 with the repository's current requirements and
MPLBACKEND=Agg:pytest tests/test_rrt_with_pathsmoothing_radius.py -q: 7 passed after the fix, including the existing robot-radius safety test.pytest tests -l -Werror --durations=0: 162 passed.ruff check PathPlanning/RRT/rrt_with_pathsmoothing.py tests/test_rrt_with_pathsmoothing_radius.py: passed. The existing files are not formatter-clean; unrelated formatting is unchanged.I maintain robotics code reuse tooling at Superfast Robotics. This focused correction and its regression tests were prepared with AI assistance and executed locally; no hardware verification is claimed.