KumarRobotics / msckf_vio

Robust Stereo Visual Inertial Odometry for Fast Autonomous Flight
Other
1.66k stars 592 forks source link

YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES #127

Closed loseyourself-gan closed 2 years ago

loseyourself-gan commented 2 years ago

I had such a problem after executing the catkin_make command, but I didn't modify the source code. How can I solve it? Thanks a lot.

[ 85%] Built target image_processor_nodelet In file included from /usr/include/eigen3/Eigen/Core:366, from /usr/include/eigen3/Eigen/QR:11, from /usr/include/eigen3/Eigen/SVD:11, from /home/gan/open-slam/msckf_noted/src/msckf_vio/src/msckf_vio.cpp:14: /usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h: In instantiation of ‘void Eigen::internal::call_assignment_no_alias(Dst&, const Src&, const Func&) [with Dst = Eigen::Matrix<double, 4, 1>; Src = Eigen::Matrix<double, 2, 1>; Func = Eigen::internal::assign_op<double, double>]’: /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:732:41: required from ‘Derived& Eigen::PlainObjectBase::_set_noalias(const Eigen::DenseBase&) [with OtherDerived = Eigen::Matrix<double, 2, 1>; Derived = Eigen::Matrix<double, 4, 1>]’ /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:537:7: required from ‘Eigen::PlainObjectBase::PlainObjectBase(const Eigen::DenseBase&) [with OtherDerived = Eigen::Matrix<double, 2, 1>; Derived = Eigen::Matrix<double, 4, 1>]’ /usr/include/eigen3/Eigen/src/Core/Matrix.h:377:29: required from ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const Eigen::EigenBase&) [with OtherDerived = Eigen::Matrix<double, 2, 1>; _Scalar = double; int _Rows = 4; int _Cols = 1; int _Options = 0; int _MaxRows = 4; int _MaxCols = 1]’ /home/gan/open-slam/msckf_noted/src/msckf_vio/src/msckf_vio.cpp:831:64: required from here /usr/include/eigen3/Eigen/src/Core/util/StaticAssert.h:174:5: error: static assertion failed: YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES 172 | ( \ | ~~~ 173 | (int(Eigen::internal::size_of_xpr_at_compile_time::ret)==0 && int(Eigen::internal::size_of_xpr_at_compile_time::ret)==0) \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 174 | || (\ | ^~~~~ 175 | (int(TYPE0::RowsAtCompileTime)==Eigen::Dynamic \ | ~~~~~~~~~~~~ 176 | || int(TYPE1::RowsAtCompileTime)==Eigen::Dynamic \ | ~~~~~~~~~~ 177 | || int(TYPE0::RowsAtCompileTime)==int(TYPE1::RowsAtCompileTime)) \ | ~~~~~~~~~~~~~~ 178 | && (int(TYPE0::ColsAtCompileTime)==Eigen::Dynamic \ | ~~~~~~~~~~~~ 179 | || int(TYPE1::ColsAtCompileTime)==Eigen::Dynamic \ | ~~~~~~~~~~ 180 | || int(TYPE0::ColsAtCompileTime)==int(TYPE1::ColsAtCompileTime))\ | ~~~~~~~~~~~~~ 181 | ) \ | ~~~ 182 | ) | ~ /usr/include/eigen3/Eigen/src/Core/util/StaticAssert.h:33:54: note: in definition of macro ‘EIGEN_STATIC_ASSERT’ 33 | #define EIGEN_STATIC_ASSERT(X,MSG) static_assert(X,#MSG); | ^ /usr/include/eigen3/Eigen/src/Core/util/StaticAssert.h:191:6: note: in expansion of macro ‘EIGEN_PREDICATE_SAME_MATRIX_SIZE’ 191 | EIGEN_PREDICATE_SAME_MATRIX_SIZE(TYPE0,TYPE1),\ | ^~~~~~~~ /usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:833:3: note: in expansion of macro ‘EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE’ 833 | EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(ActualDstTypeCleaned,Src) | ^~~~~~~~ /usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h: In instantiation of ‘void Eigen::internal::call_assignment_no_alias(Dst&, const Src&, const Func&) [with Dst = Eigen::Matrix<double, 2, 1>; Src = Eigen::Matrix<double, 4, 1>; Func = Eigen::internal::assign_op<double, double>]’: /usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:804:27: required from ‘void Eigen::internal::call_assignment(Dst&, const Src&, const Func&, typename Eigen::internal::enable_if<(! Eigen::internal::evaluator_assume_aliasing::value), void>::type) [with Dst = Eigen::Matrix<double, 2, 1>; Src = Eigen::Matrix<double, 4, 1>; Func = Eigen::internal::assign_op<double, double>; typename Eigen::internal::enable_if<(! Eigen::internal::evaluator_assume_aliasing::value), void>::type = void*]’ /usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:782:18: required from ‘void Eigen::internal::call_assignment(Dst&, const Src&) [with Dst = Eigen::Matrix<double, 2, 1>; Src = Eigen::Matrix<double, 4, 1>]’ /usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:714:32: required from ‘Derived& Eigen::PlainObjectBase::_set(const Eigen::DenseBase&) [with OtherDerived = Eigen::Matrix<double, 4, 1>; Derived = Eigen::Matrix<double, 2, 1>]’ /usr/include/eigen3/Eigen/src/Core/Matrix.h:225:24: required from ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::operator=(const Eigen::DenseBase&) [with OtherDerived = Eigen::Matrix<double, 4, 1>; _Scalar = double; int _Rows = 2; int _Cols = 1; int _Options = 0; int _MaxRows = 2; int _MaxCols = 1]’ /home/gan/open-slam/msckf_noted/src/msckf_vio/src/msckf_vio.cpp:792:35: required from here /usr/include/eigen3/Eigen/src/Core/util/StaticAssert.h:174:5: error: static assertion failed: YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES 172 | ( \ | ~~~ 173 | (int(Eigen::internal::size_of_xpr_at_compile_time::ret)==0 && int(Eigen::internal::size_of_xpr_at_compile_time::ret)==0) \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 174 | || (\ | ^~~~~ 175 | (int(TYPE0::RowsAtCompileTime)==Eigen::Dynamic \ | ~~~~~~~~~~~~ 176 | || int(TYPE1::RowsAtCompileTime)==Eigen::Dynamic \ | ~~~~~~~~~~ 177 | || int(TYPE0::RowsAtCompileTime)==int(TYPE1::RowsAtCompileTime)) \ | ~~~~~~~~~~~~~~ 178 | && (int(TYPE0::ColsAtCompileTime)==Eigen::Dynamic \ | ~~~~~~~~~~~~ 179 | || int(TYPE1::ColsAtCompileTime)==Eigen::Dynamic \ | ~~~~~~~~~~ 180 | || int(TYPE0::ColsAtCompileTime)==int(TYPE1::ColsAtCompileTime))\ | ~~~~~~~~~~~~~ 181 | ) \ | ~~~ 182 | ) | ~ /usr/include/eigen3/Eigen/src/Core/util/StaticAssert.h:33:54: note: in definition of macro ‘EIGEN_STATIC_ASSERT’ 33 | #define EIGEN_STATIC_ASSERT(X,MSG) static_assert(X,#MSG); | ^ /usr/include/eigen3/Eigen/src/Core/util/StaticAssert.h:191:6: note: in expansion of macro ‘EIGEN_PREDICATE_SAME_MATRIX_SIZE’ 191 | EIGEN_PREDICATE_SAME_MATRIX_SIZE(TYPE0,TYPE1),\ | ^~~~~~~~ /usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:833:3: note: in expansion of macro ‘EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE’ 833 | EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(ActualDstTypeCleaned,Src) | ^~~~~~~~ make[2]: [msckf_vio/CMakeFiles/msckf_vio.dir/build.make:63:msckf_vio/CMakeFiles/msckf_vio.dir/src/msckf_vio.cpp.o] 错误 1 make[1]: [CMakeFiles/Makefile2:944:msckf_vio/CMakeFiles/msckf_vio.dir/all] 错误 2 make: *** [Makefile:141:all] 错误 2 Invoking "make -j12 -l12" failed

versatran01 commented 2 years ago

Can you post line 831?