Car Port: Kia Carnival 2025 {HEV,ICE} {HDA1,HDA2}
Checklist
- [X] added entry to CAR in selfdrive/car/*/values.py and ran
selfdrive/car/docs.pyto generate new docs - [X] test route added to routes.py
- [X] route with openpilot:
- HEV:
6c0069dcd5bbb6c1/00000020--6b95507969 - ICE:
481f55600340bebb/00000095--49fb7431a0
- HEV:
- [X] route with stock system:
- HEV:
6c0069dcd5bbb6c1/00000021--e6c25dde2d - ICE:
f1a99071580b5733/00000007--260128fdab
- HEV:
- [X] car harness used (if comma doesn't sell it, put N/A):
- HDA1: Hyundai K
- HDA2: Hyundai Q
Dependencies:
- https://github.com/commaai/opendbc/pull/1671
Changes:
- Adds new car
KIA_CARNIVAL_HEV_4TH_GEN. This is the first year the Carnival is available as a hybrid. - Adds new car
KIA_CARNIVAL_2025. While it's ostensibly "4th gen", it's very different from previous 4th gen Carnivals. In terms of static flags alone, it doesn't have RADAR_SCC, has ccNC, and gets incorrectly dynamically flagged HYBRID. - Adds support for ALT_BUTTONS with HDA2. Otherwise, the following error is logged continuously and can never becomes valid:
"filename": "opendbc_repo/opendbc/can/parser.cc", "funcname": "UpdateValid", "levelnum": 40, "lineno": ' '230, "msg": "0x1CF \'CRUISE_BUTTONS\' NOT SEEN"}', - Adds support for cruise resume from standstill with ALT_BUTTONS.
- This is needed for some other ccNC models as well.
- Adds support for lane change detection with ALT_LAMPS.
- This is needed for some other ccNC models as well.
- Adds support for ICE vehicles with all-zero messages on the hybrid accel address. This includes: i. Adds a static ICE flag to prevent incorrect dynamic detection as HYBRID. Alternative considered: We could check if not 0x100 in fingerprint[CAN.ECAN]. That passed testing on all routes, but explicit configuration is much easier to maintain (case in point). ii. Changes safety RX check config to add only the relevant accelerator check (rather than all 3 (GAS, HYBRID, EV)).
- Adds support for HDA2 long on ccNC models by populating new requisite messages (MSG_161, MSG_162).
- Refactors the safety code and tests in order to support the many combinations of HKG flags. See the commit message for further details and alternatives considered.
TODO (before final review, but there's a lot I'd like to get an initial review on before dotting I's and crossing T's):
- Shave down changes to hyundaicanfd.py to absolute minimum and not modify existing behavior.
- Trigger rx check invalid flag (see TODO in the refactor).
Parent PR: https://github.com/commaai/openpilot/pull/34662
This PR is a duplicate of https://github.com/commaai/opendbc/pull/1558.
This PR is a duplicate of #1558.
Sure, the titles are similar but the content is very different. #1558 appears to be a stale draft with fingerprints only. This PR has fixes, routes, and has been verified to work.
Disclaimer: While I have the ability to merge one of these PRs, I don't set bounty policy or make bounty decisions.
@ccdunder: Welcome to opendbc and openpilot! We like having new contributors. That said, if you're aware there are other potentially duplicate PRs, it's good practice to explicitly mention them and explain why it's necessary to file a separate one. I wouldn't really call that other PR stale, conversations and testing are clearly in progress.
@sunnyhaibin: Haven't reviewed these in depth, but there are definitely differences between these PRs, starting with the existence of Panda changes in this one. Neither of these PRs are ready to merge. To get one of them merge-ready, this would be a great time to onboard and collaborate with a first-time contributor and HKG owner.
@sunnyhaibin my sincere apologies for my overly critical reply. I heard what sounded like "we don't want your work" and got confused and defensive. My sincere thanks @jyoung8607 for the warm welcome and cool moderation 🙏 Jason and I are collaborating in discord now.
To avoid duplicating efforts, I'm going to focus this set of PRs on the HEV specifically (i.e. drop the ICE fingerprints). There is an additional issue that only affects the ICE model and I only have an HEV to verify with anyhow.
Plan is to land this as part of https://github.com/commaai/opendbc/issues/1625
This PR has had no activity for 60 days. It will be automatically closed in 7 days if there is no activity.
This PR has been automatically closed due to inactivity. Feel free to re-open once activity resumes.
This PR has had no activity for 60 days. It will be automatically closed in 7 days if there is no activity.
This PR has been automatically closed due to inactivity. Feel free to re-open once activity resumes.