openpilot icon indicating copy to clipboard operation
openpilot copied to clipboard

Hyundai longitudinal: enable for IONIQ, KONA_EV, and IONIQ_PHEV

Open sunnyhaibin opened this issue 2 years ago • 2 comments

Checklist

  • [x] updated entry in CarInfo in selfdrive/car/*/values.py and ran selfdrive/car/docs.py to generate new docs
  • [x] test route updated in routes.py
  • [x] route with openpilot longitudinal:
    • [x] CAR.IONIQ - Hyundai Ioniq Hybrid 2017-19: 012c95f06918eca4|2023-01-15--11-19-36
      • Note: Steering low speed lockout of 32 MPH still exists
    • [x] CAR.KONA_EV - Hyundai Kona Electric 2018-21: f90d3cd06caeb6fa|2023-01-15--18-02-31
    • [x] CAR.IONIQ_PHEV - Hyundai Ioniq Plug-in Hybrid 2020-21: 79c52770a148c54d|2023-02-02--23-04-40

After some trials and testing, some platforms in the above list can now use the same radar disable command on 0x7D0 to disable the SCC radar unit. They can now accept openpilot longitudinal commands, with the ability to slow down to 0, which removes the limitation of low speed cutout at 8 km/h with stock SCC.

Stock AEB and FCW are disabled with this method, so we show the amber indicator on the car's dashboard to match stock when we manually disable AEB/FCW.

openpilot only sends SCC11, SCC12, SCC13, SCC14 and does not send FCA11, FCA12 messages to cars that do not broadcast FCA11, FCA12. Sending FCA11, FCA12 to those cars will cause a fault TCS13 | ACCEnable = 3.

Thanks to community 2019 Hyundai Ioniq owner andy741217, 2020 Hyundai Kona Electric owner ivan iv#6513 (Discord), 2020 Hyundai Ioniq Plug-in Hybrid owner albertcalderon1#8886 (Discord).

Amber indicator of AEB/FCW disabled image

sunnyhaibin avatar Jan 15 '23 02:01 sunnyhaibin

Could this become a broader update to bring experimental OP long to all 2017-2022 Ioniqs (with SCC, of course)? It would be nice only to look for SCC on any 2017-2022 Ioniq instead of cherry-picking the electrification by year. Looking at the updated documentation, 2020+ Ioniq HEV (not PHEV) is not covered in this PR.

EasternPA avatar Apr 05 '23 20:04 EasternPA

Could this become a broader update to bring experimental OP long to all 2017-2022 Ioniqs (with SCC, of course)? It would be nice only to look for SCC on any 2017-2022 Ioniq instead of cherry-picking the electrification by year. Looking at the updated documentation, 2020+ Ioniq HEV (not PHEV) is not covered in this PR.

If the platforms are in the LEGACY_SAFETY_MODE_CAR blacklist and the users have tested on their car with a route for confirmation, I will remove them from the blacklist in this PR. Without confirmation, it could cause unknown consequences with untested model years.

sunnyhaibin avatar Apr 25 '23 20:04 sunnyhaibin

Any updates on this? This branch is working very well on my Hyundai Ioniq 2022 PHEV. Master is missing longitudinal support and experimental mode for my car. I would love to receive newer updates from master along with the features from this branch.

samirpatelgx avatar Jul 15 '23 04:07 samirpatelgx

@samirpatelgx

Any updates on this? This branch is working very well on my Hyundai Ioniq 2022 PHEV. Master is missing longitudinal support and experimental mode for my car. I would love to receive newer updates from master along with the features from this branch.

DISCLAIMER: I have never used openpilot, I recently bought the comma device and I am waiting for it to arrive! Beware!

I have created a fork and merged the prerequisite MR and this MR with master, so technically my fork and branch should include all the master changes + the changes from this MR until its officially merged. Again, I have never used openpilot, I just merely played with merging branches and solving conflicts. I will be testing it whenever my unit arrives, but in the meantime if you wish, you can try it yourself. (beware, again, I've not used openpilot before!)

https://github.com/devtekve/openpilot/tree/ioniq-phev-2020-openpilot-dev

devtekve avatar Aug 04 '23 20:08 devtekve

@sunnyhaibin let's make a new PR to set the AEB light on non-FCA11 cars

sshane avatar Aug 19 '23 06:08 sshane

@sunnyhaibin let's make a new PR to set the AEB light on non-FCA11 cars

Sounds good.

sunnyhaibin avatar Aug 19 '23 16:08 sunnyhaibin

@sshane PR opened:

  • https://github.com/commaai/openpilot/pull/29484

sunnyhaibin avatar Aug 19 '23 16:08 sunnyhaibin

We should open individual PRs for each platform, else the PR to do them all at once will stay open indefinitely. There's a few platforms here that we don't need to change anything about FCA12 to work.

sshane avatar Aug 24 '23 22:08 sshane