Giter Club home page Giter Club logo

sophus's People

Contributors

aharrison24 avatar arntanguy avatar brentyi avatar devinlane avatar dmitriykorchemkin avatar dmmfix avatar florianfranzen avatar guilemieux avatar hs293go avatar htlife avatar ibtaylor avatar janjachnik avatar jaronkelleher avatar jlblancoc avatar kiransom avatar martineekgerhardsen avatar maximsmolskiy avatar mp3guy avatar nikolausdemmel avatar ojwoodford avatar pettni avatar sergiud avatar stevenlovegrove avatar stonier avatar strasdat avatar supervacuus avatar sweeneychris avatar tgillingham avatar v01d avatar versatran01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sophus's Issues

No initialization (Like Eigen)

Eigen does not initialize via default constructors (for performance reasons??). Instead, they provide initializer methods like Zero() and Identity().

Would it make sense to be consistent with this in Sophus and, for instance, have SO3::Identity(), SE3::Identity(), etc and not default initialize?

I can see this being a significant enough change to maybe have to be done during a major version increment since some users probably rely on this default initialization.

No translation part returned from SE3::data()?

in se3.hpp, there's a code piece

  // This provides unsafe read/write access to internal data. SO(3) is
  // represented by an Eigen::Quaternion (four parameters). When using direct
  // write access, the user needs to take care of that the quaternion stays
  // normalized.
  //
  SOPHUS_FUNC Scalar* data() {
    // so3_ and translation_ are laid out sequentially with no padding
    return so3_.data();
  }

  // Const version of data() above.
  //
  SOPHUS_FUNC Scalar const* data() const {
    // so3_ and translation_ are laid out sequentially with no padding
    return so3_.data();
  }

why is the SE3::data() only return the so3.data() only?

Strange image & real factor calculation in SO3::expAndTheta function

In case of small omega you are using next code:

if ((*theta) < Constants<Scalar>::epsilon()) 
{
      Scalar theta_po4 = theta_sq * theta_sq;
      imag_factor = Scalar(0.5) - Scalar(1.0 / 48.0) * theta_sq +
                    Scalar(1.0 / 3840.0) * theta_po4;
      real_factor =
          Scalar(1) - Scalar(0.5) * theta_sq + Scalar(1.0 / 384.0) * theta_po4;
 }

Looks like some kind of Taylor expansion. But I don't understand the reason to use such complex formula in this case.

Possible bug in `SE3Base::internalMultiplyByGenerator`

I think there might be the translation missing in:

res.template tail<3>() = so3().unit_quaternion() * internal_gen_t;

Should this maybe be the following, to implement the full SE product of "this * generator_i"?

res.template tail<3>() = translation() + so3().unit_quaternion() * internal_gen_t;

@strasdat, can you suggest a good reference for SE(3) / SO(3) / SU(2) derivatives as needed for manifold optimization?

Error using Sophus

Hello
I am trying Sophus in other machine with ROS indigo Ubuntu 14.04 64bits.
When I try to compile this code, with eclipse and using only includes no linking:

include

include "sophus/se3.hpp"

using namespace std;

typedef double Scalar;
typedef Sophus::SO3Group SO3Type;
typedef typename Sophus::SO3Group::Point Point;
typedef typename Sophus::SO3Group::Tangent Tangent;

int main() {
cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
return 0;
}
I get this error:
Scalar length = unit_quaternion_nonconst().norm();
^
/home/francisco/git/Sophus/sophus/so3.hpp:216:12: error: expected ‘;’ before ‘length’
Scalar length = unit_quaternion_nonconst().norm();
Any idea? It is a issue?

Add an overload to operator* that operates on Points?

Do you think it's a good idea to add an overload to operator* that works on Points?
It would look like something like this

Points SO3::operator*(Points const& points) const {
    return matrix() * points;
}

where Points is Matrix3 in this particular case.

error: compile with VS2015 win32

Hi

I use cmake 3.7 and vs 2015 (Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24210 for x86) to compile. My Eigen version is Eigen 3.2.8. But I get some errors as following. Any suggestion about this?

Thanks a lot.
Yanming

sophus\test\core\tests.hpp(112): error C2672: 'Sophus::details::metric': no matching overloaded function found
sophus\test\core\tests.hpp(109): note: while compiling class template member function 'bool Sophus::LieGroupTests<Sophus::RxSO3<double,0>>::veeHatTest(void)'
sophus\test\core\tests.hpp(134): note: see reference to function template instantiation 'bool Sophus::LieGroupTests<Sophus::RxSO3<double,0>>::veeHatTest(void)' being compiled
Sophus\test\core\test_rxso3.cpp(70): note: see reference to class template instantiation 'Sophus::LieGroupTests<Sophus::RxSO3<double,0>>' being compiled
Sophus\test\core\test_rxso3.cpp(69): note: while compiling class template member function 'bool Sophus::Tests::testLieProperties(void)'
Sophus\test\core\test_rxso3.cpp(61): note: see reference to function template instantiation 'bool Sophus::Tests::testLieProperties(void)' being compiled
Sophus\test\core\test_rxso3.cpp(233): note: see reference to class template instantiation 'Sophus::Tests' being compiled
sophus\test\core\tests.hpp(112): error C2782: 'unknown-type Sophus::details::metric(const T &,const T &)': template parameter 'T' is ambiguous
Sophus\sophus/test_macros.hpp(28): note: see declaration of 'Sophus::details::metric'
sophus\test\core\tests.hpp(112): note: could be 'Eigen::Matrix<double,4,1,0,4,1>'
sophus\test\core\tests.hpp(112): note: or 'Eigen::internal::workaround_msvc_stl_support'
with
[
T=Eigen::Matrix<double,4,1,0,4,1>
]
sophus\test\core\tests.hpp(112): error C2784: 'unknown-type Sophus::details::metric(const T &,const T &)': could not deduce template argument for 'const T &' from 'Eigen::Matrix<double,4,1,0,4,1>'
Sophus\sophus/test_macros.hpp(28): note: see declaration of 'Sophus::details::metric'
sophus\test\core\tests.hpp(114): error C3536: 'nrm': cannot be used before it is initialized

test_ceres_se3 test compiling error

The test_ceres_se3 test example has a compiling error below when building the Sophus library.

Sophus/test/ceres/test_ceres_se3.cpp:119:1:   required from here
/usr/include/eigen3/Eigen/src/Core/IO.h:132:96: error: no matching function for call to ‘ceil(ceres::Jet<double, 7>)’
     return cast<RealScalar,int>(ceil(-log(NumTraits<RealScalar>::epsilon())/log(RealScalar(10))));
                                                                                                ^
/usr/include/eigen3/Eigen/src/Core/IO.h:132:96: note: candidates are:
In file included from /usr/include/features.h:374:0,
                 from /usr/include/x86_64-linux-gnu/c++/4.8/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/4.8/bits/c++config.h:426,
                 from /usr/include/c++/4.8/cmath:41,
                 from /usr/local/include/ceres/jet.h:159,
                 from /usr/local/include/ceres/internal/autodiff.h:145,
                 from /usr/local/include/ceres/autodiff_cost_function.h:132,
                 from /usr/local/include/ceres/ceres.h:37,
                 from /home/robot/workspace/lib_sources/Sophus/test/ceres/test_ceres_se3.cpp:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:178:1: note: double ceil(double)
 __MATHCALLX (ceil,, (_Mdouble_ __x), (__const__));
 ^
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:178:1: note:   no known conversion for argument 1 from ‘ceres::Jet<double, 7>’ to ‘double’

Environment

  • ubuntu 14.04.5 x64

commit e1d1163811561a40759bf24261c34aca20f5418a does not compile on ubuntu 16.04

I get the following error:

[sophus:make] [ 4%] Building CXX object test/core/CMakeFiles/test_rxso2.dir/test_rxso2.cpp.o [sophus:make] [ 8%] Building CXX object test/core/CMakeFiles/test_velocities.dir/test_velocities.cpp.o [sophus:make] [ 12%] Building CXX object test/core/CMakeFiles/test_geometry.dir/test_geometry.cpp.o [sophus:make] [ 16%] Building CXX object test/core/CMakeFiles/test_se3.dir/test_se3.cpp.o [sophus:make] [ 20%] Linking CXX executable test_velocities [sophus:make] [ 20%] Built target test_velocities [sophus:make] Scanning dependencies of target test_so2 [sophus:make] [ 25%] Building CXX object test/core/CMakeFiles/test_so2.dir/test_so2.cpp.o [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:367:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/Matrix.h: In instantiation of ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const T0&, const T1&) [with T0 = double; T1 = double; _Scalar = ceres::Jet<double, 3>; int _Rows = 2; int _Cols = 1; int _Options = 0; int _MaxRows = 2; int _MaxCols = 1]’: [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:31:40: required from ‘Sophus::Tests<Scalar>::Tests() [with Scalar = ceres::Jet<double, 3>]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:212:32: required from here [sophus:make] /usr/include/eigen3/Eigen/src/Core/Matrix.h:304:35: error: no matching function for call to ‘Eigen::Matrix<ceres::Jet<double, 3>, 2, 1, 0, 2, 1>::_init2(const double&, const double&)’ [sophus:make] Base::template _init2<T0,T1>(x, y); [sophus:make] ^ [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:366:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:706:17: note: candidate: template<class T0, class T1> void Eigen::PlainObjectBase<Derived>::_init2(Eigen::Index, Eigen::Index, typename Eigen::internal::enable_if<(typename Eigen::internal::dense_xpr_base<Derived>::type:: SizeAtCompileTime != 2), T0>::type*) [with T0 = T0; T1 = T1; Derived = Eigen::Matrix<ceres::Jet<double, 3>, 2, 1, 0, 2, 1>] [sophus:make] EIGEN_STRONG_INLINE void _init2(Index rows, Index cols, typename internal::enable_if<Base::SizeAtCompileTime!=2,T0>::type* = 0) [sophus:make] ^ [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:706:17: note: template argument deduction/substitution failed: [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h: In substitution of ‘template<class T0, class T1> void Eigen::PlainObjectBase<Derived>::_init2(Eigen::Index, Eigen::Index, typename Eigen::internal::enable_if<(typename Eigen::internal::dense_xpr_base<Derived>::type:: SizeAtCompileTime != 2), T0>::type*) [with T0 = double; T1 = double]’: [sophus:make] /usr/include/eigen3/Eigen/src/Core/Matrix.h:304:35: required from ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const T0&, const T1&) [with T0 = double; T1 = double; _Scalar = ceres::Jet<double, 3>; int _Rows = 2; int _Cols = 1; int _Options = 0; int _MaxRows = 2; int _MaxCols = 1]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:31:40: required from ‘Sophus::Tests<Scalar>::Tests() [with Scalar = ceres::Jet<double, 3>]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:212:32: required from here [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:706:17: error: invalid use of incomplete type ‘struct Eigen::internal::enable_if<false, double>’ [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:295:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/util/Meta.h:131:45: note: declaration of ‘struct Eigen::internal::enable_if<false, double>’ [sophus:make] template<bool Condition, typename T> struct enable_if; [sophus:make] ^ [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:366:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/Matrix.h: In instantiation of ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const T0&, const T1&) [with T0 = double; T1 = double; _Scalar = ceres::Jet<double, 3>; int _Rows = 2; int _Cols = 1; int _Options = 0; int _MaxRows = 2; int _MaxCols = 1]’: [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:31:40: required from ‘Sophus::Tests<Scalar>::Tests() [with Scalar = ceres::Jet<double, 3>]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:212:32: required from here [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:716:17: note: candidate: template<class T0, class T1> void Eigen::PlainObjectBase<Derived>::_init2(const Scalar&, const Scalar&, typename Eigen::internal::enable_if<(typename Eigen::internal::dense_xpr_base<Derived>::type:: SizeAtCompileTime == 2), T0>::type*) [with T0 = T0; T1 = T1; Derived = Eigen::Matrix<ceres::Jet<double, 3>, 2, 1, 0, 2, 1>] [sophus:make] EIGEN_STRONG_INLINE void _init2(const Scalar& val0, const Scalar& val1, typename internal::enable_if<Base::SizeAtCompileTime==2,T0>::type* = 0) [sophus:make] ^ [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:716:17: note: template argument deduction/substitution failed: [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:367:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/Matrix.h:304:35: note: cannot convert ‘x’ (type ‘const double’) to type ‘const Scalar& {aka const ceres::Jet<double, 3>&}’ [sophus:make] Base::template _init2<T0,T1>(x, y); [sophus:make] ^ [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:366:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:725:17: note: candidate: template<class T0, class T1> void Eigen::PlainObjectBase<Derived>::_init2(const Index&, const Index&, typename Eigen::internal::enable_if<((((! Eigen::internal::is_same<long int, typename Eigen::internal::traits<T>::Scalar>::value) && Eigen::internal::is_same<T0, long int>::value) && Eigen::internal::is_same<T1, long int>::value) && (typename Eigen::internal::dense_xpr_base<Derived>::type:: SizeAtCompileTime == 2)), T1>::type*) [with T0 = T0; T1 = T1; Derived = Eigen::Matrix<ceres::Jet<double, 3>, 2, 1, 0, 2, 1>] [sophus:make] EIGEN_STRONG_INLINE void _init2(const Index& val0, const Index& val1, [sophus:make] ^ [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:725:17: note: template argument deduction/substitution failed: [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h: In substitution of ‘template<class T0, class T1> void Eigen::PlainObjectBase<Derived>::_init2(const Index&, const Index&, typename Eigen::internal::enable_if<((((! Eigen::internal::is_same<long int, typename Eigen::internal::traits<T>::Scalar>::value) && Eigen::internal::is_same<T0, long int>::value) && Eigen::internal::is_same<T1, long int>::value) && (typename Eigen::internal::dense_xpr_base<Derived>::type:: SizeAtCompileTime == 2)), T1>::type*) [with T0 = double; T1 = double]’: [sophus:make] /usr/include/eigen3/Eigen/src/Core/Matrix.h:304:35: required from ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const T0&, const T1&) [with T0 = double; T1 = double; _Scalar = ceres::Jet<double, 3>; int _Rows = 2; int _Cols = 1; int _Options = 0; int _MaxRows = 2; int _MaxCols = 1]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:31:40: required from ‘Sophus::Tests<Scalar>::Tests() [with Scalar = ceres::Jet<double, 3>]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:212:32: required from here [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:725:17: error: invalid use of incomplete type ‘struct Eigen::internal::enable_if<false, double>’ [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:295:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/util/Meta.h:131:45: note: declaration of ‘struct Eigen::internal::enable_if<false, double>’ [sophus:make] template<bool Condition, typename T> struct enable_if; [sophus:make] ^ [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:367:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/Matrix.h: In instantiation of ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const T0&, const T1&) [with T0 = ceres::Jet<double, 3>; T1 = double; _Scalar = ceres::Jet<double, 3>; int _Rows = 2; int _Cols = 1; int _Options = 0; int _MaxRows = 2; int _MaxCols = 1]’: [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:36:40: required from ‘Sophus::Tests<Scalar>::Tests() [with Scalar = ceres::Jet<double, 3>]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:212:32: required from here [sophus:make] /usr/include/eigen3/Eigen/src/Core/Matrix.h:304:35: error: no matching function for call to ‘Eigen::Matrix<ceres::Jet<double, 3>, 2, 1, 0, 2, 1>::_init2(const ceres::Jet<double, 3>&, const double&)’ [sophus:make] Base::template _init2<T0,T1>(x, y); [sophus:make] ^ [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:366:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:706:17: note: candidate: template<class T0, class T1> void Eigen::PlainObjectBase<Derived>::_init2(Eigen::Index, Eigen::Index, typename Eigen::internal::enable_if<(typename Eigen::internal::dense_xpr_base<Derived>::type:: SizeAtCompileTime != 2), T0>::type*) [with T0 = T0; T1 = T1; Derived = Eigen::Matrix<ceres::Jet<double, 3>, 2, 1, 0, 2, 1>] [sophus:make] EIGEN_STRONG_INLINE void _init2(Index rows, Index cols, typename internal::enable_if<Base::SizeAtCompileTime!=2,T0>::type* = 0) [sophus:make] ^ [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:706:17: note: template argument deduction/substitution failed: [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h: In substitution of ‘template<class T0, class T1> void Eigen::PlainObjectBase<Derived>::_init2(Eigen::Index, Eigen::Index, typename Eigen::internal::enable_if<(typename Eigen::internal::dense_xpr_base<Derived>::type:: SizeAtCompileTime != 2), T0>::type*) [with T0 = ceres::Jet<double, 3>; T1 = double]’: [sophus:make] /usr/include/eigen3/Eigen/src/Core/Matrix.h:304:35: required from ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const T0&, const T1&) [with T0 = ceres::Jet<double, 3>; T1 = double; _Scalar = ceres::Jet<double, 3>; int _Rows = 2; int _Cols = 1; int _Options = 0; int _MaxRows = 2; int _MaxCols = 1]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:36:40: required from ‘Sophus::Tests<Scalar>::Tests() [with Scalar = ceres::Jet<double, 3>]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:212:32: required from here [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:706:17: error: invalid use of incomplete type ‘struct Eigen::internal::enable_if<false, ceres::Jet<double, 3> >’ [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:295:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/util/Meta.h:131:45: note: declaration of ‘struct Eigen::internal::enable_if<false, ceres::Jet<double, 3> >’ [sophus:make] template<bool Condition, typename T> struct enable_if; [sophus:make] ^ [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:366:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/Matrix.h: In instantiation of ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const T0&, const T1&) [with T0 = ceres::Jet<double, 3>; T1 = double; _Scalar = ceres::Jet<double, 3>; int _Rows = 2; int _Cols = 1; int _Options = 0; int _MaxRows = 2; int _MaxCols = 1]’: [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:36:40: required from ‘Sophus::Tests<Scalar>::Tests() [with Scalar = ceres::Jet<double, 3>]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:212:32: required from here [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:716:17: note: candidate: template<class T0, class T1> void Eigen::PlainObjectBase<Derived>::_init2(const Scalar&, const Scalar&, typename Eigen::internal::enable_if<(typename Eigen::internal::dense_xpr_base<Derived>::type:: SizeAtCompileTime == 2), T0>::type*) [with T0 = T0; T1 = T1; Derived = Eigen::Matrix<ceres::Jet<double, 3>, 2, 1, 0, 2, 1>] [sophus:make] EIGEN_STRONG_INLINE void _init2(const Scalar& val0, const Scalar& val1, typename internal::enable_if<Base::SizeAtCompileTime==2,T0>::type* = 0) [sophus:make] ^ [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:716:17: note: template argument deduction/substitution failed: [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:367:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/Matrix.h:304:35: note: cannot convert ‘y’ (type ‘const double’) to type ‘const Scalar& {aka const ceres::Jet<double, 3>&}’ [sophus:make] Base::template _init2<T0,T1>(x, y); [sophus:make] ^ [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:366:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:725:17: note: candidate: template<class T0, class T1> void Eigen::PlainObjectBase<Derived>::_init2(const Index&, const Index&, typename Eigen::internal::enable_if<((((! Eigen::internal::is_same<long int, typename Eigen::internal::traits<T>::Scalar>::value) && Eigen::internal::is_same<T0, long int>::value) && Eigen::internal::is_same<T1, long int>::value) && (typename Eigen::internal::dense_xpr_base<Derived>::type:: SizeAtCompileTime == 2)), T1>::type*) [with T0 = T0; T1 = T1; Derived = Eigen::Matrix<ceres::Jet<double, 3>, 2, 1, 0, 2, 1>] [sophus:make] EIGEN_STRONG_INLINE void _init2(const Index& val0, const Index& val1, [sophus:make] ^ [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:725:17: note: template argument deduction/substitution failed: [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h: In substitution of ‘template<class T0, class T1> void Eigen::PlainObjectBase<Derived>::_init2(const Index&, const Index&, typename Eigen::internal::enable_if<((((! Eigen::internal::is_same<long int, typename Eigen::internal::traits<T>::Scalar>::value) && Eigen::internal::is_same<T0, long int>::value) && Eigen::internal::is_same<T1, long int>::value) && (typename Eigen::internal::dense_xpr_base<Derived>::type:: SizeAtCompileTime == 2)), T1>::type*) [with T0 = ceres::Jet<double, 3>; T1 = double]’: [sophus:make] /usr/include/eigen3/Eigen/src/Core/Matrix.h:304:35: required from ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const T0&, const T1&) [with T0 = ceres::Jet<double, 3>; T1 = double; _Scalar = ceres::Jet<double, 3>; int _Rows = 2; int _Cols = 1; int _Options = 0; int _MaxRows = 2; int _MaxCols = 1]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:36:40: required from ‘Sophus::Tests<Scalar>::Tests() [with Scalar = ceres::Jet<double, 3>]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:212:32: required from here [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:725:17: error: invalid use of incomplete type ‘struct Eigen::internal::enable_if<false, double>’ [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:295:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/util/Meta.h:131:45: note: declaration of ‘struct Eigen::internal::enable_if<false, double>’ [sophus:make] template<bool Condition, typename T> struct enable_if; [sophus:make] ^ [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:367:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/Matrix.h: In instantiation of ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const T0&, const T1&) [with T0 = double; T1 = int; _Scalar = ceres::Jet<double, 3>; int _Rows = 2; int _Cols = 1; int _Options = 0; int _MaxRows = 2; int _MaxCols = 1]’: [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:37:40: required from ‘Sophus::Tests<Scalar>::Tests() [with Scalar = ceres::Jet<double, 3>]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:212:32: required from here [sophus:make] /usr/include/eigen3/Eigen/src/Core/Matrix.h:304:35: error: no matching function for call to ‘Eigen::Matrix<ceres::Jet<double, 3>, 2, 1, 0, 2, 1>::_init2(const double&, const int&)’ [sophus:make] Base::template _init2<T0,T1>(x, y); [sophus:make] ^ [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:366:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:706:17: note: candidate: template<class T0, class T1> void Eigen::PlainObjectBase<Derived>::_init2(Eigen::Index, Eigen::Index, typename Eigen::internal::enable_if<(typename Eigen::internal::dense_xpr_base<Derived>::type:: SizeAtCompileTime != 2), T0>::type*) [with T0 = T0; T1 = T1; Derived = Eigen::Matrix<ceres::Jet<double, 3>, 2, 1, 0, 2, 1>] [sophus:make] EIGEN_STRONG_INLINE void _init2(Index rows, Index cols, typename internal::enable_if<Base::SizeAtCompileTime!=2,T0>::type* = 0) [sophus:make] ^ [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:706:17: note: template argument deduction/substitution failed: [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h: In substitution of ‘template<class T0, class T1> void Eigen::PlainObjectBase<Derived>::_init2(Eigen::Index, Eigen::Index, typename Eigen::internal::enable_if<(typename Eigen::internal::dense_xpr_base<Derived>::type:: SizeAtCompileTime != 2), T0>::type*) [with T0 = double; T1 = int]’: [sophus:make] /usr/include/eigen3/Eigen/src/Core/Matrix.h:304:35: required from ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const T0&, const T1&) [with T0 = double; T1 = int; _Scalar = ceres::Jet<double, 3>; int _Rows = 2; int _Cols = 1; int _Options = 0; int _MaxRows = 2; int _MaxCols = 1]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:37:40: required from ‘Sophus::Tests<Scalar>::Tests() [with Scalar = ceres::Jet<double, 3>]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:212:32: required from here [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:706:17: error: invalid use of incomplete type ‘struct Eigen::internal::enable_if<false, double>’ [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:295:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/util/Meta.h:131:45: note: declaration of ‘struct Eigen::internal::enable_if<false, double>’ [sophus:make] template<bool Condition, typename T> struct enable_if; [sophus:make] ^ [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:366:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/Matrix.h: In instantiation of ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const T0&, const T1&) [with T0 = double; T1 = int; _Scalar = ceres::Jet<double, 3>; int _Rows = 2; int _Cols = 1; int _Options = 0; int _MaxRows = 2; int _MaxCols = 1]’: [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:37:40: required from ‘Sophus::Tests<Scalar>::Tests() [with Scalar = ceres::Jet<double, 3>]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:212:32: required from here [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:716:17: note: candidate: template<class T0, class T1> void Eigen::PlainObjectBase<Derived>::_init2(const Scalar&, const Scalar&, typename Eigen::internal::enable_if<(typename Eigen::internal::dense_xpr_base<Derived>::type:: SizeAtCompileTime == 2), T0>::type*) [with T0 = T0; T1 = T1; Derived = Eigen::Matrix<ceres::Jet<double, 3>, 2, 1, 0, 2, 1>] [sophus:make] EIGEN_STRONG_INLINE void _init2(const Scalar& val0, const Scalar& val1, typename internal::enable_if<Base::SizeAtCompileTime==2,T0>::type* = 0) [sophus:make] ^ [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:716:17: note: template argument deduction/substitution failed: [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:367:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/Matrix.h:304:35: note: cannot convert ‘x’ (type ‘const double’) to type ‘const Scalar& {aka const ceres::Jet<double, 3>&}’ [sophus:make] Base::template _init2<T0,T1>(x, y); [sophus:make] ^ [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:366:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:725:17: note: candidate: template<class T0, class T1> void Eigen::PlainObjectBase<Derived>::_init2(const Index&, const Index&, typename Eigen::internal::enable_if<((((! Eigen::internal::is_same<long int, typename Eigen::internal::traits<T>::Scalar>::value) && Eigen::internal::is_same<T0, long int>::value) && Eigen::internal::is_same<T1, long int>::value) && (typename Eigen::internal::dense_xpr_base<Derived>::type:: SizeAtCompileTime == 2)), T1>::type*) [with T0 = T0; T1 = T1; Derived = Eigen::Matrix<ceres::Jet<double, 3>, 2, 1, 0, 2, 1>] [sophus:make] EIGEN_STRONG_INLINE void _init2(const Index& val0, const Index& val1, [sophus:make] ^ [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:725:17: note: template argument deduction/substitution failed: [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h: In substitution of ‘template<class T0, class T1> void Eigen::PlainObjectBase<Derived>::_init2(const Index&, const Index&, typename Eigen::internal::enable_if<((((! Eigen::internal::is_same<long int, typename Eigen::internal::traits<T>::Scalar>::value) && Eigen::internal::is_same<T0, long int>::value) && Eigen::internal::is_same<T1, long int>::value) && (typename Eigen::internal::dense_xpr_base<Derived>::type:: SizeAtCompileTime == 2)), T1>::type*) [with T0 = double; T1 = int]’: [sophus:make] /usr/include/eigen3/Eigen/src/Core/Matrix.h:304:35: required from ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const T0&, const T1&) [with T0 = double; T1 = int; _Scalar = ceres::Jet<double, 3>; int _Rows = 2; int _Cols = 1; int _Options = 0; int _MaxRows = 2; int _MaxCols = 1]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:37:40: required from ‘Sophus::Tests<Scalar>::Tests() [with Scalar = ceres::Jet<double, 3>]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:212:32: required from here [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:725:17: error: invalid use of incomplete type ‘struct Eigen::internal::enable_if<false, int>’ [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:295:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/util/Meta.h:131:45: note: declaration of ‘struct Eigen::internal::enable_if<false, int>’ [sophus:make] template<bool Condition, typename T> struct enable_if; [sophus:make] ^ [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:367:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/Matrix.h: In instantiation of ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const T0&, const T1&) [with T0 = int; T1 = int; _Scalar = ceres::Jet<double, 3>; int _Rows = 2; int _Cols = 1; int _Options = 0; int _MaxRows = 2; int _MaxCols = 1]’: [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:120:44: required from ‘bool Sophus::Tests<Scalar>::testRawDataAcces() [with Scalar = ceres::Jet<double, 3>]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:91:31: required from ‘void Sophus::Tests<Scalar>::runAll() [with Scalar = ceres::Jet<double, 3>]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:212:41: required from here [sophus:make] /usr/include/eigen3/Eigen/src/Core/Matrix.h:304:35: error: no matching function for call to ‘Eigen::Matrix<ceres::Jet<double, 3>, 2, 1, 0, 2, 1>::_init2(const int&, const int&)’ [sophus:make] Base::template _init2<T0,T1>(x, y); [sophus:make] ^ [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:366:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:706:17: note: candidate: template<class T0, class T1> void Eigen::PlainObjectBase<Derived>::_init2(Eigen::Index, Eigen::Index, typename Eigen::internal::enable_if<(typename Eigen::internal::dense_xpr_base<Derived>::type:: SizeAtCompileTime != 2), T0>::type*) [with T0 = T0; T1 = T1; Derived = Eigen::Matrix<ceres::Jet<double, 3>, 2, 1, 0, 2, 1>] [sophus:make] EIGEN_STRONG_INLINE void _init2(Index rows, Index cols, typename internal::enable_if<Base::SizeAtCompileTime!=2,T0>::type* = 0) [sophus:make] ^ [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:706:17: note: template argument deduction/substitution failed: [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h: In substitution of ‘template<class T0, class T1> void Eigen::PlainObjectBase<Derived>::_init2(Eigen::Index, Eigen::Index, typename Eigen::internal::enable_if<(typename Eigen::internal::dense_xpr_base<Derived>::type:: SizeAtCompileTime != 2), T0>::type*) [with T0 = int; T1 = int]’: [sophus:make] /usr/include/eigen3/Eigen/src/Core/Matrix.h:304:35: required from ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const T0&, const T1&) [with T0 = int; T1 = int; _Scalar = ceres::Jet<double, 3>; int _Rows = 2; int _Cols = 1; int _Options = 0; int _MaxRows = 2; int _MaxCols = 1]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:120:44: required from ‘bool Sophus::Tests<Scalar>::testRawDataAcces() [with Scalar = ceres::Jet<double, 3>]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:91:31: required from ‘void Sophus::Tests<Scalar>::runAll() [with Scalar = ceres::Jet<double, 3>]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:212:41: required from here [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:706:17: error: invalid use of incomplete type ‘struct Eigen::internal::enable_if<false, int>’ [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:295:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/util/Meta.h:131:45: note: declaration of ‘struct Eigen::internal::enable_if<false, int>’ [sophus:make] template<bool Condition, typename T> struct enable_if; [sophus:make] ^ [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:366:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/Matrix.h: In instantiation of ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const T0&, const T1&) [with T0 = int; T1 = int; _Scalar = ceres::Jet<double, 3>; int _Rows = 2; int _Cols = 1; int _Options = 0; int _MaxRows = 2; int _MaxCols = 1]’: [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:120:44: required from ‘bool Sophus::Tests<Scalar>::testRawDataAcces() [with Scalar = ceres::Jet<double, 3>]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:91:31: required from ‘void Sophus::Tests<Scalar>::runAll() [with Scalar = ceres::Jet<double, 3>]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:212:41: required from here [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:716:17: note: candidate: template<class T0, class T1> void Eigen::PlainObjectBase<Derived>::_init2(const Scalar&, const Scalar&, typename Eigen::internal::enable_if<(typename Eigen::internal::dense_xpr_base<Derived>::type:: SizeAtCompileTime == 2), T0>::type*) [with T0 = T0; T1 = T1; Derived = Eigen::Matrix<ceres::Jet<double, 3>, 2, 1, 0, 2, 1>] [sophus:make] EIGEN_STRONG_INLINE void _init2(const Scalar& val0, const Scalar& val1, typename internal::enable_if<Base::SizeAtCompileTime==2,T0>::type* = 0) [sophus:make] ^ [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:716:17: note: template argument deduction/substitution failed: [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:367:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/Matrix.h:304:35: note: cannot convert ‘x’ (type ‘const int’) to type ‘const Scalar& {aka const ceres::Jet<double, 3>&}’ [sophus:make] Base::template _init2<T0,T1>(x, y); [sophus:make] ^ [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:366:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:725:17: note: candidate: template<class T0, class T1> void Eigen::PlainObjectBase<Derived>::_init2(const Index&, const Index&, typename Eigen::internal::enable_if<((((! Eigen::internal::is_same<long int, typename Eigen::internal::traits<T>::Scalar>::value) && Eigen::internal::is_same<T0, long int>::value) && Eigen::internal::is_same<T1, long int>::value) && (typename Eigen::internal::dense_xpr_base<Derived>::type:: SizeAtCompileTime == 2)), T1>::type*) [with T0 = T0; T1 = T1; Derived = Eigen::Matrix<ceres::Jet<double, 3>, 2, 1, 0, 2, 1>] [sophus:make] EIGEN_STRONG_INLINE void _init2(const Index& val0, const Index& val1, [sophus:make] ^ [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:725:17: note: template argument deduction/substitution failed: [sophus:make] test/core/CMakeFiles/test_rxso2.dir/build.make:62: recipe for target 'test/core/CMakeFiles/test_rxso2.dir/test_rxso2.cpp.o' failed [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h: In substitution of ‘template<class T0, class T1> void Eigen::PlainObjectBase<Derived>::_init2(const Index&, const Index&, typename Eigen::internal::enable_if<((((! Eigen::internal::is_same<long int, typename Eigen::internal::traits<T>::Scalar>::value) && Eigen::internal::is_same<T0, long int>::value) && Eigen::internal::is_same<T1, long int>::value) && (typename Eigen::internal::dense_xpr_base<Derived>::type:: SizeAtCompileTime == 2)), T1>::type*) [with T0 = int; T1 = int]’: [sophus:make] /usr/include/eigen3/Eigen/src/Core/Matrix.h:304:35: required from ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const T0&, const T1&) [with T0 = int; T1 = int; _Scalar = ceres::Jet<double, 3>; int _Rows = 2; int _Cols = 1; int _Options = 0; int _MaxRows = 2; int _MaxCols = 1]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:120:44: required from ‘bool Sophus::Tests<Scalar>::testRawDataAcces() [with Scalar = ceres::Jet<double, 3>]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:91:31: required from ‘void Sophus::Tests<Scalar>::runAll() [with Scalar = ceres::Jet<double, 3>]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:212:41: required from here [sophus:make] /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:725:17: error: invalid use of incomplete type ‘struct Eigen::internal::enable_if<false, int>’ [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:295:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/util/Meta.h:131:45: note: declaration of ‘struct Eigen::internal::enable_if<false, int>’ [sophus:make] template<bool Condition, typename T> struct enable_if; [sophus:make] ^ [sophus:make] In file included from /usr/include/eigen3/Eigen/Core:302:0, [sophus:make] from /usr/include/eigen3/Eigen/LU:11, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/so2.hpp:8, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:4, [sophus:make] from /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:3: [sophus:make] /usr/include/eigen3/Eigen/src/Core/MathFunctions.h: In instantiation of ‘static NewType Eigen::internal::cast_impl<OldType, NewType>::run(const OldType&) [with OldType = ceres::Jet<double, 3>; NewType = int]’: [sophus:make] /usr/include/eigen3/Eigen/src/Core/MathFunctions.h:375:42: required from ‘NewType Eigen::internal::cast(const OldType&) [with OldType = ceres::Jet<double, 3>; NewType = int]’ [sophus:make] /usr/include/eigen3/Eigen/src/Core/IO.h:136:32: required from ‘static int Eigen::internal::significant_decimals_default_impl<Scalar, IsInteger>::run() [with Scalar = ceres::Jet<double, 3>; bool IsInteger = false]’ [sophus:make] /usr/include/eigen3/Eigen/src/Core/IO.h:183:66: required from ‘std::ostream& Eigen::internal::print_matrix(std::ostream&, const Derived&, const Eigen::IOFormat&) [with Derived = Eigen::Matrix<ceres::Jet<double, 3>, 2, 2, 0, 2, 2>; std::ostream = std::basic_ostream<char>]’ [sophus:make] /usr/include/eigen3/Eigen/src/Core/IO.h:248:32: required from ‘std::ostream& Eigen::operator<<(std::ostream&, const Eigen::DenseBase<Derived>&) [with Derived = Eigen::Matrix<ceres::Jet<double, 3>, 2, 2, 0, 2, 2>; std::ostream = std::basic_ostream<char>]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/sophus/common.hpp:59:12: required from ‘static void Sophus::details::ArgToStream<T>::impl(std::stringstream&, T&&) [with T = const Eigen::Matrix<ceres::Jet<double, 3>, 2, 2, 0, 2, 2>&; std::stringstream = std::__cxx11::basic_stringstream<char>]’ [sophus:make] CMakeFiles/Makefile2:195: recipe for target 'test/core/CMakeFiles/test_rxso2.dir/all' failed [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/sophus/common.hpp:76:29: required from ‘void Sophus::details::FormatStream(std::stringstream&, const char*, T&&, Args&& ...) [with T = const Eigen::Matrix<ceres::Jet<double, 3>, 2, 2, 0, 2, 2>&; Args = {}; std::stringstream = std::__cxx11::basic_stringstream<char>]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/sophus/common.hpp:90:15: required from ‘std::__cxx11::string Sophus::details::FormatString(const char*, Args&& ...) [with Args = {const Eigen::Matrix<ceres::Jet<double, 3>, 2, 2, 0, 2, 2>&}; std::__cxx11::string = std::__cxx11::basic_string<char>]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/sophus/common.hpp:126:37: required from ‘void Sophus::defaultEnsure(const char*, const char*, int, const char*, Args&& ...) [with Args = {const Eigen::Matrix<ceres::Jet<double, 3>, 2, 2, 0, 2, 2>&}]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:300:77: required from ‘void Sophus::RxSO2Base<Derived>::setScaledRotationMatrix(const Transformation&) [with Derived = Sophus::RxSO2<ceres::Jet<double, 3> >; Sophus::RxSO2Base<Derived>::Transformation = Eigen::Matrix<ceres::Jet<double, 3>, 2, 2, 0, 2, 2>; typename Eigen::internal::traits<T>::Scalar = ceres::Jet<double, 3>]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/sophus/rxso2.hpp:363:5: required from ‘Sophus::RxSO2<Scalar_, Options>::RxSO2(const Transformation&) [with Scalar_ = ceres::Jet<double, 3>; int Options = 0; Sophus::RxSO2<Scalar_, Options>::Transformation = Eigen::Matrix<ceres::Jet<double, 3>, 2, 2, 0, 2, 2>]’ [sophus:make] /home/v01d/ros/src/thirdparty/Sophus/test/core/test_rxso2.cpp:18:16: required from here [sophus:make] /usr/include/eigen3/Eigen/src/Core/MathFunctions.h:365:34: error: invalid static_cast from type ‘const ceres::Jet<double, 3>’ to type ‘int’ [sophus:make] return static_cast<NewType>(x); [sophus:make] ^ [sophus:make] make[2]: *** [test/core/CMakeFiles/test_rxso2.dir/test_rxso2.cpp.o] Error 1 [sophus:make] make[1]: *** [test/core/CMakeFiles/test_rxso2.dir/all] Error 2 [sophus:make] make[1]: *** Waiting for unfinished jobs.... [sophus:make] [ 29%] Linking CXX executable test_geometry

Control reaches end of non void function

I am using Eigen 3.0.5 and gcc 4.9. Whenever I try to compile sophus, I get the following error. I am trying to compile it in association with tum visions dvo_slam

/home/devel/dvo_test/sandbox/dvo_slam/sophus/sophus_src/sophus/rxso3.hpp:362:3: error: control reaches end of non-void function [-Werror=return-type] } ^ /home/devel/dvo_test/sandbox/dvo_slam/sophus/sophus_src/sophus/rxso3.hpp: In member function ‘Sophus::RxSO3Base<Derived>::Transformation Sophus::RxSO3Base<Derived>::rotationMatrix() const [with Derived = Sophus::RxSO3<float>; Sophus::RxSO3Base<Derived>::Transformation = Eigen::Matrix<float, 3, 3>; typename Eigen::internal::traits<T>::Scalar = float]’: /home/devel/dvo_test/sandbox/dvo_slam/sophus/sophus_src/sophus/rxso3.hpp:254:3: error: control reaches end of non-void function [-Werror=return-type] } ^ /home/devel/dvo_test/sandbox/dvo_slam/sophus/sophus_src/sophus/rxso3.hpp: In member function ‘Sophus::RxSO3<typename Eigen::internal::traits<T>::Scalar> Sophus::RxSO3Base<Derived>::inverse() const [with Derived = Sophus::RxSO3<float>; typename Eigen::internal::traits<T>::Scalar = float]’: /home/devel/dvo_test/sandbox/dvo_slam/sophus/sophus_src/sophus/rxso3.hpp:124:3: error: control reaches end of non-void function [-Werror=return-type] } ^ /home/devel/dvo_test/sandbox/dvo_slam/sophus/sophus_src/sophus/rxso3.hpp: In member function ‘const Eigen::Quaternion<Scalar_>& Sophus::RxSO3<Scalar_, Options>::quaternion() const [with Scalar_ = float; int Options = 0]’: /home/devel/dvo_test/sandbox/dvo_slam/sophus/sophus_src/sophus/rxso3.hpp:576:3: error: control reaches end of non-void function [-Werror=return-type] } ^ In file included from /home/devel/dvo_test/sandbox/dvo_slam/sophus/sophus_src/sophus/rxso3.hpp:4:0, from /home/devel/dvo_test/sandbox/dvo_slam/sophus/sophus_src/test/core/test_rxso3.cpp:3: /home/devel/dvo_test/sandbox/dvo_slam/sophus/sophus_src/sophus/so3.hpp: In static member function ‘static Sophus::SO3Base<Derived>::Tangent Sophus::SO3Base<Derived>::logAndTheta(const Sophus::SO3<typename Eigen::internal::traits<T>::Scalar>&, Sophus::SO3Base<Derived>::Scalar*) [with Derived = Sophus::SO3<float>; Sophus::SO3Base<Derived>::Tangent = Eigen::Matrix<float, 3, 1>; typename Eigen::internal::traits<T>::Scalar = float; Sophus::SO3Base<Derived>::Scalar = float]’: /home/devel/dvo_test/sandbox/dvo_slam/sophus/sophus_src/sophus/so3.hpp:455:3: error: control reaches end of non-void function [-Werror=return-type] } ^ In file included from /home/devel/dvo_test/sandbox/dvo_slam/sophus/sophus_src/test/core/test_rxso3.cpp:3:0: /home/devel/dvo_test/sandbox/dvo_slam/sophus/sophus_src/sophus/rxso3.hpp: In member function ‘Sophus::RxSO3Base<Derived>::Point Sophus::RxSO3Base<Derived>::operator*(const Point&) const [with Derived = Sophus::RxSO3<float>; Sophus::RxSO3Base<Derived>::Point = Eigen::Matrix<float, 3, 1>; typename Eigen::internal::traits<T>::Scalar = float]’: /home/devel/dvo_test/sandbox/dvo_slam/sophus/sophus_src/sophus/rxso3.hpp:211:3: error: control reaches end of non-void function [-Werror=return-type] } ^ In file included from /home/devel/dvo_test/sandbox/dvo_slam/sophus/sophus_src/test/core/tests.hpp:9:0, from /home/devel/dvo_test/sandbox/dvo_slam/sophus/sophus_src/test/core/test_rxso3.cpp:4: /home/devel/dvo_test/sandbox/dvo_slam/sophus/sophus_src/sophus/average.hpp: In function ‘Sophus::enable_if_t<std::is_same<typename SequenceContainer::value_type, Sophus::RxSO3<Scalar> >::value, Sophus::optional<typename SequenceContainer::value_type> > Sophus::average(const SequenceContainer&) [with SequenceContainer = std::array<Sophus::RxSO3<float>, 2u>; Scalar = float; Sophus::enable_if_t<std::is_same<typename SequenceContainer::value_type, Sophus::RxSO3<Scalar> >::value, Sophus::optional<typename SequenceContainer::value_type> > = Sophus::optional<Sophus::RxSO3<float> >]’: /home/devel/dvo_test/sandbox/dvo_slam/sophus/sophus_src/sophus/average.hpp:150:1: error: control reaches end of non-void function [-Werror=return-type] }

fatal error C1001 with visual studio

I try to compile a short program that does nothing but include the sophus/so3.hpp. But both vs2013 and vs2015 report the same error:

\sophus\include\sophus\types.hpp(14): fatal error C1001: An internal error has occurred in the compiler.

Anyone knows how to solve it?

sim(2) implementation

Have been off-focus of Sophus for a while and it seems that it has been updated quite a bit.
@strasdat are you still gonna add sim(2) functionality? If so, the very old non-merged PR #9 is now outdated though. I would like to use the up-to-date Sophus while my current project needs a sim(2) transformation still. Do you consider to help add or review the sim(2) if I send a PR again? Thanks.

Vectorization

Hi, thanks for writing Sophus!

This is less of an issue, and more of a comment about the implementation.

I'm wanting to interpolate with SE3, but I'm seeing some performance problems. From looking at the assembly and the eigen docs, it doesn't appear that SE3 operations are vectorized very well or at all.

I think there could be great performance benefits to having SO3 use a Vector4 and Matrix4 internally.
Same for SE3.

Interpolating with Sim3, I see a ~64x performance improvement over SE3. However, it seems like even Sim3 could make better use of Eigen's vectorization if it instead used vectors and matrices with dimensions that were multiples of 4.

It seems okay that the operator* takes a Vector3 as long as a Matrix4 or Matrix3x4 is available via matrix().

I'd much rather not use Sim3 because I'm not dealing with scale, but I'll probably end up using it due to performance reasons.

error:compiled with VS2015 win64

I use Cmake3.5 and VS2015 on win8.1,but there is a error:
\sophus\sophus\ensure.hpp(60): error C2144: Syntax error: "void" should be preceded by ";"
\sophus\sophus\ensure.hpp(60): error C4430
thanks!
error

SE3 translation error

Hello this code
cout << "d" <<d.matrix() <<endl;
Tangent td=SE3Type::log(d);
SE3Type de=SE3Type::exp(td);
cout << "de"<< de.matrix() <<endl;
output this:
d 0.904771 0.411846 0.108502 -3.01266
0.138871 -0.0444436 -0.989313 2.20879
-0.402622 0.910169 -0.0974046 1.42016
0 0 0 1
de 0.904771 0.411846 0.108502 -3.3656
0.138871 -0.0444436 -0.989313 3.29317
-0.402622 0.910169 -0.0974046 1.42016
0 0 0 1
I think d and d3 must be equals, but the translations tx and ty are differrents.
I try to interpolate two poses and starting in the right position p0 don't interpolate the final position p1.
This is a implementation of the method:
SE3Type interpolation(SE3Type &a,SE3Type &b, Escalar t){
cout << "t"<< t<<endl;
SE3Type d=b_a.inverse();
cout << "d" <<d.matrix() <<endl;
Tangent td=SE3Type::log(d);
SE3Type de=SE3Type::exp(td);
cout << "de"<< de.matrix() <<endl;
Tangent dt=td_t;
SE3Type ret=SE3Type::exp(dt)*a;
return ret;
}
I thinks it is a bug of sophus. Doesn't it?
Thanks in advance.
Paco

provide package.xml for ROS compatibility?

Hi,
I was wondering if you would be willing to include a package.xml for ROS compatibility. This allows to simply clone your repo into the catkin workspace and compile with no problems. The one from stonier's fork of your repo works directly. I think it is only needed to add an install rule of this file in the CMakeLists.txt, which would also allow for releasing this package into ROS directly.

Warning: calling a host function from a host device via Sophus::SE3f::Log

Greetings,

I am hoping to get some insight on a compiler warning regarding a host device function which gets the tangent space via the Log function. The warning is:

/workspace/Sophus/sophus/so3.hpp(569): warning: calling a host function from a host device function is not allowed
detected during:
instantiation of "Sophus::SO3GroupBase::Tangent Sophus::SO3GroupBase::logAndTheta(const Sophus::SO3Group<Sophus::SO3GroupBase::Scalar, 0> &, Sophus::SO3GroupBase::Scalar *) [with Derived=Sophus::SO3Group<float, 0>]"
/workspace/Sophus/sophus/se3.hpp(653): here
instantiation of "Sophus::SE3GroupBase::Tangent Sophus::SE3GroupBase::log(const Sophus::SE3Group<Sophus::SE3GroupBase::Scalar, 0> &) [with Derived=Sophus::SE3Group<float, 0>]"
/workspace/Sophus/sophus/se3.hpp(235): here
instantiation of "Sophus::SE3GroupBase::Tangent Sophus::SE3GroupBase::log() const [with Derived=Sophus::SE3Group<float, 0>]"
/workspace/vtrus/lib_vtrus_core/include/vtruscore/math/Utils.h(65): here

The Utils function that has the warning is a global c inline function:


__host__ __device__
inline bool IsTransformationWithinBounds(const Sophus::SE3f& T_rl, const float maxDistanceMeters, const float maxAngleDegrees)
{
    Eigen::Matrix<float, 6, 1> T_rl_ln = T_rl.log();
    float distance = core::float3(T_rl_ln[0], T_rl_ln[1], T_rl_ln[2]).norm();
    float angle = Rad2Deg(core::float3(T_rl_ln[3], T_rl_ln[4], T_rl_ln[5]).norm());

    if(distance <= maxDistanceMeters && angle <= maxAngleDegrees)
    {
        return true;
    }

    return false;
}
}

I see the function is marked as an EIGEN_DEVICE_FUNCTION, but the line:
Tanget upsilon_omega;
resolves to typedef Matrix<Scalar,DoF,1> Tangent;

Do note that I can call log and pass in an Eigen::Matrix<float, 6, 1> rather than the Sophus::SE3f and have no warnings, but I would like to get some thoughts regardless. I appreciate any suggestions or thoughts

issues related to ceres (Jet types)

Seems like this

SOPHUS_ENSURE((T.row(3) - Matrix<Scalar, 1, 4>(0, 0, 0, 1)).squaredNorm() <

should be something more like

Matrix<Scalar, 1, 4>(Scalar(0), Scalar(0), Scalar(0), Scalar(1))
or Matrix<Scalar,1,3>::Zero().homogeneous()

Also ran into an issue with

SOPHUS_ENSURE(R.determinant() > 0, "det(R) is not positive: %",

> Scalar(0)

Does this seem reasonable? I can make a PR if you'd accept these types of changes.

RxSO3Base operator= should use quaternion_nonconst() instead of quaternion()

Below is the patch I applied (sorry for inlining it since it's just one line and I have not forked the project). In short, we can't assign using quaternion() since it's const. I've just changed it to quaternion_nonconst().

diff --git a/sophus/rxso3.hpp b/sophus/rxso3.hpp
index 463d1ae..d94bfc8 100644
--- a/sophus/rxso3.hpp
+++ b/sophus/rxso3.hpp
@@ -197,7 +197,7 @@ class RxSO3Base {
   template <class OtherDerived>
   SOPHUS_FUNC RxSO3Base<Derived>& operator=(
       RxSO3Base<OtherDerived> const& other) {
-    quaternion() = other.quaternion();
+    quaternion_nonconst() = other.quaternion();
     return *this;
   }

Problem building Sophus using visual studio

Hi I am trying to build Sophus on visual studio 10 after generating the files using cmake, and was presented with the following error

-multiple error C2144: syntax error : 'int' should be preceded by ';' for the statement "typedef RxSO3Group ScSO3 EIGEN_DEPRECATED;"

  • error C2065: 'M_PI_2' : undeclared identifier for the statement " tangent_vec.push_back(Tangent(M_PI_2,M_PI_2,0.0));" in test_203.cpp

For the first error, the syntax for the typedef is not what I am familiar with, however I noticed that the same declaration was done across multiple files thus concluded that it was not a typography error. However if this is the case, I am unsure as to what causes the syntax error.

Thanks

Random rotation

Is there a function that generates a random member of SO3?
Like something described in
Effective sampling and distance metrics for 3d rigid body path planning, J. Kuffner, ICRA 2004.

Ros Release

We're interested in doing a ros release (either native catkin or ros 3rd party) of Sophus. If you're still interested in supporting Sophus let us know and we'll make some pull requests here, otherwise we'll fork it, release and attempt to support contributions from the community from the fork.

Before I forget....it's a nice library! Thanks for putting this out there in the wild!

ceres / storage order

virtual bool ComputeJacobian(double const* T_raw,
double* jacobian_raw) const {
Eigen::Map<SE3d const> T(T_raw);
Eigen::Map<Matrix<double, 6, 7> > jacobian(jacobian_raw);
jacobian = T.Dx_this_mul_exp_x_at_0();
return true;
}

uses default eigen ordering (configurable at compile-time).. but it should explicity use row major based on
http://ceres-solver.org/nnls_modeling.html?highlight=local%20parameterization#_CPPv2NK5ceres21LocalParameterization15ComputeJacobianEPKdPd
https://github.com/ceres-solver/ceres-solver/blob/9026d69d1ce1e0bcd21debd54a38246d85c7c6e4/internal/ceres/local_parameterization.cc#L127
https://github.com/ceres-solver/ceres-solver/blob/78d49f46825ce2f8c7fb040b373bcd638729ced2/include/ceres/internal/eigen.h#L44

static constexpr int kGlobalSize = SE3d::num_parameters;
static constexpr int kLocalSize = SE3d::DoF;
Eigen::Map<Matrix<double, kGlobalSize, kLocalSize, Eigen::RowMajor> > jacobian(jacobian_raw);
jacobian = T.Dx_this_mul_exp_x_at_0().transpose(); // transposing just because of its return value

seems like dimensions of Dx_this_mul_exp_x_at_0 are reversed? shouldn't number of columns be based on the size of DoF (size of x)
https://en.wikipedia.org/wiki/Jacobian_matrix_and_determinant

Unnecessary const creates compiler warning

Compilation warning from clang:

In file included from ../thirdparty/Sophus/se3.hpp:27:
../thirdparty/Sophus/so3.hpp:801:3: warning: 'const' qualifier on reference type 'ConstQuaternionReference' (aka 'const typename internal::traits<Map<const SO3Group<type-parameter-0-0, 0>, _Options, Stride<0, 0> > >::QuaternionType &') has no effect [-Wignored-qualifiers]
const ConstQuaternionReference unit_quaternion() const {
^~~~~~
1 warning generated.

Solution: remove the const (which is unnecessary).

SO3:log()

As pointed out by Christoph Hertzberg, the singularity of SO3::log() around w=-1 is not handled properly yet.

Errors when using on Windows

Hi,

I was trying to compile a demo project which involves Sophus as the 3rdParty. I have tried to compile Sophus with cmake before compiling the demo and testing projects are all ignored in cmake simply because those project cannot be compiled. Here is the error ouput of VS-2013. I don't know if you have any idea to deal with that. Just post an issue and maybe other people have the same problem. That project has only a line of include, #include <sophus/se3.hpp>.

I have added the include directory to the project in advance.

Thanks.

c:\program files (x86)\sophus\include\sophus\common.hpp(146): error C2146: syntax error : missing ';' before identifier 'epsilon' 1>c:\program files (x86)\sophus\include\sophus\common.hpp(146): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\program files (x86)\sophus\include\sophus\common.hpp(146): warning C4183: 'epsilon': missing return type; assumed to be a member function returning 'int' 1>c:\program files (x86)\sophus\include\sophus\common.hpp(150): error C2146: syntax error : missing ';' before identifier 'pi' 1>c:\program files (x86)\sophus\include\sophus\common.hpp(150): error C2086: 'float Sophus::Constants<float>::constexpr' : redefinition 1> c:\program files (x86)\sophus\include\sophus\common.hpp(146) : see declaration of 'Sophus::Constants<float>::constexpr' 1>c:\program files (x86)\sophus\include\sophus\common.hpp(150): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\program files (x86)\sophus\include\sophus\common.hpp(150): warning C4183: 'pi': missing return type; assumed to be a member function returning 'int' 1>c:\program files (x86)\sophus\include\sophus\common.hpp(147): warning C4244: 'return' : conversion from 'float' to 'int', possible loss of data 1>c:\program files (x86)\sophus\include\sophus\common.hpp(150): warning C4244: 'return' : conversion from 'float' to 'int', possible loss of data 1>c:\program files (x86)\sophus\include\sophus\common.hpp(159): error C2146: syntax error : missing ';' before identifier 'nullopt_t' 1>c:\program files (x86)\sophus\include\sophus\common.hpp(159): error C2071: 'Sophus::nullopt_t::constexpr' : illegal storage class 1>c:\program files (x86)\sophus\include\sophus\common.hpp(159): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\program files (x86)\sophus\include\sophus\common.hpp(162): error C2146: syntax error : missing ';' before identifier 'nullopt_t' 1>c:\program files (x86)\sophus\include\sophus\common.hpp(162): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\program files (x86)\sophus\include\sophus\so3.hpp(76): error C2146: syntax error : missing ';' before identifier 'DoF' 1> c:\program files (x86)\sophus\include\sophus\so3.hpp(491) : see reference to class template instantiation 'Sophus::SO3Base<Derived>' being compiled 1>c:\program files (x86)\sophus\include\sophus\so3.hpp(76): error C2143: syntax error : missing ';' before '=' 1>c:\program files (x86)\sophus\include\sophus\so3.hpp(76): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\program files (x86)\sophus\include\sophus\so3.hpp(76): error C2238: unexpected token(s) preceding ';' 1>c:\program files (x86)\sophus\include\sophus\so3.hpp(78): error C2146: syntax error : missing ';' before identifier 'num_parameters' 1>c:\program files (x86)\sophus\include\sophus\so3.hpp(78): error C2086: 'int Sophus::SO3Base<Derived>::constexpr' : redefinition 1> c:\program files (x86)\sophus\include\sophus\so3.hpp(76) : see declaration of 'Sophus::SO3Base<Derived>::constexpr' 1>c:\program files (x86)\sophus\include\sophus\so3.hpp(78): error C2143: syntax error : missing ';' before '=' 1>c:\program files (x86)\sophus\include\sophus\so3.hpp(78): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\program files (x86)\sophus\include\sophus\so3.hpp(78): error C2238: unexpected token(s) preceding ';' 1>c:\program files (x86)\sophus\include\sophus\so3.hpp(80): error C2146: syntax error : missing ';' before identifier 'N' 1>c:\program files (x86)\sophus\include\sophus\so3.hpp(80): error C2086: 'int Sophus::SO3Base<Derived>::constexpr' : redefinition 1> c:\program files (x86)\sophus\include\sophus\so3.hpp(76) : see declaration of 'Sophus::SO3Base<Derived>::constexpr' 1>c:\program files (x86)\sophus\include\sophus\so3.hpp(80): error C2143: syntax error : missing ';' before '=' 1>c:\program files (x86)\sophus\include\sophus\so3.hpp(80): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\program files (x86)\sophus\include\sophus\so3.hpp(80): error C2238: unexpected token(s) preceding ';' 1>c:\program files (x86)\sophus\include\sophus\so3.hpp(81): error C2065: 'N' : undeclared identifier 1>c:\program files (x86)\sophus\include\sophus\so3.hpp(83): error C2065: 'DoF' : undeclared identifier 1>c:\program files (x86)\sophus\include\sophus\so3.hpp(84): error C2065: 'DoF' : undeclared identifier 1>c:\program files (x86)\sophus\include\sophus\so3.hpp(123): error C2065: 'num_parameters' : undeclared identifier 1>c:\program files (x86)\sophus\include\sophus\so3.hpp(134): error C2065: 'num_parameters' : undeclared identifier 1>c:\program files (x86)\sophus\include\sophus\so3.hpp(134): error C2065: 'DoF' : undeclared identifier 1>c:\program files (x86)\sophus\include\sophus\se3.hpp(64): error C2146: syntax error : missing ';' before identifier 'DoF' 1> c:\program files (x86)\sophus\include\sophus\se3.hpp(494) : see reference to class template instantiation 'Sophus::SE3Base<Derived>' being compiled 1>c:\program files (x86)\sophus\include\sophus\se3.hpp(64): error C2143: syntax error : missing ';' before '=' 1>c:\program files (x86)\sophus\include\sophus\se3.hpp(64): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\program files (x86)\sophus\include\sophus\se3.hpp(64): error C2238: unexpected token(s) preceding ';' 1>c:\program files (x86)\sophus\include\sophus\se3.hpp(67): error C2146: syntax error : missing ';' before identifier 'num_parameters' 1>c:\program files (x86)\sophus\include\sophus\se3.hpp(67): error C2086: 'int Sophus::SE3Base<Derived>::constexpr' : redefinition 1> c:\program files (x86)\sophus\include\sophus\se3.hpp(64) : see declaration of 'Sophus::SE3Base<Derived>::constexpr' 1>c:\program files (x86)\sophus\include\sophus\se3.hpp(67): error C2143: syntax error : missing ';' before '=' 1>c:\program files (x86)\sophus\include\sophus\se3.hpp(67): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\program files (x86)\sophus\include\sophus\se3.hpp(67): error C2238: unexpected token(s) preceding ';' 1>c:\program files (x86)\sophus\include\sophus\se3.hpp(69): error C2146: syntax error : missing ';' before identifier 'N' 1>c:\program files (x86)\sophus\include\sophus\se3.hpp(69): error C2086: 'int Sophus::SE3Base<Derived>::constexpr' : redefinition 1> c:\program files (x86)\sophus\include\sophus\se3.hpp(64) : see declaration of 'Sophus::SE3Base<Derived>::constexpr' 1>c:\program files (x86)\sophus\include\sophus\se3.hpp(69): error C2143: syntax error : missing ';' before '=' 1>c:\program files (x86)\sophus\include\sophus\se3.hpp(69): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\program files (x86)\sophus\include\sophus\se3.hpp(69): error C2238: unexpected token(s) preceding ';' 1>c:\program files (x86)\sophus\include\sophus\se3.hpp(70): error C2065: 'N' : undeclared identifier 1>c:\program files (x86)\sophus\include\sophus\se3.hpp(72): error C2065: 'DoF' : undeclared identifier 1>c:\program files (x86)\sophus\include\sophus\se3.hpp(73): error C2065: 'DoF' : undeclared identifier 1>c:\program files (x86)\sophus\include\sophus\se3.hpp(100): error C2065: 'num_parameters' : undeclared identifier 1>c:\program files (x86)\sophus\include\sophus\se3.hpp(117): error C2065: 'num_parameters' : undeclared identifier 1>c:\program files (x86)\sophus\include\sophus\se3.hpp(117): error C2065: 'DoF' : undeclared identifier

Build error with gcc 5.1 and Eigen5

I've tried to build latest master branch in ubuntu 14.04 with GCC 5.1 and Eigen3. I got below errors:

/usr/local/bin/cmake -H/home/tcsuser/Desktop/Edge_VO/Sophus-master -B/home/tcsuser/Desktop/Edge_VO/Sophus-master/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/bin/cmake -E cmake_progress_start /home/tcsuser/Desktop/Edge_VO/Sophus-master/build/CMakeFiles /home/tcsuser/Desktop/Edge_VO/Sophus-master/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory /home/tcsuser/Desktop/Edge_VO/Sophus-master/build' make -f test/core/CMakeFiles/test_common.dir/build.make test/core/CMakeFiles/test_common.dir/depend make[2]: Entering directory /home/tcsuser/Desktop/Edge_VO/Sophus-master/build'
cd /home/tcsuser/Desktop/Edge_VO/Sophus-master/build && /usr/local/bin/cmake -E cmake_depends "Unix Makefiles" /home/tcsuser/Desktop/Edge_VO/Sophus-master /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core /home/tcsuser/Desktop/Edge_VO/Sophus-master/build /home/tcsuser/Desktop/Edge_VO/Sophus-master/build/test/core /home/tcsuser/Desktop/Edge_VO/Sophus-master/build/test/core/CMakeFiles/test_common.dir/DependInfo.cmake --color=
make[2]: Leaving directory /home/tcsuser/Desktop/Edge_VO/Sophus-master/build' make -f test/core/CMakeFiles/test_common.dir/build.make test/core/CMakeFiles/test_common.dir/build make[2]: Entering directory /home/tcsuser/Desktop/Edge_VO/Sophus-master/build'
/usr/local/bin/cmake -E cmake_progress_report /home/tcsuser/Desktop/Edge_VO/Sophus-master/build/CMakeFiles 2
[ 12%] Building CXX object test/core/CMakeFiles/test_common.dir/test_common.cpp.o
cd /home/tcsuser/Desktop/Edge_VO/Sophus-master/build/test/core && /usr/bin/c++ -O3 -I/usr/local/include/eigen3 -I/home/tcsuser/Desktop/Edge_VO/Sophus-master -Wall -Werror -Wextra -ftemplate-backtrace-limit=0 -o CMakeFiles/test_common.dir/test_common.cpp.o -c /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:4:0,
from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:43:7: error: identifier ‘decltype’ is a keyword in C++11 [-Werror=c++0x-compat]
-> decltype(std::declvalstd::stringstream&() << std::declval(),
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:70:3: error: identifier ‘static_assert’ is a keyword in C++11 [-Werror=c++0x-compat]
static_assert(IsStreamable::value,
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:48: error: expected ‘,’ or ‘...’ before ‘&&’ token
std::string FormatString(const char* text, Args&&... args) {
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:58: error: parameter packs not expanded with ‘...’:
std::string FormatString(const char* text, Args&&... args) {
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:58: note: ‘Args’
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp: In function ‘std::string Sophus::details::FormatString(const char*, )’:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:88:30: error: ‘forward’ is not a member of ‘std’
FormatStream(stream, text, std::forward(args)...);
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:88:47: error: expected primary-expression before ‘>’ token
FormatStream(stream, text, std::forward(args)...);
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:88:49: error: ‘args’ was not declared in this scope
FormatStream(stream, text, std::forward(args)...);
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp: At global scope:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:115:19: error: variadic templates only available with -std=c++11 or -std=gnu++11 [-Werror]
template <typename... Args>
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:117:61: error: expected ‘,’ or ‘...’ before ‘&&’ token
const char* description, Args&&... args) {
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:117:71: error: parameter packs not expanded with ‘...’:
const char* description, Args&&... args) {
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:117:71: note: ‘Args’
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp: In function ‘void Sophus::defaultEnsure(const char*, const char*, int, const char*, )’:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:123:51: error: ‘forward’ is not a member of ‘std’
std::cout << details::FormatString(description, std::forward(args)...)
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:123:68: error: expected primary-expression before ‘>’ token
std::cout << details::FormatString(description, std::forward(args)...)
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:123:70: error: ‘args’ was not declared in this scope
std::cout << details::FormatString(description, std::forward(args)...)
^
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:0:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp: At global scope:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:19:40: error: ‘>>’ operator is treated as two right angle brackets in C++11 [-Werror=c++0x-compat]
class Metric<Eigen::Matrix<Scalar, M, N>> {
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:19:40: note: suggest parentheses around ‘>>’ expression
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:19:40: error: template argument 3 is invalid
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:19:40: error: template argument 4 is invalid
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:19:40: error: template argument 6 is invalid
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:19:43: error: extended initializer lists only available with -std=c++11 or -std=gnu++11 [-Werror]
class Metric<Eigen::Matrix<Scalar, M, N>> {
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:19:21: error: template argument 1 is invalid
class Metric<Eigen::Matrix<Scalar, M, N>> {
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:28:1: error: ‘auto’ changes meaning in C++11; please remove it [-Werror=c++0x-compat]
auto metric(const T& v0, const T& v1) -> decltype(Metric::impl(v0, v1)) {
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:28:42: error: expected type-specifier before ‘decltype’
auto metric(const T& v0, const T& v1) -> decltype(Metric::impl(v0, v1)) {
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:28:42: error: expected initializer before ‘decltype’
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:39:40: error: ‘>>’ operator is treated as two right angle brackets in C++11 [-Werror=c++0x-compat]
class Pretty<Eigen::Matrix<Scalar, M, N>> {
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:39:40: note: suggest parentheses around ‘>>’ expression
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:39:40: error: template argument 3 is invalid
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:39:40: error: template argument 4 is invalid
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:39:40: error: template argument 6 is invalid
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:39:43: error: extended initializer lists only available with -std=c++11 or -std=gnu++11 [-Werror]
class Pretty<Eigen::Matrix<Scalar, M, N>> {
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:39:21: error: template argument 1 is invalid
class Pretty<Eigen::Matrix<Scalar, M, N>> {
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:51:19: error: variadic templates only available with -std=c++11 or -std=gnu++11 [-Werror]
template <typename... Args>
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp: In function ‘void Sophus::details::testFailed(bool&, const char*, const char*, int, const string&)’:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:55:39: error: no matching function for call to ‘FormatString(const char [43], const char*&, const char*&, int&)’
file, line);
^
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:4:0,
from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:13: note: candidate: template<class ... Args> std::string Sophus::details::FormatString(const char*, )
std::string FormatString(const char* text, Args&&... args) {
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:13: note: template argument deduction/substitution failed:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:92:20: note: candidate: std::string Sophus::details::FormatString()
inline std::string FormatString() { return std::string(); }
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:92:20: note: candidate expects 0 arguments, 4 provided
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:0:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp: In function ‘bool Sophus::{anonymous}::testFormatString()’:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:80:41: error: no matching function for call to ‘FormatString(const char [31], const char [24], std::string, const char [14], std::string)’
Sophus::details::pretty(right));
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:11:3: note: in expansion of macro ‘SOPHUS_TEST_EQUAL’
SOPHUS_TEST_EQUAL(passed, details::FormatString(), std::string());
^
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:4:0,
from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:13: note: candidate: template<class ... Args> std::string Sophus::details::FormatString(const char*, )
std::string FormatString(const char* text, Args&&... args) {
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:13: note: template argument deduction/substitution failed:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:92:20: note: candidate: std::string Sophus::details::FormatString()
inline std::string FormatString() { return std::string(); }
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:92:20: note: candidate expects 0 arguments, 5 provided
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:0:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:13:67: error: no matching function for call to ‘FormatString(const char*)’
SOPHUS_TEST_EQUAL(passed, details::FormatString(test_str.c_str()), test_str);
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:76:9: note: in definition of macro ‘SOPHUS_TEST_EQUAL’
if (left != right) {
^
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:4:0,
from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:13: note: candidate: template<class ... Args> std::string Sophus::details::FormatString(const char*, )
std::string FormatString(const char* text, Args&&... args) {
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:13: note: template argument deduction/substitution failed:
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:0:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:13:67: note: candidate expects 2 arguments, 1 provided
SOPHUS_TEST_EQUAL(passed, details::FormatString(test_str.c_str()), test_str);
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:76:9: note: in definition of macro ‘SOPHUS_TEST_EQUAL’
if (left != right) {
^
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:4:0,
from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:92:20: note: candidate: std::string Sophus::details::FormatString()
inline std::string FormatString() { return std::string(); }
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:92:20: note: candidate expects 0 arguments, 1 provided
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:0:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:13:67: error: no matching function for call to ‘FormatString(const char*)’
SOPHUS_TEST_EQUAL(passed, details::FormatString(test_str.c_str()), test_str);
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:79:35: note: in definition of macro ‘SOPHUS_TEST_EQUAL’
Sophus::details::pretty(left), SOPHUS_STRINGIFY(right),
^
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:4:0,
from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:13: note: candidate: template<class ... Args> std::string Sophus::details::FormatString(const char*, )
std::string FormatString(const char* text, Args&&... args) {
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:13: note: template argument deduction/substitution failed:
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:0:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:13:67: note: candidate expects 2 arguments, 1 provided
SOPHUS_TEST_EQUAL(passed, details::FormatString(test_str.c_str()), test_str);
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:79:35: note: in definition of macro ‘SOPHUS_TEST_EQUAL’
Sophus::details::pretty(left), SOPHUS_STRINGIFY(right),
^
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:4:0,
from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:92:20: note: candidate: std::string Sophus::details::FormatString()
inline std::string FormatString() { return std::string(); }
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:92:20: note: candidate expects 0 arguments, 1 provided
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:0:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:14:65: error: no matching function for call to ‘FormatString(const char [10], int)’
SOPHUS_TEST_EQUAL(passed, details::FormatString("Number: %", 5),
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:76:9: note: in definition of macro ‘SOPHUS_TEST_EQUAL’
if (left != right) {
^
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:4:0,
from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:13: note: candidate: template<class ... Args> std::string Sophus::details::FormatString(const char*, )
std::string FormatString(const char* text, Args&&... args) {
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:13: note: template argument deduction/substitution failed:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:92:20: note: candidate: std::string Sophus::details::FormatString()
inline std::string FormatString() { return std::string(); }
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:92:20: note: candidate expects 0 arguments, 2 provided
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:0:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:14:65: error: no matching function for call to ‘FormatString(const char [10], int)’
SOPHUS_TEST_EQUAL(passed, details::FormatString("Number: %", 5),
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:79:35: note: in definition of macro ‘SOPHUS_TEST_EQUAL’
Sophus::details::pretty(left), SOPHUS_STRINGIFY(right),
^
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:4:0,
from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:13: note: candidate: template<class ... Args> std::string Sophus::details::FormatString(const char*, )
std::string FormatString(const char* text, Args&&... args) {
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:13: note: template argument deduction/substitution failed:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:92:20: note: candidate: std::string Sophus::details::FormatString()
inline std::string FormatString() { return std::string(); }
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:92:20: note: candidate expects 0 arguments, 2 provided
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:0:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:17:73: error: no matching function for call to ‘FormatString(const char [14], double, std::string&)’
details::FormatString("Real: % msg %", 1.5, test_str),
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:76:9: note: in definition of macro ‘SOPHUS_TEST_EQUAL’
if (left != right) {
^
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:4:0,
from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:13: note: candidate: template<class ... Args> std::string Sophus::details::FormatString(const char*, )
std::string FormatString(const char* text, Args&&... args) {
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:13: note: template argument deduction/substitution failed:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:92:20: note: candidate: std::string Sophus::details::FormatString()
inline std::string FormatString() { return std::string(); }
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:92:20: note: candidate expects 0 arguments, 3 provided
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:0:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:17:73: error: no matching function for call to ‘FormatString(const char [14], double, std::string&)’
details::FormatString("Real: % msg %", 1.5, test_str),
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:79:35: note: in definition of macro ‘SOPHUS_TEST_EQUAL’
Sophus::details::pretty(left), SOPHUS_STRINGIFY(right),
^
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:4:0,
from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:13: note: candidate: template<class ... Args> std::string Sophus::details::FormatString(const char*, )
std::string FormatString(const char* text, Args&&... args) {
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:13: note: template argument deduction/substitution failed:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:92:20: note: candidate: std::string Sophus::details::FormatString()
inline std::string FormatString() { return std::string(); }
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:92:20: note: candidate expects 0 arguments, 3 provided
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:0:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:21:78: error: no matching function for call to ‘FormatString(const char [7], Eigen::Transpose<Eigen::Matrix<float, 3, 1> >)’
"vec: %", Eigen::Vector3f(0.f, 1.f, 1.5f).transpose()),
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:76:9: note: in definition of macro ‘SOPHUS_TEST_EQUAL’
if (left != right) {
^
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:4:0,
from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:13: note: candidate: template<class ... Args> std::string Sophus::details::FormatString(const char*, )
std::string FormatString(const char* text, Args&&... args) {
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:13: note: template argument deduction/substitution failed:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:92:20: note: candidate: std::string Sophus::details::FormatString()
inline std::string FormatString() { return std::string(); }
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:92:20: note: candidate expects 0 arguments, 2 provided
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:0:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:21:78: error: no matching function for call to ‘FormatString(const char [7], Eigen::Transpose<Eigen::Matrix<float, 3, 1> >)’
"vec: %", Eigen::Vector3f(0.f, 1.f, 1.5f).transpose()),
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:79:35: note: in definition of macro ‘SOPHUS_TEST_EQUAL’
Sophus::details::pretty(left), SOPHUS_STRINGIFY(right),
^
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:4:0,
from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:13: note: candidate: template<class ... Args> std::string Sophus::details::FormatString(const char*, )
std::string FormatString(const char* text, Args&&... args) {
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:13: note: template argument deduction/substitution failed:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:92:20: note: candidate: std::string Sophus::details::FormatString()
inline std::string FormatString() { return std::string(); }
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:92:20: note: candidate expects 0 arguments, 2 provided
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:0:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:24:54: error: no matching function for call to ‘FormatString(const char [10], int, int)’
passed, details::FormatString("Number: %", 1, 2),
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:76:9: note: in definition of macro ‘SOPHUS_TEST_EQUAL’
if (left != right) {
^
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:4:0,
from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:13: note: candidate: template<class ... Args> std::string Sophus::details::FormatString(const char*, )
std::string FormatString(const char* text, Args&&... args) {
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:13: note: template argument deduction/substitution failed:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:92:20: note: candidate: std::string Sophus::details::FormatString()
inline std::string FormatString() { return std::string(); }
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:92:20: note: candidate expects 0 arguments, 3 provided
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:0:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:24:54: error: no matching function for call to ‘FormatString(const char [10], int, int)’
passed, details::FormatString("Number: %", 1, 2),
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:79:35: note: in definition of macro ‘SOPHUS_TEST_EQUAL’
Sophus::details::pretty(left), SOPHUS_STRINGIFY(right),
^
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:4:0,
from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:13: note: candidate: template<class ... Args> std::string Sophus::details::FormatString(const char*, )
std::string FormatString(const char* text, Args&&... args) {
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:13: note: template argument deduction/substitution failed:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:92:20: note: candidate: std::string Sophus::details::FormatString()
inline std::string FormatString() { return std::string(); }
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:92:20: note: candidate expects 0 arguments, 3 provided
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:0:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp: In instantiation of ‘static std::string Sophus::details::Pretty::impl(Scalar) [with Scalar = std::basic_string; std::string = std::basic_string]’:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:48:25: required from ‘std::string Sophus::details::pretty(const T&) [with T = std::basic_string; std::string = std::basic_string]’
/home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:11:3: required from here
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:35:58: error: no matching function for call to ‘FormatString(const char [2], std::basic_string&)’
static std::string impl(Scalar s) { return FormatString("%", s); }
^
In file included from /home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/test_macros.hpp:4:0,
from /home/tcsuser/Desktop/Edge_VO/Sophus-master/test/core/test_common.cpp:3:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:13: note: candidate: template<class ... Args> std::string Sophus::details::FormatString(const char*, )
std::string FormatString(const char* text, Args&&... args) {
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:86:13: note: template argument deduction/substitution failed:
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:92:20: note: candidate: std::string Sophus::details::FormatString()
inline std::string FormatString() { return std::string(); }
^
/home/tcsuser/Desktop/Edge_VO/Sophus-master/sophus/common.hpp:92:20: note: candidate expects 0 arguments, 2 provided
cc1plus: all warnings being treated as errors
make[2]: *** [test/core/CMakeFiles/test_common.dir/test_common.cpp.o] Error 1
make[2]: Leaving directory /home/tcsuser/Desktop/Edge_VO/Sophus-master/build' make[1]: *** [test/core/CMakeFiles/test_common.dir/all] Error 2 make[1]: Leaving directory /home/tcsuser/Desktop/Edge_VO/Sophus-master/build'
make: *** [all] Error 2

Is it possible to create Sim3d object from a 4x4 matrix?

I see in Sim3Group there is a contructor taking a Matrix<Scalar,4,4>

inline explicit
Sim3Group(const Eigen::Matrix<Scalar,4,4>& T)
: rxso3_(T.template topLeftCorner<3,3>()),
translation_(T.template block<3,1>(0,3)) {
}

I got a compilation error when I compile the following code fragment. The error message is "/opt/ros/kinetic/include/sophus/rxso3.hpp:643: error: ‘setScaledRotationMatrix’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
setScaledRotationMatrix(sR);"
^

#include
#include <unsupported/Eigen/MatrixFunctions>
#include <sophus/sim3.hpp>

int main()
{
Eigen::Matrix<double, 4, 4> I = Eigen::Matrix<double, 4, 4>::Identity();
std::cout << I << '\n';
std::cout << '\n';
Sophus::Sim3d homoTrans;
std::cout << homoTrans.matrix() << '\n';
Sophus::Sim3d m2(I);
}

Is it possible to create Sim3d object from a 4x4 matrix?

provide ChangeLog

It would be useful to know about API changes, which I see in recent commits.

Thanks

Testing failed in Debug mode

Hi,

Compilation of Sophus in Debug mode such as -O0 or without any flags for optimization seems leading to failing such as test_se3.cpp. My system is Ubuntu 14 on 64bit. The Eigen library I am using is version 3.2.0-8.

Do you have any idea why it happens or could you tell me if I did something wrong? Of course, this testing works well when it is compiled in Release mode (i.e. -O3).

For compiling in debug mode, I ran ccmake and changed CMAKE_BUILD_TYPE for Debug. Then running tests (test_se3) shows as follows:
$ test_se3
Test SE3

Double tests:
G - exp(log(G))
Test case: 1
0 0 0 -1.66561
0 0 0 -1.43697
0 0 0 4.44089e-16
0 0 0 0

G - exp(log(G))
Test case: 4
0 0 0 -4.1366e-21
0 0 0 2.77784e-10
0 0 0 0
0 0 0 0

G - exp(log(G))
Test case: 5
0 0 0 -1.66667e-13
0 0 0 -0.000833335
0 0 0 0
0 0 0 0

G - exp(log(G))
Test case: 6
0 0 0 0
0 0 0 -0.0821279
0 0 0 3.53395e-16
0 0 0 0

G - exp(log(G))
Test case: 8
1.11022e-16 0 1.11022e-16 -3.96847
0 0 5.55112e-17 10.9571
1.11022e-16 0 0 -1.77636e-15
0 0 0 0

failed!

I appreicate any answer.

Sophus scale not positive

Can someone please explain why in rxSo3 constructor (from quaternion) squared norm is compared with epsilon and not zero. I'm frequently getting scaleNotPositive exception because of this.

[WIP] Python Wrapper

First of all, I'd like to thank you for all the incredible work that went on into Sophus, I use it into many projects.

Recently, I've been needing to do some quick prototyping, and as I got fed up with matlab, I decided to do it in python. Thus I started writing a small cython wrapper around Sophus to bring the magic of Lie algebra into python.

Here you go: https://github.com/arntanguy/PySophus

This is still a work in progress, but the most commonly needed functionalities are already implemented (exp, log, group product, and so on). It provides automatic conversion to/from numpy arrays.

As I don't have much time, I'll add functionalities on an as-needed basis, feel free to submit pull requests if you wish.

Best regards,
Arnaud

Sophus project doesn't have a license file

It seems that the Sophus project is mostly MIT license, am I right? It would be helpful to have a license.txt file or similar making it clear.
It also will help out with automatic build tools that check licenses at build time like Bitbake/Yocto

print/cout the object

I wonder is we could still have something like:
inline std::ostream& operator <<(std::ostream & out_str,
const SO3 & so3)
{

out_str << so3.log().transpose() << std::endl;
return out_str;
}

Order of parameters in Dx_exp_x output jacobian for SE3

I have been trying to figure out the order of the parameters (columns). Does it go: qx, qy, qz, qw, x, y, z?
Further, just to make sure, is the order of the rows is: vx, vy, vz, wx, wy, wz. where v is the translation part.

Is it possible to support Blaze?

Is it possible to support blaze too? Users can choose use Eigen or Blaze in compile time. There is a matrix type called hybridmatrix in Blaze. Hybridmatrix should be more efficient than Eigen's dynamic matrix. The blaze::HybridMatrix class template combines the flexibility of a dynamically sized matrix with the efficiency and performance of a fixed size matrix.

https://bitbucket.org/blaze-lib/blaze/wiki/Matrix%20Types#!hybridmatrix
https://bitbucket.org/blaze-lib/blaze

Minor doc error

Line 483 se3.hpp, accessor and mutator are swapped.

// Accessor of SO3
//
SOPHUS_FUNC SO3Member& so3() { return so3_; }
// Mutator of SO3
//
SOPHUS_FUNC SO3Member const& so3() const { return so3_; }

test_ceres_se3 compile error on os-x

Building CXX object test/ceres/CMakeFiles/test_ceres_se3.dir/test_ceres_se3.cpp.o
cd /Users/xing/Documents/Work/Sophus/build/test/ceres && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++   -DGFLAGS_IS_A_DLL=0 -isystem /usr/local/include -I/usr/local/include/eigen3 -I/Users/xing/Documents/Work/Sophus  -Wall -Werror -Wextra -Wno-deprecated-register -std=c++11 -stdlib=libc++ -Wno-deprecated-register -O3   -std=gnu++11 -o CMakeFiles/test_ceres_se3.dir/test_ceres_se3.cpp.o -c /Users/xing/Documents/Work/Sophus/test/ceres/test_ceres_se3.cpp
In file included from /Users/xing/Documents/Work/Sophus/test/ceres/test_ceres_se3.cpp:1:
In file included from /usr/local/include/ceres/ceres.h:37:
In file included from /usr/local/include/ceres/autodiff_cost_function.h:132:
In file included from /usr/local/include/ceres/internal/autodiff.h:145:
In file included from /usr/local/include/ceres/jet.h:165:
In file included from /usr/local/include/eigen3/Eigen/Core:412:
/usr/local/include/eigen3/Eigen/src/Core/IO.h:122:31: error: no member named 'digits10' in 'Eigen::NumTraits<ceres::Jet<double, 7> >'
   return NumTraits<Scalar>::digits10();
          ~~~~~~~~~~~~~~~~~~~^
/usr/local/include/eigen3/Eigen/src/Core/IO.h:155:63: note: in instantiation of member function
     'Eigen::internal::significant_decimals_impl<ceres::Jet<double, 7> >::run' requested here
     explicit_precision = significant_decimals_impl<Scalar>::run();
                                                             ^
/usr/local/include/eigen3/Eigen/src/Core/IO.h:220:20: note: in instantiation of function template specialization
     'Eigen::internal::print_matrix<Eigen::Matrix<ceres::Jet<double, 7>, 1, 4, 1, 1, 4> >' requested here
 return internal::print_matrix(s, m.eval(), EIGEN_DEFAULT_IO_FORMAT);
                  ^
/Users/xing/Documents/Work/Sophus/sophus/common.hpp:57:12: note: in instantiation of function template specialization
     'Eigen::operator<<<Eigen::Transpose<Eigen::Matrix<ceres::Jet<double, 7>, 4, 1, 0, 4, 1> > >' requested here
   stream << std::forward<T>(arg);
          ^
/Users/xing/Documents/Work/Sophus/sophus/common.hpp:74:25: note: in instantiation of member function
     'Sophus::details::ArgToStream<Eigen::Transpose<Eigen::Matrix<ceres::Jet<double, 7>, 4, 1, 0, 4, 1> > &&>::impl' requested here
     ArgToStream<T&&>::impl(stream, std::forward<T>(arg));
                       ^
/Users/xing/Documents/Work/Sophus/sophus/common.hpp:88:3: note: in instantiation of function template specialization
     'Sophus::details::FormatStream<Eigen::Transpose<Eigen::Matrix<ceres::Jet<double, 7>, 4, 1, 0, 4, 1> >>' requested here
 FormatStream(stream, text, std::forward<Args>(args)...);
 ^
/Users/xing/Documents/Work/Sophus/sophus/common.hpp:123:25: note: (skipping 6 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see
     all)
 std::cout << details::FormatString(description, std::forward<Args>(args)...)
                       ^
/usr/local/include/ceres/internal/variadic_evaluate.h:175:12: note: in instantiation of function template specialization
     'TestCostFunctor::operator()<ceres::Jet<double, 7> >' requested here
   return functor(input[0],
          ^
/usr/local/include/ceres/internal/autodiff.h:282:68: note: in instantiation of member function
     'ceres::internal::VariadicEvaluate<TestCostFunctor, ceres::Jet<double, 7>, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0>::Call' requested here
                         N0, N1, N2, N3, N4, N5, N6, N7, N8, N9>::Call(
                                                                  ^
/usr/local/include/ceres/autodiff_cost_function.h:211:53: note: in instantiation of member function 'ceres::internal::AutoDiff<TestCostFunctor,
     double, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0>::Differentiate' requested here
          N0, N1, N2, N3, N4, N5, N6, N7, N8, N9>::Differentiate(
                                                   ^
/usr/local/include/ceres/autodiff_cost_function.h:172:12: note: in instantiation of member function
     'ceres::AutoDiffCostFunction<TestCostFunctor, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0>::Evaluate' requested here
 explicit AutoDiffCostFunction(CostFunctor* functor)
          ^
/Users/xing/Documents/Work/Sophus/test/ceres/test_ceres_se3.cpp:61:11: note: in instantiation of member function
     'ceres::AutoDiffCostFunction<TestCostFunctor, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0>::AutoDiffCostFunction' requested here
     new ceres::AutoDiffCostFunction<TestCostFunctor, Sophus::SE3d::DoF,
         ^
1 error generated.
make[2]: *** [test/ceres/CMakeFiles/test_ceres_se3.dir/test_ceres_se3.cpp.o] Error 1
make[1]: *** [test/ceres/CMakeFiles/test_ceres_se3.dir/all] Error 2
make: *** [all] Error 2

Environment:
ceres: 1.12.0
Eigen: 3.3.3
OSX 10.12.4

Invalid comment?

Sophus/sophus/se3.hpp

Lines 128 to 130 in 3f84e42

// Returns Jacobian of generator of internal SU(2) representation.
//
SOPHUS_FUNC Matrix<Scalar, num_parameters, DoF> internalJacobian() const {

Sophus/sophus/so3.hpp

Lines 164 to 166 in 3f84e42

// Returns Jacobian of generator of internal SU(2) representation.
//
SOPHUS_FUNC Matrix<Scalar, num_parameters, DoF> internalJacobian() const {

Was the comment just copy-pasted from so3.hpp to se3.hpp? Trying to understand how either of them are SU(2) representation.

Release numbers

Hi Hauke

This project/repo is great. I think it would be super useful to have a release number, and to tag release commits. I think you had version 0.9 before. What do you say? Time for version 1.0.0?

Cheers,
Oliver

Version number missing in cmake config

I was compiling using cmake and trying to include Sophus in the process, but wanted to require a specific version (1.0). When evaluating

FIND_PACKAGE(Sophus 1.0 REQUIRED)

the cmake process fails:

CMake Error at CMakeLists.txt:16 (FIND_PACKAGE):
Could not find a configuration file for package "Sophus" that is compatible
with requested version "1.0".

The following configuration files were considered but not accepted:

  /usr/local/lib/cmake/Sophus/SophusConfig.cmake, version: unknown

-- Configuring incomplete, errors occurred!

I'm not an expert, but probably just the version number missing in SophusConfig.cmake.in

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.