Skip to content

Commit

Permalink
fixed latcontrol reset damp values
Browse files Browse the repository at this point in the history
  • Loading branch information
Gernby committed Mar 24, 2019
1 parent a07ac15 commit 463c80b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions selfdrive/controls/lib/latcontrol.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ def update(self, active, v_ego, angle_steers, angle_rate, steer_override, CP, VM
if v_ego < 0.3 or not active:
output_steer = 0.0
self.pid.reset()
self.dampened_angle_steers = angle_steers
self.dampened_desired_angle = angle_steers
else:
projected_desired_angle = interp(sec_since_boot() + self.desired_projection, path_plan.mpcTimes, path_plan.mpcAngles)
self.dampened_desired_angle = (((self.desired_smoothing - 1.) * self.dampened_desired_angle) + projected_desired_angle) / self.desired_smoothing
Expand Down

0 comments on commit 463c80b

Please sign in to comment.