From a0be48ef752bec0194cd81d5cdcdf48b0c7fe81a Mon Sep 17 00:00:00 2001 From: cbeall3 Date: Wed, 22 Oct 2014 22:00:25 -0400 Subject: [PATCH] revert from fixed size vectors to make it compile with existing numericalDerivatives --- gtsam/geometry/tests/testRot3.cpp | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/gtsam/geometry/tests/testRot3.cpp b/gtsam/geometry/tests/testRot3.cpp index b495a4fb2..2bc4c58f0 100644 --- a/gtsam/geometry/tests/testRot3.cpp +++ b/gtsam/geometry/tests/testRot3.cpp @@ -138,12 +138,7 @@ TEST( Rot3, rodriguez4) TEST( Rot3, retract) { Vector v = zero(3); - CHECK(assert_equal(R, R.retract(v))); - - // test Canonical coordinates - Canonical chart; - Vector v2 = chart.apply(R); - CHECK(assert_equal(R, chart.retract(v2))); + CHECK(assert_equal(R.retract(v), R)); } /* ************************************************************************* */ @@ -206,9 +201,9 @@ Vector3 evaluateLogRotation(const Vector3 thetahat, const Vector3 deltatheta){ TEST( Rot3, rightJacobianExpMapSO3 ) { // Linearization point - Vector3 thetahat; thetahat << 0.1, 0, 0; + Vector thetahat = (Vector(3) << 0.1, 0, 0); - Matrix expectedJacobian = numericalDerivative11( + Matrix expectedJacobian = numericalDerivative11( boost::bind(&Rot3::Expmap, _1), thetahat); Matrix actualJacobian = Rot3::rightJacobianExpMapSO3(thetahat); CHECK(assert_equal(expectedJacobian, actualJacobian)); @@ -218,10 +213,10 @@ TEST( Rot3, rightJacobianExpMapSO3 ) TEST( Rot3, rightJacobianExpMapSO3inverse ) { // Linearization point - Vector3 thetahat; thetahat << 0.1,0.1,0; ///< Current estimate of rotation rate bias - Vector3 deltatheta; deltatheta << 0, 0, 0; + Vector thetahat = (Vector(3) << 0.1,0.1,0); ///< Current estimate of rotation rate bias + Vector deltatheta = (Vector(3) << 0, 0, 0); - Matrix expectedJacobian = numericalDerivative11( + Matrix expectedJacobian = numericalDerivative11( boost::bind(&evaluateLogRotation, thetahat, _1), deltatheta); Matrix actualJacobian = Rot3::rightJacobianExpMapSO3inverse(thetahat); EXPECT(assert_equal(expectedJacobian, actualJacobian)); @@ -397,8 +392,8 @@ Vector3 testDexpL(const Vector3& dw) { TEST( Rot3, dexpL) { Matrix actualDexpL = Rot3::dexpL(w); - Matrix expectedDexpL = numericalDerivative11(testDexpL, - Vector3::Zero(), 1e-2); + Matrix expectedDexpL = numericalDerivative11(testDexpL, + LieVector(zero(3)), 1e-2); EXPECT(assert_equal(expectedDexpL, actualDexpL, 1e-5)); Matrix actualDexpInvL = Rot3::dexpInvL(w);