Merged in fix/quaternion-tests (pull request #350)

Fix testScenario when in quaternion mode
release/4.3a0
Chris Beall 2018-12-12 13:36:38 +00:00 committed by Frank Dellaert
commit 40b2ce5d1d
1 changed files with 4 additions and 0 deletions

View File

@ -96,7 +96,11 @@ TEST(Scenario, Loop) {
const double R = v / w;
const Pose3 T30 = scenario.pose(30);
EXPECT(assert_equal(Rot3::Rodrigues(0, M_PI, 0), T30.rotation(), 1e-9));
#ifdef GTSAM_USE_QUATERNIONS
EXPECT(assert_equal(Vector3(-M_PI, 0, -M_PI), T30.rotation().xyz()));
#else
EXPECT(assert_equal(Vector3(M_PI, 0, M_PI), T30.rotation().xyz()));
#endif
EXPECT(assert_equal(Point3(0, 0, 2 * R), T30.translation(), 1e-9));
}