From e07589d57ada88739932ad62c361c56e5337dce0 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Wed, 11 Aug 2021 22:41:28 -0700 Subject: [PATCH] Revert "higher delay compensation" This reverts commit d8c20ee363c58aff7197a23af8410cce4357cd43. --- SA_RELEASES.md | 2 +- selfdrive/controls/lib/longcontrol.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SA_RELEASES.md b/SA_RELEASES.md index de14ea98a54015..6d8239777bae25 100644 --- a/SA_RELEASES.md +++ b/SA_RELEASES.md @@ -1,7 +1,7 @@ Stock Additions Update 1 - 2021-08-XX (0.8.7) === * Update SA to 0.8.7! - * Variable longitudinal delay compensation by speed + * Variable longitudinal lag by speed Stock Additions Update 3 - 2021-05-03 (0.8.2) === diff --git a/selfdrive/controls/lib/longcontrol.py b/selfdrive/controls/lib/longcontrol.py index 65cba266999a64..896e5565a772e9 100644 --- a/selfdrive/controls/lib/longcontrol.py +++ b/selfdrive/controls/lib/longcontrol.py @@ -83,7 +83,7 @@ def update(self, active, CS, CP, long_plan, extras): # Interp control trajectory # TODO estimate car specific lag, use .5s for now if len(long_plan.speeds) == CONTROL_N: - accel_delay = interp(CS.vEgo, [4.4704, 35.7632], [0.2, 0.4]) # 10 to 80 mph + accel_delay = interp(CS.vEgo, [4.4704, 35.7632], [0.15, 0.3]) # 10 to 80 mph v_target = interp(accel_delay, T_IDXS[:CONTROL_N], long_plan.speeds) v_target_future = long_plan.speeds[-1] a_target = interp(accel_delay, T_IDXS[:CONTROL_N], long_plan.accels)