openpilot
openpilot copied to clipboard
Toyota: improve response to acceleration requests
Toyotas seem reluctant to apply acceleration requests immediately if this bit is set, even if you request a static acceleration of 1.0 m/s/s. There are still issues with the controller lowering or even making acceleration negative if we overshoot the plan while starting which diminishes this improvement, but this actually does make the car respond better to acceleration requests.
Here are two examples with the change showing the worse possible scenario for the car; as soon as we take off we lower the requested acceleration which normally would have the car let off the gas quite a bit, however it continues on to reach the target, albeit with a little bit of slowing that you can feel.


Routes with latest changes for my reference:
f15e3c37c118e841|2022-06-30--00-51-03--0 f15e3c37c118e841|2022-06-30--00-59-09--0 f15e3c37c118e841|2022-06-30--01-01-57--0
@HaraldSchafer Are we okay with Toyota overshooting the planner's request with this PR? When starting, nearly every time it will overshoot not only the start, but throughout accelerating. We don't exactly request what the stock system does from a start, so it releases the brakes super quickly rather than ramping off them to avoid overshoot.
We might need some manual profile to fix this, but it might be different per car (hybrids might get moving faster coasting from a stop like mine).

Per a recent conversation, closing as this bit isn't a great way to generically improve starting accuracy (little perceptible improvement to starting acceleration, overshoots acceleration at all speed, and can be dangerous if pitch is slightly wrong)