Fixed incorrect template argument leading to test failure

release/4.3a0
dellaert 2014-12-22 13:07:41 +01:00
parent 903e5a3a86
commit e44dfa5052
1 changed files with 3 additions and 3 deletions

View File

@ -79,7 +79,7 @@ TEST( testPoseRotationFactor, level2_zero_error ) {
Pose2RotationPrior factor(poseKey, rot2A, model1);
Matrix actH1;
EXPECT(assert_equal(zero(1), factor.evaluateError(pose1, actH1)));
Matrix expH1 = numericalDerivative22<Vector2,Pose2RotationPrior,Pose2>(evalFactorError2, factor, pose1, 1e-5);
Matrix expH1 = numericalDerivative22<Vector1,Pose2RotationPrior,Pose2>(evalFactorError2, factor, pose1, 1e-5);
EXPECT(assert_equal(expH1, actH1, tol));
}
@ -89,7 +89,7 @@ TEST( testPoseRotationFactor, level2_error ) {
Pose2RotationPrior factor(poseKey, rot2B, model1);
Matrix actH1;
EXPECT(assert_equal((Vector(1) << -M_PI_2).finished(), factor.evaluateError(pose1, actH1)));
Matrix expH1 = numericalDerivative22<Vector2,Pose2RotationPrior,Pose2>(evalFactorError2, factor, pose1, 1e-5);
Matrix expH1 = numericalDerivative22<Vector1,Pose2RotationPrior,Pose2>(evalFactorError2, factor, pose1, 1e-5);
EXPECT(assert_equal(expH1, actH1, tol));
}
@ -99,7 +99,7 @@ TEST( testPoseRotationFactor, level2_error_wrap ) {
Pose2RotationPrior factor(poseKey, rot2D, model1);
Matrix actH1;
EXPECT(assert_equal((Vector(1) << -0.02).finished(), factor.evaluateError(pose1, actH1)));
Matrix expH1 = numericalDerivative22<Vector2,Pose2RotationPrior,Pose2>(evalFactorError2, factor, pose1, 1e-5);
Matrix expH1 = numericalDerivative22<Vector1,Pose2RotationPrior,Pose2>(evalFactorError2, factor, pose1, 1e-5);
EXPECT(assert_equal(expH1, actH1, tol));
}