Skip to content

Handle failed LQR local paths in LQR-RRT* steering - #1421

Open
huxiaoyi-ovo wants to merge 3 commits into
AtsushiSakai:masterfrom
huxiaoyi-ovo:fix/lqr-rrt-empty-sampled-path
Open

Handle failed LQR local paths in LQR-RRT* steering#1421
huxiaoyi-ovo wants to merge 3 commits into
AtsushiSakai:masterfrom
huxiaoyi-ovo:fix/lqr-rrt-empty-sampled-path

Conversation

@huxiaoyi-ovo

@huxiaoyi-ovo huxiaoyi-ovo commented Aug 31, 2026

Copy link
Copy Markdown

Summary

  • handle an empty local path returned by the LQR planner
  • return None from LQRRRTStar.steer() instead of indexing an empty list
  • add a deterministic regression test using the real LQR failure path

Problem

LQRPlanner.lqr_planning() explicitly returns ([], []) when it cannot find a path. LQRRRTStar.steer() currently checks only if px is None, so an empty list passes the check and the subsequent px[-1] / py[-1] access raises IndexError.

Fix

Treat an empty sampled path as a failed steering attempt with if not px: return None. This matches the existing planner convention that None indicates steering failure and lets the RRT* search continue safely.

Tests

Added test_steer_handles_failed_local_planner. The test uses the real LQRPlanner with MAX_TIME = 0.0, which deterministically exercises its existing no-path return ([], []), and verifies that steer() returns None without raising.

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