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

HKG fingerprinting: add matches from platform codes #26939

Closed
wants to merge 153 commits into from
Closed

Conversation

sshane
Copy link
Contributor

@sshane sshane commented Jan 13, 2023

Still a draft. There are some cars that use the same platform codes, but are fundamentally different as far as openpilot is concerned. One big example are the older Ioniqs; some have radars, some use FCA or SCC for AEB, some are legacy, some send the LFA message, some support different torques, etc.

For these cars, we just ignore the multiple matches. @adeebshihadeh I am thinking we can track the cars we won't support with this fuzzy fingerprinting and work to combine the platforms over time (with good detection for the different features)

All Hyundai:

HYUNDAI IONIQ HYBRID 2017-2019      : radar: {b'AEhe'}, camera: {b'AEH'}
HYUNDAI IONIQ PLUG-IN HYBRID 2019   : radar: {b'AEhe'}, camera: {b'AEP'}
HYUNDAI IONIQ PHEV 2020             : radar: {b'AEhe'}, camera: {b'AEP'}
HYUNDAI IONIQ ELECTRIC 2020         : radar: {b'AEev'}, camera: {b'AEE'}
HYUNDAI IONIQ ELECTRIC LIMITED 2019 : radar: {b'AEev'}, camera: {b'AEE'}
HYUNDAI IONIQ HYBRID 2020-2022      : radar: {b'AEhe'}, camera: {b'AEH'}
HYUNDAI SONATA 2020                 : radar: {b'DN89', b'DN8'}, camera: {b'DN8'}
HYUNDAI SONATA 2019                 : radar: {b'LF'}, camera: {b'LFF'}
HYUNDAI TUCSON 2019                 : radar: {b'TL'}, camera: {b'TL'}
HYUNDAI SANTA FE 2019               : radar: {b'TM'}, camera: {b'TM'}
HYUNDAI SANTA FE 2022               : radar: {b'TM'}, camera: {b'TMA', b'TM'}
HYUNDAI SANTA FE HYBRID 2022        : radar: {b'TMhe'}, camera: {b'TMH'}
HYUNDAI SANTA FE PlUG-IN HYBRID 2022: radar: {b'TMhe'}, camera: {b'TMP'}
KIA STINGER GT2 2018                : radar: {b'CK'}, camera: {b'CK'}
KIA STINGER 2022                    : radar: {b'CK'}, camera: {b'CK'}
HYUNDAI PALISADE 2020               : radar: {b'ON', b'LX2'}, camera: {b'ON', b'LX2'}
HYUNDAI VELOSTER 2019               : radar: {b'JS'}, camera: {b'JS'}
GENESIS G70 2018                    : radar: {b'IK'}, camera: {b'IK'}
GENESIS G70 2020                    : radar: {b'IK'}, camera: {b'IK'}
GENESIS G90 2017                    : radar: {b'HI'}, camera: {b'HI'}
HYUNDAI KONA 2020                   : radar: {b'OS'}, camera: {b'OS9'}
KIA CEED INTRO ED 2019              : radar: {b'CD'}, camera: {b'CD'}
KIA FORTE E 2018 & GT 2021          : radar: {b'BD'}, camera: {b'BD'}
KIA K5 2021                         : radar: {b'DL3'}, camera: {b'DL3'}
HYUNDAI KONA ELECTRIC 2019          : radar: {b'OSev'}, camera: {b'OSE', b'OE2'}
HYUNDAI KONA ELECTRIC 2022          : radar: {b'YB'}, camera: {b'OSP'}
KIA NIRO EV 2020                    : radar: {b'DEev'}, camera: {b'DEE'}
KIA NIRO HYBRID 2019                : radar: {b'DEhe'}, camera: {b'DEP'}
KIA NIRO HYBRID 2021                : radar: {b'DEhe'}, camera: {b'DEH'}
KIA SELTOS 2021                     : radar: {b'SP2'}, camera: {b'SP2'}
KIA OPTIMA 4TH GEN                  : radar: {b'JF'}, camera: {b'JFWG'}
KIA OPTIMA 4TH GEN FACELIFT         : radar: {b'JF'}, camera: {b'JFA'}
HYUNDAI ELANTRA 2017                : radar: {b'PD'}, camera: {b'PD'}
HYUNDAI ELANTRA 2021                : radar: {b'CN7'}, camera: {b'CN7'}
HYUNDAI ELANTRA HYBRID 2021         : radar: {b'CNhe'}, camera: {b'CN7H'}
HYUNDAI KONA HYBRID 2020            : radar: {b'OShe'}, camera: {b'OSH'}
HYUNDAI SONATA HYBRID 2021          : radar: {b'DNhe'}, camera: {b'DN8H'}
KIA SORENTO GT LINE 2018            : radar: {b'UM'}, camera: {b'UMP'}
KIA SORENTO PLUG-IN HYBRID 4TH GEN  : radar: {b'MQhe'}, camera: {b'MQ4H'}
KIA EV6 2022                        : radar: {b'CV1'}, camera: {b'CV1'}
HYUNDAI IONIQ 5 2022                : radar: {b'NE1'}, camera: {b'NE1'}
HYUNDAI TUCSON 4TH GEN              : radar: {b'NX4'}, camera: {b'NX4'}
HYUNDAI TUCSON HYBRID 4TH GEN       : radar: {b'NX4'}, camera: {b'NX4'}
KIA SPORTAGE HYBRID 5TH GEN         : radar: {b'NQ5'}, camera: {b'NQ5'}
HYUNDAI SANTA CRUZ 1ST GEN          : radar: {b'NX4'}, camera: {b'NX4'}
KIA SPORTAGE 5TH GEN                : radar: {b'NQ5'}, camera: {b'NQ5'}
GENESIS GV70 1ST GEN                : radar: {b'JK1'}, camera: {b'JK1'}
GENESIS GV60 ELECTRIC 1ST GEN       : radar: {b'JW1'}, camera: {b'JW1'}
KIA SORENTO 4TH GEN                 : radar: {b'MQ4'}, camera: {b'MQ4'}

You can see the two platform codes in the Palisade's versions since we include the Telluride too (ON).

@sshane
Copy link
Contributor Author

sshane commented Jan 13, 2023

  • clean up
  • good unit tests
  • make the make-specific fp function generic and simple to use

using fleet data:

  • check if new fuzzy FP misses any routes that old fuzzy FP got right
  • check for false positives
  • check no exceptions on random FW versions from car (datetime.strptime will throw an error)

@sshane
Copy link
Contributor Author

sshane commented Jun 9, 2023

Decided to revert the revert and just add matches with platform codes. Requiring two ECUs, matching independently with platform codes and exact versions, etc. is just masking the missing ECU problem which should be handled separately and explicitly -- this PR is already doing a lot.

@sshane sshane changed the title HKG: reliable fuzzy fingerprinting HKG fingerprinting: add matches from platform codes Jun 10, 2023
Revert "fix"

This reverts commit 5cdb7bd.

Revert "check all possible ecus exist, only platform codes, slightly refactor main loop"

This reverts commit d3e918f.

Revert "copy existing fuzzy func"

This reverts commit 34c8c05.

Revert "different method first draft"

This reverts commit b911390.
@sshane sshane marked this pull request as draft June 14, 2023 03:23
@sshane
Copy link
Contributor Author

sshane commented Jun 14, 2023

replaced with #28531

@sshane sshane closed this Jun 14, 2023
@sshane sshane deleted the hkg-fuzzy branch June 14, 2023 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant