PCL 1.8.0 安装与BUG

PCL 1.8.0 安装

安装PCL 1.8.0过程中出现了VTK某函数不能找到的错误:

-- The imported target "vtkRenderingPythonTkWidgets" references the file
   "/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.

该问题的解决方案在关于高博视觉slam十四讲第5讲中PCL编译的问题
加上如下代码建立链接

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

另外出现了另一个问题:

CMake Error at cmake/pcl_utils.cmake:397 (message):
  size mismatch between PCL_MODULES_NAMES (length 27) and
  PCL_MODULES_NAMES_UNSORTED (length 25)
Call Stack (most recent call first):
  CMakeLists.txt:438 (sort_relative)

(加上了,依然没有解决问题)是因为少了一个依赖项,终端加上sudo apt-get install libproj-dev,另外在CMakeLists.txt中加上list (REMOVE_ITEM PCL_LIBRARIES “vtkproj4”)

以上都不成功,尝试装了PCL 1.8.1,在CMakeLists.txt的146行加上了以下代码,然后在编译时使用 make VERBOSE=1 命令就成功了。

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

注意:安装了eigen 3.2.10,下载源码并且用cmake-gui编译安装到了/usr/include/eigen3下,再安装g2o与PCL1.8.1.

你可能感兴趣的:(路径规划学习)