|
|
@ -115,6 +115,7 @@ class Controls: |
|
|
|
steer_angle_without_offset = math.radians(CS.steeringAngleDeg - lp.angleOffsetDeg) |
|
|
|
steer_angle_without_offset = math.radians(CS.steeringAngleDeg - lp.angleOffsetDeg) |
|
|
|
self.curvature = -self.VM.calc_curvature(steer_angle_without_offset, CS.vEgo, lp.roll) |
|
|
|
self.curvature = -self.VM.calc_curvature(steer_angle_without_offset, CS.vEgo, lp.roll) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Reset desired curvature to current to avoid violating the limits on engage |
|
|
|
if CC.latActive: |
|
|
|
if CC.latActive: |
|
|
|
self.desired_curvature, curvature_limited = clip_curvature(CS.vEgo, self.desired_curvature, model_v2.action.desiredCurvature, lp.roll) |
|
|
|
self.desired_curvature, curvature_limited = clip_curvature(CS.vEgo, self.desired_curvature, model_v2.action.desiredCurvature, lp.roll) |
|
|
|
else: |
|
|
|
else: |
|
|
|