Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions source/Tutorials/Intermediate/Launch/Creating-Launch-Files.rst
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,17 @@ In other words, ``turtlesim2`` will mimic ``turtlesim1``'s movements.

3 ros2 launch
^^^^^^^^^^^^^
To include your launch file in the build, you must instruct `setup.py` to copy it. When you run `colcon build` the .xml will be copied to the `share` dir.
Edit `setup.py` and add your launch file to the `data_files` variable:

.. code-block:: python

# excerpt from setup.py
data_files=[
# ...
('share/' + package_name, ['package.xml', 'launch/turtlesim_mimic_launch.xml']), # add your launch file here
# ... ]


To run the launch file created above, enter into the directory you created earlier and run the following command:

Expand Down
Loading