Repository navigation
Fix Voronoi roadmap collision checks across the full edge - #1487
Open
huxiaoyi-ovo wants to merge 2 commits into
Open
huxiaoyi-ovo wants to merge 2 commits into
huxiaoyi-ovo wants to merge 2 commits into
Conversation
huxiaoyi-ovo
marked this pull request as ready for review
October 30, 2026 04:42
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.
Summary
The Voronoi roadmap's
is_collision()samples a candidate edge at intervals equal to the robot radius. An obstacle can intrude into the edge's swept clearance disk between sample points, while the function reports no collision.For an edge from
(0, 0)to(1, 0), robot radius1, and obstacle at(0.5, 0.95), both endpoints are approximately1.074away from the obstacle, but the segment clearance is0.95. The old sampling returnsFalsedespite the collision.The same logic divides by the radius, which raises
ZeroDivisionErrorfor a point robot (rr=0).Fix
Regression tests
Added focused tests for between-sample collisions, collision-free clearance, point robots with obstacles on/off the segment, zero-length edges, endpoint clearance, and the existing maximum edge length limit.
Scope: Voronoi roadmap implementation plus one focused test module; no new dependencies.
Related: #1482 fixes the corresponding sampling bug in the separate Probabilistic Roadmap implementation; this PR addresses
PathPlanning/VoronoiRoadMapspecifically.Independent cross-platform CI validation has been started.
AI disclosure: ChatGPT assisted with code analysis and preparing the fix and tests.