VINS-MONO环境搭建

1. Prerequisites

1.1 Ubuntu and ROS Ubuntu 16.04. ROS Kinetic. ROS Installation additional ROS pacakge

    sudo apt-get install ros-YOUR_DISTRO-cv-bridge ros-YOUR_DISTRO-tf ros-YOUR_DISTRO-message-filters ros-YOUR_DISTRO-image-transport

1.2. Ceres Solver Follow Ceres Installation, remember to make install. (Our testing environment: Ubuntu 16.04, ROS Kinetic, OpenCV 3.3.1, Eigen 3.3.3)

安装Ceres Solver:用git安装怎么都下载不下来,后来换成从高博slam十四讲的第三方库中下载下来,然后安装的

http://www.ceres-solver.org/installation.html

Start by installing all the dependencies.

# CMake
sudo apt-get install cmake
# google-glog + gflags
sudo apt-get install libgoogle-glog-dev
# BLAS & LAPACK
sudo apt-get install libatlas-base-dev
# Eigen3
sudo apt-get install libeigen3-dev
# SuiteSparse and CXSparse (optional)
# - If you want to build Ceres as a *static* library (the default)
#   you can use the SuiteSparse package in the main Ubuntu package
#   repository:
sudo apt-get install libsuitesparse-dev
# - However, if you want to build Ceres as a *shared* library, you must
#   add the following PPA:
sudo add-apt-repository ppa:bzindovic/suitesparse-bugfix-1319687
sudo apt-get update
sudo apt-get install libsuitesparse-dev

Ceres Solver编译后,需要sudo make install

3.安装OpenCV 3.3.0:

https://github.com/opencv/opencv/releases/tag/3.3.0

Source code(zip)

按照高博slam十四讲的opencv的安装方法安装的,后来由于安装过程中把cv-bridge卸载了导致openCV编译出错,所以opencv安装前,要再安装下cv-bridge/

opencv编译后,需要sudo make install

ros-kinectic-cv-bridge

4. Build VINS-Mono on ROS

    cd ~/vins_mono_catkin_ws/src
    git clone https://github.com/HKUST-Aerial-Robotics/VINS-Mono.git
    cd ../
    catkin_make
    source devel/setup.bash

刚开始按照教程中catkin_ws/src,目录下编译,出错,因为里面有ceres solver 和opencv。后来重新换了一个文件夹,就编译通过了。运行前记得source devel/setup.bash。

你可能感兴趣的:(VINS-MONO环境搭建)