Skip to content

Commit

Permalink
Relative velocity and not additive
Browse files Browse the repository at this point in the history
  • Loading branch information
arne182 authored Nov 9, 2019
1 parent c2461c4 commit d5d9f9a
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 smooth_follow(self): # in m/s
if self.v_lead is not None: # since the new mpc now handles braking nicely, simplify mods
x = [0, 0.61, 1.26, 2.1, 2.68] # relative velocity values
y = [0, -0.017, -0.053, -0.154, -0.272] # modification values
TR_mod = interp(self.v_lead + self.v_ego, x, y) # quicker acceleration/don't brake when lead is overtaking
TR_mod = interp(self.v_lead - self.v_ego, x, y) # quicker acceleration/don't brake when lead is overtaking

'''x = [-1.49, -1.1, -0.67, 0.0, 0.67, 1.1, 1.49]
y = [0.056, 0.032, 0.016, 0.0, -0.016, -0.032, -0.056]
Expand Down

0 comments on commit d5d9f9a

Please sign in to comment.