Conversation
The CC-only Bolt button spam projected a set speed from the longitudinal PID acceleration output, and the CC-only tune (kp=5, 0.9 deadzone) was written for the retired speed-error PID. On the current accel-error PID the deadzone never applies, so aEgo noise was amplified five-fold into constant +/- taps, with and without a lead. Because the stock cruise is itself a slow speed servo, wrapping it in 1 mph steps driven by a noisy accel signal limit-cycled. Scoped to CHEVROLET_BOLT_CC_2017 / 2018_2021 / 2022_2023. Other CC-only cars keep their existing tune and set speed selector. - gmcan: _bolt_cc_setpoint_button targets the filtered planned speed 2.5 s ahead (actuators.speed) capped at the cruise set speed, with 0.8 mph hysteresis and a 1.5 s dwell in steady state. A planned speed drop > 1 m/s or a decel request <= -0.5 m/s^2 bypasses the filter and taps down every 0.25 s. No taps below the stock 25 mph minimum. The reverse-confirm helper is removed. - interface: Bolt CC kp 5 -> 0.5 so the accel command tracks the planner. - carcontroller: pass the hud set speed into the spam logic and clear the target filter when spam is inactive. - starpilot_following: +0.4 s follow time on cruise-button Bolts, which can only slow by coasting once the set speed is lowered. - tests: cover the new set speed logic, the Bolt tune, and that an Equinox CC keeps the existing tune and selector. Tested on a 2023 Chevrolet Bolt EUV without ACC or pedal interceptor, comma 4, highway driving: set speed holds still with no lead, taps every several seconds behind a steady lead, drops fast when a lead brakes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.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.
GM Bolt CC-only: drive the stock set speed from planned speed instead of PID accel
Problem
On CC-only Bolts (no ACC, no pedal interceptor) the cruise-button longitudinal constantly taps the set speed up and down, both with no lead and behind a steady lead.
Two root causes:
kpV = [0, 5, 2]with a 0.9 m/s deadzone) was written for the retired speed-error PID.LongControl.update()now runs a PID on acceleration error and never applies the deadzone (it is only referenced in the legacyupdate_old_longpath). On the accel loop, kp = 5 turns ±0.1 m/s² of aEgo ripple into ±0.5 m/s² of command.create_gm_cc_spam_commandprojected a set speed from that accel command (v_ego * 1.01 + 3 * accel) with no cap at the cruise set speed and no notion of target speed. The stock cruise is itself a slow speed servo, so a noisy accel signal quantised into 1 mph steps at up to 5 taps/s limit-cycles.Change (Bolt CC fingerprints only)
_bolt_cc_setpoint_buttontargets the planner's speed 2.5 s ahead (actuators.speed, already published by controlsd), low-pass filtered (3 s up / 1.5 s down) and capped at the cruise set speed. Taps need a 0.8 mph difference and wait 1.5 s in steady state. A planned-speed drop > 1 m/s or a decel request ≤ -0.5 m/s² bypasses the filter and taps down every 0.25 s. No taps below the stock 25 mph minimum. Removes the previous reverse-confirm helper.[0, 5, 2].Tests
test_other_cc_only_cars_keep_existing_long_tune(Equinox CC keeps[0, 5, 2]) and the existingtest_non_bolt_cc_redneck_keeps_existing_setpoint_selector(Equinox CC keeps the accel-projection selector).test_non_volt_cc_redneck_spam_stays_on_powertrain_busfixture for the stateful Bolt path.test_gm.py,test_gmcan.py,test_carcontroller.py, 255 tests) pass on a Debian 12 aarch64 host. Ruff 0.13.1 on the changed files reports only two pre-existing E501 lines that this PR does not touch.On-road testing
2023 Chevrolet Bolt EUV without ACC or pedal interceptor, comma 4, mostly highway. Set speed holds still with no lead, taps every several seconds behind a steady lead, and drops quickly when a lead brakes. Reported as a large improvement over the previous behavior.
Note for reviewers
The dead-deadzone finding applies to every CC-only GM car in that tune block (Equinox CC, Trailblazer CC, XT4 CC, Volt CC). This PR deliberately does not change them; they still run the accel-projection selector, and I only tested the Bolt.
🤖 Generated with Claude Code