系列文章目录
《SLAM研究遇到的Bug汇总》
文章目录
前言
SLAM相关问题
- 报错:
Could not find a package configuration file provided by "Eigen3" (requested
version 3.1.0) with any of the following names:
Eigen3Config.cmake
eigen3-config.cmake
原因:文件里面缺少了cmake_modules这个文件,添加上即可
使用evo工具评估ORB-SLAM3跑EuRoc的MH-01序列
问题:[ERROR]TUM trajectory files must have 8 entries per row and no trailing delimiter at the end of the rows (space)
解决方案
单目的:将ORB_SLAM3-master/evaluation/Ground_truth/EuRoC_left_cam/MH01_GT.txt文件复制到/ORB_SLAM3-master/Example/文件夹,打开txt文档,将里面的逗号
,
全部替换成空格。然后打开终端,输入
#绘制轨迹:
evo_traj tum f_dataset-MH01_mono.txt --ref=MH01_GT.txt -p -a -s
#评估:
evo_ape tum f_dataset-MH01_mono.txt MH01_GT.txt -p -a -s
- EVO参数详解:
-p或–plot 绘图
-v或–verbose 输出相关信息(均值,方差等)
-f或–full_check检查相关信息(时间戳是否对应,四元数是不是单位四元数)
-a或–align对轨迹进行配准,用ICP的方法,并不是仅仅将起点对齐
-s/––correct_scale 仅对齐尺度
ATE和APE区别?
ATE的叫法参考了文章中提到的TUM论文,APE也有自己实际的含义,比ATE多了rotation error。目前看来,ATE的评价指标更流行一些。evo的脚本提供模式的选择。用-r参数,-r full 应该计算的就是ape; -r trans_part计算的就是ate;不添加默认为tran_part。evo_ape的默认模式是 -r trans_part,即计算的是ate。想要计算ape,可以使用 -r full
pip更新及永久换国内源问题
使用pip下载时发现网速特别慢,慢到只有16kb/s
解决方案
检查了版本发现是pip 9.0.1 版本,接下来先更新pip版本:
python m pip install upgrade pip i https://pypi.douban.com/simple
接下来需要永久换为国内源,以后我下载库都可以从国内镜像下载,命令如下(我这里以阿里云为例):
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
换源成功后网速直接到了3Mb/s
CAPE方法 Eigen3问题
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Error at CMakeLists.txt:6 (find_package):
By not providing "FindEigen3.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Eigen3", but
CMake did not find one.
Could not find a package configuration file provided by "Eigen3" with any
of the following names:
Eigen3Config.cmake
eigen3-config.cmake
Add the installation prefix of "Eigen3" to CMAKE_PREFIX_PATH or set
"Eigen3_DIR" to a directory containing one of the above files. If "Eigen3"
provides a separate development package or SDK, be sure it has been
installed.
解决方法
将包含FindEigen3.cmake 的文件夹cmake_modules复制到与build同目录下:
在这里插入图片描述
在find_package(Eigen3 REQUIRED)之前加入:
LIST(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake_modules)
变化后:
LIST(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake_modules)
find_package(OpenCV REQUIRED)
find_package(Eigen3 REQUIRED)
图片无法显示:
cv::waitKey(0);