FrogPilot community - Toyota steering hack

Co-Authored-By: Jacob Pfeifer <jacob@pfeifer.dev>
This commit is contained in:
FrogAi 2024-05-29 04:00:23 -07:00
parent 5dbbaf4f6b
commit cd46b333c5

View File

@ -76,6 +76,14 @@ class CarController(CarControllerBase):
# EPS uses the torque sensor angle to control with, offset to compensate # EPS uses the torque sensor angle to control with, offset to compensate
apply_angle = actuators.steeringAngleDeg + CS.out.steeringAngleOffsetDeg apply_angle = actuators.steeringAngleDeg + CS.out.steeringAngleOffsetDeg
# PFEIFER - TSH {{
# 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.last_angle = apply_angle
# }} PFEIFER - TSH
# Angular rate limit based on speed # Angular rate limit based on speed
apply_angle = apply_std_steer_angle_limits(apply_angle, self.last_angle, CS.out.vEgoRaw, self.params) apply_angle = apply_std_steer_angle_limits(apply_angle, self.last_angle, CS.out.vEgoRaw, self.params)