diff --git a/opendbc/car/car.capnp b/opendbc/car/car.capnp index f64f388f..10f49bc1 100644 --- a/opendbc/car/car.capnp +++ b/opendbc/car/car.capnp @@ -549,15 +549,15 @@ struct CarParams { } struct LateralTorqueTuning { - kp @1 :Float32; - ki @2 :Float32; - kd @8 : Float32; friction @3 :Float32; - kf @4 :Float32; steeringAngleDeadzoneDeg @5 :Float32; latAccelFactor @6 :Float32; latAccelOffset @7 :Float32; useSteeringAngleDEPRECATED @0 :Bool; + kpDEPRECATED @1 :Float32; + kiDEPRECATED @2 :Float32; + kfDEPRECATED @4 :Float32; + kdDEPRECATED @8 : Float32; } struct LongitudinalPIDTuning { @@ -565,7 +565,7 @@ struct CarParams { kpV @1 :List(Float32); kiBP @2 :List(Float32); kiV @3 :List(Float32); - kf @6 :Float32; + kfDEPRECATED @6 :Float32; deadzoneBPDEPRECATED @4 :List(Float32); deadzoneVDEPRECATED @5 :List(Float32); } diff --git a/opendbc/car/interfaces.py b/opendbc/car/interfaces.py index af93dea6..8328062f 100644 --- a/opendbc/car/interfaces.py +++ b/opendbc/car/interfaces.py @@ -210,7 +210,6 @@ class CarInterfaceBase(ABC): ret.stoppingDecelRate = 0.8 # brake_travel/s while trying to stop ret.vEgoStopping = 0.5 ret.vEgoStarting = 0.5 - ret.longitudinalTuning.kf = 1. ret.longitudinalTuning.kpBP = [0.] ret.longitudinalTuning.kpV = [0.] ret.longitudinalTuning.kiBP = [0.] @@ -225,10 +224,6 @@ class CarInterfaceBase(ABC): params = get_torque_params()[candidate] tune.init('torque') - tune.torque.kf = 1.0 - tune.torque.kp = 1.0 - tune.torque.ki = 0.3 - tune.torque.kd = 0.0 tune.torque.friction = params['FRICTION'] tune.torque.latAccelFactor = params['LAT_ACCEL_FACTOR'] tune.torque.latAccelOffset = 0.0 diff --git a/opendbc/car/tests/test_car_interfaces.py b/opendbc/car/tests/test_car_interfaces.py index 63bedf0b..a329ee3b 100644 --- a/opendbc/car/tests/test_car_interfaces.py +++ b/opendbc/car/tests/test_car_interfaces.py @@ -87,7 +87,7 @@ class TestCarInterfaces: assert len(tune.pid.kiV) > 0 and len(tune.pid.kiV) == len(tune.pid.kiBP) elif tune.which() == 'torque': - assert not math.isnan(tune.torque.kf) and tune.torque.kf > 0 + assert not math.isnan(tune.torque.latAccelFactor) and tune.torque.latAccelFactor > 0 assert not math.isnan(tune.torque.friction) and tune.torque.friction > 0 # Run car interface