From f1a3ede920d3e34336fa18ae3c888041d4d9d4f6 Mon Sep 17 00:00:00 2001 From: newstackdevelopment <31353561+newstackdevelopment@users.noreply.github.com> Date: Wed, 20 Jan 2021 08:47:17 -0600 Subject: [PATCH] added allow nudgeless bypass --- selfdrive/controls/lib/pathplanner.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/selfdrive/controls/lib/pathplanner.py b/selfdrive/controls/lib/pathplanner.py index c3f239704e..6240a4e7ea 100644 --- a/selfdrive/controls/lib/pathplanner.py +++ b/selfdrive/controls/lib/pathplanner.py @@ -17,8 +17,9 @@ LaneChangeDirection = log.PathPlan.LaneChangeDirection LOG_MPC = os.environ.get('LOG_MPC', False) -LANE_CHANGE_SPEED_MIN = 45 * CV.MPH_TO_MS +LANE_CHANGE_SPEED_MIN = 45 * CV.MPH_TO_MS #change minimum LANE_CHANGE_TIME_MAX = 10. +LANE_CHANGE_NUDGE_LESS = False DESIRES = { LaneChangeDirection.none: { @@ -131,7 +132,7 @@ class PathPlanner(): elif self.lane_change_state == LaneChangeState.preLaneChange: if not one_blinker or below_lane_change_speed: self.lane_change_state = LaneChangeState.off - elif torque_applied and not blindspot_detected: + elif (torque_applied or LANE_CHANGE_NUDGE_LESS) and not blindspot_detected: self.lane_change_state = LaneChangeState.laneChangeStarting # starting