mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-14 22:02:09 +08:00
Latcontrol torque: max_torque rename (#24265)
old-commit-hash: 506650bab66ae1d28f76526ffcb73470b755c170
This commit is contained in:
@@ -51,7 +51,7 @@ class CarInterface(CarInterfaceBase):
|
||||
ret.steerRatio = 16.88 # 14.5 is spec end-to-end
|
||||
tire_stiffness_factor = 0.5533
|
||||
ret.mass = 3650. * CV.LB_TO_KG + STD_CARGO_KG # mean between normal and hybrid
|
||||
set_lat_tune(ret.lateralTuning, LatTunes.TORQUE, MAX_TORQUE=2.5, FRICTION=0.06)
|
||||
set_lat_tune(ret.lateralTuning, LatTunes.TORQUE, MAX_LAT_ACCEL=2.5, FRICTION=0.06)
|
||||
|
||||
elif candidate == CAR.COROLLA:
|
||||
ret.wheelbase = 2.70
|
||||
@@ -132,7 +132,7 @@ class CarInterface(CarInterfaceBase):
|
||||
ret.steerRatio = 13.9
|
||||
tire_stiffness_factor = 0.444 # not optimized yet
|
||||
ret.mass = 3060. * CV.LB_TO_KG + STD_CARGO_KG
|
||||
set_lat_tune(ret.lateralTuning, LatTunes.TORQUE, MAX_TORQUE=3.0, FRICTION=0.08)
|
||||
set_lat_tune(ret.lateralTuning, LatTunes.TORQUE, MAX_LAT_ACCEL=3.0, FRICTION=0.08)
|
||||
|
||||
elif candidate in (CAR.LEXUS_ES_TSS2, CAR.LEXUS_ESH_TSS2, CAR.LEXUS_ESH):
|
||||
stop_and_go = True
|
||||
|
||||
@@ -50,13 +50,13 @@ def set_long_tune(tune, name):
|
||||
|
||||
|
||||
###### LAT ######
|
||||
def set_lat_tune(tune, name, MAX_TORQUE=2.5, FRICTION=.1):
|
||||
def set_lat_tune(tune, name, MAX_LAT_ACCEL=2.5, FRICTION=.1):
|
||||
if name == LatTunes.TORQUE:
|
||||
tune.init('torque')
|
||||
tune.torque.useSteeringAngle = True
|
||||
tune.torque.kp = 2.0 / MAX_TORQUE
|
||||
tune.torque.kf = 1.0 / MAX_TORQUE
|
||||
tune.torque.ki = 0.5 / MAX_TORQUE
|
||||
tune.torque.kp = 2.0 / MAX_LAT_ACCEL
|
||||
tune.torque.kf = 1.0 / MAX_LAT_ACCEL
|
||||
tune.torque.ki = 0.5 / MAX_LAT_ACCEL
|
||||
tune.torque.friction = FRICTION
|
||||
elif name == LatTunes.INDI_PRIUS:
|
||||
tune.init('indi')
|
||||
|
||||
Reference in New Issue
Block a user