Fixed issue with quaternions and added "special" travis stage that checks quaternions path.

release/4.3a0
Frank Dellaert 2019-06-15 15:24:37 -04:00 committed by Fan Jiang
parent a573658ba4
commit 9d23fe52e0
2 changed files with 13 additions and 5 deletions

View File

@ -27,6 +27,7 @@ install:
stages:
- compile
- test
- special
# Compile stage without building examples/tests to populate the caches.
jobs:
@ -75,12 +76,18 @@ jobs:
compiler: clang
env: CMAKE_BUILD_TYPE=Release
script: bash .travis.sh -b
# on Linux, with deprecated ON to make sure that path still compiles
- stage: compile
# on Linux, with deprecated ON to make sure that path still compiles/tests
- stage: special
os: linux
compiler: clang
env: CMAKE_BUILD_TYPE=Debug GTSAM_BUILD_UNSTABLE=OFF GTSAM_ALLOW_DEPRECATED_SINCE_V4=ON
script: bash .travis.sh -b
env: CMAKE_BUILD_TYPE=Release GTSAM_BUILD_UNSTABLE=OFF GTSAM_ALLOW_DEPRECATED_SINCE_V4=ON
script: bash .travis.sh -t
# on Linux, with quaternions ON to make sure that path still compiles/tests
- stage: special
os: linux
compiler: clang
env: CMAKE_BUILD_TYPE=Release GTSAM_BUILD_UNSTABLE=OFF GTSAM_USE_QUATERNIONS=ON
script: bash .travis.sh -t
# Matrix configuration:
os:

View File

@ -94,7 +94,8 @@ namespace gtsam {
*/
template <typename Derived>
#ifdef GTSAM_USE_QUATERNIONS
explicit Rot3(const Eigen::MatrixBase<Derived>& R) : quaternion_(R) {
explicit Rot3(const Eigen::MatrixBase<Derived>& R) {
quaternion_ = Matrix3(R);
}
#else
explicit Rot3(const Eigen::MatrixBase<Derived>& R) : rot_(R) {