Skip to content

Add regression tests for LidarLocalization ICP and BasicSim kinematics - #33

Draft
cursor[bot] wants to merge 2 commits into
devfrom
cursor/missing-test-coverage-d159
Draft

Add regression tests for LidarLocalization ICP and BasicSim kinematics#33
cursor[bot] wants to merge 2 commits into
devfrom
cursor/missing-test-coverage-d159

Conversation

@cursor

@cursor cursor Bot commented Aug 6, 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#32.

Risky behavior now covered

  • LidarLocalization ICP: first scan seeds the reference map without mutating ego; reset() clears map/pose; pure translation and yaw recovery on a seeded asymmetric cloud; None/empty/<3-point/3D z-band-empty scans are no-ops
  • BasicSim bicycle ego kinematics: XY integrates with pre-update velocity, then accel updates v, then yaw uses post-update v with default axle length 2.5
  • BasicSim NPC plant: with npc_control=True, agents advance and steer is slew-limited to |Δsteer| ≤ 3·dt; with npc_control=False, agents stay frozen while ego moves
  • State.get_bb_corners: axis-aligned corners and 90° yaw length/width swap used by LiDAR raycasting and collision geometry

Test files added/updated

  • test/c10_perception/test_c16_lidar_localization.py (new)
  • test/c40_execution/test_c46_basic_sim_kinematics.py (new)
  • test/c10_perception/test_c11_state_geometry.py (new)

Why these tests materially reduce regression risk

LidarLocalization is the only non-GT localization path and silently writes ego pose from scan alignment—wrong ICP/guards corrupt the whole stack state estimate. BasicSim bicycle/NPC integration is the plant for Control Step/Steer and multi-agent sims; integration-order or steer-slew regressions change every closed-loop demo. Bounding-box corners feed LiDAR hits and corridor collision; wrong rotation quietly shifts perceived obstacles.

Validation

pytest \
  test/c10_perception/test_c16_lidar_localization.py \
  test/c40_execution/test_c46_basic_sim_kinematics.py \
  test/c10_perception/test_c11_state_geometry.py -v

All 14 tests passed. No production code changes.

Open in Web View Automation 

cursoragent and others added 2 commits August 6, 2026 10:05
Cover scan-to-map seeding/guards/translation/yaw recovery, bicycle ego
integration order, NPC steer slew, and State BB corner geometry.

Co-authored-by: Majid Khonji <majid-khonji@users.noreply.github.com>
Collinear wall scans left translation/yaw underconstrained; seeded
Gaussian landmarks make ICP recovery deterministic and unique.

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