panda icon indicating copy to clipboard operation
panda copied to clipboard

Toyota LTA: fix the way the torque `sample_t`'s are used

Open sshane opened this issue 1 year ago • 0 comments

The problem is how the safety was using the torque samples to enforce the torque winddown. To avoid erroneous blocked messages from panda getting a steer torque message before openpilot, we used the minimum of the last few values which provides tolerance. But this doesn't work if the torque oscillates heavily above the threshold, like when going over a pot hole.

After the oscillation, openpilot tries to enable torque correctly, but panda still thinks that torque is high since it isn't using the latest value, only the min.

image

8494c69d3c710e81/00000019--7c84cbf43c/11

sshane avatar May 14 '24 01:05 sshane