工程问题--一起学RGBD_SLAM工程问题汇总

一起学RGBD_SLAM工程问题汇总

在学习RGBD_SLAM的时候,因为自己用的是Ubuntu16.04,所以会遇到很多原文中没有遇到过的问题

这里进行汇总。

一. VTK Not Found

 1 -- Found OpenNI2: /usr/lib/libOpenNI2.so  
 2 ** WARNING ** io features related to pcap will be disabled
 3 ** WARNING ** io features related to png will be disabled
 4 -- The imported target "vtkRenderingPythonTkWidgets" references the file
 5    "/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
 6 but this file does not exist.  Possible reasons include:
 7 * The file was deleted, renamed, or moved to another location.
 8 * An install or uninstall procedure did not complete successfully.
 9 * The installation package was faulty and contained
10    " /usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
11     but not all the files it references.

解决方法有两种:

1.

1 sudo apt-get install libproj-dev

然后在src中的CMakeLists.txt中添加这句

1 list (REMOVE_ITEM PCL_LIBRARIES "vtkproj4")

2.

1 sudo ln -s /usr/lib/python2.7/dist-packages/vtk/libvtkRenderingPythonTkWidgets.x86_64-linux-gnu.so /usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so

 二. [pcl::PCDWriter::writeASCII] Input point cloud has no data

1 terminate called after throwing an instance of 'pcl::IOException'
2 what():  : [pcl::PCDWriter::writeASCII] Input point cloud has no data!

出现这句话的主要原因是我们执行bin/generate_pointcloud的时候,我们所处的位置是在slam这个文件夹下

在代码中读取图像那一行是"./data/rgb.png",那么在执行那个二进制文件时会去slam/data/rgb.png下寻找

但是,如果我们的目录结构不是这样的,那就会报这个错误。

解决方法:

依据自己的目录结构编写路径。"./"表示当前目录下,"../"表示当前目录的上一级目录下。

我的data文件夹放在src/中,那么我应该改为"/src/data/rbg.png"。


参考文章飞机票:

https://github.com/CPFL/Autoware/issues/795

https://blog.csdn.net/u010918541/article/details/51043332

可能在现在看来,你与世界顶端有太大的差距,但是没关系。从你真真切切地去生活的那一刻起,你就知道自己要去做什么了。那接下来的日子就是勤勤恳恳,主动积极,任劳任怨地去奋斗了!!!
原文地址:https://www.cnblogs.com/sincere-diligence/p/9336045.html