Skip to content

Commit

Permalink
df and dg
Browse files Browse the repository at this point in the history
  • Loading branch information
rav4kumar committed Dec 12, 2020
1 parent 33d1941 commit 55396eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions selfdrive/controls/lib/dynamic_follow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def _norm(self, x, name):

def _change_cost(self, libmpc):
TRs = [0.9, 1.8, 2.7]
costs = [1.0, 0.115, 0.05]
costs = [1.0, 0.12, 0.05]
cost = interp(self.TR, TRs, costs)
if self.last_cost != cost:
libmpc.change_tr(MPC_COST_LONG.TTC, cost, MPC_COST_LONG.ACCELERATION, MPC_COST_LONG.JERK)
Expand Down Expand Up @@ -337,4 +337,4 @@ def _get_live_params(self):
self.min_TR, self.dp_dynamic_follow_min_tr_last_modified = param_get_if_updated("dp_dynamic_follow_min_tr", "float", self.min_TR, self.dp_dynamic_follow_min_tr_last_modified)
if self.min_TR != .9:
self.min_TR = clip(self.min_TR, .85, 1.6)
self.last_modified = self.modified
self.last_modified = self.modified
2 changes: 1 addition & 1 deletion selfdrive/controls/lib/dynamic_gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def set_profile(self):
x = [0.0, 1.4082, 2.80311, 4.22661, 5.38271, 6.16561, 7.24781, 8.28308, 10.24465, 12.96402, 15.42303, 18.11903, 20.11703, 24.46614, 29.05805, 32.71015, 35.76326, 40]
if self.dp_profile == DP_ECO:
#km/h[0, 5, 10, 15, 19, 22, 25, 29, 36, 43, 54, 64, 72, 87, 104, 117, 128 144]
y = [0.35587, 0.46747, 0.41816, 0.33261, 0.27844, 0.2718, 0.28184, 0.29106, 0.29785, 0.297, 0.29658, 0.30308, 0.31354, 0.34922, 0.39767, 0.44527, 0.4984]
y = [0.35587, 0.46747, 0.41816, 0.33261, 0.27844, 0.2718, 0.28184, 0.29106, 0.29785, 0.297, 0.29658, 0.30308, 0.31354, 0.34922, 0.39767, 0.40, 0.4284]
self.x_lead_mod_x = [8.1, 12.15, 25.24, 35 , 50 ]
elif self.dp_profile == DP_SPORT:
#km/h[0, 5, 10, 15, 19, 22, 25, 29, 36, 43, 54, 64, 72, 87, 104, 117, 128 144]
Expand Down

0 comments on commit 55396eb

Please sign in to comment.