openpilot
openpilot copied to clipboard
Ford: detect missing LKAS from EPS configuration
Description
Detect when the PSCM isn't configured for Traffic Jam Assist/Lane Centering Assist and disable openpilot.
In tools such as Forscan these two features are configured seperately, but I don't know how every EPS/model would respond to only having one set, and whether openpilot could work properly, so we check for both.
openpilot will only check this during fingerprinting, so upon changing their PSCM configuration, the user would have to clear the car params cache. (I think?)
Verification
- [x] I collected the "As-Built data" for thousands of VINs (downloaded from Ford) and could reliably determine whether the car had ACC/TJA features enabled
- [ ] Pending verification on openpilot logs using responses gathered with https://github.com/commaai/openpilot/pull/31569
Route with LCA/TJA disabled: TODO
Route with LCA/TJA enabled: TODO
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
This PR has had no activity for 30 days. It will be automatically closed in 7 days if there is no activity.
I couldn't find a CAN signal denoting if LCA was allowed or not across cars with the LCA byte and without, so I think checking this is the best option for now. We do detect if normal CC or ACC is the current option though, so this TJA check might be fully redundant.
This becomes more important after https://github.com/commaai/openpilot/pull/31124 which would fingerprint many more vehicles. Right now, we would enable on a car without LCA, but I'm not sure what would happen after. I'm guessing no fault would be logged.
Ford route w/ no TJA or LCA: 58609189e4a2bac4/2023-07-18--19-35-17
Checked 140 total dongles (one seg each from 11k routes) on 0.9.7 after https://github.com/commaai/openpilot/pull/31569 was merged on all remotes, 57 non-CAN FD dongles (4k routes). So far no car was missing the AsBuilt data, except some CAN FD users (Lighting, F-150, Mach-E).
I checked the F-150 brochure, and it at least always packages ACC with LCA, never LCA without ACC, so our ACC check should catch any lack of API. We can further explore this in the future if needed.
Dongles without TJA or LCA: {'ef13a960f7d8fa7a': 91, '47eda58b4c6c83fb': 18, 'e886087f430e7fe7': 2, 'bb6fde754f1e8e8f': 13}
The nonAdaptive cruise check we have catches all of them, as TJA was never True with LCA being False. I just noticed this, so we don't need this PR as a pre-req for https://github.com/commaai/openpilot/pull/31124 as I had thought.
This would still enable a better alert for the user to tell them why they're not supported, so we can leave it open for now.
Here's the Bronco brochure, ACC is packaged with LCA like the Q4 F-150:
https://cdn.dealereprocess.org/cdn/brochures/ford/2021-broncosport.pdf
The only model I know has this potential problem is the Escape 2020. Here's the brochure: https://cdn.dealereprocess.org/cdn/brochures/ford/2020-escape.pdf
- "Adaptive Cruise Control" is part of the "Co-Pilot360 Assist" package (available on SE/SEL, standard on Titanium)
- "Lane Centering" is part of "Co-Pilot360 Assist+" package (standard on Titanium)
So, the Escape 2020 SE/SEL trims can have ACC without LCA. I remember seeing a couple of these on Turo.
@incognitojam if you add a new event for missing API (fine to combine lat and long) and open a PR to cereal we can review the copy and merge