|
|
@ -25,7 +25,7 @@ LOW_SPEED_Y = [15, 13, 10, 5] |
|
|
|
class LatControlTorque(LatControl): |
|
|
|
class LatControlTorque(LatControl): |
|
|
|
def __init__(self, CP, CI): |
|
|
|
def __init__(self, CP, CI): |
|
|
|
super().__init__(CP, CI) |
|
|
|
super().__init__(CP, CI) |
|
|
|
self.torque_params = CP.lateralTuning.torque |
|
|
|
self.torque_params = CP.lateralTuning.torque.as_builder() |
|
|
|
self.pid = PIDController(self.torque_params.kp, self.torque_params.ki, |
|
|
|
self.pid = PIDController(self.torque_params.kp, self.torque_params.ki, |
|
|
|
k_f=self.torque_params.kf, pos_limit=self.steer_max, neg_limit=-self.steer_max) |
|
|
|
k_f=self.torque_params.kf, pos_limit=self.steer_max, neg_limit=-self.steer_max) |
|
|
|
self.torque_from_lateral_accel = CI.torque_from_lateral_accel() |
|
|
|
self.torque_from_lateral_accel = CI.torque_from_lateral_accel() |
|
|
|