Skip to content

Commit

Permalink
don't need error rate for now
Browse files Browse the repository at this point in the history
  • Loading branch information
incognitojam committed Sep 9, 2022
1 parent fa75794 commit 9eba294
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions selfdrive/car/ford/carcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ def __init__(self, dbc_name, CP, VM):
self.packer = CANPacker(dbc_name)
self.frame = 0

self.angle_error_last = 0.
self.apply_angle_last = 0
self.main_on_last = False
self.lkas_enabled_last = False
Expand Down Expand Up @@ -78,10 +77,8 @@ def update(self, CC, CS):
angle_error = CS.out.steeringAngleDeg - actuators.steeringAngleDeg

if CC.latActive:
angle_error_rate = angle_error - self.angle_error_last
self.angle_error_last = angle_error
new_steer = actuators.steeringAngleDeg
new_steer += self.pid.update(angle_error, angle_error_rate, CS.out.vEgo, CS.out.steeringPressed)
new_steer += self.pid.update(angle_error, speed=CS.out.vEgo, override=CS.out.steeringPressed)

lca_rq = 1
apply_angle = apply_ford_steer_angle_limits(new_steer, self.apply_angle_last, CS.out.vEgo)
Expand Down

0 comments on commit 9eba294

Please sign in to comment.