mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 20:03:53 +08:00
Latcontrol torque: fix integrator induced ping pong (#24458)
* Latcontrol torque: fix integrator induced ping pong * Reset on disengage since unwind resets anywayh * Might be overkill * rm whitespace * update ref
This commit is contained in:
@@ -56,7 +56,7 @@ def set_lat_tune(tune, name, MAX_LAT_ACCEL=2.5, FRICTION=.1):
|
||||
tune.torque.useSteeringAngle = True
|
||||
tune.torque.kp = 1.0 / MAX_LAT_ACCEL
|
||||
tune.torque.kf = 1.0 / MAX_LAT_ACCEL
|
||||
tune.torque.ki = 0.25 / MAX_LAT_ACCEL
|
||||
tune.torque.ki = 0.1 / MAX_LAT_ACCEL
|
||||
tune.torque.friction = FRICTION
|
||||
elif name == LatTunes.INDI_PRIUS:
|
||||
tune.init('indi')
|
||||
|
||||
@@ -42,7 +42,8 @@ class LatControlTorque(LatControl):
|
||||
if CS.vEgo < MIN_STEER_SPEED or not active:
|
||||
output_torque = 0.0
|
||||
pid_log.active = False
|
||||
self.pid.reset()
|
||||
if not active:
|
||||
self.pid.reset()
|
||||
else:
|
||||
if self.use_steering_angle:
|
||||
actual_curvature = -VM.calc_curvature(math.radians(CS.steeringAngleDeg - params.angleOffsetDeg), CS.vEgo, params.roll)
|
||||
|
||||
@@ -1 +1 @@
|
||||
70d79fbcc2b9ab0af867a7d6f138b58bcaaa3aa8
|
||||
10b766fa845934f0258c52cdf2103d0e1a9496c9
|
||||
Reference in New Issue
Block a user