ROS中launch详解记录
ROS中的launch文件主要用于多个节点的配置与启动,launch是后缀为.launch的xml文件
1、使用方法
1 roslaunch package_name launch_file_name
2、launch文件的标签
2.1 launch标签
1 <launch> 2 ... 3 </launch>
2.2 node标签
其中“SUBscriber”为ros节点的名字,“subscriber”为功能包的名字,“exeSubscriber”为生成可执行文件的名字,“output”是否输出到屏幕上!
1 <launch> 2 <node name = "SUBscriber" pkg = "subscriber" type = "exeSubscriber" output = "screen"/> 3 </launch>
2.3 include标签
1、使用方法
include标签相当于嵌套语句,用于把另外一个launch文件导入当前的launch文件,只需要执行publisher.launch,SUBscriber节点也会启动。
<launch> <node name = "PUBlisher" pkg = "publisher" type = "exePublisher"/> <include file = "$(find subscriber)/launch/subscriber.launch"/> #include 的使用方法 </launch>
3、参考:https://blog.csdn.net/zxxxiazai/article/details/108231232?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1.no_search_link