openpilot icon indicating copy to clipboard operation
openpilot copied to clipboard

Hyundai CAN-FD: support for ICE cars

Open sunnyhaibin opened this issue 3 years ago • 9 comments

Checklist

  • [x] added entry to CarInfo in selfdrive/car/*/values.py and ran selfdrive/car/docs.py to generate new docs
  • [x] test route added to routes.py

2022 Hyundai Santa Cruz

  • [x] route with openpilot:
    • stock longitudinal: f0709d2bc6ca451f|2022-10-15--08-13-54
    • openpilot longitudinal: f0709d2bc6ca451f|2022-10-15--10-39-32
  • [x] harness type: Hyundai N

2023 Kia Sportage

  • [x] route with openpilot:
    • stock longitudinal: 192283cdbb7a58c2|2022-10-15--00-57-57
    • openpilot longitudinal: 192283cdbb7a58c2|2022-10-15--01-43-18, 965a780ebeeed150|2022-10-16--20-50-38
  • [x] harness type: Hyundai N

2022 Genesis GV70

  • [x] route with openpilot: ca4de5b12321bd98|2022-10-18--21-15-59
  • [x] harness type: Hyundai L

Physical setup

  • Top port behind comma three
    • comma Power <-> First Harness Box <-> comma three USB C/Right-Angle C <-> comma three
  • Bottom port behind comma three
    • Camera Harness <-> Second Harness Box <-> USB C/C 3.1 <-> Red Panda <-> USB A/A <-> USB A to C OTG Adapter <-> comma three

openpilot Longitudinal Control

  • openpilot longitudinal control support for 2022 Hyundai Santa Cruz (ICE) and 2023 Kia Sportage (ICE), without radar disable. Message 0x1a0 | CRUISE_INFO is on bus 6, we block the message from bus 6 and send our own longitudinal commands to 0x1a0 | CRUISE_INFO bus 4.

Prerequisites

  • https://github.com/commaai/openpilot/pull/25276
  • https://github.com/commaai/panda/pull/999

Requires

  • https://github.com/commaai/openpilot/pull/26086
  • https://github.com/commaai/panda/pull/1031
  • https://github.com/commaai/opendbc/pull/680

Thanks to community Santa Cruz owner chrsfr, Sportage owner gaanthony and Daltoh, and GV70 owner zunichky.

sunnyhaibin avatar Aug 14 '22 04:08 sunnyhaibin

Closed the gv70 (#26068) pr so we only have one open.

zunichky avatar Oct 18 '22 00:10 zunichky

@adeebshihadeh @sunnyhaibin Idk if there are any more cars that are going to be like this, or if it's a genesis thing, so not sure how we want these changes generic.

GV70 LAT Changes: CRUISE_INFO comes from bus 4 not 6, so this bus needs to be changed to 4. return CANParser(DBC[CP.carFingerprint]["pt"], signals, checks, 6)

GV70 LONG Changes: Maybe make this into a different PR? Radar/TP: 0x7d0, 4 CAM_0x2a4 comes from bus 5 In create_adrv_messages, I only need to send ADRV_0x160 to keep the car happy (mines HDA1, no side radars)

zunichky avatar Oct 18 '22 15:10 zunichky

@adeebshihadeh @sunnyhaibin Idk if there are any more cars that are going to be like this, or if it's a genesis thing, so not sure how we want these changes generic.

GV70 LAT Changes: CRUISE_INFO comes from bus 4 not 6, so this bus needs to be changed to 4. return CANParser(DBC[CP.carFingerprint]["pt"], signals, checks, 6)

GV70 LONG Changes: Maybe make this into a different PR? Radar/TP: 0x7d0, 4 CAM_0x2a4 comes from bus 5 In create_adrv_messages, I only need to send ADRV_0x160 to keep the car happy (mines HDA1, no side radars)

I can try to take care of the change with CRUISE_INFO in carstate.

  • Edit: This should be satisfied in https://github.com/commaai/openpilot/pull/25434/commits/063e6f79c4ad40c8b0cb6628ac02a1862dce0204.

I agree with having another PR for GV70's longitudinal support, with 0x1A0 being on bus 4 and we need to disable radar unlike the other ICE models we're supporting in this PR. We could submit another one once this is merged.

sunnyhaibin avatar Oct 18 '22 15:10 sunnyhaibin

@sunnyhaibin CarTestRoute("f0709d2bc6ca451f|2022-10-15--10-39-32", HYUNDAI.SANTA_CRUZ_1ST_GEN), doesn't have rlogs. can we get a new route?

adeebshihadeh avatar Oct 19 '22 22:10 adeebshihadeh

@sunnyhaibin CarTestRoute("f0709d2bc6ca451f|2022-10-15--10-39-32", HYUNDAI.SANTA_CRUZ_1ST_GEN), doesn't have rlogs. can we get a new route?

@adeebshihadeh would the ones from the PR description suffice? I believe they have rlogs uploaded. If not, we can request new ones from the Santa Cruz user.

sunnyhaibin avatar Oct 19 '22 22:10 sunnyhaibin

@sunnyhaibin CarTestRoute("f0709d2bc6ca451f|2022-10-15--10-39-32", HYUNDAI.SANTA_CRUZ_1ST_GEN), doesn't have rlogs. can we get a new route?

@adeebshihadeh would the ones from the PR description suffice? I believe they have rlogs uploaded. If not, we can request new ones from the Santa Cruz user.

Yeah, looks like that'll work.

adeebshihadeh avatar Oct 19 '22 22:10 adeebshihadeh

@adeebshihadeh User with the Sportage 2023 mentioned that he received a Controls Mismatch alert when he updated to the latest commit:

  • 192283cdbb7a58c2|2022-10-22--11-49-07

Control Mismatch resolved by pointing the panda directory to the open panda PR along with this one.

  • https://github.com/commaai/openpilot/pull/25434/commits/b5cbf7f9277ebdbdc1aab6f6a000b59be80ac507

sunnyhaibin avatar Oct 22 '22 17:10 sunnyhaibin

Here's another route from the 2023 Kia Sportage triggering FCW from the car: 192283cdbb7a58c2|2022-10-27--09-34-58

sunnyhaibin avatar Oct 27 '22 14:10 sunnyhaibin

Checked and there's no common gear message :(. There's a duplicate gear signal in the ACCELERATOR message for our EV6, but it's not filled out on the Santa Cruz

sshane avatar Nov 04 '22 10:11 sshane

Removed the GV70 from this PR as it's the sole HDA1 car where the camera doesn't do SCC (radar). @sunnyhaibin is making another PR just for that car

sshane avatar Nov 05 '22 00:11 sshane