您当前的位置: 首页 >  算法
  • 0浏览

    0关注

    483博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

SLAM算法VINS-MONO安装运行介绍

高精度计算机视觉 发布时间:2021-12-13 12:20:14 ,浏览量:0

说明:把资料放在这里,主要是因为github经常上不去,速度慢。如果网络申通的话大家还是去官网看资料比较方便,这个贴子本身没什么价值。同时这个贴子会持续更新。

这里是安装在Ubuntu18.04,通常是ROS melodic。

Ubuntu20.04上ROS noetic有些小问题,不过都很容易解决。

关于ceres-solver和VINS-mono在Ubuntu20.04上的特别说明

==>安装ceres-solver-2.0.0后VINS-mono的catkin_make没能编译成功,最后是改用的ceres-solver-1.14.0。

==> 在Ubuntu20.04上ROS-noetic安装VINS-mono,发现Opencv的几个参数不支持,具体可以参考[fix build for ros noetic #385] 这个request。例如把

cv::cvtColor(image, image, CV_GRAY2RGB);

替换成

cv::cvtColor(image, image, cv::COLOR_GRAY2RGB);

VINS MONO 运行介绍

VINS mono的下载地址

https://github.com/HKUST-Aerial-Robotics/VINS-Mono

安装参考网址

ROS Documentation

对VINS一般会选ubuntu18.04+ROS-melodic,

melodic/Installation/Ubuntu - ROS Wiki

按照项目上的安装介绍一步步来,

在安装vins-mono前先要安装ceres-solver,根据官网的指示,先到这里下载ceres包,

http://ceres-solver.org/ceres-solver-2.0.0.tar.gz http://ceres-solver.org/ceres-solver-1.14.0.tar.gz

然后安装依赖(Start by installing all the dependencies)。

# CMake
sudo apt-get install cmake
# google-glog + gflags
sudo apt-get install libgoogle-glog-dev libgflags-dev
# BLAS & LAPACK
sudo apt-get install libatlas-base-dev
# Eigen3
sudo apt-get install libeigen3-dev
# SuiteSparse and CXSparse (optional)
sudo apt-get install libsuitesparse-dev

编译安装ceres-solver (We are now ready to build, test, and install Ceres),

tar zxf ceres-solver-2.0.0.tar.gz
mkdir ceres-bin
cd ceres-bin
cmake ../ceres-solver-2.0.0
make -j3
make test
# Optionally install Ceres, it can also be exported using CMake which
# allows Ceres to be used without requiring installation, see the documentation
# for the EXPORT_BUILD_DIR option for more information.
make install

下面开始安装使用vins-mono,

(1) Clone the repository and catkin_make:

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

(2) 数据集下载地址

Download EuRoC MAV Dataset. Although it contains stereo cameras, we only use one camera. The system also works with ETH-asl cla dataset. We take EuRoC as the example.

(3) 如何运行

3.1.1 Open three terminals, launch the vins_estimator , rviz and play the bag file respectively. Take MH_01 for example

打开3个终端窗口输入下面的指令,注意每个窗口都要输入source ~/catkin_ws/devel/setup.bash,所以整体上就是,

    roslaunch vins_estimator euroc.launch 
    roslaunch vins_estimator vins_rviz.launch
    rosbag play YOUR_PATH_TO_DATASET/MH_01_easy.bag 

如果不想重复输入source指令,最简单的办法是打开编辑~/.bashrc文件,把下面这句直接加入到文件的内容的后面,

source ~/catkin_ws/devel/setup.bash

然后分别打开三个终端窗口输入上面三条指令就可以了。通常一路过来不会有太大的障碍,运行时就可以通过RVIZ直接看到效果了。

VINS MONO调试介绍

参考资料:

 利用vscode调试VINS-FUSION - 知乎

如何配置VSCode来调试ROS节点_白夜行的狼-CSDN博客_vscode调试ros

VS Code 调试 VINS-Mono 环境配置_Barry_123的博客-CSDN博客c

通常我也是用VScode来调试Ubuntu下面的程序, 

关注
打赏
1661664439
查看更多评论
立即登录/注册

微信扫码登录

0.0377s