Skip to content

Add regression tests for velocity collision glue, Kalman tracks, and OpenDRIVE geometry - #29

Draft
cursor[bot] wants to merge 1 commit into
devfrom
cursor/missing-test-coverage-0afc
Draft

Add regression tests for velocity collision glue, Kalman tracks, and OpenDRIVE geometry#29
cursor[bot] wants to merge 1 commit into
devfrom
cursor/missing-test-coverage-0afc

Conversation

@cursor

@cursor cursor Bot commented Aug 4, 2026

Copy link
Copy Markdown

Summary

Adds focused regression coverage for high-risk paths that remained untested on dev, while avoiding duplication of open drafts #17/#20/#22/#23/#24/#25/#26/#27/#28.

Risky behavior now covered

  • VelocityLocalPlanner.profile_trajectory obstacle_polygons glue: with agents, check_collision receives precomputed polygons (and precompute gets total_time / thresholds / inflation, not lattice beside_* windows); without agents the kwarg stays None and precompute is skipped
  • KalmanTracker association lifecycle: persistent track IDs across frames with positive velocity estimate; detections beyond gate_distance spawn new IDs; tracks prune after max_missed; None perception model raises
  • OpenDRIVE geometry / lane offset: arc quarter-circle endpoints; zero-curvature spiral falls back to line; _get_lane_offset_at_s selects the latest applicable polynomial segment

Test files added/updated

  • test/c20_planning/test_c27_local_behavioral_and_velocity_planners.py
  • test/c10_perception/test_c15_kalman_tracker.py (new)
  • test/c10_perception/test_c18_hdmap_parser.py

Why these tests materially reduce regression risk

Velocity profiling is the default local-plan speed path; dropping obstacle_polygons silently changes collision semantics vs predictor-gated precompute. Kalman association owns persistent agent IDs and estimated velocity used by prediction/planning. Arc/offset parsing feeds HD-map centerlines—wrong geometry corrupts global plans on curved roads.

Validation

pytest \
  test/c20_planning/test_c27_local_behavioral_and_velocity_planners.py \
  test/c10_perception/test_c15_kalman_tracker.py \
  test/c10_perception/test_c18_hdmap_parser.py -v

All 33 tests passed. No production code changes.

Open in Web View Automation 

…OpenDRIVE geometry

Cover VelocityLocalPlanner obstacle_polygons hot-path wiring, KalmanTracker
ID/association lifecycle, and previously untested arc/spiral/lane-offset parsing.

Co-authored-by: Majid Khonji <majid-khonji@users.noreply.github.com>
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