高翔视觉slam十四讲(第二版)第13讲实践:设计slam系统遇到问题总结

平台:ubuntu20.04

问题1:kitti数据集获取(能进网站,点击下载后,...,邮件下载链接打不开)

方法:进站长工具地址查询https://www.ipaddress.com/ip-lookup后截取下载网址 https://s3.eu-central-1.amazonaws.com/avg-kitti/data_odometry_gray.zip前半部分https://s3.eu-central-1.amazonaws.com,查询其对应的IP地址如下

IP Address
  • 52.219.72.84

然后进入hosts将52.219.169.17 s3.eu-central-1.amazonaws.com写入,如下

终端运行

sudo gedit /etc/hosts

然后写入 52.219.169.17 s3.eu-central-1.amazonaws.com

保存退出,就可以点击下载链接下载了,但速度很慢,可以用迅雷加速,亲测快很多(好像快十倍)!

问题2.编译中出现的问题

出现:CMake Error at CMakeLists.txt:18 (find_package):
  Could not find a configuration file for package "OpenCV" that is compatible
  with requested version "3.1".

办法:讲CMakeLists.txt文件中 3.1删掉,如下

出现:/usr/local/include/g2o/core/base_fixed_sized_edge.h:174:32: error: ‘index_sequence’ is not a member of ‘std’
   ......

等错误

方法:将CMakeLists.txt文件中关于c++11设置注释掉同时设置c++14,如下

出现:/home/kbfvictory/Downloads/slambook2/ch13/src/viewer.cpp:83:54: error: ‘CV_GRAY2BGR’ was not declared in this scope
     cv::cvtColor(current_frame_->left_img_, img_out, CV_GRAY2BGR);

方法:在viewer.cpp h中加入头文件,如下

#include <opencv2/imgproc/types_c.h>

如果继续报错,需要查看usr/local/include目录上opencv文件夹名字做对应改变找到types_c.h头文件

出现:/home/kbfvictory/slambook2/ch13/src/frontend.cpp:295:68: error: ‘CV_FILLED’ was not declared in this scope
                       feat->position_.pt + cv::Point2f(10, 10), 0, CV_FILLED);
等错误

办法:将CV_FILLED改为cv::FILLED即可

问题3:运行时报错

出现:WARNING: Logging before InitGoogleLogging() is written to STDERR
I20210712 22:42:13.808815 12504 visual_odometry.cpp:44] VO is running
Segmentation fault (core dumped)

办法:打开run_kitti_stereo.cpp注释掉assert函数将初始提取出来,如下

出现:WARNING: Logging before InitGoogleLogging() is written to STDERR
E20210712 22:57:54.938446 13193 dataset.cpp:18] cannot find /mnt/1A9286BD92869CBF/Dataset/Kitti/dataset/sequences/05/calib.txt!
F20210712 22:57:54.938530 13193 visual_odometry.cpp:21] Check failed: dataset_->Init() == true (0 vs. 1) 
*** Check failure stack trace: ***
Aborted (core dumped)

办法:打开default.yaml把dataset_dir的路径改为前面下载的kitti数据集存放的绝对路径,样例如下

最后结果放不了视频,放着图片

还存在的问题:运行最开始还是会出现警告,如果有大佬已经解决该问题,一定要告诉小弟,不胜感激,实验室就我一个人搞,太苦了,那种无助的感觉......

评论 20
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值