ROS与VSLAM入门教程-DSO安装
ROS与VSLAM入门教程-DSO安装
说明:
- 介绍如何安装DSO
下载DSO库:
- 新建目录
mkdir ~/dso
- 下载
cd ~/dso
git clone https://github.com/JakobEngel/dso.git
安装必要依赖:
- 安装suitesparse和igen3:
sudo apt-get install libsuitesparse-dev libeigen3-dev libboost-all-dev
安装可选依赖:
- 安装OpenCV,推荐
sudo apt-get install libopencv-dev
或源码安装
安装Pangolin,推荐,安装参考https://github.com/stevenlovegrove/Pangolin
安装ziplib :
sudo apt-get install zlib1g-dev
cd dso/thirdparty
tar -zxvf libzip-1.1.1.tar.gz
cd libzip-1.1.1/
./configure
make
sudo make install
sudo cp lib/zipconf.h /usr/local/include/zipconf.h # (no idea why that is needed).
- 安装sse2neon (required for ARM builds)
git submodule update --init
- 在~/dso/dso 目录里执行
编译DSO:
- 编译:
cd dso
mkdir build
cd build
cmake ..
make -j
安装DSO_ROS包:
- 添加配置DSO路径,更换[PATH_TO_DSO]为实际的路径
export DSO_PATH=[PATH_TO_DSO]/dso
- 下载编译:
mkdir ~/dso/src
cd ~/dso/src
git clone -b catkin https://github.com/JakobEngel/dso_ros
cd ..
catkin_make
- 运行测试:
rosrun dso_ros dso_live image:=image_raw \
calib=XXXXX/camera.txt \
gamma=XXXXX/pcalib.txt \
vignette=XXXXX/vignette.png \
利用USB摄像头测试:
- 启动摄像头:
roslaunch usb_cam webcam.launch
- 执行:
rosrun dso_ros dso_live image:=/usb_cam/image_raw calib=/xxxx/DSO/camera.txt mode=1
利用UVC摄像头测试:
- 采用罗技C270摄像头测试
- 新建
vim uvc_camera.launch
- 内容如下:
<launch>
<arg name="video_device" default="/dev/video1" />
<node name="uvc_camera_node" pkg="uvc_camera" type="uvc_camera_node" output="screen">
<remap from="image_raw" to="/camera/rgb/image_raw" />
<param name="device" value="$(arg video_device)" />
<param name="width" value="640" />
<param name="height" value="480" />
<param name="frame_rate" value="30" />
<param name="exposure" value="0" />
<param name="gain" value="100" />
</node>
</launch>
- 启动摄像头:
roslaunch uvc_camera.launch
- camera.txt 文件内容如下:
0.349153000000000 0.436593000000000 0.493140000000000 0.499021000000000 0.933271000000000
640 480
0.4 0.53 0.5 0.5 0
640 480
- 执行:
rosrun dso_ros dso_live image:=/camera/rgb/image_raw calib=/xxxx/DSO/camera.txt mode=1
TUM单目数据集测试:
- 下载数据集https://vision.in.tum.de/mono-dataset,选择sequence_11.zip
wget http://vision.in.tum.de/mono/dataset/sequence_11.zip
- 执行命令:
cd /xxxx_to_dso/dso/build/bin
./dso_dataset \
files=XXXXX/sequence_XX/images.zip \
calib=XXXXX/sequence_XX/camera.txt \
gamma=XXXXX/sequence_XX/pcalib.txt \
vignette=XXXXX/sequence_XX/vignette.png \
preset=0 \
mode=0
- files为数据集图片压缩包
- calib为相机内参数文件
- gamma和vignette为相机的一些特性参数,光度标定文件
- mode为DSO模式切换,如0为包含光度表达文件,1为只包含内参数,2为没有畸变参数.
- preset为设定DSO运行时的参数,如选取的像素点个数等等。
- preset=3是preset=0的5倍速运行DSO。
- 效果图:
参考:
- https://github.com/JakobEngel/dso
- https://github.com/JakobEngel/dso_ros
- https://vision.in.tum.de/research/vslam/dso?redirect=1
- http://blog.csdn.net/heyijia0327/article/details/53173146
获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号