View on GitHub

Rosworkshop

HOME

ROS launch files

For bigger projects it should be not easy to open up differnt terminals to different nodes and ROS process So ROS had provided a solution known as

Launch files

launch files will run roscore when called and even you can run multiple ros lauch files in a single extention lauch files are generlly in end in ‘my_xxx.launch’

Lauch files are in XML format

XML tags in launch files

<?xml version="1.0" encoding="UTF-8"?>
<launch>
  <! other between these-->
</launch>

Let’s create Launch for our projects

Myfirst.launch

   <?xml version="1.0" encoding="UTF-8"?>
   <launch>
     <node name ="turtle1" pkg="turtlesim" type="turtlesim_node"/>
     <node name ="controller" pkg="rosbasics" type="pubsub.py" output="screen"/>
   </launch>

Lets RUN it

roslaunch rosbasics Myfirst.launch

Back to:Chapter 3
Next to:Chapter 5