Changed some lie groups to manifolds
parent
58cb47a3f0
commit
6b04fee048
|
|
@ -202,7 +202,7 @@ private:
|
|||
};
|
||||
|
||||
template<>
|
||||
struct traits_x<CalibratedCamera> : public internal::LieGroup<CalibratedCamera> {};
|
||||
struct traits_x<CalibratedCamera> : public internal::Manifold<CalibratedCamera> {};
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ private:
|
|||
};
|
||||
|
||||
template<>
|
||||
struct traits_x<EssentialMatrix> : public internal::LieGroup<EssentialMatrix> {};
|
||||
struct traits_x<EssentialMatrix> : public internal::Manifold<EssentialMatrix> {};
|
||||
|
||||
} // gtsam
|
||||
|
||||
|
|
|
|||
|
|
@ -36,10 +36,11 @@ private:
|
|||
Calibration K_;
|
||||
|
||||
// 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;
|
||||
|
||||
public:
|
||||
enum { dimension = DimC };
|
||||
|
||||
/// @name Standard Constructors
|
||||
/// @{
|
||||
|
|
@ -485,26 +486,7 @@ private:
|
|||
|
||||
};
|
||||
|
||||
// Define GTSAM traits
|
||||
namespace traits {
|
||||
|
||||
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());
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
template<>
|
||||
struct traits_x<CalibratedCamera> : public internal::Manifold<CalibratedCamera> {};
|
||||
|
||||
} // \ gtsam
|
||||
|
|
|
|||
|
|
@ -153,6 +153,6 @@ private:
|
|||
};
|
||||
|
||||
template<>
|
||||
struct traits_x<StereoCamera> : public internal::LieGroup<StereoCamera> {};
|
||||
struct traits_x<StereoCamera> : public internal::Manifold<StereoCamera> {};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -175,5 +175,5 @@ namespace gtsam {
|
|||
};
|
||||
|
||||
template<>
|
||||
struct traits_x<StereoPoint2> : public internal::LieGroup<StereoPoint2> {};
|
||||
struct traits_x<StereoPoint2> : public internal::Manifold<StereoPoint2> {};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue