FrogPilot community - Ford steering hack

Co-Authored-By: Jacob Pfeifer <jacob@pfeifer.dev>
This commit is contained in:
FrogAi 2024-05-29 03:59:07 -07:00
parent c736387125
commit 3662bd5510

View File

@ -65,6 +65,13 @@ class CarController(CarControllerBase):
if CC.latActive:
# apply rate limits, curvature error limit, and clip to signal range
current_curvature = -CS.out.yawRate / max(CS.out.vEgoRaw, 0.1)
# PFEIFER - FSH {{
# Ignore limits while overriding, this prevents pull when releasing the wheel. This will cause messages to be
# blocked by panda safety, usually while the driver is overriding and limited to at most 1 message while the
# driver is not overriding.
if CS.out.steeringPressed:
self.apply_curvature_last = actuators.curvature
# }} PFEIFER - FSH
apply_curvature = apply_ford_curvature_limits(actuators.curvature, self.apply_curvature_last, current_curvature, CS.out.vEgoRaw)
else:
apply_curvature = 0.