Skip to content

Commit

Permalink
Update Launch-system.rst (#4068)
Browse files Browse the repository at this point in the history
* Update Launch-system.rst

added comments to the code.
I think the it is better if we tell beginner what's changed, especially the addition of
```
import os
from glob import glob
```
Otherwise, a beginner might not notice this and will take some time to figure out what's not working (happened to me).

Other part of documentation followed this. For example:
https://docs.ros.org/en/humble/Tutorials/Intermediate/Tf2/Writing-A-Tf2-Broadcaster-Py.html#update-setup-py

Signed-off-by: Muhammad Ashfaq <[email protected]>
Co-authored-by: Tomoya Fujita <[email protected]>
(cherry picked from commit 482dcd2)

# Conflicts:
#	source/Tutorials/Intermediate/Launch/Launch-system.rst
  • Loading branch information
ashfaq92 authored and clalancette committed Dec 20, 2023
1 parent be6bba9 commit a3a7776
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions source/Tutorials/Intermediate/Launch/Launch-system.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,14 @@ Make sure to create a ``launch`` directory at the top-level of the package you c
setup.py
test/
In order for colcon to find the launch files, we need to inform Python's setup tools of our launch files using the ``data_files`` parameter of ``setup``.

Inside our ``setup.py`` file:
To enable colcon to locate and utilize our launch files, we need to inform Python's setup tools of their presence.
To achieve this, open the ``setup.py`` file, add the necessary ``import`` statements at the top, and include the launch files into the ``data_files`` parameter of ``setup``:

.. code-block:: python
import os
from glob import glob
from setuptools import find_packages, setup
# Other imports ...
package_name = 'py_launch_example'
Expand Down

0 comments on commit a3a7776

Please sign in to comment.