mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-25 16:02:14 +08:00
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:
@@ -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
|
||||
Reference in New Issue
Block a user