vins安装及小觅深度版运行

本小白在对VINS进行实践的过程中,走了许多的弯路,现在将全部过程都记下来,希望能对大家有所帮助

VINS安装

vins源代码地址

ros

ros-csdn

  1. sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
  2. sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
  3. sudo apt-get update
  4. sudo apt-get install ros-kinetic-desktop-full
  5. apt-cache search ros-kinetic
  6. sudo rosdep init
  7. rosdep update
  8. echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
  9. source ~/.bashrc
  10. sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential
  11. 测试
    roscore
    rosrun turtlesim turtlesim_node
    rosrun turtlesim turtle_teleop_key
    rosrun rqt_graph rqt_graph

ceres

ceres

  1. mkdir ceres
    cd ceres
  2. git clone https://github.com/ceres-solver/ceres-solver.git
  3. sudo apt-get install cmake
    sudo apt-get install libgoogle-glog-dev
    sudo apt-get install libatlas-base-dev
    sudo apt-get install libeigen3-dev
    sudo apt-get install libsuitesparse-dev
  4. mkdir ceres-bin
    cd ceres-bin
    cmake ../ceres-solver
    make -j12
    make test
    sudo make install

Build VINS-Mono on ROS

  1. mkdir catkin_ws
    cd catkin_ws
    mkdir src
    cd src
  2. git clone https://github.com/HKUST-Aerial-Robotics/VINS-Mono.git
  3. cd ..
    catkin_make
  4. source /home/fxf/catkin_ws/devel/setup.bash

Visual-Inertial Odometry and Pose Graph Reuse on Public datasets

  1. MH数据集
  2. 每次roslaunch前添加source ros工程下绝对路径/setup.bash,例如:
    source /home/fxf/work/catkin-ws/devel/setup.bash
    roslaunch /home/fxf/work/VINS-Mono/vins_estimator/launch/euroc.launch
  3. source /home/fxf/work/catkin-ws/devel/setup.bash
    roslaunch /home/fxf/work/VINS-Mono/vins_estimator/launch/vins_rviz.launch
  4. rosbag play 绝对路径/MH_01_easy.bag
  5. 其他的bag、ar等可参考github上的源文件的readme

小觅深度版SDK

安装OpenCV

sudo apt-get install libopencv-dev

安装点云例程依赖的PCL库

sudo apt-get install libpcl-dev libproj-dev libopenni2-dev libopenni-dev

SDK

  1. git clone https://github.com/slightech/MYNT-EYE-D-SDK.git
  2. cd MYNT-EYE-D-SDK
    make init
    make all
  3. 左右目的图像和彩色深度图
    ./samples/_output/bin/get_image
    左目的图像,16UC1的深度图和鼠标选中的像素的深度值(mm)
    ./samples/_output/bin/get_depth
    显示左目的图像,16UC1的深度图和点云
    ./samples/_output/bin/get_points
    get_imu 打印 imu 数据
    ./samples/_output/bin/get_imu
    get_img_params 打印相机参数并保存在文件中
    ./samples/_output/bin/get_img_params
    get_imu_params 打印 imu 参数并保存在文件中
    ./samples/_output/bin/get_imu_params
    get_from_callbacks 使用回调方式获取图像和 imu 数据
    ./samples/_output/bin/get_from_callbacks
    get_all_with_options 使用不同参数打开设备
    ./samples/_output/bin/get_all_with_options

SDK编译到ROS

  1. cd /home/fxf/catkin_ws/src
    git clone https://github.com/slightech/MYNT-EYE-D-SDK.git
    cd MYNT-EYE-D-SDK
    make ros
    echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
    source ~/.bashrc
  2. cd /home/fxf/catkin_ws/src
    git clone https://github.com/slightech/MYNT-EYE-VINS-Sample.git
    cd ..
    catkin_make
    echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
    source ~/.bashrc

更新配置文件

运行

  1. 启动相机
    source ~/catkin_ws/src/MYNT-EYE-D-SDK/wrappers/ros/devel/setup.bash
    roslaunch /home/fxf/catkin_ws/src/MYNT-EYE-D-SDK/wrappers/ros/src/mynteye_wrapper_d/launch/mynteye.launch
  2. 运行VINS
    source ~/catkin_ws/devel/setup.bash
    roslaunch /home/fxf/catkin_ws/src/MYNT-EYE-VINS-Sample/vins_estimator/launch/mynteye_d.launch
    如果发现有same name报错,就把src文件夹下的VINS-Mono文件夹删除

未完待续。。。

你可能感兴趣的:(vins安装及小觅深度版运行)