orb_slam3跑数据集

参考ORB-SLAM2和3官网编译

https://blog.csdn.net/hhhhpanda/article/details/85037463
出现如下错误:
orb_slam3跑数据集_第1张图片

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

运行数据集

.yaml是必要的

rosrun ORB_SLAM2 zed_Stereo_rect Vocabulary/ORBvoc.txt Examples/Stereo/EuRoC.yaml false

zed2自带配置

rosrun ORB_SLAM3 Stereo_Inertial Vocabulary/ORBvoc.txt Examples/Stereo-Inertial/EuRoC.yaml true /camera/left/image_raw:=/cam0/image_raw /camera/right/image_raw:=/cam1/image_raw /imu:=/imu0
roscore
rosbag play data.bag
rostopic list 

找出对应topic,进行填写
结果
orb_slam3跑数据集_第2张图片

编译orb-slam2(add seg)的一些警告

/usr/bin/ld: warning: libopencv_core.so.3.4, needed by …/Thirdparty/DBoW2/

1

/usr/bin/ld: warning: libopencv_core.so.3.4, needed by …/Thirdparty/DBoW2/lib/libDBoW2.so, not found (try using -rpath or -rpath-link)

2

./Examples/RGB-D/rgbd_tum: error while loading shared libraries: libopencv_core.so.3.4: cannot open shared object file: No such file or directory
orb_slam3跑数据集_第3张图片

解决

编译别人给的代码,注意删除原始的build相关文件,进行重新编译,否则进行的链接关系会基于已有的生成的编译文件进行链接

echo "Configuring and building Thirdparty/DBoW2 ..."

cd Thirdparty/DBoW2
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j

cd ../../g2o

echo "Configuring and building Thirdparty/g2o ..."

mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j

cd ../../../

echo "Uncompress vocabulary ..."

cd Vocabulary
tar -xf ORBvoc.txt.tar.gz
cd ..

echo "Configuring and building ORB_SLAM2 ..."

mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j

你可能感兴趣的:(ros,slam学习调试,自动驾驶,人工智能,机器学习)