From 641d5ce7e5929d654e19289ab0ae7b66db79bdde Mon Sep 17 00:00:00 2001 From: Manav Gagvani Date: Fri, 24 Nov 2023 10:29:02 -0500 Subject: [PATCH] decently working PID gains --- telemetry.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/telemetry.py b/telemetry.py index 1ea50e1..5838e90 100644 --- a/telemetry.py +++ b/telemetry.py @@ -58,15 +58,15 @@ class pid_steer_throttle(): MPH_TO_MPS = 0.44704 def __init__(self): - self.SPEED = 20 * self.MPH_TO_MPS # m/s + self.SPEED = 40 * self.MPH_TO_MPS # m/s self.throttle_pid = PID(1, 1, 1, setpoint=self.SPEED) self.throttle_pid.output_limits = (0, 1) self.speed = 0 self.SETPOINT = 0 # center of the road - self.S_KP = 0.5 / 127.0 - self.S_KI = 0.00001 - self.S_KD = 0.25 + self.S_KP = 0.50 / 127.0 + self.S_KI = 0.64 / 127.0 + self.S_KD = 32.0 / 127.0 self.steer_pid = PID(self.S_KP, self.S_KI, self.S_KD, setpoint=self.SETPOINT) self.steer_pid.output_limits = (-1, 1) self.norm_driving_line = 0