From 6b67238dd33de7b5f30907949798d6073ab2f1bd Mon Sep 17 00:00:00 2001 From: Chris Beall Date: Thu, 29 Nov 2012 18:19:28 +0000 Subject: [PATCH] more documentation and cleanup --- gtsam_unstable/geometry/InvDepthCamera3.h | 15 ++++++++++++--- gtsam_unstable/slam/InvDepthFactor3.h | 9 ++++++++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/gtsam_unstable/geometry/InvDepthCamera3.h b/gtsam_unstable/geometry/InvDepthCamera3.h index a9dc8d5f8..7b2a1b9fe 100644 --- a/gtsam_unstable/geometry/InvDepthCamera3.h +++ b/gtsam_unstable/geometry/InvDepthCamera3.h @@ -1,7 +1,10 @@ /** * @file InvDepthCamera3.h - * @brief + * @brief Inverse Depth Camera based on Civera09tro, Montiel06rss. + * Landmarks are initialized from the first camera observation with + * (x,y,z,theta,phi,inv_depth), where x,y,z are the coordinates of + * the camera * @author Chris Beall * @date Apr 14, 2012 */ @@ -29,8 +32,8 @@ namespace gtsam { template class InvDepthCamera3 { private: - Pose3 pose_; - boost::shared_ptr k_; + Pose3 pose_; ///< The camera pose + boost::shared_ptr k_; ///< The fixed camera calibration public: @@ -62,6 +65,12 @@ public: k_.print("calibration"); } + /** + * Convert an inverse depth landmark to cartesian Point3 + * @param pw first five parameters (x,y,z,theta,phi) of inv depth landmark + * @param inv inverse depth + * @return Point3 + */ static gtsam::Point3 invDepthTo3D(const gtsam::LieVector& pw, const gtsam::LieScalar& inv) { gtsam::Point3 ray_base(pw.vector().segment(0,3)); double theta = pw(3), phi = pw(4); diff --git a/gtsam_unstable/slam/InvDepthFactor3.h b/gtsam_unstable/slam/InvDepthFactor3.h index 8a0dce1dd..4b28a84d5 100644 --- a/gtsam_unstable/slam/InvDepthFactor3.h +++ b/gtsam_unstable/slam/InvDepthFactor3.h @@ -1,7 +1,14 @@ /** * @file InvDepthFactor3.h - * @brief Inverse Depth Factor + * @brief Inverse Depth Factor based on Civera09tro, Montiel06rss. + * Landmarks are initialized from the first camera observation with + * (x,y,z,theta,phi,inv_depth), where x,y,z are the coordinates of + * the camera. InvDepthCamera provides methods to initialize inverse + * depth landmarks (backproject), and to convert inverse depth + * landmarks to cartesian coordinates (Point3) for visualization, etc. + * The inverse depth parameterization is split into (x,y,z,theta,phi), + * (inv_depth) to make it easy to add a prior on inverse depth alone * @author Chris Beall */