Skip to content

Commit

Permalink
Toyota: new longitudinal tune improvements (#1554)
Browse files Browse the repository at this point in the history
lower up accel rl and raise permit braking threshold
  • Loading branch information
sshane authored Dec 2, 2024
1 parent 6626f62 commit 6afe699
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions opendbc/car/toyota/carcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

# The up limit allows the brakes/gas to unwind quickly leaving a stop,
# the down limit roughly matches the rate of ACCEL_NET, reducing PCM compensation windup
ACCEL_WINDUP_LIMIT = 6.0 * DT_CTRL * 3 # m/s^2 / frame
ACCEL_WINDUP_LIMIT = 4.0 * DT_CTRL * 3 # m/s^2 / frame
ACCEL_WINDDOWN_LIMIT = -4.0 * DT_CTRL * 3 # m/s^2 / frame

# LKA limits
Expand Down Expand Up @@ -289,9 +289,9 @@ def update(self, CC, CS, now_nanos):
# Along with rate limiting positive jerk above, this greatly improves gas response time
# Consider the net acceleration request that the PCM should be applying (pitch included)
net_acceleration_request_min = min(actuators.accel + accel_due_to_pitch, net_acceleration_request)
if net_acceleration_request_min < 0.1 or stopping or not CC.longActive:
if net_acceleration_request_min < 0.2 or stopping or not CC.longActive:
self.permit_braking = True
elif net_acceleration_request_min > 0.2:
elif net_acceleration_request_min > 0.3:
self.permit_braking = False

pcm_accel_cmd = clip(pcm_accel_cmd, self.params.ACCEL_MIN, self.params.ACCEL_MAX)
Expand Down

0 comments on commit 6afe699

Please sign in to comment.