ROS Indigo beginner_Tutorials-09 编写简单的启动脚本文件
我使用的虚拟机软件:VMware Workstation 11
使用的Ubuntu系统:Ubuntu 14.04.4 LTS
ROS 版本:ROS Indigo
.launch文件 :
下面我们将介绍,如何编写一个启动脚本程序:(.launch文件)
还记得我们在 创建ROS软件包教程 中创建的第一个程序包(beginner_tutorials
)吗,现在我们要使用它。在 beginner_tutorials
软件包里新建一个名为 launch 的文件夹。(用来保存 launch 启动脚本的):
$ roscd beginner_tutorials
$ mkdir launch
$ cd launch
$ gedit turtlemimic.launch #使用你喜欢的编译器打开turtlemimic.launch,对其进行编辑
添加下面的代码:
<launch>
<group ns="turtlesim1">
<node pkg="turtlesim" name="sim" type="turtlesim_node"/>
</group>
<group ns="turtlesim2">
<node pkg="turtlesim" name="sim" type="turtlesim_node"/>
</group>
</