From 66df10faaf2419f426a693b78aab33c837ed1940 Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Fri, 2 Feb 2024 01:14:13 -0500 Subject: [PATCH] MSPA: Lat plan deprecation prerequisites (#276) * MSPA: Lat plan deprecation prerequisites * bump cereal --- cereal | 2 +- selfdrive/controls/controlsd.py | 4 ++-- selfdrive/controls/lib/lateral_planner.py | 2 +- selfdrive/modeld/modeld.py | 2 ++ 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cereal b/cereal index e99eb7bdd4..d3d5b06703 160000 --- a/cereal +++ b/cereal @@ -1 +1 @@ -Subproject commit e99eb7bdd41d9bf23fe4353ea5f562bdf83052e8 +Subproject commit d3d5b0670305c8dcb165e7d6a5be8d8af4e4092e diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index e50baa7543..215a1af104 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -81,7 +81,7 @@ class Controls: self.sm = messaging.SubMaster(['deviceState', 'pandaStates', 'peripheralState', 'modelV2', 'liveCalibration', 'driverMonitoringState', 'longitudinalPlan', 'lateralPlan', 'liveLocationKalman', 'managerState', 'liveParameters', 'radarState', 'liveTorqueParameters', - 'testJoystick', 'longitudinalPlanSP', 'lateralPlanSPDEPRECATED'] + self.camera_packets + self.sensor_packets, + 'testJoystick', 'longitudinalPlanSP', 'lateralPlanSPDEPRECATED', 'modelV2SP'] + self.camera_packets + self.sensor_packets, ignore_alive=ignore, ignore_avg_freq=['radarState', 'testJoystick']) if CI is None: @@ -299,7 +299,7 @@ class Controls: lane_change_set_timer = int(self.params.get("AutoLaneChangeTimer", encoding="utf8")) if self.sm['lateralPlan'].laneChangeState == LaneChangeState.preLaneChange: direction = self.sm['lateralPlan'].laneChangeDirection - lc_prev = self.sm['lateralPlanSPDEPRECATED'].laneChangePrev + lc_prev = self.sm['lateralPlanSPDEPRECATED'].laneChangePrevDEPRECATED if (CS.leftBlindspot and direction == LaneChangeDirection.left) or \ (CS.rightBlindspot and direction == LaneChangeDirection.right): self.events.add(EventName.laneChangeBlocked) diff --git a/selfdrive/controls/lib/lateral_planner.py b/selfdrive/controls/lib/lateral_planner.py index 61d2b4561b..ee3cf8decc 100644 --- a/selfdrive/controls/lib/lateral_planner.py +++ b/selfdrive/controls/lib/lateral_planner.py @@ -77,6 +77,6 @@ class LateralPlanner: plan_sp_send.valid = sm.all_checks(service_list=['carState', 'controlsState', 'modelV2']) lateralPlanSPDEPRECATED = plan_sp_send.lateralPlanSPDEPRECATED - lateralPlanSPDEPRECATED.laneChangePrev = self.DH.prev_lane_change + lateralPlanSPDEPRECATED.laneChangePrevDEPRECATED = self.DH.prev_lane_change pm.send('lateralPlanSPDEPRECATED', plan_sp_send) diff --git a/selfdrive/modeld/modeld.py b/selfdrive/modeld/modeld.py index 2b211b22e6..b8388ccdb2 100755 --- a/selfdrive/modeld/modeld.py +++ b/selfdrive/modeld/modeld.py @@ -272,12 +272,14 @@ def main(): if model_output is not None: modelv2_send = messaging.new_message('modelV2') + modelv2_sp_send = messaging.new_message('modelV2SP') posenet_send = messaging.new_message('cameraOdometry') fill_model_msg(modelv2_send, model_output, publish_state, meta_main.frame_id, meta_extra.frame_id, frame_id, frame_drop_ratio, meta_main.timestamp_eof, timestamp_llk, model_execution_time, nav_enabled, live_calib_seen) fill_pose_msg(posenet_send, model_output, meta_main.frame_id, vipc_dropped_frames, meta_main.timestamp_eof, live_calib_seen) pm.send('modelV2', modelv2_send) + pm.send('modelV2SP', modelv2_sp_send) pm.send('cameraOdometry', posenet_send) last_vipc_frame_id = meta_main.frame_id