Ubuntu16.04 ORB-SLAM2运行

文章目录

  • Ubuntu16.04 ORB-SLAM2运行
    • 1.ORB-SLAM2安装
      • 1)通用组件
      • 2)ROS接口(选装)
    • 2.官方示例运行
    • 3.基于ROS和相机运行

Ubuntu16.04 ORB-SLAM2运行

官方文档ORB-SLAM2,依赖项:Eigen3,OpenCV,g2o,Pangolin,DBoW2/DBoW3,安装Ubuntu16.04 SLAM环境配置

1.ORB-SLAM2安装

1)通用组件

git clone https://github.com/raulmur/ORB_SLAM2.git ORB_SLAM2

cd ORB_SLAM2
chmod +x build.sh && ./build.sh

2)ROS接口(选装)

sudo gedit ~/.bashrc
将export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:PATH/ORB_SLAM2/Examples/ROS修改为本地路径,复制到打开的文件末尾,保存关闭

打开ORB_SLAM2/Examples/ROS/ORB_SLAM2/CMakeList.txt,添加-lboost_system,修改后局部代码如下
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
)

cd ORB_SLAM2
chmod +x build_ros.sh && ./build_ros.sh

2.官方示例运行

参考官方文档ORB-SLAM2

3.基于ROS和相机运行

sudo apt-get install ros-kinetic-rgbd-launch

你可能感兴趣的:(Ubuntu16.04 ORB-SLAM2运行)