Skip to content

messaging: cleanup zero-frequency service initialization #35145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 9, 2025

Conversation

jyoung8607
Copy link
Collaborator

@jyoung8607 jyoung8607 commented May 7, 2025

Fix a bug wherein zero-frequency (on-demand only) services wouldn't go alive in the simulator without having seen at least one message, and make their initial state valid.

Copy link
Contributor

@TheSecurityDev TheSecurityDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make #34920 (and other zero-frequency services) work, you need to change:

self.valid[s] = False

To:

self.valid[s] = SERVICE_LIST[s].frequency <= 1e-5 # Default to valid for zero frequency services

@jyoung8607 jyoung8607 changed the title messaging: fix bug with relaxed checks under simulation messaging: cleanup zero-frequency service initialization May 9, 2025
@jyoung8607 jyoung8607 requested a review from TheSecurityDev May 9, 2025 18:45
@jyoung8607
Copy link
Collaborator Author

Did some more cleanup. @TheSecurityDev, if you can verify this works for you in the sim, I'll merge it.

@TheSecurityDev
Copy link
Contributor

TheSecurityDev commented May 9, 2025

Did some more cleanup. @TheSecurityDev, if you can verify this works for you in the sim, I'll merge it.

Unfortunately it doesn't work, but with a different issue:

Failed to retrieve initial values: Car model mismatch
logcatd proclogd modeld ui soundd locationd calibrationd torqued controlsd selfdrived card deleter paramsd lagd plannerd radard hardwared statsd
Failed to retrieve initial lag: Car model mismatch
{"event": "selfdrived.initialized", "dt": 0.0, "timeout": false, "canValid": true, "invalid": ["pandaStates", "modelV2", "liveCalibration", "carOutput", "longitudinalPlan", "livePose", "liveDelay", "liveParameters", "radarState", "liveTorqueParameters", "controlsState", "carControl", "driverAssistance", "alertDebug", "driverCameraState", "wideRoadCameraState", "gpsLocation"], "not_alive": ["pandaStates", "modelV2", "liveCalibration", "longitudinalPlan", "livePose", "liveDelay", "liveParameters", "radarState", "liveTorqueParameters", "driverAssistance", "alertDebug", "driverCameraState", "wideRoadCameraState", "gpsLocation"], "not_freq_ok": [], "error": true}

I don't understand why the simulator test didn't catch that though.

Update: It seems to be working now, not sure what happened there.

@TheSecurityDev
Copy link
Contributor

Did some more cleanup. @TheSecurityDev, if you can verify this works for you in the sim, I'll merge it.

Hmmm, okay nevermind, it seems to be working now. I'm not sure what happened there.

@jyoung8607 jyoung8607 marked this pull request as ready for review May 9, 2025 19:13
@jyoung8607 jyoung8607 dismissed TheSecurityDev’s stale review May 9, 2025 19:13

Fixed a different way

@jyoung8607 jyoung8607 merged commit 1f312e1 into master May 9, 2025
17 checks passed
@jyoung8607 jyoung8607 deleted the sim-messaging-fix branch May 9, 2025 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants