Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VW MQB: Fahrzeuglängsbeschleunigungssteuerungseinrichtung #22963

Merged
merged 163 commits into from
Nov 1, 2022

Conversation

jyoung8607
Copy link
Collaborator

@jyoung8607 jyoung8607 commented Nov 18, 2021

Rough draft support of openpilot longitudinal control for VW MQB vehicles. The tune needs help, particularly for braking behind rapidly slowing lead cars. Right now I'm using some HKG constants I stole and took around the block once. But, it's driving pretty good on the highway, and the state transitions in-and-out of standstill seem to be working.

Test drive: 3cfdec54aa035f3f|2021-11-17--23-33-17

Activated using the DisableRadar_Allow parameter, which enables the OP long control toggle in the UI.

Limitations:

  • Requires a gateway (J533) harness. I hope, but make no promises, to support camera harnesses later.
  • Requires full Stop-and-Go ACC. Will look at Follow-to-Stop vehicles later, but probably can't make them hold at stop.
  • This is VOACC, but we do require factory ACC be present. I can confirm this won't be a restriction forever.

Todo:

Known bugs:

  • At first startup, with mainswitch on but no ACC setpoint established, the setpoint will show 158MPH instead of ---
  • Some cars will briefly show a FCW-like alert in the cluster when disengaging by brake pedal

@jyoung8607 jyoung8607 changed the title VW MQB: Fahrvergnügen mit Beschleunigung! VW MQB: Longitudinal control Nov 18, 2021
@jyoung8607 jyoung8607 changed the title VW MQB: Longitudinal control VW MQB: Fahrzeuglängsbeschleunigungskontrolle Nov 18, 2021
@jyoung8607 jyoung8607 changed the title VW MQB: Fahrzeuglängsbeschleunigungskontrolle VW MQB: Personenkraftfahrzeuglängsbeschleunigungskontrolle Nov 18, 2021
@jyoung8607 jyoung8607 changed the title VW MQB: Personenkraftfahrzeuglängsbeschleunigungskontrolle VW MQB: Personenkraftfahrzeuglängsbeschleunigungssteuerungseinrichtung Nov 18, 2021
@jyoung8607 jyoung8607 changed the title VW MQB: Personenkraftfahrzeuglängsbeschleunigungssteuerungseinrichtung VW MQB: Fahrzeuglängsbeschleunigungssteuerungseinrichtung Nov 18, 2021
@jyoung8607
Copy link
Collaborator Author

Working a problem wherein the car sometimes just doesn't decelerate as-requested. This gets exciting with a lead car. On comparison with stock, it looks like there's yet a third copy of our requested acceleration to deal with, in an ACC_07 signal I originally thought was lead car relative speed, and it's not always active. I'll continue working on it later this weekend.

image

@jyoung8607
Copy link
Collaborator Author

jyoung8607 commented Oct 14, 2022

Want to get this merged to avoid more merge conflicts? We can merge if we explicitly disable it and ignore DisableRadar.

I'd like to go ahead with this. This works reasonably well on SNG cars, within the limitations of VOACC/E2E without radar points, but needs more work in a few areas before it's globally enabled.

The empty fingerprint checks are ugly but necessary to avoid docs being generated with non-zero min engage speeds (we fall through to the manual transmission / basic ACC case). LMK if you see a less hacky way to deal with it.

Tasks for a future PR:

  • Need better detection and handling of FTS cars, they drive on this but temporarily go accFaulted after 3 second stop
  • Add explicit fault detection for failure to acknowledge stopping request (seen with stock ACC in comma data)
  • More robust brake pressed detection, some cars have lazy brake light switches and we need stock-like redundancy
  • Restore lead car display in HUD
  • Explicitly validate disengage/timeout-at-standstill cases for SNG cars (I think this works, but needs some rigor)
  • Figure out what to do about harness recommendations, maybe make a run at software disabling the radar

@jyoung8607 jyoung8607 marked this pull request as ready for review October 14, 2022 19:15
@adeebshihadeh adeebshihadeh merged commit b31b031 into commaai:master Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
car vehicle-specific enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants