Skip to content

Commit

Permalink
longitudinal mpc: weigh a_change in 1 place only
Browse files Browse the repository at this point in the history
  • Loading branch information
FreyJo committed Feb 24, 2022
1 parent 95c5c89 commit 68bf992
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
V_EGO_COST = 0.
A_EGO_COST = 0.
J_EGO_COST = 5.0
A_CHANGE_COST = .5
A_CHANGE_COST = 200.
DANGER_ZONE_COST = 100.
CRASH_DISTANCE = .5
LIMIT_COST = 1e6
Expand Down Expand Up @@ -136,7 +136,7 @@ def gen_long_mpc_solver():
x_ego,
v_ego,
a_ego,
20*(a_ego - prev_a),
a_ego - prev_a,
j_ego]
ocp.model.cost_y_expr = vertcat(*costs)
ocp.model.cost_y_expr_e = vertcat(*costs[:-1])
Expand Down

0 comments on commit 68bf992

Please sign in to comment.