报错:
/home/dzh/fastSLAMproject/src/gmapping/openslam_gmapping/scanmatcher/scanmatcher.cpp:6:10: fatal error: ros/ros.h: 没有那个文件或目录
解决方案为,在出错的文件的包下的CMakeLists.txt文件里,加上
find_package(catkin REQUIRED COMPONENTS
roscpp
)
include_directories(include ${catkin_INCLUDE_DIRS} )
注意一个工作空间有很多camakelists.txt,要找出错包下的,比如我这个就是openslam_gmapping下的