错误如下:
/home/a/ORB_SLAM2/src/Optimizer.cc:1244:1: required from here
/usr/include/eigen3/Eigen/src/Core/util/StaticAssert.h:32:40: error: static assertion failed: YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY
#define EIGEN_STATIC_ASSERT(X,MSG) static_assert(X,#MSG);
解决办法:其实是版本问题,在这个网站上https://launchpad.net/ubuntu/trusty/amd64/libeigen3-dev/3.2.0-8,下载.deb文件,放到home下面
然后安装:
sudo dpkg -i libeigen3-dev_3.2.0-8_all.deb
之后再运行
cd ORB_SLAM2 chmod +x build.sh ./build.sh
解决.