Fixed some tests/warnings in quaternion mode
parent
ff036ac05c
commit
e0c4d84dd7
|
|
@ -188,7 +188,7 @@ TEST(Expression, AutoDiff3) {
|
|||
Matrix29 H1;
|
||||
Matrix23 H2;
|
||||
Point2 actual2 = snavely(P, X, H1, H2);
|
||||
EXPECT(assert_equal(expected,actual,1e-9));
|
||||
EXPECT(assert_equal(expected,actual2,1e-9));
|
||||
EXPECT(assert_equal(E1,H1,1e-8));
|
||||
}
|
||||
|
||||
|
|
@ -200,7 +200,7 @@ TEST(Expression, Snavely) {
|
|||
typedef AdaptAutoDiff<SnavelyProjection, Point2, Camera, Point3> Adaptor;
|
||||
Expression<Point2> expression(Adaptor(), P, X);
|
||||
#ifdef GTSAM_USE_QUATERNIONS
|
||||
EXPECT_LONGS_EQUAL(480,expression.traceSize()); // Todo, should be zero
|
||||
EXPECT_LONGS_EQUAL(400,expression.traceSize()); // Todo, should be zero
|
||||
#else
|
||||
EXPECT_LONGS_EQUAL(432,expression.traceSize()); // Todo, should be zero
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -165,6 +165,7 @@ TEST(ExpressionFactor, Binary) {
|
|||
char raw[size];
|
||||
ExecutionTrace<Point2> trace;
|
||||
Point2 value = binary.traceExecution(values, trace, raw);
|
||||
EXPECT(assert_equal(Point2(),value, 1e-9));
|
||||
// trace.print();
|
||||
|
||||
// Expected Jacobians
|
||||
|
|
@ -208,8 +209,8 @@ TEST(ExpressionFactor, Shallow) {
|
|||
size_t expectedTraceSize = sizeof(Unary::Record) + sizeof(Binary::Record);
|
||||
EXPECT_LONGS_EQUAL(112, sizeof(Unary::Record));
|
||||
#ifdef GTSAM_USE_QUATERNIONS
|
||||
EXPECT_LONGS_EQUAL(464, sizeof(Binary::Record));
|
||||
LONGS_EQUAL(112+464, expectedTraceSize);
|
||||
EXPECT_LONGS_EQUAL(352, sizeof(Binary::Record));
|
||||
LONGS_EQUAL(112+352, expectedTraceSize);
|
||||
#else
|
||||
EXPECT_LONGS_EQUAL(400, sizeof(Binary::Record));
|
||||
LONGS_EQUAL(112+400, expectedTraceSize);
|
||||
|
|
@ -220,6 +221,7 @@ TEST(ExpressionFactor, Shallow) {
|
|||
char raw[size];
|
||||
ExecutionTrace<Point2> trace;
|
||||
Point2 value = expression.traceExecution(values, trace, raw);
|
||||
EXPECT(assert_equal(Point2(),value, 1e-9));
|
||||
// trace.print();
|
||||
|
||||
// Expected Jacobians
|
||||
|
|
|
|||
Loading…
Reference in New Issue