Skip to content

Commit

Permalink
vEgoStopping needs to be less than or equal to vEgoStarting to avoid …
Browse files Browse the repository at this point in the history
…state oscillation
  • Loading branch information
sshane committed Nov 24, 2021
1 parent 4fad454 commit 5fbdbc1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions selfdrive/controls/lib/longcontrol.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

LongCtrlState = car.CarControl.Actuators.LongControlState

STOPPING_TARGET_SPEED = 0.31

# As per ISO 15622:2018 for all speeds
ACCEL_MIN_ISO = -3.5 # m/s^2
ACCEL_MAX_ISO = 2.0 # m/s^2
Expand All @@ -19,7 +17,7 @@ def long_control_state_trans(CP, active, long_control_state, v_ego, v_target_fut
"""Update longitudinal control state machine"""
stopping_condition = (v_ego < 2.0 and cruise_standstill) or \
(v_ego < CP.vEgoStopping and
(v_target_future < STOPPING_TARGET_SPEED or brake_pressed))
(v_target_future < CP.vEgoStopping or brake_pressed))

starting_condition = v_target_future > CP.vEgoStarting and not cruise_standstill

Expand Down

0 comments on commit 5fbdbc1

Please sign in to comment.