Fix testScenario in quaternion mode

release/4.3a0
Chris Beall 2018-12-11 21:00:43 -08:00
parent 85513c3b05
commit 0295f1e240
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));
}