-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fixup ford radar #1408
Fixup ford radar #1408
Conversation
opendbc/car/ford/radar_interface.py
Outdated
@@ -68,6 +71,10 @@ def update(self, can_strings): | |||
self._update_delphi_esr() | |||
elif self.radar == RADAR.DELPHI_MRR: | |||
self._update_delphi_mrr() | |||
print('pts', len(self.pts), self.rcp.vl['MRR_Header_InformationDetections']['CAN_NUMBER_OF_DET']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CAN_NUMBER_OF_DET
was always lower by 3-6 times from our number of points, now they match exactly!
It was originally thought that CAN_SCAN_INDEX_2LSB_xx
was a sort of multiplexing signal, but it makes more sense that along with the header message it's used to ensure that the latest updates are kept up to sync.
Will have to look into the flickering that was noticed in the original PR (commaai/openpilot#24296) though, perhaps some more robust track switching logic is needed, or maybe it's not a problem since Harald added it after the original PR.
opendbc/car/ford/radar_interface.py
Outdated
if self.trigger_msg not in self.updated_messages: | ||
# print('updated_messages:', self.updated_messages) | ||
# if self.trigger_msg not in self.updated_messages: | ||
if 368 not in self.updated_messages: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All track message's LSB scan index signals always match the header counter's 2 LSB when waiting for it now, before it would usually have a few messages that mismatched every cycle (so we should have waited a bit longer for the header message to have the most up to date detection/track messages)
I colored scan indexes of 0 and 2 as green, and 1 and 3 as purple. They're grouped into close range tracks and far away/less accurate tracks.
ford-radar-sorted-by-scan-index.mp4This is very clearly seen here: |
I then filtered for only ford-radar-only-super-res.mp4 |
mostly in |
MRR_Header_InformationDetections->CAN_NUMBER_OF_DET
exactly matches our parsed points usingCAN_DET_VALID_LEVEL_xx
when assuming the scan index signal is a sync signalCAN_SCAN_INDEX_2LSB_xx
signal matches the header's when triggered on the header message