(1)在功能包的顶级目录创建launch文件夹;
(2)在launch文件夹中创建一个.lanuch文件,名字随意;
(3)文件中填写:
<launch>
<node name="node1" pkg = "test" type = "node_minimal_controller" />
<node name="node2" pkg = "test" type = "node_minimal_simulator" />
</launch>
其中:name为节点名字,如果与程序中init语句的名字参数不相同,则默认用name中的名字;
pkg为包名;
type为节点可执行文件的名字
(4)roslaunch 包名 lanuch文件名.launch