Add regression tests for controller emergency brake and anti-windup - #35
Draft
cursor[bot] wants to merge 1 commit into
Draft
Add regression tests for controller emergency brake and anti-windup#35cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
Cover Stanley and PurePursuit velocity safety paths: hard brake on near-zero reference speed, integral clear + accel floor at rest, and Stanley CTE slow-down while fast. 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 controller safety paths that remained untested on
dev, while avoiding duplication of open drafts #17/#20/#22–#34.Risky behavior now covered
ego_min_acceleration * c30_emergency_braking_factorc30_emergency_min_moving_velocitydoes not trigger the overridecte_v_sumand refuses further negative accelerationvelocity_pid: same emergency override and stop-floor/anti-windup contract on the shared velocity PID helperTest files added/updated
test/c30_control/test_c30_emergency_brake.py(new)Why these tests materially reduce regression risk
Emergency braking and anti-windup sit on every Stanley/PurePursuit control tick and gate obstacle-stop / end-of-path deceleration. Silently dropping the override leaves a weak PID coasting into a stop request; losing anti-windup/floor pushes the plant through zero velocity. CTE slow-down is the Stanley-specific path that bleeds speed in corners—easy to regress while tuning gains.
Validation
All 29 control tests passed (6 new). No production code changes.