Better explanation of Rot3 Logmap Lund unit test
parent
7c362c3e92
commit
3bdc6d36cd
|
|
@ -243,10 +243,16 @@ TEST(Rot3, log) {
|
||||||
Rot3 Rlund(-0.98582676, -0.03958746, -0.16303092, //
|
Rot3 Rlund(-0.98582676, -0.03958746, -0.16303092, //
|
||||||
-0.03997006, -0.88835923, 0.45740671, //
|
-0.03997006, -0.88835923, 0.45740671, //
|
||||||
-0.16293753, 0.45743998, 0.87418537);
|
-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)
|
#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),
|
EXPECT(assert_equal(Vector3(0.264451979, -0.742197651, -3.04098211),
|
||||||
(Vector)Rot3::Logmap(Rlund), 1e-8));
|
(Vector)Rot3::Logmap(Rlund), 1e-8));
|
||||||
#else
|
#else
|
||||||
|
// SO3 does not bound angle resulting in ~180.1 degrees
|
||||||
EXPECT(assert_equal(Vector3(-0.264544406, 0.742217405, 3.04117314),
|
EXPECT(assert_equal(Vector3(-0.264544406, 0.742217405, 3.04117314),
|
||||||
(Vector)Rot3::Logmap(Rlund), 1e-8));
|
(Vector)Rot3::Logmap(Rlund), 1e-8));
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue