/ORBSLAM2_with_pointcloud_map/g2o_with_orbslam2/g2o/types/slam2d/edge_se2_pointxy_bearing.cpp:51:39: error: cannot convert ‘Eigen::Rotation2D::Scalar’ {aka ‘double’} to ‘const Rotation2Dd&’ {aka ‘const Eigen::Rotation2D&’}
51 | t.setRotation(t.rotation().angle()+_measurement);
| ~~~~~~~~^
| |
| Eigen::Rotation2D::Scalar {aka double}
解决办法 相应文件中51行
t.setRotation(t.rotation().angle()+_measurement);
改为
t.setRotation((Eigen::Rotation2Dd)(t.rotation().angle()+_measurement));
/usr/local/include/eigen3/Eigen/src/Core/util/XprHelper.h:833:96: error: static assertion failed: YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY
833 | gen::internal::has_ReturnType<ScalarBinaryOpTraits<LHS, RHS,BINOP> >::value),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/usr/local/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/local/include/eigen3/Eigen/src/Core/AssignEvaluator.h:834:3: note: in expansion of macro ‘EIGEN_CHECK_BINARY_COMPATIBILIY’
将/ORBSLAM2_with_pointcloud_map/g2o_with_orbslam2/g2o/solvers/eigen/linear_solver_eigen.h
54行
typedef Eigen::PermutationMatrix<Eigen::Dynamic, Eigen::Dynamic, SparseMatrix::Index> PermutationMatrix;
改为
typedef Eigen::PermutationMatrix<Eigen::Dynamic, Eigen::Dynamic, int> PermutationMatrix;