流程 1.在package中新建文件夹名为msg 2.在msg文件夹中创建消息(此处以my_msg.msg)为例,注意的是要以msg为后缀名 内容举例如下: int32 data1 float64 date2 关于消息内容,需要注意的是如果类型错误,那么将不能生成头文件.例如float64写成了float,那么编译时将会出现错误:xxx.h: No such file or directory:而不会告诉你是哪里出错了,我曾经就遇到过这么坑的问题,所以这点需要注意. 3.修改CmakeList.
msg: msg files are simple text files that describe the fields of a ROS message. They are used to generate source code for messages in different languages. srv: an srv file describes a service. It is composed of two parts: a request and a response. ms
至此,我们初步学习了ROS的基本工具,接下来一步步理解ROS的各个工作部件的创建和工作原理. 本文的详细文档:http://wenku.baidu.com/view/623f41b3376baf1ffd4fad7a Creating a ROS msg and srv This tutorial covers how to create and build msg and srv files as well as therosmsg, rossrv and roscp commandline t