运行准备
按照原github上,下载安装对应 Eigen 3.3.7, Ceres 1.14,Sophus 和 PCL 1.10 or 1.11。
问题
1、Not Found “include <sophus/se3.h>”/“include <sophus/so3.h>”
再次下载资源非模板类的sophus,同样的安装步骤。
cd ../../Sophus
mkdir -p build && cd build
cmake ..
make
sudo make install
再次运行解决。
2、undefined reference to ‘fmt::v10::report_error(char const*)’ ……
fmt的定义问题。
1)查看 /usr/local/lib/libfmt.a
文件是否存在,若存在则表明fmt正常安装。
2)打开Ground-Fusion文件Ground-Fusion/src/Ground-Fusion/vins_estimator/CMakeLists.txt
文件,将其324行,fmt更改为
/usr/local/lib/libfmt.a
再次运行,解决。
3、/usr/bin/ld: /usr/local/lib/libfmt.a(format.cc.o) : relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5’ can not be used when making a shared object
原因可能为fmt下载为静态库,GCC无法与之链接。无需卸载,按照下面代码重新安装fmt即可:
mkdir -p build && cd build
cmake .. -DCMAKE_CXX_FLAGS=-fPIC
make
sudo make install
问题解决!
4、vins_node: /usr/include/boost/smart_ptr/shared_ptr.hpp:734: typename boost::detail::sp_member_access::type boost::shared_ptr::operator->() const [with T = camodocal::Camera; typename boost::detail::sp_member_access::type = camodocal::Camera*]: Assertion `px != 0’ failed
此问题一般为配置文件出现问题。在路径Ground-Fusion/config/realsense
添加配置文件 wt_cam.yaml,从本文资源下载。重新编译
成功!