openpilot icon indicating copy to clipboard operation
openpilot copied to clipboard

HKG: Can-fd resume from standstill improvement

Open hoomoose opened this issue 3 years ago • 1 comments

Description Resume from standstill fails to work 1/5 times in a given drive in my hda1 EV6 (and others as well). To solve this problem I have employed the same technique as used in non-canfd hkg cars. I propose sending 5 "resume" button presses at a time. I attempted sending 25 button presses as is currently done with non-canfd cars, but this resulted in a communications error. 5 button presses appears to improve the resume from standstill (no failures in 3 days of driving) and does not give the communications error.

Verification This fix has been employed for a few days now by a few users in a fork created specifically for hda1 ev6 and I5 cars (hoomoose:hda1ev6i5) since master does not have the prerequisite resume from standstill fix needed for hda1 ev6 and I5. In three days of driving with this fix, I have not had a failure of resume from standstill (yet...). However, this fix would affect all can-fd cars with the cruise_buttons signal and can/should be tested by hda1 and hda2 cars.

Prerequisite For testing on an HDA1 car, the hda1 fix is a prerequisite: https://github.com/commaai/openpilot/pull/26069

hoomoose avatar Oct 13 '22 17:10 hoomoose

I had my first failure with this method, so it is not perfect. Just thought I would report this.

hoomoose avatar Oct 15 '22 17:10 hoomoose

@hoomoose Have you tried something similar to this PR?

  • https://github.com/commaai/openpilot/pull/25579

sunnyhaibin avatar Oct 18 '22 02:10 sunnyhaibin

I just tested out the solution offered by Sunnyhaibin, and have committed the changes. In one day of driving through rush hour traffic, I had no errors and 100% resume rate. I would estimate success was 14/14. I do not think a conclusion was reached whether to merge the previous PR, but it certainly seems to cause no negative issues with an EV6 and would appear (with limited data from one can-fd car) to offer success. What would be a next step - have more cars try this out?

hoomoose avatar Oct 18 '22 22:10 hoomoose

I just tested out the solution offered by Sunnyhaibin, and have committed the changes. In one day of driving through rush hour traffic, I had no errors and 100% resume rate. I would estimate success was 14/14. I do not think a conclusion was reached whether to merge the previous PR, but it certainly seems to cause no negative issues with an EV6 and would appear (with limited data from one can-fd car) to offer success. What would be a next step - have more cars try this out?

@hoomoose Provide the route(s) with the resume tests should be sufficient for review.

sunnyhaibin avatar Oct 19 '22 15:10 sunnyhaibin

Now that HDA1 resume is in master, can you try master for a bit and see if you still have problems?

adeebshihadeh avatar Oct 19 '22 22:10 adeebshihadeh

Installing as I type - thanks!

hoomoose avatar Oct 19 '22 22:10 hoomoose

In driving through downtown to and from my rec center on the new Master with no modifications from me (which is awesome by the way!), I had the following results. To gym 4/6 successful resumes (Route 68d6a96e703c00c9|2022-10-19--16-28-36) From Gym 7/8 successful resumes (Route 68d6a96e703c00c9|2022-10-19--17-49-42) (and 1 false positive where the car resumed but the car in front wasn't moving, but that's a success in my book.) Overall successful resume rate 11/14. I am happy to keep driving as is to get more data, but I would say this has been typical of my experience all along before trying to do improvements. Others who post (can-fd with hda1 and hda2) seem to have similar experiences of the ~15 -25% failure rate. Do you have a similar experience with your EV6? I will also try this fix again after re-basing with current master to see if I have the same success rate as I previously posted and I will post routes.

hoomoose avatar Oct 20 '22 00:10 hoomoose