赞
踩
按照文件中的编译顺序进行编译即可!
有几个问题要注意的是:
make -j2
命令进行编译,不然仍有可能死机。并且一次性并行少量的程序整体进度更快。~/Sophus_dir/Sophus/CMakeLists.txt
文件中29行下,添加如下内容:SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -Wno-error=deprecated-copy -Wextra -std=c++11 -Wno-deprecated-declarations -ftemplate-backtrace-limit=0")
sudo apt-get install mlocate
sudo updatedb
~/slam算法/ORB_SLAM3/CMakeLists.txt
中Line 38-44中opencv的版本,为自己电脑上的版本cd ~/slam算法/ORB_SLAM3
chmod +x build.sh
./build.sh
export ORB_SLAM3_ROOT_DIR=/home/howtoloveyou/slam算法/ORB_SLAM3
cd ~/slam算法/ORB_SLAM3
./Examples/Monocular/mono_tum Vocabulary/ORBvoc.txt Examples/Monocular/TUM1.yaml ../../slam-dataset/rgbd_f1_xyz
export LD_LIBRARY_PATH=/home/howtoloveyou/3rd_pkg/Pangolin/build/src/:/home/howtoloveyou/slam算法/ORB_SLAM3/Thirdparty/DBoW2/lib:/home/howtoloveyou/slam算法/ORB_SLAM3/Thirdparty/g2o/lib:/home/howtoloveyou/slam算法/ORB_SLAM3/lib:$LD_LIBRARY_PATH
cd ~/slam算法/ORB_SLAM3
./Examples/RGB-D/rgbd_tum Vocabulary/ORBvoc.txt Examples/RGB-D/TUM1.yaml ../../slam-dataset/rgbd_f1_xyz Examples/RGB-D/associations/fr1_xyz.txt
提前将ros2-ORB_SLAM3订阅的话题改为数据集的相机话题
cd ~/slam算法/ros2-ORB_SLAM3
. install setup.bash
ros2 run ros2_orbslam3 rgbd /home/howtoloveyou/slam算法/ORB_SLAM3/Vocabulary/ORBvoc.txt /home/howtoloveyou/slam算法/ros2-ORB_SLAM3/src/rgbd/rgbd_f1_xyz.yaml
cd ~/slam-dataset
ros2 bag play rgbd
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。