-
Notifications
You must be signed in to change notification settings - Fork 767
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
Unit tests for Jacobian of PartialPriorFactor<Pose3> #721
Unit tests for Jacobian of PartialPriorFactor<Pose3> #721
Conversation
Nice. I would put the fix in this same PR, as we can’t merge failing tests :-) do you know how to fix it? |
I think so - the Unrelated, but I'd also like to rename the "mask" argument in the factor to something else, since it's a list of tangent vector indices rather than a binary mask (I found this slightly confusing at first). |
One question: should I prefer |
Ah, unrelated PRs are unrelated :-) Let's keep this one easy to review? If you've already don it no issue. localcoordinates is indeed preferred as that will allow any manifold type as well. |
Already made the change, apologies - I'll keep my PRs minimal in the future though! :) Switched to Based on |
Interesting. I propose you try something that you think is right, but do it in a very test-driven way. Definitely test away from zero, and for non-trivial manifolds, e.g. Pose3. CI seems to be failing now, BTW |
@dellaert I decided to use |
Hmmm. What's the problem using |
I forgot to mention - Would you like me to add |
So, PoseRTV is superseded by NavState, but that's a different PR :-) But the problem with LocalCoordinates might be easily solved. It might simply be a missing entry at line 78 in PoseRTV.h ?
|
I think because |
No, I think that's an oversight and we could put that in this PR. OR switch to a different type for testing this PR. Adding PoseRTV code is probably a mistake, so maybe just switch to NavState which should have all the manifold goodness. |
…en/Core> include to reduce compile memory
Sorry for all the back and forth - I opted to just add |
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.
Looking good! A few more comments re modern Jacobian style. Re-request review if CI succeeds and I'll approve (or Brice can).
|
||
// If the Rot3 Cayley map is used, Rot3::LocalCoordinates will throw a runtime error | ||
// when asked to compute the Jacobian matrix (see Rot3M.cpp). | ||
#ifdef GTSAM_ROT3_EXPMAP |
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.
Sure, but why would we do this for every possible T?
But I'll let this slip, as (a) the fix is not straightforward, (b) this is not an often used factor, and (c) GTSAM_ROT3_EXPMAP is the default...
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.
Sorry, I'm not sure I follow. Do you mean we just shouldn't use this factor if GTSAM_ROT3_EXPMAP
is turned off?
Thanks @miloknowles !!!! |
Adds unit tests for
PartialPriorFactor<Pose3>
to show that the Jacobians for this factor are incorrect. Specifically, the factor precomputes a Jacobian that is correct for an identity pose, but doesn't take into account the rotation/translation at the current linearization point. See/gtsam_unstable/slam/tests/testPartialPriorFactor.cpp
for the relevant tests (the identity case succeeds while the others fail). This is addressing the post here on the Google group.Haven't contributed to GTSAM before so apologies if I'm missing a part of the workflow. I thought I'd open the issue now, and start working on a fix in the meantime.