Skip to content
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

ui: synchronize model frame with camera frame to ensure consistent display #33461

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

deanlee
Copy link
Contributor

@deanlee deanlee commented Sep 4, 2024

This PR synchronizes the camera frame displayed in the UI with the model's output, ensuring visual consistency between the model and camera frames.

Previously, the UI was repainted upon receiving a camera frame, while the model data (modelV2) was updated separately using a timer. This often led to a mismatch.

To address this issue, the timer-based update mechanism has been replaced with a background thread that manages updates. The UI now repaints only upon receiving a modelV2 frame rather than a camera frame.

When offroad (without modelV2 data), the update frequency is set to 10Hz. Once onroad, the update frequency aligns with the modelV2 update rate(20 hz). This ensures that the UI is only updated when modelV2 data is received, allowing the camera view to be accurately rendered based on the synchronized model frame ID.

@github-actions github-actions bot added the ui label Sep 4, 2024
Copy link
Contributor

github-actions bot commented Sep 4, 2024

UI Preview

All Screenshots

@deanlee deanlee force-pushed the ui_scheduling_update branch 3 times, most recently from 18678f3 to 9cee894 Compare September 7, 2024 07:49
@deanlee deanlee marked this pull request as draft September 7, 2024 12:12
@deanlee deanlee force-pushed the ui_scheduling_update branch 2 times, most recently from dd1d3f8 to 85e6252 Compare September 12, 2024 14:09
@deanlee deanlee force-pushed the ui_scheduling_update branch 4 times, most recently from 663c127 to 8de7cb4 Compare September 24, 2024 18:32
@deanlee deanlee force-pushed the ui_scheduling_update branch 2 times, most recently from 7d796b1 to 822febd Compare September 29, 2024 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant