安装过程见:添加链接描述
https://blog.csdn.net/weixin_43211438/article/details/87818526
安装pcl时,执行sudo apt-get install libvtk5.10-qt4 libvtk5.10 libvtk5-dev时,会有如下提示:
当时没有理会,直接继续安装。
等到pcl安装完毕,安装loam,在用catkin编译loam之后,出现如下图所示的报错
错误提示:
– +++ processing catkin package: ‘loam_velodyne’
– ==> add_subdirectory(loam_velodyne)
– Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
Could not find a package configuration file provided by “pcl_conversions”
with any of the following names:
pcl_conversionsConfig.cmake
pcl_conversions-config.cmake
Add the installation prefix of “pcl_conversions” to CMAKE_PREFIX_PATH or
set “pcl_conversions_DIR” to a directory containing one of the above files.
If “pcl_conversions” provides a separate development package or SDK, be
sure it has been installed.
Call Stack (most recent call first):
loam_velodyne/CMakeLists.txt:4 (find_package)
– Could not find the required component ‘pcl_conversions’. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by “pcl_conversions”
with any of the following names:
pcl_conversionsConfig.cmake
pcl_conversions-config.cmake
Add the installation prefix of “pcl_conversions” to CMAKE_PREFIX_PATH or
set “pcl_conversions_DIR” to a directory containing one of the above files.
If “pcl_conversions” provides a separate development package or SDK, be
sure it has been installed.
Call Stack (most recent call first):
loam_velodyne/CMakeLists.txt:4 (find_package)
– Configuring incomplete, errors occurred!
See also “/home/zxj/catkin_ws/build/CMakeFiles/CMakeOutput.log”.
See also “/home/zxj/catkin_ws/build/CMakeFiles/CMakeError.log”.
Invoking “cmake” failed
解决方法:
执行sudo apt-get install ros-kinetic-pcl-conversions
会有如下提示:
再次编译loam,编译通过
推测原因:
在安装执行sudo apt-get install libvtk5.10-qt4 libvtk5.10 libvtk5-dev时,卸载了ros-kinetic-pcl-conversions。
尚未测试在安装pcl依赖项时,是否可以跳过执行sudo apt-get install libvtk5.10-qt4 libvtk5.10 libvtk5-dev这句。