Add regression tests for lattice partial replan, track-end gate, and e-stop switch - #27
Draft
cursor[bot] wants to merge 1 commit into
Draft
Add regression tests for lattice partial replan, track-end gate, and e-stop switch#27cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
Cover obstacle_polygons hot-path glue in _partial_replan, track_end_s extension gate, edge-traversal handoff, and trailing-velocity emergency stop recovery in should_switch_plan. Co-authored-by: Majid Khonji <majid-khonji@users.noreply.github.com>
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
Adds focused regression coverage for GreedyLatticePlanner sliding-window and plan-switch paths that remained untested after recent closed-loop / lattice work. Complements (does not duplicate) open drafts #17/#20/#22/#23/#24/#25/#26.
Risky behavior now covered
_partial_replanobstacle_polygons glue: with agents, everycheck_collisioncall receives precomputed polygons; without agents the kwarg staysNone(avoids silent CV-sweep slow-path semantics)_partial_replantrack_end_s gate: skips extension whentail.s + maneuver_distance > track_end_s; extends by one maneuver when room remains_advance_local_planhandoff: traversed head with successor advances to next edge and calls_on_edge_traversed→_partial_replan; no successor holds and does not callshould_switch_planemergency-stop recovery: trailing velocitylast < 0.5andmean < 3.0recovers to a clean plan; low-speed cruise andlast >= 0.5do not misclassifyTest files added/updated
test/c20_planning/test_c28_local_lattice_planners.pyWhy these tests materially reduce regression risk
Sliding-window extension is the default local-plan grow path after each edge traverse. Dropping
obstacle_polygonswould change collision semantics vs predictor-gated precompute. Wrongtrack_end_sgating (or reverting to stalepath_s[-2]) can append edges past finish or stop extending early. Emergency-stop recovery prevents stuck near-zero profiles without jittering normal low-speed cruise.Validation
All 40 tests passed. No production code changes.