commaai / openpilot

openpilot is an operating system for robotics. Currently, it upgrades the driver assistance system in 275+ supported cars.
https://comma.ai/openpilot
MIT License
49.63k stars 9.02k forks source link

2020 Silverado/Sierra Gas drop outs and slow take off #30557

Closed morrislee closed 10 months ago

morrislee commented 10 months ago

Describe the bug

GM Camera based ACC or GM cars in general has lack of throttle response which resulted in poor acceleration from stop and also keeping up with traffic. I have discovered that the current panda code of 2048 zero gas causes the throttle to cut out when planner is trying to smoothly let off the gas

dc7716b32bf25574|2023-11-28--17-18-31--15 image

here is an example following a lead car with a consistent velocity but I am rubberbanding behind because of the throttle cutouts image

While doing so, we also discovered that poor take off performance was caused by the throttle limited to 3400 units like the segment below, both flanking cars are already so far ahead and we can observe the throttle is pegged at 3400 until 25kph ( 7 kph) where the acceleration feels more natural

dc7716b32bf25574|2023-11-24--21-25-09--9 image

The current planner and the MPC following distance is rather far (I have adjusted t_follow to 0.8 is still far), I have made zero gas to follow the max acc regen value for zero gas can be observed for a smoother drop and doesnt cut out throttle while approaching lead car on the highway speeds, this was able to keep up with the lead car way better. dc7716b32bf25574|2023-11-29--18-59-18--15 image

On take off behind lead can be observed to allow up to 4095 bits on max gas was able to maintain traffic with a consistent lead distance (drel) and most reached it without any unnatural acceleration dc7716b32bf25574|2023-11-29--18-59-18--7 image

I suggest that we apply the max gas allowed to 4095 to conform to what GM allows and we need to further observe what the zero gas needs to be calibrated to, but 1514 seems to work ok so far.

Vision only ACC is finally a drivable experience with these changes for me, I no longer rubber band behind lead because the throttle doesnt cut out or unable to have enough throttle to keep up with a lead taking off ahead.

This is all now discoverable issues thanks to the accurate new models with very consistent lead speed.

I also propose that we include the lead_msg[0].a back to radard.py, I still seem to get a more reactive feel behind a lead changing in speed both acceleration or braking, doesnt seem to cause any feedback loop. I do observe the lead_msg[0].a can be a bit noisey still, but it works better than a static 0 value.

If possible, please revisit the following distance currently set at 1.2, 1.45, and 1.75 all follows really far, adjusting these to lower number doesnt seem to help much, and also worsen the braking feel as it doesnt brake early enough, compensating with comfort_brake value dropped to 1.5 seems to help a bit but has some side effects as sometimes it takes a while to decide to keep up with the lead car back again.

Perhaps @sshane can chime in and @haraschax can assist in the radard.py, MPC and planner adjustments

Which car does this affect?

GMC Sierra 1500

Provide a route where the issue occurs

dc7716b32bf25574|2023-11-28--17-18-31--15

openpilot version

0.9.5

Additional info

No response

sshane commented 10 months ago

This mostly looks like a model issue to me, the lead estimation still isn't perfect. You can see in the first segment you sent, it follows the plan relatively well already, it even slightly overshoots when the throttle cuts out, so I'm not sure lowering zero gas will fix anything:

image

You can try to lower the deadzone, as that was a fix for the braking pulsing when going down hills on the Bolt, but I could see other solutions for that.