同事的点云程序必须用PCL-1.8,而ROS默认的是1.7,结果有时出现了版本冲突。
安装了PCL-1.8后,重要的库文件libcostmap_2d.so
链接到了pcl-1.8,而不是默认的1.7。此时删除了pcl-1.8之后,再编译会报错:1
2
3
4CMake Error at /home/user/catkin_ws/devel/share/costmap_2d/cmake/costmap_2dConfig.cmake:113 (message):
Project 'costmap_2d' specifies '/usr/local/include/pcl-1.8' as an include
dir, which is not found. It does neither exist as an absolute directory
nor in '/home/user/catkin_ws/src/navigation/costmap_2d//usr/local/include/pcl-1.8'.
编译还会找pcl-1.8的路径,这是CMake caches
的问题,不是软链接之类的问题,它还会去找旧的路径,所以删除catkin_ws/build
下面的catkin_make.cache
, Makefile
, CMakeCache.txt
. 然后重新编译,这样libcostmap_2d.so
就不会再去链接1.8了