opendbc icon indicating copy to clipboard operation
opendbc copied to clipboard

HKG: Car Port for Kia EV9 2024 (HDA2 & LFA2)

Open sunnyhaibin opened this issue 10 months ago • 13 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 openpilot: cab65d75e75fe3e3/0000000b--704950fc79
  • [x] harness Type: Hyundai R
  • [x] architecture: CAN-FD
  • [x] panda
    • [x] Safety implementation for angle steering control
    • [x] Unit tests

Link to all physical parts during installation

This PR will focus on steering support. openpilot longitudinal control will be worked on in a future PR.

Thanks to the community 2024 Kia EV9 users epchris.

Supersedes

  • https://github.com/commaai/opendbc/pull/1225

sunnyhaibin avatar Jan 28 '25 01:01 sunnyhaibin

Route with the latest commit + safety: cab65d75e75fe3e3/0000000b--704950fc79

sunnyhaibin avatar Feb 24 '25 04:02 sunnyhaibin

can you rebase?

sshane avatar Feb 27 '25 20:02 sshane

can you rebase?

Done!

sunnyhaibin avatar Feb 27 '25 21:02 sunnyhaibin

Stock route with lane changes, LKAS and LFA: https://connect.comma.ai/8279cfddf735a11e/00000010--a643312798

sshane avatar Feb 27 '25 21:02 sshane

Max torque by the stock system is 250:

image

image

sshane avatar Feb 27 '25 22:02 sshane

LKAS (still angle) uses max 175:

image

sshane avatar Feb 27 '25 22:02 sshane

The MDPS angle looks closer to the request, we might want to switch to that eventually:

image

sshane avatar Feb 27 '25 22:02 sshane

250 could reach -3.9 m/s^2 on a curve (stock system!):

image

sshane avatar Feb 27 '25 22:02 sshane

Stock torque signal ramps up on engage:

image

sshane avatar Feb 27 '25 23:02 sshane

EV9 injection test route: 8279cfddf735a11e/0000001e--14bd4e33be

70-80 mph: left: -2.4, -1.87, -2.48, -2.6, -2.5, -2.5, -2.5, -2.5, -2.3, -2.1 m/s^2 right: 2.23, 2.22, 2.22, 2.4, 2.2, 2.4 m/s^2

image image

30-40 mph: left: -1.8, -1.4, m/s^2 right: 1.48, 1.6, 2.2, 1.7, 1.2, 1.1, 1.3, 1.5, 1.3, 1.7 m/s^2

image image

(all accels are roll compensated)

sshane avatar Feb 28 '25 05:02 sshane

The max torque/lateral accel is not the same across different models. @sunnyhaibin's GV80 also with LFA and angle steering achieves Honda levels of torque (0.5 m/s^2) with the EV9's values, so we can't ship this yet. We can for the EV9, but now I worry other EV9s would be different. The value we're using is a "torque reduction gain," it says nothing about the max torque, just a multiplier.

https://connect.comma.ai/2bfcfe373379cd18/0000000b--ab2f4c9283

sshane avatar Mar 01 '25 08:03 sshane

The max torque/lateral accel is not the same across different models. @sunnyhaibin's GV80 also with LFA and angle steering achieves Honda levels of torque (0.5 m/s^2) with the EV9's values, so we can't ship this yet. We can for the EV9, but now I worry other EV9s would be different. The value we're using is a "torque reduction gain," it says nothing about the max torque, just a multiplier.

https://connect.comma.ai/2bfcfe373379cd18/0000000b--ab2f4c9283

Found that the torque was also a bit too soft. It was getting to the steering limits pretty easy, but it was able to handle the initial part of the turn. I am on an ioniq 5 PE which is the same as EV9 or GV80 coupe e1107f9d04dfb1e2/00000455--9b2328ec73

(https://github.com/commaai/opendbc/pull/1676)

devtekve avatar Mar 01 '25 22:03 devtekve

@sshane the latest changes on this branch seem to have made it waaaay too soft in the ioniq 5

https://github.com/user-attachments/assets/a50fa684-37ae-425b-85aa-b871f117c293

e1107f9d04dfb1e2/00000461--c3f1f65bb7

devtekve avatar Mar 02 '25 22:03 devtekve