mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-09-29 15:03:43 +08:00
Lateral Planner: Use new variable for useLaneLines
This commit is contained in:
@@ -31,8 +31,7 @@ MODEL_USE_LATERAL_PLANNER = False
|
||||
|
||||
|
||||
class LateralPlanner:
|
||||
def __init__(self, CP, debug=False, use_lanelines=True):
|
||||
self.use_lanelines = use_lanelines
|
||||
def __init__(self, CP, debug=False):
|
||||
self.LP = LanePlanner()
|
||||
self.DH = DesireHelper()
|
||||
|
||||
@@ -253,7 +252,7 @@ class LateralPlanner:
|
||||
lateralPlanDEPRECATED.solverState.u = self.lat_mpc.u_sol.flatten().tolist()
|
||||
|
||||
lateralPlanDEPRECATED.desire = self.DH.desire
|
||||
lateralPlanDEPRECATED.useLaneLines = self.use_lanelines
|
||||
lateralPlanDEPRECATED.useLaneLines = not self.dynamic_lane_profile_status
|
||||
lateralPlanDEPRECATED.laneChangeState = self.DH.lane_change_state
|
||||
lateralPlanDEPRECATED.laneChangeDirection = self.DH.lane_change_direction
|
||||
|
||||
|
||||
@@ -48,13 +48,9 @@ def plannerd_thread():
|
||||
|
||||
debug_mode = bool(int(os.getenv("DEBUG", "0")))
|
||||
|
||||
use_lanelines = False
|
||||
|
||||
cloudlog.event("e2e mode", on=use_lanelines)
|
||||
|
||||
longitudinal_planner = LongitudinalPlanner(CP)
|
||||
# TODO: SP - Reimplement lateral planner with legacy models
|
||||
lateral_planner = LateralPlanner(CP, debug=debug_mode, use_lanelines=use_lanelines) if USE_LATERAL_PLANNER else None
|
||||
lateral_planner = LateralPlanner(CP, debug=debug_mode) if USE_LATERAL_PLANNER else None
|
||||
lateral_planner_svs = ['lateralPlanDEPRECATED', 'lateralPlanSPDEPRECATED'] if USE_LATERAL_PLANNER else []
|
||||
|
||||
pm = messaging.PubMaster(['longitudinalPlan', 'uiPlan', 'longitudinalPlanSP'] + lateral_planner_svs)
|
||||
|
||||
Reference in New Issue
Block a user