Skip to content

GM Bolt CC-only: drive stock set speed from planned speed, not PID accel - #161

Open
OVR92 wants to merge 1 commit into
firestar5683:Domfrom
OVR92:bolt-cc-setpoint
Open

OVR92 wants to merge 1 commit into
firestar5683:Domfrom
OVR92:bolt-cc-setpoint

Conversation

@OVR92

@OVR92 OVR92 commented Sep 16, 2026

Copy link
Copy Markdown

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:

  1. The CC-only longitudinal tune (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 legacy update_old_long path). On the accel loop, kp = 5 turns ±0.1 m/s² of aEgo ripple into ±0.5 m/s² of command.
  2. create_gm_cc_spam_command projected 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)

  • gmcan: _bolt_cc_setpoint_button targets 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.
  • interface: Bolt CC kp 5 → 0.5 so the accel command tracks the planner. Other CC-only cars keep [0, 5, 2].
  • carcontroller: passes the HUD set speed into the spam logic and clears 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

  • New: set speed holds with no lead; cruise speed caps the set speed; small target changes are filtered; sudden planned-speed drops bypass the filter and tap fast; rising targets are slower than falling; no taps below the stock minimum; cancel when far below engage speed; spam command respects the tap interval.
  • Boundary: test_other_cc_only_cars_keep_existing_long_tune (Equinox CC keeps [0, 5, 2]) and the existing test_non_bolt_cc_redneck_keeps_existing_setpoint_selector (Equinox CC keeps the accel-projection selector).
  • Updated test_non_volt_cc_redneck_spam_stays_on_powertrain_bus fixture for the stateful Bolt path.
  • Run: the GM test modules (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

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>
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