From 8ceaa8a3cc8e6d7327c139e522c3c72c9aa7e8d1 Mon Sep 17 00:00:00 2001 From: Frank Dellaert Date: Sat, 4 Jul 2015 15:25:18 -0700 Subject: [PATCH] Check ceres rotation convention --- gtsam/nonlinear/tests/testAdaptAutoDiff.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gtsam/nonlinear/tests/testAdaptAutoDiff.cpp b/gtsam/nonlinear/tests/testAdaptAutoDiff.cpp index 3f477098a..6b64aedfa 100644 --- a/gtsam/nonlinear/tests/testAdaptAutoDiff.cpp +++ b/gtsam/nonlinear/tests/testAdaptAutoDiff.cpp @@ -59,6 +59,16 @@ typedef PinholeCamera Camera; using namespace std; using namespace gtsam; +/* ************************************************************************* */ +// Make sure rotation convention is the same +TEST(AdaptAutoDiff, Rotation) { + Vector3 axisAngle(0.1,0.2,0.3); + Matrix3 expected = Rot3::rodriguez(axisAngle).matrix(); + Matrix3 actual; + ceres::AngleAxisToRotationMatrix(axisAngle.data(), actual.data()); + EXPECT(assert_equal(expected, actual)); +} + /* ************************************************************************* */ // charts TEST(AdaptAutoDiff, Canonical) {