mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-07 22:52:06 +08:00
Update Lateral
This commit is contained in:
@@ -417,10 +417,10 @@ class CarInterface(CarInterfaceBase):
|
||||
CAR.CHEVROLET_BOLT_ACC_2022_2023,
|
||||
CAR.CHEVROLET_BOLT_ACC_2022_2023_PEDAL,
|
||||
CAR.CHEVROLET_BOLT_CC_2022_2023):
|
||||
# Apply 2019-style negative FF and Ki-mult tweaks to 2019-2021 and 2022 variants.
|
||||
# Apply 2019+/2022 generation-specific FF and Ki/Kd tweaks.
|
||||
ret.lateralTuning.torque.ki *= 1.07
|
||||
ret.lateralTuning.torque.kd *= 0.93
|
||||
ret.lateralTuning.torque.kfDEPRECATED *= 1.20
|
||||
ret.lateralTuning.torque.kfDEPRECATED *= 0.75
|
||||
|
||||
if candidate == CAR.CHEVROLET_BOLT_CC_2017:
|
||||
ret.lateralTuning.torque.kp *= 1.0
|
||||
|
||||
@@ -37,12 +37,12 @@ EventName = car.CarEvent.EventName
|
||||
MAX_CTRL_SPEED = (V_CRUISE_MAX + 4) * CV.KPH_TO_MS
|
||||
ACCEL_MAX = 2.0
|
||||
ACCEL_MIN = -3.5
|
||||
FRICTION_THRESHOLD = 0.12
|
||||
FRICTION_THRESHOLD = 0.16
|
||||
|
||||
def get_friction_threshold(v_ego):
|
||||
# Interpolate friction threshold
|
||||
from openpilot.common.numpy_fast import interp
|
||||
return interp(v_ego, [1 * CV.MPH_TO_MS, 75 * CV.MPH_TO_MS], [0.12, 0.3])
|
||||
return interp(v_ego, [1 * CV.MPH_TO_MS, 20 * CV.MPH_TO_MS, 75 * CV.MPH_TO_MS], [0.16, 0.19, 0.27])
|
||||
|
||||
TORQUE_PARAMS_PATH = os.path.join(BASEDIR, 'selfdrive/car/torque_data/params.toml')
|
||||
TORQUE_OVERRIDE_PATH = os.path.join(BASEDIR, 'selfdrive/car/torque_data/override.toml')
|
||||
|
||||
Reference in New Issue
Block a user