hyundai canfd: bump steer max 270->324 (~+20%), rate_up 2->3, rate_down 3->5
Tucson (and other Hyundai CAN-FD HDA2 cars) get pinned to comma's conservative steer ceiling of 270 in the CAN-FD branch of selfdrive/car/hyundai/values.py and the matching panda safety limit HYUNDAI_CANFD_STEERING_LIMITS. Comma's non-CAN-FD HKG default is 384; PR commaai/openpilot#25723 merged 384 for HDA1 EV6/Ioniq 5 with operator quote "max steer needed to be 384 to make basic turns." Bumping to 324 (~+20%) keeps a safe margin under the proven 384 ceiling while giving enough headroom for moderate clover-style on-ramps without the controller hitting the limit. Rate limits also nudged up (2->3 up, 3->5 down) to match the slightly higher ceiling and reduce ramp time / release lag; chose 5 instead of comma's 7 for delta_down to keep release smoother. max_rt_delta scaled proportionally (112->134) so the 250ms real-time check tracks the new ceiling. Both files MUST stay in lockstep — panda safety enforces independently and would reject larger commands if only one side was bumped. Panda firmware re-flashes automatically on next pandad start because the safety code hash changed. References: https://github.com/commaai/openpilot/pull/25723 (HDA1 270->384) https://github.com/commaai/openpilot/issues/24122 (HKG torque blacklist) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,16 @@
|
|||||||
#include "safety_hyundai_common.h"
|
#include "safety_hyundai_common.h"
|
||||||
|
|
||||||
const SteeringLimits HYUNDAI_CANFD_STEERING_LIMITS = {
|
const SteeringLimits HYUNDAI_CANFD_STEERING_LIMITS = {
|
||||||
.max_steer = 270,
|
// CLEARPILOT: bumped from comma defaults (270/2/3/112) by ~20% so this Tucson HDA2
|
||||||
.max_rt_delta = 112,
|
// can hold modest curvature in place. Mirrors the rate-limit shape comma uses for
|
||||||
|
// its non-CAN-FD high-torque HKG default (384/3/7). Must stay in lockstep with
|
||||||
|
// STEER_MAX in selfdrive/car/hyundai/values.py — panda enforces independently and
|
||||||
|
// will reject larger commands if openpilot's value exceeds this.
|
||||||
|
.max_steer = 324,
|
||||||
|
.max_rt_delta = 134,
|
||||||
.max_rt_interval = 250000,
|
.max_rt_interval = 250000,
|
||||||
.max_rate_up = 2,
|
.max_rate_up = 3,
|
||||||
.max_rate_down = 3,
|
.max_rate_down = 5,
|
||||||
.driver_torque_allowance = 250,
|
.driver_torque_allowance = 250,
|
||||||
.driver_torque_factor = 2,
|
.driver_torque_factor = 2,
|
||||||
.type = TorqueDriverLimited,
|
.type = TorqueDriverLimited,
|
||||||
|
|||||||
@@ -27,12 +27,14 @@ class CarControllerParams:
|
|||||||
self.STEER_STEP = 1 # 100 Hz
|
self.STEER_STEP = 1 # 100 Hz
|
||||||
|
|
||||||
if CP.carFingerprint in CANFD_CAR:
|
if CP.carFingerprint in CANFD_CAR:
|
||||||
self.STEER_MAX = 270
|
# CLEARPILOT: bumped from comma defaults (270/2/3) by ~20% — must stay in
|
||||||
|
# lockstep with HYUNDAI_CANFD_STEERING_LIMITS in panda/board/safety/safety_hyundai_canfd.h.
|
||||||
|
self.STEER_MAX = 324
|
||||||
self.STEER_DRIVER_ALLOWANCE = 250
|
self.STEER_DRIVER_ALLOWANCE = 250
|
||||||
self.STEER_DRIVER_MULTIPLIER = 2
|
self.STEER_DRIVER_MULTIPLIER = 2
|
||||||
self.STEER_THRESHOLD = 250
|
self.STEER_THRESHOLD = 250
|
||||||
self.STEER_DELTA_UP = 2
|
self.STEER_DELTA_UP = 3
|
||||||
self.STEER_DELTA_DOWN = 3
|
self.STEER_DELTA_DOWN = 5
|
||||||
|
|
||||||
# To determine the limit for your car, find the maximum value that the stock LKAS will request.
|
# To determine the limit for your car, find the maximum value that the stock LKAS will request.
|
||||||
# If the max stock LKAS request is <384, add your car to this list.
|
# If the max stock LKAS request is <384, add your car to this list.
|
||||||
|
|||||||
Reference in New Issue
Block a user