From 68d829c7c9e7485f03d64f1f201f8cda137ee9d0 Mon Sep 17 00:00:00 2001 From: Zeph Date: Thu, 10 Sep 2026 14:14:54 -0500 Subject: [PATCH] selfdrived: no localizer alerts from capnp defaults (#38840) selfdrived: don't alert on a message that was never received posenetInvalid, locationdTemporaryError and paramsdTemporaryError are raised off the capnp defaults of deviceMotion and vehicleParameters before either message has ever arrived. When modeld is down, locationd and paramsd never publish, the defaults read as a nan posenet speed, and that NoEntryAlert can hide the process not running alert that names modeld. Same guard as the big model alert in #38500. --- openpilot/selfdrive/selfdrived/selfdrived.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openpilot/selfdrive/selfdrived/selfdrived.py b/openpilot/selfdrive/selfdrived/selfdrived.py index 638448d897..f7636ce427 100755 --- a/openpilot/selfdrive/selfdrived/selfdrived.py +++ b/openpilot/selfdrive/selfdrived/selfdrived.py @@ -398,11 +398,12 @@ class SelfdriveD: self.logged_comm_issue = None if not self.CP.notCar and not big_model_settling: # localization has nothing to work with during the load - if not self.sm['deviceMotion'].posenetOK: + # the defaults of a message that was never received are not a localizer failure + if self.sm.seen['deviceMotion'] and not self.sm['deviceMotion'].posenetOK: self.events.add(EventName.posenetInvalid) - if not self.sm['deviceMotion'].inputsOK: + if self.sm.seen['deviceMotion'] and not self.sm['deviceMotion'].inputsOK: self.events.add(EventName.locationdTemporaryError) - if (not self.sm['vehicleParameters'].valid and cal_status == log.ExtrinsicsCalibration.Status.calibrated and + if (self.sm.seen['vehicleParameters'] and not self.sm['vehicleParameters'].valid and cal_status == log.ExtrinsicsCalibration.Status.calibrated and not TESTING_CLOSET and (not SIMULATION or REPLAY)): self.events.add(EventName.paramsdTemporaryError)