orb3-编译网上教程很多,写一下自己安装编译过程中踩的坑,一个半星期,终于可以跑demo了。
1.出现如下问题,或者在Build target g2o时 卡住。
-
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:375:CMakeFiles/ORB_SLAM3.dir/src/MLPnPsolver.cpp.o] 错误 1 -
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:76:CMakeFiles/ORB_SLAM3.dir/src/Tracking.cc.o] 错误 1 -
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:245:CMakeFiles/ORB_SLAM3.dir/src/Frame.cc.o] 错误 1 -
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:102:CMakeFiles/ORB_SLAM3.dir/src/LoopClosing.cc.o] 错误 1 -
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:323:CMakeFiles/ORB_SLAM3.dir/src/G2oTypes.cc.o] 错误 1 -
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:232:CMakeFiles/ORB_SLAM3.dir/src/Optimizer.cc.o] 错误 1 -
make[1]: *** [CMakeFiles/Makefile2:390:CMakeFiles/ORB_SLAM3.dir/all] 错误 2 -
make: *** [Makefile:84:all] 错误 2 -
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:375:CMakeFiles/ORB_SLAM3.dir/src/MLPnPsolver.cpp.o] 错误 1
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:76:CMakeFiles/ORB_SLAM3.dir/src/Tracking.cc.o] 错误 1
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:245:CMakeFiles/ORB_SLAM3.dir/src/Frame.cc.o] 错误 1
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:102:CMakeFiles/ORB_SLAM3.dir/src/LoopClosing.cc.o] 错误 1
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:323:CMakeFiles/ORB_SLAM3.dir/src/G2oTypes.cc.o] 错误 1
make[2]: *** [CMakeFiles/ORB_SLAM3.dir/build.make:232:CMakeFiles/ORB_SLAM3.dir/src/Optimizer.cc.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:390:CMakeFiles/ORB_SLAM3.dir/all] 错误 2
make: *** [Makefile:84:all] 错误 2 解决方法: orb-slam3/CMakeLists.xt中添加 set(CMAKE_CXX_STANDARD 14)
2:Package opencv was not found in the pkg-config search path
解决方法:
cd /usr/local/lib
sudo mkdir pkgconfig
cd pkgconfig
sudo touch opencv.pc
sudo gedit opencv.pc
然后复制:
prefix=/usr/local exec_prefix=${prefix} includedir=${prefix}/include libdir=${exec_prefix}/lib
Name: opencv Description: The opencv library Version:4.0.1 Cflags: -I${includedir}/opencv4 Libs: -L${libdir} -lopencv_shape -lopencv_stitching -lopencv_objdetect -lopencv_superres -lopencv_videostab -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_ml -lopencv_imgproc -lopencv_flann ?-lopencv_core ~ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?? ?
|