From 3bdc6d36cde0d55b44e00bad8ae085e01446e529 Mon Sep 17 00:00:00 2001 From: Binit Shah Date: Fri, 12 Jun 2020 00:08:06 -0400 Subject: [PATCH] Better explanation of Rot3 Logmap Lund unit test --- gtsam/geometry/tests/testRot3.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gtsam/geometry/tests/testRot3.cpp b/gtsam/geometry/tests/testRot3.cpp index 19d696abd..598c57b24 100644 --- a/gtsam/geometry/tests/testRot3.cpp +++ b/gtsam/geometry/tests/testRot3.cpp @@ -243,10 +243,16 @@ TEST(Rot3, log) { Rot3 Rlund(-0.98582676, -0.03958746, -0.16303092, // -0.03997006, -0.88835923, 0.45740671, // -0.16293753, 0.45743998, 0.87418537); + + // Rot3's Logmap returns different, but equivalent compacted + // axis-angle vectors depending on whether Rot3 is implemented + // by Quaternions or SO3. #if defined(GTSAM_USE_QUATERNIONS) + // Quaternion bounds angle to [-pi, pi] resulting in ~179.9 degrees EXPECT(assert_equal(Vector3(0.264451979, -0.742197651, -3.04098211), (Vector)Rot3::Logmap(Rlund), 1e-8)); #else + // SO3 does not bound angle resulting in ~180.1 degrees EXPECT(assert_equal(Vector3(-0.264544406, 0.742217405, 3.04117314), (Vector)Rot3::Logmap(Rlund), 1e-8)); #endif