Skip to content

Commit

Permalink
decently working PID gains
Browse files Browse the repository at this point in the history
  • Loading branch information
mgagvani committed Nov 24, 2023
1 parent 93cba4c commit 641d5ce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 641d5ce

Please sign in to comment.