首先需要安装opencv-dev(后缀代表C++版),但因之前安装过ROS,便已自带安装opencv,故略opencv安装方法。
①fmp链接报错
解决方法:
#rgbd/CMakeLists.txt
find_package(Sophus REQUIRED)
include_directories(${Sophus_INCLUDE_DIRS})
find_package(Pangolin REQUIRED)
#1此处添加
find_package(fmt REQUIRED)
add_executable(joinMap joinMap.cpp)
#2此处修改为(增添fmt::fmt)
target_link_libraries(joinMap ${OpenCV_LIBS} ${Pangolin_LIBRARIES} fmt::fmt)
②运行imageBasics
③路径报错
解决
#string image_file = "./distorted.png"; // 原代码所用路径
string image_file = "/home/cmx/slambook2/ch5/imageBasics/distorted.png"; // 修改为绝对路径,勿用相对路径
string left_file = "/home/cmx/slambook2/ch5/stereo/left.png";
string right_file = "/home/cmx/slambook2/ch5/stereo/right.png";
④运行jointMap.cpp后电脑反应慢:若要进行科研还是要安装双系统,只是学习可用虚拟机