Closed GoogleCodeExporter closed 9 years ago
[deleted comment]
I changed the line 188 of "rotation.h" as follow, and that working for my
request.
// const T k = T(2.0) * atan2(sin_theta, quaternion[0]) / sin_theta;
const T a = T(2.0) * atan2(sin_theta, quaternion[0]);
const T an = atan2( sin(a), cos(a) );
const T k = an / sin_theta;
Still, I need some comments on this issue.
Thank you!
Original comment by akc...@gmail.com
on 16 Aug 2012 at 12:47
Thanks for reporting this. This looks like a floating point overflow issue. I
will look into today or hopefully tomorrow.
Original comment by sameerag...@google.com
on 16 Aug 2012 at 2:51
Original comment by sameerag...@google.com
on 16 Aug 2012 at 5:50
Its not a rounding error, but actually a bug in our conversion routine. Thanks
for catching this and suggesting a solution. I came up with a slightly better
(I think) solution which avoids two atan2 calls.
I have submitted a patch for review which fixes this, you can follow its
progress at
https://ceres-solver-review.googlesource.com/#/c/1571/
Original comment by sameerag...@google.com
on 17 Aug 2012 at 5:18
The change is submitted and live in the git repository on gerrit.
Original comment by sameerag...@google.com
on 17 Aug 2012 at 9:33
In the first post, the value of quaternion is given by the function
QuaternionProduct:
q[0] = -0.0107399;
q[1] = 0.00987652;
q[2] = -0.999836;
q[3] = 0.0107603;
This value already implies that the theta is greater than PI, so I think this
routine can also be improved to give a stable result.
Original comment by akc...@gmail.com
on 18 Aug 2012 at 1:16
I disagree. There are no constraints on the quaternions that the angle there be
normalized. The result of the quaternion product is stable. Indeed, introducing
a normalization there will create a discontinuity.
Original comment by sameerag...@google.com
on 18 Aug 2012 at 7:22
Thanks for your comment.
Original comment by akc...@gmail.com
on 19 Aug 2012 at 5:45
Original issue reported on code.google.com by
akc...@gmail.com
on 16 Aug 2012 at 5:48