long planner: no reset when starting (#23149)

* long planner: no reset when starting

* let go to 2m/s

* update ref
old-commit-hash: 77a99e7d6d
commatwo_master
HaraldSchafer 4 years ago committed by GitHub
parent 1ca1d7a673
commit b19b5fdb98
  1. 2
      selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py
  2. 3
      selfdrive/controls/lib/longitudinal_planner.py
  3. 2
      selfdrive/test/process_replay/ref_commit

@ -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 @@
7bcb9e414784d5ca8a4338680421023d07ef9e53
a64f5f3d44b2d96c5b555dd91172e5e8d760edb2
Loading…
Cancel
Save