Skip to content

Handle goal node at index zero in RRT Dubins - #1420

Open
huxiaoyi-ovo wants to merge 3 commits into
AtsushiSakai:masterfrom
huxiaoyi-ovo:fix/rrt-goal-index-zero
Open

Handle goal node at index zero in RRT Dubins#1420
huxiaoyi-ovo wants to merge 3 commits into
AtsushiSakai:masterfrom
huxiaoyi-ovo:fix/rrt-goal-index-zero

Conversation

@huxiaoyi-ovo

Copy link
Copy Markdown

Summary

  • treat goal index 0 as a valid search result in RRTDubins
  • add a deterministic regression test where the start already satisfies the goal pose

Problem

search_best_goal_node() returns a node index or None. The planner currently checks the result with if last_index:, so a valid result of 0 is treated as false and the planner incorrectly reports that no path was found.

This occurs naturally when the start node itself already satisfies the goal position and yaw thresholds.

Fix

Use an explicit is not None check for the returned node index.

Tests

Added test_start_already_satisfies_goal with max_iter=0, which makes node index 0 the valid goal result and verifies that planning returns a path.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant