Skip to content

Update Creating-Launch-Files.rst #5396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: humble
Choose a base branch
from
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