openpilot icon indicating copy to clipboard operation
openpilot copied to clipboard

[HKG-CAN] Consider FCW alerts from SCC

Open devtekve opened this issue 1 year ago • 9 comments

Description I was driving the other day using SP with Custom Stock and the car's radar had a false positive which I let it continue to analyze the behavior afterwards. The car suddenly started warning of a collision but stock SCC was engaged and commanding the vehicle and the way ahead was clear. @sunnyhaibin and I looked through the logs and realized that when SCC is engaged, no FCA11 signals are sent, and instead everything is handled by the SCC12, but more importantly, CF_VSM_Warn was silent. The only message was the SCC requesting a takeover.

This is the route where we observed this behavior e1107f9d04dfb1e2|2023-12-22--10-30-52--3

https://github.com/commaai/openpilot/assets/7696966/4c094269-b7ac-40dd-b69e-aa0a4bf183ba

Verification In order to validate the cluster message I modified the OP code to send the takeOverReq always to see how the cluster reacted and I could see the collision warning flashing which confirmed that the takeOverReq of SCC12 is an FCW when AccEnabled = 1

https://github.com/commaai/openpilot/assets/7696966/d2a68daa-ce53-40f5-bc42-27edd35ee644

And this is the route of the video above where I was permanently sending the takeOverReq to validate the cluster message: e1107f9d04dfb1e2|2023-12-29--00-19-47--1

Note: I have not done a run with this changes yet and they were written based on cabana's input, that's why I am creating this as draft. If he integration tests cover this, then feel free to mark it as ready. Otherwise I will try to do a run with this change soon

devtekve avatar Jan 02 '24 14:01 devtekve

Are we sure this was a true AEB? I would doubt that the car wouldn't use the dedicated FCA/AEB message/signals just when the ACC system is active.

sshane avatar Jan 02 '24 22:01 sshane

Are we sure this was a true AEB? I would doubt that the car wouldn't use the dedicated FCA/AEB message/signals just when the ACC system is active.

I am 100% sure it was a forward collision alert as you can see on the second video I uploaded. I don’t really consider this “AEB”, it was simply SCC controlling the vehicle as expected, but from the logs it somehow thought obj distance was 0m out of the sudden so it started decelerating harder and throwing the FCA alert. It never threw the AEB message

devtekve avatar Jan 02 '24 23:01 devtekve

Yeah exactly, that's what I'm saying. It looks like we currently consider AEB prepare as FCW, but SCC can also issue its own FCW without any AEB actuation that we don't check.

  • [ ] We should check a small data set for TakeOverReq to see when it activates, if it also activates for things like no hands on the wheel, seatbelt unbuckled, etc, we can't quite use it.

sshane avatar Jan 02 '24 23:01 sshane

Yeah exactly, that's what I'm saying. It looks like we currently consider AEB prepare as FCW, but SCC can also issue its own FCW without any AEB actuation that we don't check.

  • [ ] We should check a small data set for TakeOverReq to see when it activates, if it also activates for things like no hands on the wheel, seatbelt unbuckled, etc, we can't quite use it.

That’s why the check is validating that ACCMode is active, when that’s the case, the takeOverReq is issued as FCA in the dash. I’ve never seen it happening before except one time a car cut in front of me very close to me on the highway, but I have seen the “keep hands on steering wheel”. And the messages are very different on the dash

devtekve avatar Jan 02 '24 23:01 devtekve

Also for reference I also test sending value 2 for takeOverReq but that was the same as sending 0, meaning no warning on the dashboard and everything kept working as usual

devtekve avatar Jan 02 '24 23:01 devtekve

I see, what happens when you send 1 while cruise is not enabled? Looks like we can send our own FCW on the dash with this find in the future, nice! Still, just need to check some data to fully understand the signal, which I can do later

sshane avatar Jan 02 '24 23:01 sshane

I only see a handful of examples in 30k segments from the last year of Hyundai data, but they all were engaged and generally do look like FCW events, without AEB:

https://github.com/commaai/openpilot/assets/25857203/487e309a-adb0-4528-8cec-387ef87ca4a1

sshane avatar Jan 03 '24 07:01 sshane

I see, what happens when you send 1 while cruise is not enabled? Looks like we can send our own FCW on the dash with this find in the future, nice! Still, just need to check some data to fully understand the signal, which I can do later

Nothing happens, remember I told you I modified OP to constantly send takeOverReq to 1, in the second video of me driving in the night you can see that the fca happens when I “set” the SCC not when I am driving, but all that time the takeOverReq sent was being 1

devtekve avatar Jan 03 '24 10:01 devtekve

I only see a handful of examples in 30k segments from the last year of Hyundai data, but they all were engaged and generally do look like FCW events, without AEB:

output_grid.mp4

It’s a very rare occurrence that the FCW happens when stock SCC is active, I’ve only seen it happening twice in my 4 years owning this car, usually SCC simply prevents an FCW because it simply is always at a good distance. I wonder if I disable SCC and force it to regular CC and set what would happen as it approaches a car ? I’m a bit scared of testing that $h!t out tho 😂😂😂

Also from the videos, the only other event like this that happened to me is very similar to those in the bottom part, a car cut in front of me suddenly.

devtekve avatar Jan 03 '24 10:01 devtekve

All of those examples were enabled during TakeOverReq=1 (except one where it persisted for a second after disabling), and when the SCC system requested a lot of decel from detecting a new lead suddenly. Here's a few examples:

image

image

Looks fine to always check (ignoring ACCMode)

sshane avatar Jan 04 '24 01:01 sshane

nice find, thanks!

sshane avatar Jan 04 '24 03:01 sshane

Only one thing I want to mention is that if ACCMode is not enabled, even if you send takeOverReq the FCA alert won’t show on the cluster, so in my head, I don’t consider simply having the takeOverReq to be the FCA and rather it’s a combination of takeOverReq + ACCMode, but I’m leaving the comment here in case we ever get a case that is confusing. Thanks for merging @sshane

devtekve avatar Jan 04 '24 09:01 devtekve