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

Subaru: stop and go autoresume #28064

Closed
wants to merge 12 commits into from
Closed

Conversation

martinl
Copy link
Contributor

@martinl martinl commented Apr 29, 2023

Subaru Stop and Go autoresume support for global gen1 and pre-global models.

Subaru stock ACC stops behind stopped cars but does not resume automatically. We send Throttle:Throttle_Pedal signal from openpilot to ACC when car in front starts moving to resume from ACC Hold state (mimicking stock ACC resume using gas press behaviour). It works for cars with electric parking brake and does not change stock ACC behaviour for cars with manual parking brake (which disengage 3 seconds after stopping).

For Global models, we also allow setting ACC hold manually when stopped with no lead car (eg at intersection/traffic light) and resume from manual hold by using ACC resume button press, retaining stock ACC behaviour.

We tried to resume by sending ACC resume button press signals but that did not work since ACC buttons are directly wired to Eyesight and not accepted as input from CAN messages.

Prerequisites:

I will post test routes for both global and pre-global and then PR should be ready for review

@martinl
Copy link
Contributor Author

martinl commented May 17, 2023

I tested spamming the Throttle message without panda fwd blocking and it did not work, so I reverted back to original version

@jnewb1
Copy link
Contributor

jnewb1 commented Jun 30, 2023

I tested spamming the Throttle message without panda fwd blocking and it did not work, so I reverted back to original version

When you tried spamming, did you do COUNTER+1?, like we do for ES_Distance? I can get it to work about 70% of the time by spamming throttle on CAN1 with COUNTER +1 (the only option, since we can’t intercept CAN1).

@martinl
Copy link
Contributor Author

martinl commented Jul 1, 2023

I did not try to use counter+1. There is another option for gen1 using Brake_Pedal message speed signal that would avoid using auto hold and would also work for manual parking brake cars https://github.com/martinl/openpilot/blob/subaru-community/selfdrive/car/subaru/carcontroller.py#L96

@martinl
Copy link
Contributor Author

martinl commented Jul 18, 2023

I tested sending throttle message with counter+1 and I can confirm it also works about 60% of the time on gen1. Here is a route using jnewb1 subaru-gen2-sng-throttle branch 8de015561e1ea4a0|2023-07-17--16-59-49

@martinl
Copy link
Contributor Author

martinl commented Jul 18, 2023

Would it make a difference from reliability and AEB standpoint if gen1 used conditional blocking for Throttle message in panda safety when openpilot needs to modify the Throttle message (eg by sending custom can message with one signal bit to start/stop the blocking)?

@sshane
Copy link
Contributor

sshane commented Aug 26, 2023

Isn't mergable in its current state, pending AEB tests I think. @martinl let us know if you have any conclusion about that!

To summarize, sending fake gas pedal messages to the camera, which does AEB, might change AEB behavior with stock long, in release, which isn't acceptable.

@sshane sshane closed this Aug 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants