Skip to content

Commit

Permalink
Merge pull request #780 from tmcg0/fix-so3-logmap
Browse files Browse the repository at this point in the history
Bugfix: correct SO(3) logmap when theta small
  • Loading branch information
ProfFan authored Jun 3, 2021
2 parents 5540097 + 4ef4338 commit 26356db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gtsam/geometry/SO3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,8 @@ Vector3 SO3::Logmap(const SO3& Q, ChartJacobian H) {
} else {
// when theta near 0, +-2pi, +-4pi, etc. (trace near 3.0)
// use Taylor expansion: theta \approx 1/2-(t-3)/12 + O((t-3)^2)
magnitude = 0.5 - tr_3 * tr_3 / 12.0;
// see https://github.com/borglab/gtsam/issues/746 for details
magnitude = 0.5 - tr_3 / 12.0;
}
omega = magnitude * Vector3(R32 - R23, R13 - R31, R21 - R12);
}
Expand Down

0 comments on commit 26356db

Please sign in to comment.