-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Subaru: POC for longitudinal control #25345
Conversation
I did some testing on subaru long branch and Eyesight also faults when rebased to latest master. I tracked down the commit using preserved subaru-long-c2 branch and fault starts after opendbc commit 859fea7 (CAN FD support in packer + parser). Last currently working opendbc commit is 0ccc718 I will post relevant routes once they are uploaded |
Working subaru-long-c2 route: 05bca04dfbdca165|2022-08-17--22-23-55 |
I would check if any signals are overlapping. |
I tested the subaru dbc files
I tested loading subaru dbc files using cantools and there are no overlapping signals. I created one signals overlap for testing and cantools reported it correctly. I also enabled DEBUG in opendbc/can/common.h but did not find any clues related to can signals or checksums being wrong |
with latest version / feature-subaru-long branch I get during startup
I tried to comment out can_valid checks in opendbc/can/parser.cc (can_valid is always true) and set all frequency checks in carstate to 1 but eyesight still faulted. Are there any other debug options to enable that might be useful to finding the cause? |
I made some progress narrowing down the issue - Eyesight does not fault if I allow forwarding of Brake_Status and CruiseControl messages in panda safety. I added debug output to subarucan to print the sent Brake_Status and CruiseControl messages working, subaru-long-c2 branch:
not working, subaru-feature-long:
Eyesight faults when the panda safety mode is set |
I split the 46bit Brake_Status Signal1 signal to two 23bit signals in test branch and that fixed eyesight fault. I'll see if I can fix opendbc large values issue but I may need help with that. |
CAN Parser bug fixed and opendbc has been bumped on master with the fix. |
Thanks. I merged the latest master and it's working with Crosstrek. I'll look into why gen2 car interface tests are failing, process replay failure is expected |
not directly relevant but I had to add the common/realtime.py:35: error: Module has no attribute "sched_setscheduler" |
I moved the dev environment to ubuntu and reverted linux platform checks. Also moved ES_Status and ES_Brake to can1 for GEN2, so all route tests are passing now. |
e944a57
to
dfc72e1
Compare
Stock AEB PR #28052 |
This reverts commit 6e9b209.
selfdrive/car/subaru/carstate.py
Outdated
("COUNTER", "ES_Brake"), | ||
("Signal1", "ES_Brake"), | ||
("Brake_Pressure", "ES_Brake"), | ||
("Signal2", "ES_Brake"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ES_Status.Signal2
no longer exists, and kills controlsd when the checks run.
This is likely ES_Brake.AEB_Status
now... which already exists on line 132.
("Signal2", "ES_Brake"), |
selfdrive/car/subaru/carstate.py
Outdated
|
||
("COUNTER", "ES_Brake"), | ||
("Signal1", "ES_Brake"), | ||
("Brake_Pressure", "ES_Brake"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ES_Brake.Brake_Pressure
check already exists above on line 133
the required changes are already implemented in feature-subaru-long-2023-07-02 branch, I will merge soon after testing |
…subaru-long-2023-08-08
Superseded by #28872 - closing this |
Description POC for Subaru Global longitudinal control. For acceleration, there are 2 signals - cruise_throttle and cruise_rpm that are basically throttle and rpm target requests. Scaling values used in carcontroller are roughly modeled by plotting and observing stock acc signals and testing. Brake request is single linear signal with 0-400 scale.
Stock AEB/PCB is passed through.
The general idea for logitudinal control is that eyesight is not engaged by rewriting the feedback signals from car. openpilot generates the required signals for lateral and longitudinal control and dash display.
POC is usable and I have used it for testing the openpilot vision only performance from time to time
Verification Tested on 2018 Crosstrek