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

ekf2: symforce - use builtin Rot3 and Quaternion operations #21359

Merged
merged 8 commits into from
Jun 5, 2023

Conversation

bresch
Copy link
Member

@bresch bresch commented Mar 22, 2023

Solution

Symforce has rotation (https://symforce.org/api/symforce.symbolic.html#symforce.symbolic.Rot3) and quaternion (https://symforce.org/api/symforce.symbolic.html#symforce.symbolic.Quaternion) support so we should use it instead of re-writing all the functions (mult, conversions, ...).

Test coverage

  • interestingly some of the jacobians are different from before. This is because of how the quat to rot mat is implemented (assuming unit quaternion, like we do for the covariance prediction).

@bresch bresch added the EKF2 label Mar 22, 2023
@bresch bresch self-assigned this Mar 22, 2023
@dagar
Copy link
Member

dagar commented Mar 22, 2023

Time to drop (or relax) the comparisons with old generated?

@bresch
Copy link
Member Author

bresch commented Mar 23, 2023

Time to drop (or relax) the comparisons with old generated?

Yes, I't trying to find a new metric to compare them or just make new unit tests to actually make sure the result is correct instead of just comparing with the old derivation.

@bresch bresch force-pushed the pr-symforce-builtin-rot branch 2 times, most recently from ba06334 to 573a633 Compare March 29, 2023 15:09
@bresch bresch marked this pull request as ready for review March 29, 2023 15:09
@bresch bresch force-pushed the pr-symforce-builtin-rot branch 3 times, most recently from d7496c8 to 7042375 Compare March 30, 2023 09:53
@bresch
Copy link
Member Author

bresch commented Mar 30, 2023

The true correct thing would actually be to define the quaternion variance on the tangent-space and not as an uncertainty on each component of the quaternion (the quaternion is not "just a vector"). see A micro Lie theory for state estimation in robotics, p.8-II.H and how to do it in SymForce.
DeepinScreenshot_select-area_20230330161920

This would reduce the P matrix to 23x23 elements, so it would make sense to also estimate the delta quaternion (3D) in an error-state EKF to also reduce the state vector. Something to keep in mind for later.

@bresch bresch requested a review from dagar March 31, 2023 11:30
@bresch bresch force-pushed the pr-symforce-builtin-rot branch 2 times, most recently from f69bbdd to a890fe1 Compare April 3, 2023 10:01
@bresch
Copy link
Member Author

bresch commented Apr 28, 2023

to merge after 1.14 release

@dagar dagar merged commit 5233b33 into main Jun 5, 2023
82 of 84 checks passed
@dagar dagar deleted the pr-symforce-builtin-rot branch June 5, 2023 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants