Add regression tests for separate-thread perception and CV collision sweep - #23
Draft
cursor[bot] wants to merge 2 commits into
Draft
Add regression tests for separate-thread perception and CV collision sweep#23cursor[bot] wants to merge 2 commits into
cursor[bot] wants to merge 2 commits into
Conversation
Locks the intentional divergence from predictor-gated precompute: movers without prediction still sweep under check_collision's slow path, while one-point/None trajectories stay pose-only BB checks. Co-authored-by: Majid Khonji <majid-khonji@users.noreply.github.com>
Assert Perception worker creation, dedicated sensor fetch in worker_perception, and that combined=False keeps perceive off the planner worker. 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 high-risk paths that recent async/collision work left thinly tested. Complements (does not duplicate) open draft PRs #17/#20/#22.
Risky behavior now covered
combined_perception_planning=False): creates a dedicatedPerceptionworker;worker_perceptionfetches its ownSensorFrame; planner worker never runsperceivein this modecheck_collisionCV sweep: movers without prediction still get a constant-velocity swept hull whenobstacle_polygonsis omitted — intentionally diverges from predictor-gatedprecompute_obstacle_polygonsNone/ 1-point paths use current-pose BB checks only (no corridor, no CV sweep)Test files added/updated
test/c40_execution/test_c42_sensor_snapshot.pytest/c50_common/test_c55_collision_checking.pyWhy these tests materially reduce regression risk
Separate-thread mode is the non-default async path and was untested end-to-end for snapshot ownership; a wrong combined gate can either starve perception or double-run it. The slow-path CV sweep is public API and easy to “align” incorrectly with the predictor-gated fast path, which would silently change collision costs for any caller that skips precompute. Short/None trajectories are more common after recent end-of-path tracker fixes.
Validation
All 15 tests passed. No production code changes.
Does not overlap open coverage PRs #17/#20 or bugfix PR #22.