Ubuntu 16.04 上用RealSense ZR300跑Vins Mono
这篇博客主要讲使用RealSense ZR300
运行Vins Mono
,主要包括:(1)ROS上RealSense ZR300
驱动的安装;(2)Vins Mono
的安装。
ROS上RealSense ZR300驱动的安装
这里使用的ROS
上RealSense
的驱动是eth-asl
的maplab_realsense,这个程序对IMU
的陀螺仪、加速度计、图像的时间戳做了对齐处理。通过实验发现,RealSense ZR300
的加速度计和陀螺仪的时间戳不是完全相同的(这个博客里面的RealSense ZR300
的简单采集程序输出信息反应了这一现象),这主要是由于RealSense ZR300
的加速度计的频率为250Hz
而陀螺仪的频率为200Hz
(参考librealsense
的Issue
,戳这里),但是由于RealSense ZR300
的时间戳是在硬件上打的,不是操作系统接收到到图像和IMU
的时间戳,所以可以通过插值的方式使它们的时间戳对齐。下面介绍maplab_realsense
的配置。
cd path_to_catkin_ws_src
git clone https:
git clone https:
git clone https:
git clone https:
git clone https:
git clone https:
sudo apt-get install autoconf
sudo apt install ros-kinetic-librealsense
sudo apt-get install python-catkin-tools
cd ..
catkin build
运行maplab_realsense
编译之后,使用下面的命令运行maplab-realsense
source devel/setup.bash
roslaunch maplab_realsense maplab_realsense.launch
运行正常会出现下面的结果:
如果出现错误信息,可以多尝试运行几次。
ROS上安装Vins-Mono
下面介绍Vins-Mono
的安装,参考Vins-Mono
的Readme
。
依赖项安装
Vins-Mono
需要安装的依赖项为ceres-solver
,安装ceres-solver
的命令为:
sudo apt-get install libgoogle-glog-dev
sudo apt-get install libatlas-base-dev
sudo apt-get install libeigen3-dev
git clone https:
cd ceres-solver
mkdir build
cd build
cmake ..
make -j4
sudo make install
Vins-Mono
编译
在catkin_ws
的顶层目录上,输入catkin build
编译Vins-Mono
。如果电脑的内存只有4G
,可以使用catkin build -j1
编译,否则很容易报编译错。
运行Vins-Mono
需要修改Vins-Mono
的config/realsense/realsense_fisheye_config.yaml
文件中IMU
和Image
的topic
为/zr300_node/imu
和/zr300_node/fisheye/image_raw
,然后修改estimate_extrinsic
为1
(也可以使用官方给出的结果,然后设置为0
),标定参数可以不需要修改(当然为了更高的精度,可以使用camodocal
进行标定),然后运行Vins-Mono
的estimator
和rviz
cd path_to_catkin_ws
source devel/setup.bash
roslaunch vins_estimator realsense_fisheye.launch
cd path_to_catkin_ws
source devel/setup.bash
roslaunch vins_estimator vins_rviz.launch
这是实验结果,精度看起来还不错,后续会尝试提高精度和对Vins-Mono
的代码进行分析、改进。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)