甘肃快3:ROS与VSLAM入门教程-ORB-SLAM2安装

青海快三下载 www.41pi3.cn ROS与VSLAM入门教程-ORB-SLAM2安装

说明:

  • 介绍如何安装ORB-SLAM2

环境:

  • Ubuntu14.04 + ROS indigo
  • Kinect V1.

准备:

sudo apt-get install libboost-all-dev
  • 安装Pangolin:
git clone https://github.com/stevenlovegrove/Pangolin.git 
cd Pangolin 
mkdir build 
cd build 
cmake .. 
make -j 
  • 安装OpenCV,版本为OpenCV2.4.11,参考文章
  • 安装Eigen3
sudo apt-get install libeigen3-dev
#ls查看,含有3个文件: Eigen  signature_of_eigen3_matrix_library  unsupported
cd /usr/include/eigen3     
#将Eigen文件夹放在 /usr/include 下面  
sudo cp Eigen/ .. -R               
  • DBoW2和g2o (included in Thirdparty) 在ORB-SLAM2的Thirdparty文件夹里面,无需安装。

安装ORB-SLAM2:

  • 下载编译ORB-SLAM2:
cd ~
git clone https://github.com/raulmur/ORB_SLAM2.git ORB_SLAM2
cd ORB_SLAM2
chmod +x build.sh
./build.sh

单目测试:

  1. TUM Dataset:
  • 下载数据集//vision.in.tum.de/data/datasets/rgbd-dataset/download
  • 执行命令:
./Examples/Monocular/mono_tum Vocabulary/ORBvoc.txt Examples/Monocular/TUMX.yaml PATH_TO_SEQUENCE_FOLDER
  • 可以改变TUMX.yaml为 TUM1.yaml,TUM2.yaml or TUM3.yaml 针对 freiburg1, freiburg2 和freiburg3
  • 改变PATH_TO_SEQUENCE_FOLDER为对应解压后的目录
  1. KITTI Dataset:
  • 下载数据集//www.cvlibs.net/datasets/kitti/eval_odometry.php
  • 执行命令:
./Examples/Monocular/mono_kitti Vocabulary/ORBvoc.txt Examples/Monocular/KITTIX.yaml PATH_TO_DATASET_FOLDER/dataset/sequences/SEQUENCE_NUMBER
  • 改变KITTIX.yaml为 KITTI00-02.yaml, KITTI03.yaml or KITTI04-12.yaml
  • 针对0 to 2, 3, and 4 to 12
  • 改变PATH_TO_DATASET_FOLDER为解压的目录
  • 改变SEQUENCE_NUMBER 为00, 01, 02,.., 11.
  1. EuRoC Dataset:
  • 下载数据集 //projects.asl.ethz.ch/datasets/doku.php?id=kmavvisualinertialdatasets
  • 执行命令,针对V1和V2 sequences.:
./Examples/Monocular/mono_euroc Vocabulary/ORBvoc.txt Examples/Monocular/EuRoC.yaml PATH_TO_SEQUENCE_FOLDER/mav0/cam0/data Examples/Monocular/EuRoC_TimeStamps/SEQUENCE.txt 
  • 执行命令,针对MH sequences.
./Examples/Monocular/mono_euroc Vocabulary/ORBvoc.txt Examples/Monocular/EuRoC.yaml PATH_TO_SEQUENCE/cam0/data Examples/Monocular/EuRoC_TimeStamps/SEQUENCE.txt
  • 改变PATH_TO_SEQUENCE_FOLDER和SEQUENCE为你想要执行的数据

双目测试:

  1. KITTI Dataset
  • 下载数据集//www.cvlibs.net/datasets/kitti/eval_odometry.php
  • 执行命令:
./Examples/Stereo/stereo_kitti Vocabulary/ORBvoc.txt Examples/Stereo/KITTIX.yaml PATH_TO_DATASET_FOLDER/dataset/sequences/SEQUENCE_NUMBER
  • 改变KITTIX.yaml为KITTI00-02.yaml, KITTI03.yaml or KITTI04-12.yaml
  • 针对序列0 to 2, 3, and 4 to 12
  • 改变PATH_TO_DATASET_FOLDER为下载的数据集
  • 改变SEQUENCE_NUMBER为00, 01, 02,.., 11.
  1. EuRoC Dataset
  • 下载数据集 //projects.asl.ethz.ch/datasets/doku.php?id=kmavvisualinertialdatasets
  • 执行命令, 针对 V1 and V2 序列:
./Examples/Stereo/stereo_euroc Vocabulary/ORBvoc.txt Examples/Stereo/EuRoC.yaml PATH_TO_SEQUENCE/mav0/cam0/data PATH_TO_SEQUENCE/mav0/cam1/data Examples/Stereo/EuRoC_TimeStamps/SEQUENCE.txt
  • 执行命令,针对MH sequences
./Examples/Stereo/stereo_euroc Vocabulary/ORBvoc.txt Examples/Stereo/EuRoC.yaml PATH_TO_SEQUENCE/cam0/data PATH_TO_SEQUENCE/cam1/data Examples/Stereo/EuRoC_TimeStamps/SEQUENCE.txt
  • PATH_TO_SEQUENCE_FOLDER and SEQUENCE 更改你想执行的数据集

RGB-D 例子测试:

  1. TUM Dataset
  • 下载数据库//vision.in.tum.de/data/datasets/rgbd-dataset/download
  • 关联RGB图和深度图,可以使用associate.py脚本
  • 在Examples/RGB-D/associations/.有一些现成的associations文件
  • 或者生产自己的associations文件
python associate.py PATH_TO_SEQUENCE/rgb.txt PATH_TO_SEQUENCE/depth.txt > associations.txt
  • 执行命令:
./Examples/RGB-D/rgbd_tum Vocabulary/ORBvoc.txt Examples/RGB-D/TUMX.yaml PATH_TO_SEQUENCE_FOLDER ASSOCIATIONS_FILE
  • 改变TUMX.yaml为TUM1.yaml,TUM2.yaml or TUM3.yaml ,针对 freiburg1, freiburg2 and freiburg3 sequences
  • PATH_TO_SEQUENCE_FOLDER为解压的目录
  • ASSOCIATIONS_FILE为对应的associations文件

ROS Examples

  1. 针对 mono, monoAR, stereo and RGB-D
  • 添加路径到 .bashrc
export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:PATH/ORB_SLAM2/Examples/ROS
  • 执行编译
chmod +x build_ros.sh
./build_ros.sh
  • 运行 Monocular Node
rosrun ORB_SLAM2 Mono PATH_TO_VOCABULARY PATH_TO_SETTINGS_FILE
  • 输入图像话题是/camera/image_raw
  • 运行 Monocular Augmented Reality Demo
rosrun ORB_SLAM2 MonoAR PATH_TO_VOCABULARY PATH_TO_SETTINGS_FILE
  • 输入图像话题是/camera/image_raw
  • 这是增强现实的演示,您可以使用界面在场景的平面区域中插入虚拟立方体
  • 运行 Stereo Node
rosrun ORB_SLAM2 Stereo PATH_TO_VOCABULARY PATH_TO_SETTINGS_FILE ONLINE_RECTIFICATION
  • 输入话题/camera/left/image_raw and /camera/right/image_raw
  • 运行RGB_D Node
rosrun ORB_SLAM2 RGBD PATH_TO_VOCABULARY PATH_TO_SETTINGS_FILE
  • 输入话题/camera/rgb/image_raw and /camera/depth_registered/image_raw

参考:

  • https://github.com/raulmur/ORB_SLAM2.git
  • //www.cnblogs.com/zengcv/p/6021512.html

纠错,疑问,交流: 请进入讨论区点击加入Q群

获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号


标签: ros与vslam入门教程

  • 北新建材荣登“中国500最具价值品牌”100强 2018-11-24
  • 杨梅:谣言太多伤不起 2018-11-24
  • 13岁少年杀3幼童被收容教养 下调入刑年龄可控犯罪 2018-09-04
  • 银保监会:6月22日前上报保险消费风险提示落实情况 2018-07-25
  • 刘杰的专栏作者中国国家地理网 2018-07-25
  • 漫游宝澄清“无证”传闻 2018-07-24
  • 罗青林的专栏作者中国国家地理网 2018-07-24
  • 2018世界杯 竞彩游戏的投注方式 2018-07-23
  • 足球,从工人阶级平民运动到资本主义商业游戏 2018-07-23
  • 奚梦瑶穿牛仔套装帅气十足 双手接护照礼仪满分 2018-07-22
  • 看了看某同事放长线的账户,居然赔掉了三分之二的本金[可怜] 2018-07-22
  • 克罗地亚VS尼日利亚前瞻:克罗地亚或是最大黑马 2018-07-21
  • 崔世安:澳门须主动融入和参与粤港澳大湾区建设 2018-07-20
  • 《亲爱的活祖宗》甜蜜开播 原声带上线亲爱的活祖宗 原声带 2018-07-20
  • 年底北斗系统将为“一带一路”建设参与国提供服务 2018-07-19
  • 38| 906| 172| 722| 700| 483| 699| 863| 835| 299|