작성자: 박준규

2023.01.16(월)

Referred to: https://www.youtube.com/watch?v=cTXHIEYXKpM

What is a launch file?

Use a .launch file (referred below as launch file) to launch multiple ROS nodes.

A launch file is an XML document which specifies:

How do we make a launch file?

  1. create a directory called launch inside the package directory

    1. Not sure if we need to do this or just place the launch files inside the package directory and roslaunch will find them for us
  2. inside the launch folder, create launchfile_name.launch

  3. The launch file would look something like this:

    <launch>
    	
    	<node pkg="turtlesim" type="turtlesim_node" name="turtlesim_node" />
    
    	<node pkg="package_name" type="name_of_node_in_package" name="custom_name_of_the_node" />
    
    </launch>
    

Running the launch file

roslaunch package_name launchfile_name.launch

if roscore is not running at this stage, roslaunch will detect it and start it automatically.