From a55f8d65cd2328b44380c31d14128a4ebea99a5f Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Thu, 23 Feb 2023 16:18:32 -0800 Subject: [PATCH] Angle control: fix limiting bug (#27428) * fix steer up bug * Update ref_commit old-commit-hash: d5688ae49fd8652bf500ec145f2f3aa711c6bbf3 --- selfdrive/car/__init__.py | 2 +- selfdrive/test/process_replay/ref_commit | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/selfdrive/car/__init__.py b/selfdrive/car/__init__.py index c056f7ca3d..a90f023ed1 100644 --- a/selfdrive/car/__init__.py +++ b/selfdrive/car/__init__.py @@ -115,7 +115,7 @@ def apply_toyota_steer_torque_limits(apply_torque, apply_torque_last, motor_torq def apply_std_steer_angle_limits(apply_angle, apply_angle_last, v_ego, LIMITS): # pick angle rate limits based on wind up/down - steer_up = apply_angle_last * apply_angle > 0. and abs(apply_angle) > abs(apply_angle_last) + steer_up = apply_angle_last * apply_angle >= 0. and abs(apply_angle) > abs(apply_angle_last) rate_limits = LIMITS.ANGLE_RATE_LIMIT_UP if steer_up else LIMITS.ANGLE_RATE_LIMIT_DOWN angle_rate_lim = interp(v_ego, rate_limits.speed_bp, rate_limits.angle_v) diff --git a/selfdrive/test/process_replay/ref_commit b/selfdrive/test/process_replay/ref_commit index 5e7a5c8c0a..9991154b9a 100644 --- a/selfdrive/test/process_replay/ref_commit +++ b/selfdrive/test/process_replay/ref_commit @@ -1 +1 @@ -a38b267bd2d44945dcd664b2a84e6cd0a6163f91 +772f30de36fc7f8421dabb779cc02f45eb83d7bb