版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/flyfish1986/article/details/85053233
机器人 Grasp Pose Detection (GPD) 源码编译问题
flyfish
错误1
CMake Error at CMakeLists.txt:11 (find_package):
By not providing "FindPCL.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "PCL", but
CMake did not find one.
Could not find a package configuration file provided by "PCL" with any of
the following names:
PCLConfig.cmake
pcl-config.cmake
Add the installation prefix of "PCL" to CMAKE_PREFIX_PATH or set "PCL_DIR"
to a directory containing one of the above files. If "PCL" provides a
separate development package or SDK, be sure it has been installed.
-- Configuring incomplete, errors occurred!
See also "/home/pumpkinking/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/pumpkinking/catkin_ws/build/CMakeFiles/CMakeError.log".
解决方法
官网提供,因网络问题但未成功的方法
Ubuntu
We currently support all Ubuntu via PPA. The installation instructions are:
sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl
sudo apt-get update
sudo apt-get install libpcl-all
所以采用了如下的从源码编译安装
https://github.com/PointCloudLibrary/pcl
cd pcl && mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release …
make -j2
sudo make -j2 install
错误2
fatal error: pcl_conversions/pcl_conversions.h: 没有那个文件或目录
compilation terminated.
CMakeFiles/gpd_test_service.dir/build.make:62: recipe for target 'CMakeFiles/gpd_test_service.dir/src/tests/test_service.cpp.o' failed
make[2]: *** [CMakeFiles/gpd_test_service.dir/src/tests/test_service.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/gpd_test_service.dir/all' failed
解决方法
sudo apt-get install ros-kinetic-pcl-conversions
sudo apt-get install ros-kinetic-pcl-ros
sudo apt-get install ros-kinetic-pcl-msgs
错误3
/home/pumpkinking/catkin_ws/src/src/nodes/grasp_detection_node.cpp:1:61: fatal error: ../../../gpd/include/nodes/grasp_detection_node.h: 没有那个文件或目录
compilation terminated.
CMakeFiles/gpd_detect_grasps.dir/build.make:62: recipe for target 'CMakeFiles/gpd_detect_grasps.dir/src/nodes/grasp_detection_node.cpp.o' failed
make[2]: *** [CMakeFiles/gpd_detect_grasps.dir/src/nodes/grasp_detection_node.cpp.o] Error 1
CMakeFiles/Makefile2:150: recipe for target 'CMakeFiles/gpd_detect_grasps.dir/all' failed
make[1]: *** [CMakeFiles/gpd_detect_grasps.dir/all] Error 2
make[1]: *** 正在等待未完成的任务....
[ 98%] Built target gpd_classify_candidates
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
解决方法
目录结构必须是这样的
/catkin_ws/src/gpd