catkin_package解析

catkin_package与find_package
https://cloud.tencent.com/developer/ask/183702

ROS Catkin 教程之 catkin_package(...) 到底在做什么?
https://blog.csdn.net/lcc816/article/details/82962561

https://answers.ros.org/question/58498/what-is-the-purpose-of-catkin_depends/
https://blog.csdn.net/lcc816/article/details/82949880

在文件CMakelists.txt中我看到find_packages和catkin_package:

find_package(catkin REQUIRED COMPONENTS roscpp rospy image_transport std_msgs message_generation sensor_msgs geometry_msgs) catkin_package(CATKIN_DEPENDS message_runtime std_msgs sensor_msgs geometry_msgs)

这两件事有什么区别?

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS ...
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if you package contains header files
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(...

find_package命令是常见的cmake,需要加载catkin宏并指定其他ROS包的依赖关系。
catkin_package命令是这些catkin宏之一。它负责包的ROS特定配置。因此,这是将ROS包与常见的cmake项目区分开来的重要部分。我不知道细节,但我想,例如,它负责设置catkin工作区的正确构建路径。 当其他ROS包依赖于此包时,这里给出的参数(即依赖性)很重要。

catkin_package中添加的包,必须在package.xml中指定依赖
 

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值