< >
Home » ROS与VSLAM入门教程 » ROS与VSLAM入门教程-ubuntu16.04安装ORB-SLAM2

ROS与VSLAM入门教程-ubuntu16.04安装ORB-SLAM2

ROS与VSLAM入门教程-ubuntu16.04安装ORB-SLAM2

说明:

  • 介绍如何在ubuntu16.04系统下安装ORB-SLAM2

环境:

  • Ubuntu16.04 + ROS kinetic
  • Kinect V1.

准备:

  • 安装Boost
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 
  • ROS安装后,带有opencv 3.2
  • 一般都已经安装Eigen3,未安装参考
sudo apt-get install libeigen3-dev
cd /usr/include/eigen3   
#ls查看,含有3个文件: Eigen  signature_of_eigen3_matrix_library  unsupported

    
  • 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

安装ROS

  • 添加路径到 .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

问题:

  • 错误:Undefined reference to symbol '_ZN5boost6system15system_categoryEv' #494

  • 解决:

    vim Examples/ROS/ORB_SLAM2/CMakeLists.txt

    set(LIBS
    ${OpenCV_LIBS}
    ${EIGEN3_LIBS}
    ${Pangolin_LIBRARIES}
    ${PROJECT_SOURCE_DIR}/../../../Thirdparty/DBoW2/lib/libDBoW2.so
    ${PROJECT_SOURCE_DIR}/../../../Thirdparty/g2o/lib/libg2o.so
    ${PROJECT_SOURCE_DIR}/../../../lib/libORB_SLAM2.so
    -lboost_system
    )

  • 增加-lboost_system,在重新编译。

参考:

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

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

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


标签: ros与vslam入门教程, orb-slam2