安装VINS-Mono

概述

Vins-mono是香港科技大学开源的一个VIO算法

 

1
sudo apt-get install ros-$ROS_DISTRO-realsense2-camera

  

 

1
dpkg -L

 

 

 

 源码安装

1
git clone https://gitee.com/kay2020/realsense-ros.git

  

 

加头文件

1
2
3
4
#include <iostream>     // std::cout
#include <algorithm>    // std::find_if
#include <vector>       // std::vector
using namespace std;

  

 

安装VINS-Mono

 ceres-solver依赖

1
2
3
4
5
6
7
8
9
10
# 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

 

 

 

 

下载

1
git clone https://gitee.com/kay2020/ceres-solver.git

  

 

编译

1
2
3
4
5
6
7
tar -xzvf ceres-solves tar.gz
cd ceres-solves
mkdir build
cd build
cmake ..
make
sudo make install

  

 设置交换空间

 创建临时分区

1
2
3
4
5
6
7
sudo dd if=/dev/zero of=/swapfile bs=64M count=32
#count的大小就是增加的swap空间的大小,64M是块大小,所以空间大小是bs*count=2048MB
sudo mkswap /swapfile
#把刚才空间格式化成swap格式
chmod 0600 /swapfile 
sudo swapon /swapfile
#使用刚才创建的swap空间

  

1
sudo swapoff -a

  

 

 

 

 

1
2
3
4
cd ~/catkin_ws/src
git clone https://gitee.com/kay2020/VINS-Mono.git
cd ..
catkin_make

  

 

备份,修改rs_camera.launch

 

 

 修改VINS-Mono包里的realsense_color_config.yaml

 

 

1
2
3
roslaunch realsense2_camera rs_camera.launch
roslaunch vins_estimator realsense_color.launch
roslaunch vins_estimator vins_rviz.launch

  

 

 

 

安装openCV库

https://opencv.org/releases/page/5/

 

安装openCV

https://blog.csdn.net/m0_37797953/article/details/82013509

 

查看openCV版本 

1
pkg-config --modversion opencv

  

 

 

openCV2.4.13.6安装

CMake-GUI

cap_ffmpeg_impl.hpp最顶端添加

1
2
3
#define AV_CODEC_FLAG_GLOBAL_HEADER (1 << 22)
#define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER
#define AVFMT_RAWPICTURE 0x0020

  

 

 

 

 

参考

https://blog.csdn.net/weixin_43297891/article/details/115051422

https://blog.csdn.net/weixin_48083022/article/details/118282363

https://www.jianshu.com/p/c4ef42f6b2ec

https://zhuanlan.zhihu.com/p/432167383

 

 

https://blog.csdn.net/weixin_38141453/article/details/108450027#comments_15748964

posted @   kay880  阅读(243)  评论(0编辑  收藏  举报
(评论功能已被禁用)
相关博文:
阅读排行:
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
· SQL Server 2025 AI相关能力初探
点击右上角即可分享
微信分享提示