openpilot icon indicating copy to clipboard operation
openpilot copied to clipboard

HKG: Car Port for Kia Sportage Plug-in Hybrid 2023

Open sunnyhaibin opened this issue 2 years ago • 14 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
  • [x] route with stock system: 428412ad82894ba3|2023-10-27--15-44-21
  • [x] route with openpilot: 428412ad82894ba3|2023-12-09--17-01-47
  • [x] harness Type: Hyundai N
  • [x] architecture: CAN-FD

Link to all physical parts during installation

Thanks to the community 2022 Kia Sportage Plug-in Hybrid owner dhimmels.

sunnyhaibin avatar Dec 02 '23 04:12 sunnyhaibin

@dhimmel @sunnyhaibin any reason not to combine with the current hybrid platform? We should get the HKG port into a state where this is just a fingerprint.

sshane avatar Dec 05 '23 01:12 sshane

@dhimmel @sunnyhaibin any reason not to combine with the current hybrid platform? We should get the HKG port into a state where this is just a fingerprint.

Initially, the car seemed to do SCC from the radar, but the latest route confirmed it's doing SCC from the camera.

sunnyhaibin avatar Dec 08 '23 06:12 sunnyhaibin

Great, then let's combine if possible

sshane avatar Dec 09 '23 23:12 sshane

@dhimmel let us know when you can get a test route, just need to drive around for 10 minutes, ideally engaging with the system!

sshane avatar Dec 09 '23 23:12 sshane

let us know when you can get a test route, just need to drive around for 10 minutes, ideally engaging with the system!

@sshane I have this route from yesterday with id 428412ad82894ba3|2023-12-09--17-01-47--32. It might be too long (1 hour) but has several periods with OpenPilot engaged. Let me know if something shorter would be preferable for the tests?

dhimmel avatar Dec 10 '23 16:12 dhimmel

I see we have been splitting up the hybrid and plug-in hybrids because of the different masses; we should start using the info in the hvac FW version soon, which splits ICE, hybrid and plug-in hybrid. It seems to be available on all the variants of the Sorento too, so we can combine a couple platforms with this.

For now though, we can merge as a separate platform as that will take some large data verification.

sshane avatar Dec 12 '23 00:12 sshane

@dhimmel can you put your device on WiFi and upload a short 10 minute route with some engagement? Then we can merge!

sshane avatar Dec 12 '23 00:12 sshane

Your car also has a very high lateral accel factor (similar to https://github.com/commaai/openpilot/pull/30025), and your car consistently overshoots the desired lateral accel, we will need to figure this out before we can merge:

image

image

sshane avatar Dec 13 '23 16:12 sshane

I have the same model and am trying to install a 3X. Can I ask where you placed the camera connector harness?

Responding to this question on discord here for easier retreivability. The following picture shows where I mounted the Comma 3x alongside the rearview mirror assembly:

image

dhimmel avatar Dec 20 '23 20:12 dhimmel

I have a 2024 Sportage PHEV that has very few changes from the 2023. If there is anything I can contribute to add it to the compatibility list

'carFw': [{'address': 2000, 'brand': 'hyundai', 'bus': 0, 'ecu': 'fwdRadar', 'fwVersion': b'\xf1\x00NQ5__ 1.01 1.03 99110-CH000 ', 'logging': False, 'obdMultiplexing': True, 'request': [b'"\xf1\x00'], 'responseAddress': 2008, 'subAddress': 0}, {'address': 1988, 'brand': 'hyundai', 'bus': 0, 'ecu': 'fwdCamera', 'fwVersion': b'\xf1\x00NQ5 FR_CMR AT USA LHD 1.00 1.00 99211-P1070 690', 'logging': False, 'obdMultiplexing': True, 'request': [b'"\xf1\x00'], 'responseAddress': 1996, 'subAddress': 0}, {'address': 1975, 'brand': 'hyundai', 'bus': 0, 'ecu': 'cornerRadar', 'fwVersion': b'\xf1\x00NQ5 BCW RR 1.00 , 1.00 (\x81\x98\x83#\x02u\x06Y', 'logging': True, 'obdMultiplexing': True, 'request': [b'"\xf1\x00'], 'responseAddress': 1983, 'subAddress': 0}, {'address': 1971, 'brand': 'hyundai', 'bus': 0, 'ecu': 'hvac', 'fwVersion': b'\xf1\x00NQ5PH 97255-CH100UNIT-HEATER CONTROL 1.03NQ5PHEV DATC 1.2 1.01', 'logging': True, 'obdMultiplexing': True, 'request': [b'"\xf1\x00'], 'responseAddress': 1979, 'subAddress': 0}, {'address': 1969, 'brand': 'hyundai', 'bus': 0, 'ecu': 'parkingAdas', 'fwVersion': b'\xf1\x10NQ5 ADAS_PRK ANL 1.01 1.06 99910-CH330', 'logging': True, 'obdMultiplexing': True, 'request': [b'"\xf1\x10'], 'responseAddress': 1977, 'subAddress': 0}],

THESE SEEM TO WORK FINE:

CAR.KIA_SPORTAGE_5TH_GEN: {
(Ecu.fwdRadar, 0x7D0, None): [b'\xf1\x00NQ5__               1.01 1.03 99110-CH000         ',],
(Ecu.fwdCamera, 0x7C4, None): [b'\xf1\x00NQ5 FR_CMR AT USA LHD 1.00 1.00 99211-P1070 690',],  
(Ecu.cornerRadar, 0x7B7, None): [b'\xf1\x00NQ5 BCW RR 1.00 , 1.00 (\x81\x98\x83#\x02u\x06Y',],
(Ecu.hvac, 0x7B3, None): [b'\xf1\x00NQ5PH 97255-CH100UNIT-HEATER CONTROL 1.03NQ5PHEV DATC 1.2 1.01',],
(Ecu.parkingAdas, 0x7B1, None): [b'\xf1\x10NQ5  ADAS_PRK ANL 1.01 1.06 99910-CH330',],

},

I haven't had a ton of time to test it but it drove around my neighborhood fine

Wafflezzbutt avatar Feb 11 '24 18:02 Wafflezzbutt

https://useradmin.comma.ai/?onebox=ad5d1c08bcc42d1a%7C2024-02-15--17-19-23

I do feel like it overcorrects sometimes. It seems to "lean left" especially around turns, and then over correct back

Wafflezzbutt avatar Feb 17 '24 00:02 Wafflezzbutt

Is this PR blocked on needing additional route data?

xtian avatar Mar 12 '24 17:03 xtian

While The turning radius issue seems to be less of a problem since the 0.9.6 release, I think there may be an issue with how heavy the car is. The PHEV model is 5300 lbs compared to the 3500 on the regular sportage. In experimental mode it seems to have trouble braking if there is a downward slope and it occasionally gets too close to the car in front of it when coming to a complete stop

Here is a drive today where this should be obvious: https://useradmin.comma.ai/?onebox=ad5d1c08bcc42d1a%7C2024-03-12--17-40-15

Especially: Segment 3 Segment 6 Segment 10

Wafflezzbutt avatar Mar 13 '24 02:03 Wafflezzbutt

I get a “Driver’s grasp not detected” alert from the stock ACC relatively often while using @dhimmel’s fork. Are others experiencing this?

I also frequently get a “Consider taking a break” notice while on short drives. Not sure if that’s related.

xtian avatar Apr 11 '24 23:04 xtian

Thanks for contributing to openpilot! 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
    • the change is something we merge
    • include a route or your device' dongle ID if relevant

github-actions[bot] avatar Jun 17 '24 04:06 github-actions[bot]

Is there anything I can do to help this get merged?

xtian avatar Jul 29 '24 20:07 xtian