SLAM14讲——ch4,轨迹计算报错解决

出现以下报错:

[ 50%] Linking CXX executable trajectoryError

/usr/bin/ld: CMakeFiles/trajectoryError.dir/trajectoryError.cpp.o: in function `std::make_unsigned<int>::type fmt::v8::detail::to_unsigned<int>(int)':

trajectoryError.cpp:(.text._ZN3fmt2v86detail11to_unsignedIiEENSt13make_unsignedIT_E4typeES4_[_ZN3fmt2v86detail11to_unsignedIiEENSt13make_unsignedIT_E4typeES4_]+0x23): undefined reference to `fmt::v8::detail::assert_fail(char const*, int, char const*)'

说明fmt库没有链接成功,因此需要链接fmt库,方法如下:

将CMakeLists.txt中:

target_link_libraries(trajectoryError ${Pangolin_LIBRARIES} ${FMT_LIBRARIES})

改为:(注意下面fmt前面有空格!)

target_link_libraries(trajectoryError ${Pangolin_LIBRARIES} ${FMT_LIBRARIES} fmt)

再次编译,问题解决。

运行时,新的问题出现:

trajectory ./example/groundtruth.txt not found.

trajectory ./example/estimated.txt not found

原因是没有找到需要的txt文件

解决方案:

编辑trajectoryError.cpp,将以下两行

string groundtruth_file = "./example/groundtruth.txt";

string estimated_file = "./example/estimated.txt";

转换为绝对路径:

string groundtruth_file = "../example/groundtruth.txt";

string estimated_file = "../example/estimated.txt";

再次编译后,再使用:

./trajectoryError

即可得到轨迹误差评估结果。

参考并使用该博主的一部分内容,且在其基础上解决了一部分问题:

https://blog.csdn.net/LNSTOP/article/details/125914717

  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
SLAM精度评估中的EVO是指使用EVO工具来评估SLAM系统的轨迹误差。EVO是一个开源的工具,用于评估SLAM系统的性能。它提供了一系列命令和功能,可以计算和可视化SLAM系统的轨迹误差。 在EVO中,有几个常用的命令可以用来评估SLAM系统的轨迹误差。其中,evo_traj命令用于评估轨迹误差,可以使用手写的ATE(绝对位姿误差)和RPE(相对位姿误差)来比较SLAM系统的性能。\[1\] 相对位姿误差主要用于比较运动(姿态增量),而不是进行绝对位姿的比较。相对位姿误差可以给出局部精度,例如SLAM系统每米的平移或旋转漂移量。可以使用evo_rpe命令来计算相对位姿误差,并通过设置参数来进行可视化和保存结果。\[2\] 另外,evo_ape命令可以用于计算ATE(绝对位姿误差),并提供了可视化和保存结果的功能。可以使用该命令来评估SLAM系统在KITTI数据集上的性能。\[3\] 总之,EVO是一个用于评估SLAM系统性能的工具,可以通过计算和可视化轨迹误差来评估SLAM系统的精度。可以使用evo_traj、evo_rpe和evo_ape等命令来进行评估和分析。 #### 引用[.reference_title] - *1* *2* [SLAM精度测评——EVO进阶](https://blog.csdn.net/Darlingqiang/article/details/123534388)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [ros中SLAM的EVO、APE测评——SLAM精度测评(一)](https://blog.csdn.net/Yangy_Jiaojiao/article/details/124419966)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值