<launch>
<node pkg="turtlesim" type="turtlesim_node" name="sim"/>
<node pkg="turtlesim" type="turtle_teleop_key" name="teleop" output="screen"/>
<node name="turtle1_tf_broadcaster" pkg="learning_tf" type="turtle_tf_broadcaster.py">
<param name="turtle" type="string" value="turtle1" />
</node>
<node name="turtle2_tf_broadcaster" pkg="learning_tf" type="turtle_tf_broadcaster.py">
<param name="turtle" type="string" value="turtle2" />
</node>
<node pkg="learning_tf" type="turtle_tf_listener.py" name="listener" />
</launch>
<launch>
launch文件中的根元素采用<launch>标签定义
<node>
启动节点 <node pkg="package-name" type="executable-name" name="node-name">
pkg:节点所在的功能包名称
type:节点的可执行文件名称
name:节点运行时的名称
output、respawn、required、ns、args