-
Notifications
You must be signed in to change notification settings - Fork 765
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
CombinedImuFactor: Add bias effect on position jacobian #874
Conversation
@dellaert I need some help regarding the integration covariance. Can you point me to a resource that can help explain the mathematical basis for it? |
No, @lucacarlone and @cfo did all this. The integration covariance was always a bit of a mystery to me as well ;-) Your best bet is @lucacarlone 's TR which I think you already asked for. |
Gotcha! That's the only thing left to document before this PR is ready. 🙂 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.01, 0, // | ||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.01; | ||
|
||
// regression |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, I think a "regression" is not enough here. It's easy to make a mistake, so how do we know the code is correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a great point which I have been wondering about myself. ImuFactor
has a similar test (which I used as a template) so the same question can be asked about that factor.
I should add sub-tests that check for these things individually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, especially with the non-trivial changes here, we need to think about how we can test, maybe using numbers also derivatives
I shared the report, but I suspect it will not be very useful (it mostly covers the jacobians). I'm happy to write down the math if this is not super-urgent (I cannot do that before sometimes in October). |
@lucacarlone yes that works. We can update the document later since this PR is focused on resolving #368. 🙂 |
@dellaert so I've spent some more time trying to test the preintegration covariance, and I've found a lot of inconsistencies.
Unfortunately, without understanding the math behind the preintegration covariance, I cannot be certain whether any operation is the correct one to do. |
This is the preintegration covariance for the ImuFactor
and for the same numbers, we get for CombinedImuFactor
I know what is causing the difference, I just need to understand the rationale behind it. |
So, is this (a) the manifold or (b) tangent-space formulation that has issues? You should not do any operation/correction unless it is described there. If somethings is done in the code that is not described in either document, what is it? PS It might be easiest to start with tangent-space formulation. |
Also, which unit test fails - excluding regression tests? |
I'm currently working explicitly in the tangent space formulation, but this is an issue in the noise propagation at the factor level so I imagine it will show even in the manifold formulation. None of the math regarding the covariance of the CombinedImuFactor exists in ImuFactor.pdf. What's confusing is the interaction of the integration covariance with all the Jacobians which we don't have any documentation for yet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to resolve the testing issue before we can land
gtsam/navigation/CombinedImuFactor.h
Outdated
@@ -42,6 +42,8 @@ typedef ManifoldPreintegration PreintegrationType; | |||
* L. Carlone, Z. Kira, C. Beall, V. Indelman, F. Dellaert, Eliminating | |||
* conditionally independent sets in factor graphs: a unifying perspective based | |||
* on smart factors, Int. Conf. on Robotics and Automation (ICRA), 2014. | |||
* | |||
* [3] is available in this repo as "PreintegratedIMUJacobians.pdf". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not say this below where [3] is defined?
gtsam/navigation/ImuFactor.h
Outdated
@@ -44,6 +44,8 @@ typedef ManifoldPreintegration PreintegrationType; | |||
* C. Forster, L. Carlone, F. Dellaert, D. Scaramuzza, "IMU Preintegration on | |||
* Manifold for Efficient Visual-Inertial Maximum-a-Posteriori Estimation", | |||
* Robotics: Science and Systems (RSS), 2015. | |||
* | |||
* [3] is available in this repo as "PreintegratedIMUJacobians.pdf". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same: say this below
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.01, 0, // | ||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.01; | ||
|
||
// regression |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, especially with the non-trivial changes here, we need to think about how we can test, maybe using numbers also derivatives
Fix Preintegration Covariance of CombinedImuFactor
@lucacarlone yes last PR. Just the one file in |
@varunagrawal : to be honest I'm a bit lost among these PRs. the PR says this mostly updates the pdf, but you mention CombinedImuFactor.cpp is what's important? |
@lucacarlone so sorry about that. This PR was supposed to initially fix a bug causing degenerate covariances but we discovered a lot of issues when going through the IMU factor PDF, which is why you saw the other PRs built on top of this. Honestly, this PR should be good to go since the other PRs were updates to this one. Frank prefers having smaller PRs to make reviewing easier but this time it proved to be a bit more complicated. CombinedImuFactor.cpp is definitely the only major change here. Everything else should just be a repeat of things you've already reviewed. |
The original PR comment is definitely outdated. |
This reverts commit 2d41b01.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm approving this, but haven't re-reviewed the math.
@lucacarlone thank you! That should be fine since the math is the same from the prior PRs you reviewed and I went from math -> code + added lots of unit tests. @dellaert just need you to unblock this PR now and we can land it!!! 😄 |
@dellaert I undid the name change from |
Thanks for isolating the name change. Will approve now. |
Fixes #368
TODO