From ce6844abe19b194e7c69b36efff1366780dc6581 Mon Sep 17 00:00:00 2001 From: Chris Beall Date: Thu, 21 Oct 2010 19:51:12 +0000 Subject: [PATCH] fixed threshold problems that showed up when compiling 32 bit gtsam on Snow leopard with universal boost --- geometry/tests/testPose3.cpp | 26 +++++++++++++------------- geometry/tests/testRot3.cpp | 10 +++++----- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/geometry/tests/testPose3.cpp b/geometry/tests/testPose3.cpp index 8bcd0dc5e1..627b156f8d 100644 --- a/geometry/tests/testPose3.cpp +++ b/geometry/tests/testPose3.cpp @@ -168,10 +168,10 @@ TEST( Pose3, compose ) Matrix actualDcompose1, actualDcompose2; T2.compose(T2, actualDcompose1, actualDcompose2); - Matrix numericalH1 = numericalDerivative21(testing::compose, T2, T2, 1e-4); - CHECK(assert_equal(numericalH1,actualDcompose1,5e-5)); + Matrix numericalH1 = numericalDerivative21(testing::compose, T2, T2, 1e-2); + CHECK(assert_equal(numericalH1,actualDcompose1,5e-3)); - Matrix numericalH2 = numericalDerivative22(testing::compose, T2, T2, 1e-4); + Matrix numericalH2 = numericalDerivative22(testing::compose, T2, T2, 1e-2); CHECK(assert_equal(numericalH2,actualDcompose2)); } @@ -186,10 +186,10 @@ TEST( Pose3, compose2 ) Matrix actualDcompose1, actualDcompose2; T1.compose(T2, actualDcompose1, actualDcompose2); - Matrix numericalH1 = numericalDerivative21(testing::compose, T1, T2, 1e-4); - CHECK(assert_equal(numericalH1,actualDcompose1,5e-5)); + Matrix numericalH1 = numericalDerivative21(testing::compose, T1, T2, 1e-2); + CHECK(assert_equal(numericalH1,actualDcompose1,5e-3)); - Matrix numericalH2 = numericalDerivative22(testing::compose, T1, T2, 1e-4); + Matrix numericalH2 = numericalDerivative22(testing::compose, T1, T2, 1e-2); CHECK(assert_equal(numericalH2,actualDcompose2)); } @@ -201,8 +201,8 @@ TEST( Pose3, inverse) Matrix expected = inverse(T.matrix()); CHECK(assert_equal(actual,expected,1e-8)); - Matrix numericalH = numericalDerivative11(testing::inverse, T, 1e-5); - CHECK(assert_equal(numericalH,actualDinverse)); + Matrix numericalH = numericalDerivative11(testing::inverse, T, 1e-2); + CHECK(assert_equal(numericalH,actualDinverse,5e-3)); } /* ************************************************************************* */ @@ -212,10 +212,10 @@ TEST( Pose3, inverseDerivatives2) Point3 t(3.5,-8.2,4.2); Pose3 T(R,t); - Matrix numericalH = numericalDerivative11(testing::inverse, T, 1e-5); + Matrix numericalH = numericalDerivative11(testing::inverse, T, 1e-2); Matrix actualDinverse; T.inverse(actualDinverse); - CHECK(assert_equal(numericalH,actualDinverse,5e-5)); + CHECK(assert_equal(numericalH,actualDinverse,5e-3)); } /* ************************************************************************* */ @@ -457,10 +457,10 @@ TEST( Pose3, between ) Pose3 actual = T2.between(T3, actualDBetween1,actualDBetween2); CHECK(assert_equal(expected,actual)); - Matrix numericalH1 = numericalDerivative21(testing::between , T2, T3, 1e-4); - CHECK(assert_equal(numericalH1,actualDBetween1,5e-5)); + Matrix numericalH1 = numericalDerivative21(testing::between , T2, T3, 1e-2); + CHECK(assert_equal(numericalH1,actualDBetween1,5e-3)); - Matrix numericalH2 = numericalDerivative22(testing::between , T2, T3, 1e-4); + Matrix numericalH2 = numericalDerivative22(testing::between , T2, T3, 1e-2); CHECK(assert_equal(numericalH2,actualDBetween2)); } diff --git a/geometry/tests/testRot3.cpp b/geometry/tests/testRot3.cpp index 3472dc49ae..e65ab1b2fe 100644 --- a/geometry/tests/testRot3.cpp +++ b/geometry/tests/testRot3.cpp @@ -276,11 +276,11 @@ TEST( Rot3, compose ) CHECK(assert_equal(expected,actual)); Matrix numericalH1 = numericalDerivative21(testing::compose, R1, - R2, 1e-4); + R2, 1e-2); CHECK(assert_equal(numericalH1,actualH1)); Matrix numericalH2 = numericalDerivative22(testing::compose, R1, - R2, 1e-4); + R2, 1e-2); CHECK(assert_equal(numericalH2,actualH2)); } @@ -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, R, 1e-4); + Matrix numericalH = numericalDerivative11(testing::inverse, R, 1e-2); CHECK(assert_equal(numericalH,actualH)); } @@ -314,10 +314,10 @@ TEST( Rot3, between ) Rot3 actual = R1.between(R2, actualH1, actualH2); CHECK(assert_equal(expected,actual)); - Matrix numericalH1 = numericalDerivative21(testing::between , R1, R2, 1e-4); + Matrix numericalH1 = numericalDerivative21(testing::between , R1, R2, 1e-2); CHECK(assert_equal(numericalH1,actualH1)); - Matrix numericalH2 = numericalDerivative22(testing::between , R1, R2, 1e-4); + Matrix numericalH2 = numericalDerivative22(testing::between , R1, R2, 1e-2); CHECK(assert_equal(numericalH2,actualH2)); }