Added Logmap test

release/4.3a0
dellaert 2015-02-11 14:28:44 +01:00
parent 9613f4d5b0
commit 53b9911121
1 changed files with 28 additions and 20 deletions

View File

@ -39,6 +39,14 @@ TEST(Quaternion , Constructor) {
Q q(Eigen::AngleAxisd(1, Vector3(0, 0, 1))); Q q(Eigen::AngleAxisd(1, Vector3(0, 0, 1)));
} }
//******************************************************************************
TEST(Quaternion , Logmap) {
Q q1(5e-06, 0, 0, 1), q2(-5e-06, 0, 0, -1);
Vector3 v1 = traits<Q>::Logmap(q1);
Vector3 v2 = traits<Q>::Logmap(q2);
EXPECT(assert_equal(v1, v2));
}
//****************************************************************************** //******************************************************************************
TEST(Quaternion , Local) { TEST(Quaternion , Local) {
Vector3 z_axis(0, 0, 1); Vector3 z_axis(0, 0, 1);