From 16d9690b5c4c3a6bb15196d8c0245c2d433f2c62 Mon Sep 17 00:00:00 2001 From: Arne Schwarck Date: Thu, 12 Mar 2020 17:30:53 +0100 Subject: [PATCH] Add half the value to cost --- selfdrive/controls/lib/long_mpc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/controls/lib/long_mpc.py b/selfdrive/controls/lib/long_mpc.py index 6576f4a78c82ea..3597b2e211d097 100644 --- a/selfdrive/controls/lib/long_mpc.py +++ b/selfdrive/controls/lib/long_mpc.py @@ -121,7 +121,7 @@ def change_cost(self, TR, vEgo): cost = 0.1 cost = cost * min(max(1.0 , (6.0 - vEgo)),5.0) if self.TR_Mod > 0: - cost = cost + self.TR_Mod/5.0 + cost = cost + self.TR_Mod/2.0 if self.last_cost != cost: self.libmpc.change_tr(MPC_COST_LONG.TTC, cost, MPC_COST_LONG.ACCELERATION, MPC_COST_LONG.JERK) self.last_cost = cost