diff --git a/gtsam/slam/visualSLAM.h b/gtsam/slam/visualSLAM.h index 044e96e43..a8ba06bd2 100644 --- a/gtsam/slam/visualSLAM.h +++ b/gtsam/slam/visualSLAM.h @@ -35,19 +35,19 @@ namespace gtsam { /** * Typedefs that make up the visualSLAM namespace. */ - typedef TypedSymbol PoseKey; - typedef TypedSymbol PointKey; - typedef LieValues PoseValues; - typedef LieValues PointValues; - typedef TupleValues2 Values; - typedef boost::shared_ptr shared_values; + typedef TypedSymbol PoseKey; ///< The key type used for poses + typedef TypedSymbol PointKey; ///< The key type used for points + typedef LieValues PoseValues; ///< Values used for poses + typedef LieValues PointValues; ///< Values used for points + typedef TupleValues2 Values; ///< Values data structure + typedef boost::shared_ptr shared_values; ///< shared pointer to values data structure - typedef NonlinearEquality PoseConstraint; - typedef NonlinearEquality PointConstraint; - typedef PriorFactor PosePrior; - typedef PriorFactor PointPrior; + typedef NonlinearEquality PoseConstraint; ///< put a hard constraint on a pose + typedef NonlinearEquality PointConstraint; ///< put a hard constraint on a point + typedef PriorFactor PosePrior; ///< put a soft prior on a Pose + typedef PriorFactor PointPrior; ///< put a soft prior on a point - // Typedef for general use + /// monocular and stereo camera typedefs for general use typedef GenericProjectionFactor ProjectionFactor; typedef GenericStereoFactor StereoFactor; @@ -57,27 +57,30 @@ namespace gtsam { class Graph: public NonlinearFactorGraph { public: - + /// shared pointer to this type of graph typedef boost::shared_ptr shared_graph; - /** default constructor is empty graph */ + /// default constructor is empty graph Graph() { } - /** print out graph */ + /// print out graph void print(const std::string& s = "") const { NonlinearFactorGraph::print(s); } - /** equals */ + /// check if two graphs are equal bool equals(const Graph& p, double tol = 1e-9) const { return NonlinearFactorGraph::equals(p, tol); } /** - * Add a measurement - * @param j index of camera - * @param p to which pose to constrain it to + * Add a projection factor measurement (monocular) + * @param z the measurement + * @param model the noise model for the measurement + * @param i index of camera + * @param j index of point + * @param K shared pointer to calibration object */ void addMeasurement(const Point2& z, const SharedNoiseModel& model, PoseKey i, PointKey j, const shared_ptrK& K) { @@ -119,6 +122,7 @@ namespace gtsam { /** * Add a prior on a landmark * @param j index of landmark + * @param p index of point * @param model uncertainty model of this prior */ void addPointPrior(int j, const Point3& p = Point3(), const SharedNoiseModel& model = noiseModel::Unit::Create(1)) { @@ -128,7 +132,7 @@ namespace gtsam { }; // Graph - // Optimizer + /// typedef for Optimizer. The current default will use the multi-frontal solver typedef NonlinearOptimizer Optimizer; } } // namespaces