Skip to content

Commit

Permalink
Add half the value to cost
Browse files Browse the repository at this point in the history
  • Loading branch information
arne182 authored Mar 12, 2020
1 parent 3c917f3 commit 16d9690
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion selfdrive/controls/lib/long_mpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 16d9690

Please sign in to comment.