ROS-CmakeList.txt详解

代码中包名:test-packagle-name,文件名:test-file-namecmake_minimum_required(VERSION 2.8.3) # CMake最低版本要求,低于2.8.3构建过程会被终止。 project(test-package-name)#定义工程名称## Compile as C++11, supported in ROS Kinetic and...
摘要由CSDN通过智能技术生成

代码中包名:test-packagle-name,文件名:test-file-name

cmake_minimum_required(VERSION 2.8.3) # CMake最低版本要求,低于2.8.3构建过程会被终止。 
project(test-package-name)#定义工程名称

## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
#找到catkin编译的宏命令和库文件,如果像find_package(catkin REQUIRED COMPONENTS xyz)一样的清单被使用的话,也能找到其他catkin编译的功能包
find_package(catkin REQUIRED COMPONENTS
  roscpp
  std_msgs
)

## System dependencies are found with CMake's conventions 
#系统依赖项也能随着CMake的规定被找到
# find_package(Boost REQUIRED COMPONENTS system)

## Uncomment this if the package has a setup.py. This macro ensures
## modules and global scripts declared therein get installed
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
#如果功能包里有一个setup.py,取消这些注释。这个宏可以确保模块和全局脚本声明在其中得到安装,参考http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
# catkin_python_setup()

################################################
## Declare ROS messages, services and actions ##
################################################
#声明 ROS 的 messages, services 和 actions
#ervice 是同步的通信机制,a 和 b 间通过 sevice 机制通信,假设 a 是客户端访问 b 服务器端,a 远程调用 b 上的某个函数,
#a 程序得等 b 服务器响应后才能作其他的事情(运行其他程序),如果 b 服务器长期无响应,那么 a 啥也别做了,一直等下去吧,无法取消。
#显然效率低下,原因在于 service 时同步通信机制。ros 提供了另外一种通信机制 action,可以在远程调用服务器上某程序后,转而执行其他的程序,
#周期性的获得服务器上的信息,或者取消发送到服务器上的某远程调用,机制灵活,异步通信。

## To declare and build messages, services or actions from within this package, follow these steps:
##想要在功能包中声明和建立习messages, services和actions,就遵循以下步骤:

## * Let MSG_DEP_SET be the set of packages whose message types you use in your messages/services/actions (e.g. std_msgs, actionlib_msgs, .
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值