NX入门教程软件篇-安装VINS-Mono
说明
本教程介绍如何在Jetson Xavier NX 安装VINS-Mono
测试环境:Jetson Xavier NX + Jetpack4.4 + Ubuntu 1804 + ROS Melodic + opencv3.4.3
NX 默认是4.1.1版本目前对于VINS-Mono支持还不完善,使用opencv3.4.3版本
安装步骤
安装opencv3.4.3,参考文章:NX入门教程软件篇-安装opencv3.4.3
安装ROS相关
$ sudo apt-get install ros-melodic-cv-bridge ros-melodic-tf ros-melodic-message-filters ros-melodic-image-transport
- 安装ceres-solver的依赖
# 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
- 下载且编译ceres-solver
$ cd ~/tools/
$ git clone https://github.com/ceres-solver/ceres-solver.git
$ cd ceres-solver/
$ mkdir build
$ cd build
$ cmake ..
$ make -j1
$ sudo make install
- 下载cv_bridge包
$ cd ~/tools/
$ git clone -b melodic https://github.com/ros-perception/vision_opencv
$ cp -r vision_opencv/cv_bridge ~/catkin_ws/src/
- 下载且编译VINS-Mono源码
$ cd ~/catkin_ws/src
$ git clone https://github.com/HKUST-Aerial-Robotics/VINS-Mono.git
- 指定使用opencv版本3.4.3
- 找到如下包的的CMakelist.txt文件
ar_demo
pose_graph
vins_estimator
camera_model
feature_tracker
- 在find_package(OpenCV REQUIRED)行前面加上
set(OpenCV_DIR /home/ubuntu/opencv/build/)
find_package(OpenCV 3.4.3 REQUIRED)
- 编译:
$ cd ../
$ catkin_make -j1
$ source ~/catkin_ws/devel/setup.bash
- 如果编译出错,请参考FAQ
普通测试
$ roslaunch vins_estimator euroc.launch
$ roslaunch vins_estimator vins_rviz.launch
$ rosbag play YOUR_PATH_TO_DATASET/MH_01_easy.bag
- 如果需要跟实际轨迹同步显示
$ roslaunch vins_estimator euroc.launch
$ roslaunch vins_estimator vins_rviz.launch
$ roslaunch benchmark_publisher publish.launch sequence_name:=MH_05_difficult
$ rosbag play YOUR_PATH_TO_DATASET/MH_01_easy.bag
- 绿线是VINS的轨迹,红线是真实的轨迹
AR测试:
- 下载数据集,bag文件
- 测试命令
$ roslaunch ar_demo 3dm_bag.launch
$ roslaunch ar_demo ar_rviz.launch
$ rosbag play YOUR_PATH_TO_DATASET/ar_box.bag
FAQ
参考链接
- https://github.com/HKUST-Aerial-Robotics/VINS-Mono
- http://ceres-solver.org/installation.html
获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号