From 21b97ddedf928fbf396dabc50be22677054d9a7f Mon Sep 17 00:00:00 2001 From: dellaert Date: Tue, 9 Dec 2014 01:04:21 +0100 Subject: [PATCH] Removed obsolete methods (but link error!) --- gtsam/geometry/Quaternion.h | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/gtsam/geometry/Quaternion.h b/gtsam/geometry/Quaternion.h index bb27b1d0b..3c2dbff6c 100644 --- a/gtsam/geometry/Quaternion.h +++ b/gtsam/geometry/Quaternion.h @@ -11,7 +11,7 @@ /** * @file Quaternion.h - * @brief Unit tests for unit quaternions + * @brief Lie Group wrapper for Eigen Quaternions * @author Frank Dellaert **/ @@ -34,6 +34,7 @@ struct MakeQuaternionChart: LieGroupChart< typedef typename manifold::traits::TangentVector::type Omega; /// Exponential map given axis/angle representation of Lie algebra + /// TODO: obsolete? But see if not called now in Rot3Q static Q Expmap(const _Scalar& angle, const Eigen::Ref& axis) { return Q(Eigen::AngleAxis<_Scalar>(angle, axis)); } @@ -48,11 +49,6 @@ struct MakeQuaternionChart: LieGroupChart< } } - /// retract, simply be converting omega to AngleAxis - static Q Retract(const Q& p, const Eigen::Ref& omega) { - return p * Expmap(omega); - } - /// We use our own Logmap, as there is a slight bug in Eigen static Omega Logmap(const Q& q) { using std::acos; @@ -79,18 +75,15 @@ struct MakeQuaternionChart: LieGroupChart< return (angle / s) * q.vec(); } } - - /// local is our own, as there is a slight bug in Eigen - static Omega Local(const Q& q1, const Q& q2) { - return Logmap(q1.inverse() * q2); - } }; +// Define group traits #define QUATERNION_TEMPLATE typename _Scalar, int _Options #define QUATERNION_TYPE Eigen::Quaternion<_Scalar,_Options> GTSAM_GROUP_IDENTITY(QUATERNION_TEMPLATE, QUATERNION_TYPE) GTSAM_MULTIPLICATIVE_GROUP(QUATERNION_TEMPLATE, QUATERNION_TYPE) +// Define manifold traits #define QUATERNION_TANGENT Eigen::Matrix<_Scalar, 3, 1, _Options, 3, 1> #define QUATERNION_CHART MakeQuaternionChart<_Scalar,_Options> GTSAM_MANIFOLD(QUATERNION_TEMPLATE, QUATERNION_TYPE, 3, QUATERNION_TANGENT, @@ -98,8 +91,8 @@ GTSAM_MANIFOLD(QUATERNION_TEMPLATE, QUATERNION_TYPE, 3, QUATERNION_TANGENT, /// Define Eigen::Quaternion to be a model of the Lie Group concept namespace traits { -template -struct structure_category > { +template +struct structure_category > { typedef lie_group_tag type; }; }