所需环境
- ceres-solver
- ROS
ROS 安装
全自动安装有手就行(rostaller)
ceres-solver
sudo apt install libgoogle-glog-dev libatlas-base-dev libeigen3-dev libsuitesparse-dev liblapack-dev libcxsparse3 libgflags-dev libgtest-dev
需要1.14.0 版本
git clone https://github.com/ceres-solver/ceres-solver.git -b 1.14.0
cd ceres-solver
mkdir build && cd build
cmake ..
make -j4
sudo make install
编译VINS-Fusion
在camera_model/include/camodocal/chessboard/Chessboard.h中添加
#include <opencv2/imgproc/types_c.h>
#include <opencv2/calib3d/calib3d_c.h>
在camera_model/include/camodocal/calib/CameraCalibration.h中添加
#include <opencv2/imgproc/types_c.h>
#include <opencv2/imgproc/imgproc_c.h>
cd ~/catkin_ws/src
git clone https://github.com/HKUST-Aerial-Robotics/VINS-Fusion.git
cd ..
catkin_make
报错
error: ‘CV_FONT_HERSHEY_SIMPLEX’ was not declared in this scope
在报错的文件添加头文件
#include <opencv2/imgproc/types_c.h>
error: ‘CV_RGB2GRAY’ was not declared in this scope
在报错的文件添加头文件
#include <opencv2/imgproc/types_c.h>
error: ‘CV_LOAD_IMAGE_GRAYSCALE’ was not declared in this scope
将报错文件上的CV_LOAD_IMAGE_GRAYSCALE改为cv::IMREAD_GRAYSCALE