Skip to content

Commit

Permalink
fixed threshold problems that showed up when compiling 32 bit gtsam o…
Browse files Browse the repository at this point in the history
…n Snow leopard with universal boost
  • Loading branch information
chrisbeall committed Oct 21, 2010
1 parent 6b553ce commit ce6844a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
26 changes: 13 additions & 13 deletions geometry/tests/testPose3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@ TEST( Pose3, compose )
Matrix actualDcompose1, actualDcompose2;
T2.compose(T2, actualDcompose1, actualDcompose2);

Matrix numericalH1 = numericalDerivative21(testing::compose<Pose3>, T2, T2, 1e-4);
CHECK(assert_equal(numericalH1,actualDcompose1,5e-5));
Matrix numericalH1 = numericalDerivative21(testing::compose<Pose3>, T2, T2, 1e-2);
CHECK(assert_equal(numericalH1,actualDcompose1,5e-3));

Matrix numericalH2 = numericalDerivative22(testing::compose<Pose3>, T2, T2, 1e-4);
Matrix numericalH2 = numericalDerivative22(testing::compose<Pose3>, T2, T2, 1e-2);
CHECK(assert_equal(numericalH2,actualDcompose2));
}

Expand All @@ -186,10 +186,10 @@ TEST( Pose3, compose2 )
Matrix actualDcompose1, actualDcompose2;
T1.compose(T2, actualDcompose1, actualDcompose2);

Matrix numericalH1 = numericalDerivative21(testing::compose<Pose3>, T1, T2, 1e-4);
CHECK(assert_equal(numericalH1,actualDcompose1,5e-5));
Matrix numericalH1 = numericalDerivative21(testing::compose<Pose3>, T1, T2, 1e-2);
CHECK(assert_equal(numericalH1,actualDcompose1,5e-3));

Matrix numericalH2 = numericalDerivative22(testing::compose<Pose3>, T1, T2, 1e-4);
Matrix numericalH2 = numericalDerivative22(testing::compose<Pose3>, T1, T2, 1e-2);
CHECK(assert_equal(numericalH2,actualDcompose2));
}

Expand All @@ -201,8 +201,8 @@ TEST( Pose3, inverse)
Matrix expected = inverse(T.matrix());
CHECK(assert_equal(actual,expected,1e-8));

Matrix numericalH = numericalDerivative11(testing::inverse<Pose3>, T, 1e-5);
CHECK(assert_equal(numericalH,actualDinverse));
Matrix numericalH = numericalDerivative11(testing::inverse<Pose3>, T, 1e-2);
CHECK(assert_equal(numericalH,actualDinverse,5e-3));
}

/* ************************************************************************* */
Expand All @@ -212,10 +212,10 @@ TEST( Pose3, inverseDerivatives2)
Point3 t(3.5,-8.2,4.2);
Pose3 T(R,t);

Matrix numericalH = numericalDerivative11(testing::inverse<Pose3>, T, 1e-5);
Matrix numericalH = numericalDerivative11(testing::inverse<Pose3>, T, 1e-2);
Matrix actualDinverse;
T.inverse(actualDinverse);
CHECK(assert_equal(numericalH,actualDinverse,5e-5));
CHECK(assert_equal(numericalH,actualDinverse,5e-3));
}

/* ************************************************************************* */
Expand Down Expand Up @@ -457,10 +457,10 @@ TEST( Pose3, between )
Pose3 actual = T2.between(T3, actualDBetween1,actualDBetween2);
CHECK(assert_equal(expected,actual));

Matrix numericalH1 = numericalDerivative21(testing::between<Pose3> , T2, T3, 1e-4);
CHECK(assert_equal(numericalH1,actualDBetween1,5e-5));
Matrix numericalH1 = numericalDerivative21(testing::between<Pose3> , T2, T3, 1e-2);
CHECK(assert_equal(numericalH1,actualDBetween1,5e-3));

Matrix numericalH2 = numericalDerivative22(testing::between<Pose3> , T2, T3, 1e-4);
Matrix numericalH2 = numericalDerivative22(testing::between<Pose3> , T2, T3, 1e-2);
CHECK(assert_equal(numericalH2,actualDBetween2));
}

Expand Down
10 changes: 5 additions & 5 deletions geometry/tests/testRot3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,11 @@ TEST( Rot3, compose )
CHECK(assert_equal(expected,actual));

Matrix numericalH1 = numericalDerivative21(testing::compose<Rot3>, R1,
R2, 1e-4);
R2, 1e-2);
CHECK(assert_equal(numericalH1,actualH1));

Matrix numericalH2 = numericalDerivative22(testing::compose<Rot3>, R1,
R2, 1e-4);
R2, 1e-2);
CHECK(assert_equal(numericalH2,actualH2));
}

Expand All @@ -294,7 +294,7 @@ TEST( Rot3, inverse )
CHECK(assert_equal(I,R*R.inverse(actualH)));
CHECK(assert_equal(I,R.inverse()*R));

Matrix numericalH = numericalDerivative11(testing::inverse<Rot3>, R, 1e-4);
Matrix numericalH = numericalDerivative11(testing::inverse<Rot3>, R, 1e-2);
CHECK(assert_equal(numericalH,actualH));
}

Expand All @@ -314,10 +314,10 @@ TEST( Rot3, between )
Rot3 actual = R1.between(R2, actualH1, actualH2);
CHECK(assert_equal(expected,actual));

Matrix numericalH1 = numericalDerivative21(testing::between<Rot3> , R1, R2, 1e-4);
Matrix numericalH1 = numericalDerivative21(testing::between<Rot3> , R1, R2, 1e-2);
CHECK(assert_equal(numericalH1,actualH1));

Matrix numericalH2 = numericalDerivative22(testing::between<Rot3> , R1, R2, 1e-4);
Matrix numericalH2 = numericalDerivative22(testing::between<Rot3> , R1, R2, 1e-2);
CHECK(assert_equal(numericalH2,actualH2));
}

Expand Down

0 comments on commit ce6844a

Please sign in to comment.