-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Eigen NumTraits incomplete for Eigen/Geometry/AngleAxis #310
Comments
Do you mean?
=> |
@pmoulon you are right. its either
as described by NumTrait Docs and... sorry for closing this issue prematurely... |
Can you clarify what Eigen version you are using? |
Eigen version is 3.3.4 |
Can you please post a complete compilable example so I can reproduce the issue? |
Also, have you seen ceres/rotation.h? Using Jet objects in Eigen's angle axis implementations is probably not a good idea; we have special handling for derivatives that won't be done in Eigen's version. |
@keir I found that the reason for the compilation error stems from using the initialization from a rotation matrix AngleAxis(Eigen::MatrixBase). This then leads to problems found in Quaternions. I apologize here that my bugreport is overall sloppy... :( Will come up with an "non-working" example soon. Then, using g++-7.1, the error will be
|
Here is the non-compiling example. The problem indeed stems from the conversion of a rotation matrix to angle axis format.
cmake project file:
|
Unfortunately your desire to stay with Eigen expressions will likely lead to bad optimization - autodiff is not a panacea; you cannot blindly use it without understanding what happens underneath. Eigen will not do any special handling for autodiff, nor can they-- the special handling requires digging directly into the autodiff types. It would be strange for Eigen to have Ceres::Jet specific code. If anything, I'm tempted to add a compile assert to prevent people from using Eigen's AxisAngle code with Jets, since it will lead to tears and frustration. What's most vexing is that if we fixed the current issue to enable Eigen::AngleAxis with Ceres jets, the resulting code would compile, and even work sometimes, but then break silently when near the areas that have the singularities. What is the reason to not use ceres/rotation.h? It has taken multiple years to get the corner cases right in that code, so I would like to understand the reason not to benefit from our pain and suffering. |
However, I could be convinced to add overloads for Eigen::AngleAxis<> that call into the other routines in ceres/rotation.h. I suspect it'd be messy and not worth the effort, but if the patch turns out reasonably clean, then I would support inclusion in Ceres. |
we should add these traits. It is the user's choice as to how they want to use Jets. |
https://ceres-solver-review.googlesource.com/#/c/ceres-solver/+/11020/ is out for review. Please test it and let me know that it does the needful for you. |
Add highest and lowest traits to the Jet implementation. #310 Change-Id: I7c68fa8e2baa7742880d3faa21f366352e48aacf
Add highest and lowest traits to the Jet implementation. ceres-solver/ceres-solver#310 Change-Id: I7c68fa8e2baa7742880d3faa21f366352e48aacf
Hello,
when using Eigen's Geometry/AngleAxis class, compilation errors occour, as these classes require the traits highest() and lowest() to be defined.
Would be nice, if they could be added.
Cheers
The text was updated successfully, but these errors were encountered: