diff --git a/gtsam/geometry/CalibratedCamera.cpp b/gtsam/geometry/CalibratedCamera.cpp index 0e5a6a3ea..33f2c84eb 100644 --- a/gtsam/geometry/CalibratedCamera.cpp +++ b/gtsam/geometry/CalibratedCamera.cpp @@ -76,7 +76,7 @@ void PinholeBase::print(const string& s) const { } /* ************************************************************************* */ -const Pose3& PinholeBase::pose(OptionalJacobian<6, 6> H) const { +const Pose3& PinholeBase::getPose(OptionalJacobian<6, 6> H) const { if (H) { H->setZero(); H->block(0, 0, 6, 6) = I_6x6; diff --git a/gtsam/geometry/CalibratedCamera.h b/gtsam/geometry/CalibratedCamera.h index 34edae2e1..ed0c55208 100644 --- a/gtsam/geometry/CalibratedCamera.h +++ b/gtsam/geometry/CalibratedCamera.h @@ -131,7 +131,7 @@ public: } /// return pose, with derivative - const Pose3& pose(OptionalJacobian<6, 6> H) const; + const Pose3& getPose(OptionalJacobian<6, 6> H) const; /// @} /// @name Transformations and measurement functions diff --git a/gtsam/geometry/PinholeCamera.h b/gtsam/geometry/PinholeCamera.h index 996313c5c..eb2dceee1 100644 --- a/gtsam/geometry/PinholeCamera.h +++ b/gtsam/geometry/PinholeCamera.h @@ -142,7 +142,7 @@ public: } /// return pose, with derivative - const Pose3& pose(OptionalJacobian<6, dimension> H) const { + const Pose3& getPose(OptionalJacobian<6, dimension> H) const { if (H) { H->setZero(); H->block(0, 0, 6, 6) = I_6x6; diff --git a/gtsam/geometry/tests/testPinholeCamera.cpp b/gtsam/geometry/tests/testPinholeCamera.cpp index f1e698fc1..11c95d822 100644 --- a/gtsam/geometry/tests/testPinholeCamera.cpp +++ b/gtsam/geometry/tests/testPinholeCamera.cpp @@ -61,11 +61,11 @@ TEST( PinholeCamera, constructor) TEST(PinholeCamera, Pose) { Matrix actualH; - EXPECT(assert_equal(pose, camera.pose(actualH))); + EXPECT(assert_equal(pose, camera.getPose(actualH))); // Check derivative boost::function f = // - boost::bind(&Camera::pose,_1,boost::none); + boost::bind(&Camera::getPose,_1,boost::none); Matrix numericalH = numericalDerivative11(f,camera); EXPECT(assert_equal(numericalH, actualH, 1e-9)); } diff --git a/gtsam/geometry/tests/testPinholePose.cpp b/gtsam/geometry/tests/testPinholePose.cpp index c2ba412a4..f0c364955 100644 --- a/gtsam/geometry/tests/testPinholePose.cpp +++ b/gtsam/geometry/tests/testPinholePose.cpp @@ -58,32 +58,18 @@ TEST( PinholePose, constructor) } //****************************************************************************** -TEST(PinholePose, Pose) { +TEST(PinholeCamera, Pose) { Matrix actualH; - EXPECT(assert_equal(pose, camera.pose(actualH))); + EXPECT(assert_equal(pose, camera.getPose(actualH))); // Check derivative boost::function f = // - boost::bind(&Camera::pose,_1,boost::none); + boost::bind(&Camera::getPose,_1,boost::none); Matrix numericalH = numericalDerivative11(f,camera); EXPECT(assert_equal(numericalH, actualH, 1e-9)); } -/* ************************************************************************* */ -TEST( PinholePose, level2) -{ - // Create a level camera, looking in Y-direction - Pose2 pose2(0.4,0.3,M_PI/2.0); - Camera camera = Camera::Level(K, pose2, 0.1); - - // expected - Point3 x(1,0,0),y(0,0,-1),z(0,1,0); - Rot3 wRc(x,y,z); - Pose3 expected(wRc,Point3(0.4,0.3,0.1)); - EXPECT(assert_equal( camera.pose(), expected)); -} - /* ************************************************************************* */ TEST( PinholePose, lookat) {