Skip to content

Hyundai: add Kia Niro PHEV (2023-25, 2nd gen)#3374

Draft
santiagolgzz wants to merge 4 commits intocommaai:masterfrom
santiagolgzz:niro-phev-2nd-gen-fingerprint-openpilot-base
Draft

Hyundai: add Kia Niro PHEV (2023-25, 2nd gen)#3374
santiagolgzz wants to merge 4 commits intocommaai:masterfrom
santiagolgzz:niro-phev-2nd-gen-fingerprint-openpilot-base

Conversation

@santiagolgzz
Copy link
Copy Markdown

@santiagolgzz santiagolgzz commented May 4, 2026

Summary

Adds a separate Hyundai CAN-FD platform for the 2023-25 Kia Niro Plug-in Hybrid instead of letting it alias to the 2nd-gen Niro Hybrid.

This includes:

  • corrected 2nd-gen Niro EV/HEV/PHEV specs
  • PHEV-specific firmware fingerprints
  • Niro PHEV torque override entry
  • a recorded route for KIA_NIRO_PHEV_2ND_GEN

Evidence

Observed on the vehicle/comma:

  • saved CarParamsPersistent fingerprints as KIA_NIRO_PHEV_2ND_GEN
  • route: 9369c137569c2483/00000004--3879667fb5
  • route qlogs contain KIA_NIRO_PHEV_2ND_GEN
  • firmware strings include PHEV-specific transmission, EPS, and DATC evidence, while camera/radar overlap with the 2nd-gen HEV

Representative firmware differentiators:

  • EPS: SG2 MDPS C A.00 1.02 56310AT150 4SGPC102
  • DATC: SG2PHEV ATC
  • transmission: PSBG2552 D121092 ... BSG2G16XXP092NS7E

Source for PHEV, EV, HEV car specs:
https://www.kiamedia.com/us/en/models/niro-phev/2023/specifications
https://www.kiamedia.com/us/en/models/niro-ev/2023/specifications
https://www.kiamedia.com/us/en/models/niro/2023/specifications

Adds the 2nd-gen Kia Niro Plug-in Hybrid as a CAN FD platform:

- New KIA_NIRO_PHEV_2ND_GEN platform, hyundai_a harness, CarSpecs
  taken from Kia 2023 Niro PHEV (mass=3336 lb, wheelbase=2.72 m,
  steerRatio=13.3, tireStiffnessFactor=0.385).
- Fingerprints for camera, radar, EPS, and transmission.
- Added to CANFD_FUZZY_WHITELIST. The EPS part number (56310-AT150)
  encodes into the platform code as SG2-AT150, which uniquely
  disambiguates from the HEV variant's 56310-AT050 at the fuzzy-match
  layer. HEV is intentionally not whitelisted yet — its EPS
  fingerprint has not been collected, so its expected platform codes
  are still only cam+radar (byte-identical to PHEV's). A TODO marks
  the follow-up.
- Torque override entry [2.5, 2.5, 0.1], the established Kia CAN-FD
  baseline shared with Sorento HEV, K8 HEV, and Kona EV.
- Listed in non_tested_cars as a placeholder until a drive captured
  with this branch loaded (fingerprinting as PHEV) is uploaded.
Both KIA_NIRO_EV_2ND_GEN and KIA_NIRO_HEV_2ND_GEN were inheriting
KIA_NIRO_EV.specs (the 1st-gen EV's CarSpecs), which gave them an
incorrect mass (3543 lb instead of their actual curb weights), a
slightly off wheelbase (2.7 m instead of 2.72 m), and a steerRatio
that didn't match either 2nd-gen variant.

Replaces the inherited references with explicit per-variant CarSpecs:

- KIA_NIRO_EV_2ND_GEN:  mass=3721 lb, wheelbase=2.72 m, steerRatio=13.3
- KIA_NIRO_HEV_2ND_GEN: mass=3071 lb, wheelbase=2.72 m, steerRatio=13.7

tireStiffnessFactor stays at 0.385 for both (carried over from the
1st-gen EV — same SG2 chassis and tire family).

Sources: Kia Media 2023 Niro spec sheets.
@github-actions github-actions Bot added car related to opendbc/car/ hyundai labels May 4, 2026
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing to opendbc! In order for us to review your PR as quickly as possible, check the following:

  • Convert your PR to a draft unless it's ready to review
  • Read the contributing docs
  • Before marking as "ready for review", ensure:
    • the goal is clearly stated in the description
    • all the tests are passing
    • include a route or your device' dongle ID if relevant

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

Car behavior report

Replays driving segments through this PR and compares the behavior to master.
Please review any changes carefully to ensure they are expected.

Testing 260 segments for: HYUNDAI_AZERA_HEV_6TH_GEN, HYUNDAI_ELANTRA_GT_I30, HYUNDAI_ELANTRA_2021, HYUNDAI_ELANTRA_HEV_2021, HYUNDAI_GENESIS, HYUNDAI_IONIQ, HYUNDAI_IONIQ_HEV_2022, HYUNDAI_IONIQ_EV_2020, HYUNDAI_IONIQ_PHEV_2019, HYUNDAI_IONIQ_PHEV, HYUNDAI_KONA_2022, HYUNDAI_KONA_EV, HYUNDAI_KONA_EV_2022, HYUNDAI_KONA_EV_2ND_GEN, HYUNDAI_SANTA_FE, HYUNDAI_SANTA_FE_2022, HYUNDAI_SANTA_FE_HEV_2022, HYUNDAI_SANTA_FE_PHEV_2022, HYUNDAI_SONATA, HYUNDAI_SONATA_LF, HYUNDAI_STARIA_4TH_GEN, HYUNDAI_PALISADE, HYUNDAI_SONATA_HYBRID, HYUNDAI_IONIQ_5, HYUNDAI_IONIQ_6, HYUNDAI_TUCSON_4TH_GEN, HYUNDAI_SANTA_CRUZ_1ST_GEN, HYUNDAI_CUSTIN_1ST_GEN

✅ 0 changed, 260 passed, 0 errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

car related to opendbc/car/ hyundai

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant