Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

params learner unstable during dynamic driving #33074

Open
jyoung8607 opened this issue Jul 25, 2024 · 1 comment
Open

params learner unstable during dynamic driving #33074

jyoung8607 opened this issue Jul 25, 2024 · 1 comment
Labels

Comments

@jyoung8607
Copy link
Collaborator

jyoung8607 commented Jul 25, 2024

Describe the bug

The params learner displays unexpected behavior when coming out of a corner, or accelerating or braking. The biggest problem seems to be going around corners in city driving, but acceleration or braking in a straight line can be a problem too.

When allowing the wheel to return to center under self-aligning torque, there is often a very large spike in learned tire stiffness along with some downward pressure on learned steering ratio. There are multiple issues:

  • The params learner really only understands steady-state handling, not dynamic handling
  • Therefore, steering return to center via self-aligning torque, unopposed by the driver, looks like really stiff tires
    • Acceleration and braking also affect apparent tire stiffness for purposes of lateral control
  • car_kf allows a big jump because ALL of its inputs jump simultaneously as we cross below 45 degrees steering angle

The effect seems to be cumulative, and can manifest as quality degrading over the course of a drive. Much of the effect doesn't persist for the next drive, because the learned tire stiffness factor resets at the beginning of every drive, but effects on the learned steering ratio can persist.

I'm not sure of the best way to fix this. As a workaround, I've done some testing with a patch that tries to exclude more dynamic driving. It's very crude and doesn't completely work, but does seem to reduce the problem somewhat. Anecdotally, the learned params with this patch do seem to have a positive effect on driving behavior.

Provide a route where the issue occurs

04836f13759962ab/00000077--a510468422, 73adbb0a04418743/00000027--d30dd7b9db

openpilot version

edd8759 (today's master)

Additional info

From my own car, 04836f13759962ab/00000077--a510468422.

image

From Eyezenheim's car, 73adbb0a04418743/00000027--d30dd7b9db.

Note the tire stiffness factor transients, and the factor made it all the way to 1.5.

image

Return-to-center (falling below 45 degrees) transient example 1:

image

Return-to-center (falling below 45 degrees) transient example 2:

image

Return-to-center (falling below 45 degrees) transient example 3:

image

@jyoung8607 jyoung8607 added the bug label Jul 25, 2024
@simontheflutist
Copy link

The params learner really only understands steady-state handling, not dynamic handling

Can you also share the Kalman variances from a sample trajectory? I'm wondering if they also spike during dynamic uncertainty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants