catkin所依赖的package必须在package.xml中添加build_depend和run_depend
现象:
error: catkin_package() the catkin package '×××' has been find_package()-ed but is not listed as a build dependency in the package.xml
解决方法:
1:首先出现这个问题的原因是在CMakeLists配置文件中
find_package(catkin REQUIRED COMPONENTS
roscpp
dynamic_reconfigure
std_msgs
your_package
)
2:这个your_package就是你自己写的另一个package,被当前package依赖
3:因此,它也需要在package.xml中配置build_depend和run_depend