From 2a07cfed6604d4b9a7f43e71a7a600a0756b6fd0 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Wed, 18 Mar 2020 18:18:51 -0400 Subject: [PATCH] improved rotation transpose with quaternions --- gtsam/geometry/Rot3Q.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gtsam/geometry/Rot3Q.cpp b/gtsam/geometry/Rot3Q.cpp index 377cc4a5f..64e8324b8 100644 --- a/gtsam/geometry/Rot3Q.cpp +++ b/gtsam/geometry/Rot3Q.cpp @@ -19,8 +19,8 @@ #ifdef GTSAM_USE_QUATERNIONS -#include #include +#include #include using namespace std; @@ -80,8 +80,8 @@ namespace gtsam { /* ************************************************************************* */ const Eigen::Transpose Rot3::transpose() const { - // `.eval()` to avoid aliasing effect due to transpose (allows compilation). - return matrix().eval().transpose(); + // `eval` for immediate evaluation (allows compilation). + return Rot3(matrix()).matrix().eval().transpose(); } /* ************************************************************************* */