Changed some lie groups to manifolds

release/4.3a0
Paul Furgale 2014-12-13 22:26:49 +01:00
parent 58cb47a3f0
commit 6b04fee048
5 changed files with 8 additions and 26 deletions

View File

@ -202,7 +202,7 @@ private:
}; };
template<> template<>
struct traits_x<CalibratedCamera> : public internal::LieGroup<CalibratedCamera> {}; struct traits_x<CalibratedCamera> : public internal::Manifold<CalibratedCamera> {};
} }

View File

@ -199,7 +199,7 @@ private:
}; };
template<> template<>
struct traits_x<EssentialMatrix> : public internal::LieGroup<EssentialMatrix> {}; struct traits_x<EssentialMatrix> : public internal::Manifold<EssentialMatrix> {};
} // gtsam } // gtsam

View File

@ -36,10 +36,11 @@ private:
Calibration K_; Calibration K_;
// Get dimensions of calibration type and This at compile time // Get dimensions of calibration type and This at compile time
static const int DimK = traits::dimension<Calibration>::value, // static const int DimK = traits_x<Calibration>::dimension, //
DimC = 6 + DimK; DimC = 6 + DimK;
public: public:
enum { dimension = DimC };
/// @name Standard Constructors /// @name Standard Constructors
/// @{ /// @{
@ -485,26 +486,7 @@ private:
}; };
// Define GTSAM traits template<>
namespace traits { struct traits_x<CalibratedCamera> : public internal::Manifold<CalibratedCamera> {};
template<typename Calibration>
struct GTSAM_EXPORT is_manifold<PinholeCamera<Calibration> > : public boost::true_type {
};
template<typename Calibration>
struct GTSAM_EXPORT dimension<PinholeCamera<Calibration> > : public boost::integral_constant<
int, dimension<Pose3>::value + dimension<Calibration>::value> {
};
template<typename Calibration>
struct GTSAM_EXPORT zero<PinholeCamera<Calibration> > {
static PinholeCamera<Calibration> value() {
return PinholeCamera<Calibration>(zero<Pose3>::value(),
zero<Calibration>::value());
}
};
}
} // \ gtsam } // \ gtsam

View File

@ -153,6 +153,6 @@ private:
}; };
template<> template<>
struct traits_x<StereoCamera> : public internal::LieGroup<StereoCamera> {}; struct traits_x<StereoCamera> : public internal::Manifold<StereoCamera> {};
} }

View File

@ -175,5 +175,5 @@ namespace gtsam {
}; };
template<> template<>
struct traits_x<StereoPoint2> : public internal::LieGroup<StereoPoint2> {}; struct traits_x<StereoPoint2> : public internal::Manifold<StereoPoint2> {};
} }