diff --git a/gtsam/slam/SmartFactorBase.h b/gtsam/slam/SmartFactorBase.h index 870f4d5db..ba38a65d9 100644 --- a/gtsam/slam/SmartFactorBase.h +++ b/gtsam/slam/SmartFactorBase.h @@ -142,7 +142,7 @@ public: } /** - * Add a bunch of measurements and uses the same noise model for all of them + * Add a bunch of measurements and use the same noise model for all of them */ void add(std::vector& measurements, std::vector& cameraKeys, const SharedNoiseModel& noise) { @@ -177,7 +177,7 @@ public: } /// Collect all cameras: important that in key order - Cameras cameras(const Values& values) const { + virtual Cameras cameras(const Values& values) const { Cameras cameras; BOOST_FOREACH(const Key& k, this->keys_) cameras.push_back(values.at(k)); @@ -214,7 +214,7 @@ public: return e && Base::equals(p, tol) && areMeasurementsEqual; } - ///Compute reprojection errors [h(x)-z] = [cameras.project(p)-z] and derivatives + /// Compute reprojection errors [h(x)-z] = [cameras.project(p)-z] and derivatives template Vector unwhitenedError(const Cameras& cameras, const POINT& point, boost::optional Fs = boost::none, // diff --git a/gtsam/slam/SmartProjectionPoseFactor.h b/gtsam/slam/SmartProjectionPoseFactor.h index fbd9e1ca6..e089e6f4f 100644 --- a/gtsam/slam/SmartProjectionPoseFactor.h +++ b/gtsam/slam/SmartProjectionPoseFactor.h @@ -103,24 +103,6 @@ public: return e && Base::equals(p, tol); } - /** - * Linearize to Gaussian Factor - * @param values Values structure which must contain camera poses for this factor - * @return a Gaussian factor - */ - boost::shared_ptr linearizeDamped(const Values& values, - const double lambda = 0.0) const { - // depending on flag set on construction we may linearize to different linear factors - typename Base::Cameras cameras = this->cameras(values); - return Base::linearizeDamped(cameras, lambda); - } - - /// linearize - virtual boost::shared_ptr linearize( - const Values& values) const { - return linearizeDamped(values); - } - /** * error calculates the error of the factor. */ @@ -156,15 +138,6 @@ public: return cameras; } - /** - * Triangulate and compute derivative of error with respect to point - * @return whether triangulation worked - */ - bool triangulateAndComputeE(Matrix& E, const Values& values) const { - typename Base::Cameras cameras = this->cameras(values); - return Base::triangulateAndComputeE(E, cameras); - } - private: /// Serialization function