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

controls: publish current curvature in CarControl #34679

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jyoung8607
Copy link
Collaborator

In support of Volkswagen ID.4 (MEB). Requires commaai/opendbc#1803.

The lateral control coordinator accepts curvature for actuation, and does a pretty good job controlling the car. However, it's closing the control loop against its own idea of the vehicle's curvature, which is different from what openpilot calculates.

Screenshot from 2025-02-22 19-51-50

To drive the car properly, we need to calculate the difference between those current curvatures, and offset our actuation command by that amount. For the car port to do that, it needs access to the vehicle model curvature.

Before:

Screenshot from 2025-02-22 19-48-35

After:

Screenshot from 2025-02-22 19-43-23

@sshane
Copy link
Contributor

sshane commented Feb 23, 2025

@haraschax what do you think? The ID.4 takes a curvature, however its current curvature reading is inaccurate so it doesn't reach our target curvature. If we offset the desired curvature with the difference of the car's reading and our reading of current curvature it seems to work.

We can also error correct on angle/curvature to fix this, but we haven't needed to add this to LatControlAngle yet

@haraschax
Copy link
Contributor

Yeah this seems fine, this doesn't break the API.

@sshane
Copy link
Contributor

sshane commented Feb 23, 2025

Can you bump opendbc?

@jyoung8607
Copy link
Collaborator Author

@sshane this should just need replay logs updated.

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

Successfully merging this pull request may close these issues.

3 participants