-
Notifications
You must be signed in to change notification settings - Fork 595
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
Possible bug in SE3Base::internalMultiplyByGenerator
#118
Comments
👍 the formula makes sense, but it's hard to believe such an error is overlooked by unit tests (!?).
Sections 7 to 10 of these notes I collected over the years might hopefully be a good starting point... (feedback is welcome!) |
Ah, good point about the unit tests. There is in fact a unit test, and it passes as is, and fails with my suggestion. Thinking about it again, my comment is wrong, since we are multiplying by a generator, and not by another SE3 element. The generators (as 4x4 matrices) all have 0 in their last row, which means that the translation of |
@jlblancoc: I'm aware of your tech report, and it has been very useful to me many times, thank your very much! However, for me it leaves some questions open, in particular when trying to understand the implementation here. Your report discusses the optimization related Jacobians with respect to a matrix representation, not the quaternion one. Also, you follow the convention for current state estimate P.S.: I have some minor comments on this part of your report. In what form would you prefer the feedback? Via email? |
P.S.: regarding this issue here, looking at your report, equation (10.19), it makes sense that the translation does not appear in the Jacobian of Sohpus' code either. |
Hi @NikolausDemmel ,
Until now people contacted via email, but I have just published the whole thing on a GH repo so it's easier to discuss and propose changes to anyone. Feel free of opening issue tickets there to post your comments on the report.
AFAIK, both are valid choices. I can't remember from the top of my head if one has more advantages than the other in computational terms.
I tend to like the matrix version since it led to really "clean" (and linear) Jacobians. Probably we can obtain the Jacobians wrt quaternions by applying the chain rule. That conversion Jacobian would be a nice addition to the report, since it will allow any of the other formulas to work for quaternions too.
I was not familiar with that rule, but writing it in matrix form, looks valid in general to me. |
While SE(3) / SO(3) etc. are pretty much covered by standard textbooks, I'm not aware of a good reference when it comes to the concept I call "internal generators". This concept arises by the fact that we represent SO(3) internally as SU(2). I do have some vague plans to
When I find some time... |
This is also my understanding. I have came across both variants many times and there does not seem to be a clear advantage of either approach in general.
Yes that would be useful. In general there is of course also the problem that there are different conventions for quaternions (see Joan Sola's techreport for a detailed discussion).
Is there really something fundamental going on here? It is simply a matter of representing rotations in different and equivalent ways. And its fine to mix and match, as long as you are consistent. E.g. for manifold optimization, what Jacobians you need depends on whether you differentiate down to the quaternion representation, or stop at the direction cosine matrix, and at the same time whether you apply the update directly to the quaternion, or whether you update an intermediate direction cosine matrix and then convert the result to a quaternion.
Would be nice to have :-D |
@NikolausDemmel, you are right. There is not. I merged some changes which make this hopefully much cleaner: SO(2), SO(3), SE(2) and SE(3) have now a number of Jacobians implemented:
Here, All such derivatives are derived from sympy, see In addition all derivatives have c++ unit test coverage by comparing the Jacobians with numerical Jacobians using finite differences. |
Hence, I believe PR #133 addresses this issue. Please reopen if this is not the case. |
Thanks @strasdat |
I think there might be the translation missing in:
Sophus/sophus/se3.hpp
Line 124 in 3f84e42
Should this maybe be the following, to implement the full SE product of "this * generator_i"?
@strasdat, can you suggest a good reference for SE(3) / SO(3) / SU(2) derivatives as needed for manifold optimization?
The text was updated successfully, but these errors were encountered: