包A引用包B的头文件
首先包A的package.xml中增加
<build_depend>B</build_depend>
<exec_depend>B</exec_depend>
其次包A的cmakelist.txt中
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
B
)
最后
include_directories(
include
${catkin_INCLUDE_DIRS}
)
请测可用