long planner: no reset when starting (#23149)

* long planner: no reset when starting

* let go to 2m/s

* update ref
This commit is contained in:
HaraldSchafer
2021-12-06 23:10:16 -08:00
committed by GitHub
parent f71a03f967
commit 77a99e7d6d
3 changed files with 3 additions and 4 deletions
@@ -255,7 +255,7 @@ class LongitudinalMpc():
self.solver.cost_set(i, 'Zl', Zl)
def set_cur_state(self, v, a):
if abs(self.x0[1] - v) > 1.:
if abs(self.x0[1] - v) > 2.:
self.x0[1] = v
self.x0[2] = a
for i in range(0, N+1):
@@ -68,8 +68,7 @@ class Planner:
force_slow_decel = sm['controlsState'].forceDecel
prev_accel_constraint = True
enabled = (long_control_state == LongCtrlState.pid) or (long_control_state == LongCtrlState.stopping)
if not enabled or sm['carState'].gasPressed:
if long_control_state == LongCtrlState.off or sm['carState'].gasPressed:
self.v_desired = v_ego
self.a_desired = a_ego
# Smoothly changing between accel trajectory is only relevant when OP is driving
+1 -1
View File
@@ -1 +1 @@
7bcb9e414784d5ca8a4338680421023d07ef9e53
a64f5f3d44b2d96c5b555dd91172e5e8d760edb2