Controls - Lane Change Customizations - Minimum Lane Change Speed
Customize the minimum driving speed to allow openpilot to change lanes.
This commit is contained in:
parent
16bc06cb98
commit
2e90b94ee6
@ -5,7 +5,6 @@ from openpilot.common.realtime import DT_MDL
|
||||
LaneChangeState = log.LaneChangeState
|
||||
LaneChangeDirection = log.LaneChangeDirection
|
||||
|
||||
LANE_CHANGE_SPEED_MIN = 20 * CV.MPH_TO_MS
|
||||
LANE_CHANGE_TIME_MAX = 10.
|
||||
|
||||
DESIRES = {
|
||||
@ -43,7 +42,7 @@ class DesireHelper:
|
||||
def update(self, carstate, lateral_active, lane_change_prob, frogpilotPlan, frogpilot_toggles):
|
||||
v_ego = carstate.vEgo
|
||||
one_blinker = carstate.leftBlinker != carstate.rightBlinker
|
||||
below_lane_change_speed = v_ego < LANE_CHANGE_SPEED_MIN
|
||||
below_lane_change_speed = v_ego < frogpilot_toggles.minimum_lane_change_speed
|
||||
|
||||
if not lateral_active or self.lane_change_timer > LANE_CHANGE_TIME_MAX:
|
||||
self.lane_change_state = LaneChangeState.off
|
||||
|
Loading…
x
Reference in New Issue
Block a user