From 0503df31fa8a3a5facaa745bbfea4916e0530135 Mon Sep 17 00:00:00 2001 From: cbeall3 Date: Tue, 25 Aug 2015 12:14:52 -0400 Subject: [PATCH] Relax tolerance to 1e-6 for MKL/quaternion test, and fix up documentation a bit. --- gtsam_unstable/slam/SmartStereoProjectionFactor.h | 9 ++++++--- gtsam_unstable/slam/SmartStereoProjectionPoseFactor.h | 7 +++++-- .../slam/tests/testSmartStereoProjectionPoseFactor.cpp | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/gtsam_unstable/slam/SmartStereoProjectionFactor.h b/gtsam_unstable/slam/SmartStereoProjectionFactor.h index d3dca11e0..c12bf8d94 100644 --- a/gtsam_unstable/slam/SmartStereoProjectionFactor.h +++ b/gtsam_unstable/slam/SmartStereoProjectionFactor.h @@ -11,7 +11,7 @@ /** * @file SmartStereoProjectionFactor.h - * @brief Base class to create smart factors on poses or cameras + * @brief Smart stereo factor on StereoCameras (pose + calibration) * @author Luca Carlone * @author Zsolt Kira * @author Frank Dellaert @@ -123,8 +123,11 @@ enum DegeneracyMode { /** * SmartStereoProjectionFactor: triangulates point and keeps an estimate of it around. - * This factor operates with StereoCamrea. This factor requires that values - * contains the involved camera poses. Calibration is assumed to be fixed. + * This factor operates with StereoCamera. This factor requires that values + * contains the involved StereoCameras. Calibration is assumed to be fixed, as this + * is also assumed in StereoCamera. + * If you'd like to store poses in values instead of cameras, use + * SmartStereoProjectionPoseFactor instead */ class SmartStereoProjectionFactor: public SmartFactorBase { private: diff --git a/gtsam_unstable/slam/SmartStereoProjectionPoseFactor.h b/gtsam_unstable/slam/SmartStereoProjectionPoseFactor.h index 061c67a08..c9d8ec285 100644 --- a/gtsam_unstable/slam/SmartStereoProjectionPoseFactor.h +++ b/gtsam_unstable/slam/SmartStereoProjectionPoseFactor.h @@ -11,7 +11,7 @@ /** * @file SmartStereoProjectionPoseFactor.h - * @brief Produces an Hessian factors on POSES from monocular measurements of a single landmark + * @brief Smart stereo factor on poses, assuming camera calibration is fixed * @author Luca Carlone * @author Chris Beall * @author Zsolt Kira @@ -35,7 +35,10 @@ namespace gtsam { */ /** - * The calibration is known here. The factor only constraints poses (variable dimension is 6) + * This factor assumes that camera calibration is fixed, but each camera + * has its own calibration. + * The factor only constrains poses (variable dimension is 6). + * This factor requires that values contains the involved poses (Pose3). * @addtogroup SLAM */ class SmartStereoProjectionPoseFactor: public SmartStereoProjectionFactor { diff --git a/gtsam_unstable/slam/tests/testSmartStereoProjectionPoseFactor.cpp b/gtsam_unstable/slam/tests/testSmartStereoProjectionPoseFactor.cpp index 89c9c020a..3b16a9db8 100644 --- a/gtsam_unstable/slam/tests/testSmartStereoProjectionPoseFactor.cpp +++ b/gtsam_unstable/slam/tests/testSmartStereoProjectionPoseFactor.cpp @@ -1089,7 +1089,7 @@ TEST( SmartStereoProjectionPoseFactor, HessianWithRotationDegenerate ) { // Hessian is invariant to rotations in the nondegenerate case EXPECT( assert_equal(hessianFactor->information(), - hessianFactorRot->information(), 1e-7)); + hessianFactorRot->information(), 1e-6)); Pose3 poseDrift2 = Pose3(Rot3::ypr(-M_PI / 2, -M_PI / 3, -M_PI / 2), Point3(10, -4, 5));