Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vikit_common fail to build with ARM_ARCHITECTURE, Sophus? Eigen 3? #11

Open
jiapei100 opened this issue Apr 7, 2015 · 1 comment
Open

Comments

@jiapei100
Copy link

Can anybody give me a hand?
It took me a while to build vikit-common on an ARM-based open source board.
However, I've got a lot of errors as shown at the botom:
All errors are from 2 lines in the same file ../vikit_common/src/homography.cpp

  1. line 34 H_c2_from_c1 = T_c2_from_c1.rotation_matrix() + (T_c2_from_c1.translation()*n_c1.transpose())/d;
  2. line 263 Matrix3d Essential = T.rotation_matrix() * sqew(T.translation());

Any updated version to eliminate these two errors?

Cheers
Pei

[ 69%] Building CXX object CMakeFiles/vikit_common.dir/src/homography.cpp.o
In file included from ....../Programs/svo/rpg_vikit/vikit_common/src/homography.cpp:12:0:
....../Programs/svo/rpg_vikit/vikit_common/include/vikit/homography.h:37:15: warning: ‘Sophus::SE3’ is deprecated (declared at ....../Programs/svo/Sophus/sophus/se3.hpp:35) [-Wdeprecated-declarations]
Sophus::SE3 T; //!< second from first
^
....../Programs/svo/rpg_vikit/vikit_common/include/vikit/homography.h:75:7: warning: ‘Sophus::SE3’ is deprecated (declared at ....../Programs/svo/Sophus/sophus/se3.hpp:35) [-Wdeprecated-declarations]
SE3 T_c2_from_c1; //!< Relative translation and rotation of two images
^
....../Programs/svo/rpg_vikit/vikit_common/src/homography.cpp: In member function ‘void vk::Homography::calcFromPlaneParams(const Vector3d&, const Vector3d&)’:
....../Programs/svo/rpg_vikit/vikit_common/src/homography.cpp:34:47: warning: ‘const M3_marcos_dont_like_commas Sophus::SE3GroupBase::rotation_matrix() const [with Derived = Sophus::SE3Group; Sophus::SE3GroupBase::M3_marcos_dont_like_commas = Eigen::Matrix<double, 4, 4>; typename Eigen::internal::traits::Scalar = double]’ is deprecated (declared at ....../Programs/svo/Sophus/sophus/se3.hpp:281) [-Wdeprecated-declarations]
H_c2_from_c1 = T_c2_from_c1.rotation_matrix() + (T_c2_from_c1.translation()n_c1.transpose())/d;
^
....../Programs/svo/rpg_vikit/vikit_common/src/homography.cpp: In member function ‘void vk::Homography::findBestDecomposition()’:
....../Programs/svo/rpg_vikit/vikit_common/src/homography.cpp:262:19: warning: ‘Sophus::SE3’ is deprecated (declared at ....../Programs/svo/Sophus/sophus/se3.hpp:35) [-Wdeprecated-declarations]
Sophus::SE3 T = decompositions[i].T;
^
....../Programs/svo/rpg_vikit/vikit_common/src/homography.cpp:263:46: warning: ‘const M3_marcos_dont_like_commas Sophus::SE3GroupBase::rotation_matrix() const [with Derived = Sophus::SE3Group; Sophus::SE3GroupBase::M3_marcos_dont_like_commas = Eigen::Matrix<double, 4, 4>; typename Eigen::internal::traits::Scalar = double]’ is deprecated (declared at ....../Programs/svo/Sophus/sophus/se3.hpp:281) [-Wdeprecated-declarations]
Matrix3d Essential = T.rotation_matrix() * sqew(T.translation());
^
In file included from /usr/include/eigen3/Eigen/Core:254:0,
from ....../Programs/svo/rpg_vikit/vikit_common/include/vikit/homography.h:19,
from ....../Programs/svo/rpg_vikit/vikit_common/src/homography.cpp:12:
/usr/include/eigen3/Eigen/src/Core/GeneralProduct.h: In instantiation of ‘const typename Eigen::ProductReturnType<Derived, OtherDerived>::Type Eigen::MatrixBase::operator
(const Eigen::MatrixBase&) const [with OtherDerived = Eigen::Matrix<double, 3, 3>; Derived = Eigen::Matrix<double, 4, 4>; typename Eigen::ProductReturnType<Derived, OtherDerived>::Type = Eigen::CoeffBasedProduct<const Eigen::Matrix<double, 4, 4>&, const Eigen::Matrix<double, 3, 3>&, 6>]’:
....../Programs/svo/rpg_vikit/vikit_common/src/homography.cpp:263:70: required from here
/usr/include/eigen3/Eigen/src/Core/util/StaticAssert.h:32:40: error: static assertion failed: INVALID_MATRIX_PRODUCT
#define EIGEN_STATIC_ASSERT(X,MSG) static_assert(X,#MSG);
^
/usr/include/eigen3/Eigen/src/Core/GeneralProduct.h:591:3: note: in expansion of macro ‘EIGEN_STATIC_ASSERT’
EIGEN_STATIC_ASSERT(ProductIsValid || SameSizes, INVALID_MATRIX_PRODUCT)
^
/usr/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h: In instantiation of ‘Eigen::CwiseBinaryOp<BinaryOp, Lhs, Rhs>::CwiseBinaryOp(const Lhs&, const Rhs&, const BinaryOp&) [with BinaryOp = Eigen::internal::scalar_sum_op; Lhs = const Eigen::Matrix<double, 4, 4>; Rhs = const Eigen::CwiseUnaryOpEigen::internal::scalar_quotient1_op<double, const Eigen::CoeffBasedProduct<const Eigen::Matrix<double, 3, 1>&, const Eigen::Transpose<const Eigen::Matrix<double, 3, 1> >, 256> >]’:
/usr/include/eigen3/Eigen/src/Core/../plugins/CommonCwiseBinaryOps.h:27:1: required from ‘const Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op<typename Eigen::internal::traits::Scalar>, const Derived, const OtherDerived> Eigen::MatrixBase::operator+(const Eigen::MatrixBase&) const [with OtherDerived = Eigen::CwiseUnaryOpEigen::internal::scalar_quotient1_op<double, const Eigen::CoeffBasedProduct<const Eigen::Matrix<double, 3, 1>&, const Eigen::Transpose<const Eigen::Matrix<double, 3, 1> >, 256> >; Derived = Eigen::Matrix<double, 4, 4>; typename Eigen::internal::traits::Scalar = double]’
....../Programs/svo/rpg_vikit/vikit_common/src/homography.cpp:34:97: required from here
/usr/include/eigen3/Eigen/src/Core/util/StaticAssert.h:32:40: error: static assertion failed: YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES
#define EIGEN_STATIC_ASSERT(X,MSG) static_assert(X,#MSG);
^
/usr/include/eigen3/Eigen/src/Core/util/StaticAssert.h:182:3: note: in expansion of macro ‘EIGEN_STATIC_ASSERT’
EIGEN_STATIC_ASSERT(
^
/usr/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h:130:7: note: in expansion of macro ‘EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE’
EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Lhs, Rhs)
^
/usr/include/eigen3/Eigen/src/Core/Assign.h: In instantiation of ‘Derived& Eigen::DenseBase::lazyAssign(const Eigen::DenseBase&) [with OtherDerived = Eigen::CoeffBasedProduct<const Eigen::Matrix<double, 4, 4>&, const Eigen::Matrix<double, 3, 3>&, 6>; Derived = Eigen::Matrix<double, 3, 3>]’:
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:411:46: required from ‘Derived& Eigen::PlainObjectBase::lazyAssign(const Eigen::DenseBase&) [with OtherDerived = Eigen::CoeffBasedProduct<const Eigen::Matrix<double, 4, 4>&, const Eigen::Matrix<double, 3, 3>&, 6>; Derived = Eigen::Matrix<double, 3, 3>]’
/usr/include/eigen3/Eigen/src/Core/Assign.h:520:123: required from ‘static Derived& Eigen::internal::assign_selector<Derived, OtherDerived, false, false>::run(Derived&, const OtherDerived&) [with Derived = Eigen::Matrix<double, 3, 3>; OtherDerived = Eigen::CoeffBasedProduct<const Eigen::Matrix<double, 4, 4>&, const Eigen::Matrix<double, 3, 3>&, 6>]’
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:618:105: required from ‘Derived& Eigen::PlainObjectBase::_set_noalias(const Eigen::DenseBase&) [with OtherDerived = Eigen::CoeffBasedProduct<const Eigen::Matrix<double, 4, 4>&, const Eigen::Matrix<double, 3, 3>&, 6>; Derived = Eigen::Matrix<double, 3, 3>]’
/usr/include/eigen3/Eigen/src/Core/Matrix.h:281:31: required from ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const Eigen::MatrixBase&) [with OtherDerived = Eigen::CoeffBasedProduct<const Eigen::Matrix<double, 4, 4>&, const Eigen::Matrix<double, 3, 3>&, 6>; _Scalar = double; int _Rows = 3; int _Cols = 3; int _Options = 0; int _MaxRows = 3; int _MaxCols = 3]’
....../Programs/svo/rpg_vikit/vikit_common/src/homography.cpp:263:70: required from here
/usr/include/eigen3/Eigen/src/Core/util/StaticAssert.h:32:40: error: static assertion failed: YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES
#define EIGEN_STATIC_ASSERT(X,MSG) static_assert(X,#MSG);
^
/usr/include/eigen3/Eigen/src/Core/util/StaticAssert.h:182:3: note: in expansion of macro ‘EIGEN_STATIC_ASSERT’
EIGEN_STATIC_ASSERT(
^
/usr/include/eigen3/Eigen/src/Core/Assign.h:492:3: note: in expansion of macro ‘EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE’
EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Derived,OtherDerived)
^
/usr/include/eigen3/Eigen/src/Core/Assign.h: In instantiation of ‘Derived& Eigen::DenseBase::lazyAssign(const Eigen::DenseBase&) [with OtherDerived = Eigen::Matrix<double, 3, 3>; Derived = Eigen::Matrix<double, 4, 4>]’:
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:411:46: required from ‘Derived& Eigen::PlainObjectBase::lazyAssign(const Eigen::DenseBase&) [with OtherDerived = Eigen::Matrix<double, 3, 3>; Derived = Eigen::Matrix<double, 4, 4>]’
/usr/include/eigen3/Eigen/src/Core/Assign.h:520:123: required from ‘static Derived& Eigen::internal::assign_selector<Derived, OtherDerived, false, false>::run(Derived&, const OtherDerived&) [with Derived = Eigen::Matrix<double, 4, 4>; OtherDerived = Eigen::Matrix<double, 3, 3>]’
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:618:105: required from ‘Derived& Eigen::PlainObjectBase::_set_noalias(const Eigen::DenseBase&) [with OtherDerived = Eigen::Matrix<double, 3, 3>; Derived = Eigen::Matrix<double, 4, 4>]’
/usr/include/eigen3/Eigen/src/Core/Matrix.h:281:31: required from ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const Eigen::MatrixBase&) [with OtherDerived = Eigen::Matrix<double, 3, 3>; _Scalar = double; int _Rows = 4; int _Cols = 4; int _Options = 0; int _MaxRows = 4; int _MaxCols = 4]’
....../Programs/svo/Sophus/sophus/se3.hpp:282:25: required from ‘const M3_marcos_dont_like_commas Sophus::SE3GroupBase::rotation_matrix() const [with Derived = Sophus::SE3Group; Sophus::SE3GroupBase::M3_marcos_dont_like_commas = Eigen::Matrix<double, 4, 4>; typename Eigen::internal::traits::Scalar = double]’
....../Programs/svo/rpg_vikit/vikit_common/src/homography.cpp:34:47: required from here
/usr/include/eigen3/Eigen/src/Core/util/StaticAssert.h:32:40: error: static assertion failed: YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES
#define EIGEN_STATIC_ASSERT(X,MSG) static_assert(X,#MSG);
^
/usr/include/eigen3/Eigen/src/Core/util/StaticAssert.h:182:3: note: in expansion of macro ‘EIGEN_STATIC_ASSERT’
EIGEN_STATIC_ASSERT(
^
/usr/include/eigen3/Eigen/src/Core/Assign.h:492:3: note: in expansion of macro ‘EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE’
EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Derived,OtherDerived)
^
/usr/include/eigen3/Eigen/src/Core/Assign.h: In instantiation of ‘Derived& Eigen::DenseBase::lazyAssign(const Eigen::DenseBase&) [with OtherDerived = Eigen::CwiseBinaryOpEigen::internal::scalar_sum_op<double, const Eigen::Matrix<double, 4, 4>, const Eigen::CwiseUnaryOpEigen::internal::scalar_quotient1_op<double, const Eigen::CoeffBasedProduct<const Eigen::Matrix<double, 3, 1>&, const Eigen::Transpose<const Eigen::Matrix<double, 3, 1> >, 256> > >; Derived = Eigen::Matrix<double, 3, 3>]’:
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:411:46: required from ‘Derived& Eigen::PlainObjectBase::lazyAssign(const Eigen::DenseBase&) [with OtherDerived = Eigen::CwiseBinaryOpEigen::internal::scalar_sum_op<double, const Eigen::Matrix<double, 4, 4>, const Eigen::CwiseUnaryOpEigen::internal::scalar_quotient1_op<double, const Eigen::CoeffBasedProduct<const Eigen::Matrix<double, 3, 1>&, const Eigen::Transpose<const Eigen::Matrix<double, 3, 1> >, 256> > >; Derived = Eigen::Matrix<double, 3, 3>]’
/usr/include/eigen3/Eigen/src/Core/Assign.h:520:123: required from ‘static Derived& Eigen::internal::assign_selector<Derived, OtherDerived, false, false>::run(Derived&, const OtherDerived&) [with Derived = Eigen::Matrix<double, 3, 3>; OtherDerived = Eigen::CwiseBinaryOpEigen::internal::scalar_sum_op<double, const Eigen::Matrix<double, 4, 4>, const Eigen::CwiseUnaryOpEigen::internal::scalar_quotient1_op<double, const Eigen::CoeffBasedProduct<const Eigen::Matrix<double, 3, 1>&, const Eigen::Transpose<const Eigen::Matrix<double, 3, 1> >, 256> > >]’
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:618:105: required from ‘Derived& Eigen::PlainObjectBase::_set_noalias(const Eigen::DenseBase&) [with OtherDerived = Eigen::CwiseBinaryOpEigen::internal::scalar_sum_op<double, const Eigen::Matrix<double, 4, 4>, const Eigen::CwiseUnaryOpEigen::internal::scalar_quotient1_op<double, const Eigen::CoeffBasedProduct<const Eigen::Matrix<double, 3, 1>&, const Eigen::Transpose<const Eigen::Matrix<double, 3, 1> >, 256> > >; Derived = Eigen::Matrix<double, 3, 3>]’
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:603:120: required from ‘void Eigen::PlainObjectBase::_set_selector(const OtherDerived&, const Eigen::internal::false_type&) [with OtherDerived = Eigen::CwiseBinaryOpEigen::internal::scalar_sum_op<double, const Eigen::Matrix<double, 4, 4>, const Eigen::CwiseUnaryOpEigen::internal::scalar_quotient1_op<double, const Eigen::CoeffBasedProduct<const Eigen::Matrix<double, 3, 1>&, const Eigen::Transpose<const Eigen::Matrix<double, 3, 1> >, 256> > >; Derived = Eigen::Matrix<double, 3, 3>]’
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:595:189: required from ‘Derived& Eigen::PlainObjectBase::_set(const Eigen::DenseBase&) [with OtherDerived = Eigen::CwiseBinaryOpEigen::internal::scalar_sum_op<double, const Eigen::Matrix<double, 4, 4>, const Eigen::CwiseUnaryOpEigen::internal::scalar_quotient1_op<double, const Eigen::CoeffBasedProduct<const Eigen::Matrix<double, 3, 1>&, const Eigen::Transpose<const Eigen::Matrix<double, 3, 1> >, 256> > >; Derived = Eigen::Matrix<double, 3, 3>]’
/usr/include/eigen3/Eigen/src/Core/Matrix.h:172:30: required from ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::operator=(const Eigen::MatrixBase&) [with OtherDerived = Eigen::CwiseBinaryOpEigen::internal::scalar_sum_op<double, const Eigen::Matrix<double, 4, 4>, const Eigen::CwiseUnaryOpEigen::internal::scalar_quotient1_op<double, const Eigen::CoeffBasedProduct<const Eigen::Matrix<double, 3, 1>&, const Eigen::Transpose<const Eigen::Matrix<double, 3, 1> >, 256> > >; _Scalar = double; int _Rows = 3; int _Cols = 3; int _Options = 0; int _MaxRows = 3; int _MaxCols = 3]’
....../Programs/svo/rpg_vikit/vikit_common/src/homography.cpp:34:16: required from here
/usr/include/eigen3/Eigen/src/Core/util/StaticAssert.h:32:40: error: static assertion failed: YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES
#define EIGEN_STATIC_ASSERT(X,MSG) static_assert(X,#MSG);
^
/usr/include/eigen3/Eigen/src/Core/util/StaticAssert.h:182:3: note: in expansion of macro ‘EIGEN_STATIC_ASSERT’
EIGEN_STATIC_ASSERT(
^
/usr/include/eigen3/Eigen/src/Core/Assign.h:492:3: note: in expansion of macro ‘EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE’
EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Derived,OtherDerived)
^
make[2]: *** [CMakeFiles/vikit_common.dir/src/homography.cpp.o] Error 1
make[1]: *** [CMakeFiles/vikit_common.dir/all] Error 2
make: *** [all] Error 2
bananapi@lemaker:~/Programs/svo/rpg_vikit/vikit_common/build$

@jiapei100
Copy link
Author

Problem solved... close the topic please...
Sophus rotation_matrix() deprecated now.
Change rotation_matrix() to rotationMatrix().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant