ubuntu18.04 orb_slam2安裝記錄


1.git clone https://github.com/raulmur/ORB_SLAM2.git
2.git clone https://github.com/stevenlovegrove/Pangolin.git
cd ~/Pangolin/
mkdir build
cd build/
cmake ..
sudo apt install libgl1-mesa-dev
sudo apt install libglew-dev
cmake ..
sudo apt install pkg-config
sudo apt install libegl1-mesa-dev libwayland-dev libxkbcommon-dev wayland-protocols
cmake ..
cmake --build .

3.cd ORB_SLAM2/
./build.sh

在編譯usleep()報錯的文件里加入#include<unistd.h>
locate libboost_system

在/home/wang/ORB_SLAM2/Examples/ROS/ORB_SLAM2/CMakeLists.txt的set(LIBS...最后加入/usr/lib/x86_64-linux-gnu/libboost_system.so
./build.sh
export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:/home/wang/ORB_SLAM2/Examples/ROS/ORB_SLAM2
./build_ros.sh

4.使用ros錄的bag測試orb_slam2

export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:/home/wang/ORB_SLAM2/Examples/ROS/ORB_SLAM2

cd ~/ORB_SLAM2

roscore

rosrun ORB_SLAM2 Mono Vocabulary/ORBvoc.txt Examples/Monocular/TUM1.yaml

rosbag play xxxx.bag(rosbag reindex xxxx.bag)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2024 CODEPRJ.COM