创建使用msg,srv和topic注意事项
2014-05-29 18:34
363 查看
creat .msg后,
(1)必须在package.xml中添加依赖项:
(2)在CMakeLists.txt中添加message_generation:
and uncomment :
If you have a previously compiled workspace and you add a new package inside it, you can tell catkin to add this new package to the already-compiled binaries by adding this parameter:
NOTES:
a, ***.h文件不是自己写的,
b, 新建**.c , **.py文件后,必须修改对应的CMakeLists.txt。
c , rosbag info <your bagfile> 查看bag信息。
d, rosdep install turtlesim 下载turtlesim包的依赖项。
WORKFLOW:
参考: http://wiki.ros.org/ROS/Tutorials/CreatingMsgAndSrv
(1)必须在package.xml中添加依赖项:
<build_depend>message_generation</build_depend> <run_depend>message_runtime</run_depend>
(2)在CMakeLists.txt中添加message_generation:
find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs message_generation ) [code]catkin_package( ... CATKIN_DEPENDS message_runtime ... ...)
and uncomment :
add_message_files( FILES Num.msg ### msg which you create ) [code]generate_messages( DEPENDENCIES std_msgs )
If you have a previously compiled workspace and you add a new package inside it, you can tell catkin to add this new package to the already-compiled binaries by adding this parameter:
$ catkin_make --force-cmake $ source
NOTES:
a, ***.h文件不是自己写的,
#include "beginner_tutorials/AddTwoInts.h" ## it is a header file generated from the srv file that we created earlier.
b, 新建**.c , **.py文件后,必须修改对应的CMakeLists.txt。
c , rosbag info <your bagfile> 查看bag信息。
d, rosdep install turtlesim 下载turtlesim包的依赖项。
WORKFLOW:
<pre name="code" class="cpp">$ cd ~/catkin_ws/src/beginner_tutorials/src # Add/Edit source files $ cd ~/catkin_ws/src/beginner_tutorials # Update CMakeFiles.txt to reflect any changes to your sources $ cd ~/catkin_ws $ catkin_make -DCMAKE_BUILD_TYPE=Release
参考: http://wiki.ros.org/ROS/Tutorials/CreatingMsgAndSrv
相关文章推荐
- 创建线程函数的使用注意事项
- 使用条码控件TBarCode SDK创建条码图像的注意事项
- Dynamics CRM2016 使用web api来创建注释时的注意事项
- Socket的创建、销毁、使用的注意事项
- oracle中创建序列以及序列使用注意事项
- Dynamics CRM2016 使用web api来创建注释时的注意事项
- 使用xib方式创建UITableViewCell,设置Label自动换行注意事项
- ros_fuerte创建工作空间、创建ROS功能包、编译ROS功能包、创建节点(cpp)、编译节点、使用launch文件、创建srv和msg文件、使用新建的srv和msg文件
- 常用sql命令@oracle数据类型概括@权限、角色、用户的创建于使用@伪列及其注意事项
- golang 中使用数组创建slice时的注意事项
- 使用eclipse 开发 嵌入式Linux驱动(注意事项)(make:***没有规则可言创建目标"all".停止 的解决方法)
- Dynamics CRM2016 使用web api来创建注释时的注意事项
- 函数的创建及使用时的注意事项
- 常用sql命令@oracle数据类型概括@权限、角色、用户的创建于使用@伪列及其注意事项
- esxi使用RDM创建MSCS时的注意事项
- 数据库创建及使用注意事项
- 创建hive表和使用Load data指令导入数据的注意事项
- CfileDialog的使用方法与注意事项及多选打开对话框的创建
- Dynamics CRM2016 使用web api来创建注释时的注意事项
- oracle创建表中LONG字段类型的使用注意事项