commaai / openpilot

openpilot is an open source driver assistance system. openpilot performs the functions of Automated Lane Centering and Adaptive Cruise Control for 250+ supported car makes and models.
https://comma.ai/
MIT License
48.64k stars 8.81k forks source link

Hyundai: detect lateral API #32525

Open sshane opened 1 month ago

sshane commented 1 month ago

A lot of newer Hyundai vehicles we have yet to merge are blocked on different lateral control behavior, a mostly complete list is here: https://github.com/commaai/openpilot/discussions/30810

We should find a way to detect when the API is different and how. For the cars above, the main two differences we care about are achieving significantly more or less lateral acceleration when applying the same torque.

To prevent fingerprinting on these new vehicles and giving our users a bad experience, our fuzzy fingerprinting function checks that we've seen the camera part number and build/flash date in the FW. This, however, stops a lot of new cars from fingerprinting when the API has not changed, as we don't know if anything has changed when one of these values gets bumped.

For example, the 2024 EV6 is the same as previous models with a new part number: https://github.com/commaai/openpilot/pull/32524 However the 2024 Kia Sorento Hybrid acheives significantly less lateral acceleration (less than half) and the only thing that was bumped was the date in the FW by a few months (which I suspect is either part build date, FW build date, or flash date).

estiens commented 1 month ago

2024 Ioniq 5 (HDA2) seems to have different wiring harness, not sure if different behavior

sshane commented 1 month ago

Ioniq 5 N or Ioniq 5?

mscbuck commented 1 month ago

2024 Ioniq 5 (HDA2) seems to have different wiring harness, not sure if different behavior

I have used the 2022-2023 I5 Q harness just fine with SunnyPilot on my 24 I5 Limited, but yes, it does fingerprint as a 2022 and not sure if there really are any model differences that would affect the torque/lat control. I think there is a 2024 "PE" version that is slightly different.