27 using namespace gtsam;
29 #ifdef GTSAM_USE_QUATERNIONS
32 TEST(Rot3Q , Compare) {
37 typedef TQ::ChartJacobian OJ;
49 Q q3 = TQ::Compose(q1, q2, {}, {});
50 R R3 = TR::Compose(
R1,
R2, {}, {});
55 Q q4 = TQ::Retract(q3,
v);
56 R R4 = TR::Retract(
R3,
v);
73 vQ = TQ::Local(q3, q4);
74 vR = TR::Local(
R3, R4);
78 Vector3 vQ1 = TQ::Local(q3, TQ::Compose(q1, TQ::Retract(q2,
v)));
81 Vector3 vQ2 = TQ::Local(q3, TQ::Compose(q1, TQ::Retract(q2, -
v)));
84 EXPECT(assert_equal<Vector3>((vQ1 - vQ2) / 0.2, (vR1 - vR2) / 0.2));
88 HQ = numericalDerivative42<Q, Q, Q, OJ, OJ>(TQ::Compose, q1, q2, {}, {});
89 HR = numericalDerivative42<R, R, R, OJ, OJ>(TR::Compose,
R1,
R2, {}, {});