马上就要毕业了,搜索csdn没有关于ORB_line_SLAM的运行,在此记录一下为学习SLAM的小伙伴们做个参考。码字不易,动手点个赞~~
1 编译过程同ORBSLAM2一致,看此帖ORBSLAM2安装。
2 编译过程报错处理
error1: Wrong path to vocabulary. Falied to open at: or
解决办法:
step1: 进入到PL_Euroc.yaml文件中
cd /home/your_path/ORB_Line_SLAM/Examples/PL
sudo gedit PL_Euroc.yaml
step2: 修改213/212行路径
vocabulary_p : "/home/your_path/ORB_Line_SLAM/Vocabulary/ORBvoc.txt"
vocabulary_l : "/home/your_path/ORB_Line_SLAM/Vocabulary/LSDvoc.txt"
最后,可以直接运行数据集了
运行命令:
./Examples/PL/PL_stereo_euroc Vocabulary/ORBvoc.txt Examples/Stereo/EuRoC.yaml /your_path/mav0/cam0/data /your_path/mav0/cam1/data Examples/PL/EuRoC_TimeStamps/MH01.txt
error2: 关于使用ros运行跑EUROC数据集报错的解决办法
原因:相机话题名称错误
解决办法:
step1: 进入路径下
cd /your_path/ORB_Line_SLAM/Examples/ROS/ORB_Line_SLAM2/src
step2:修改ros_stereo.cc文件第115/116行,如下:
message_filters::Subscriber<sensor_msgs::Image> left_sub(nh, "/cam0/image_raw", 1);
message_filters::Subscriber<sensor_msgs::Image> right_sub(nh, "/cam1/image_raw", 1);
注意:上述报错修改完成后都需要重新编译
最后可以编译运行了:
rosrun ORB_Line_SLAM2 Stereo Vocabulary/ORBvoc.txt Examples/PL/PL_EuRoC.yaml false
rosbag play MH_01_easy.bag
最后,麻烦大家点赞咯,码字不易~~~~