Skip to content

In setuptools packages, install everything in launch directory (backport #5156) #5172

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

Merged
merged 2 commits into from
Mar 25, 2025
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion source/How-To-Guides/Developing-a-ROS-2-Package.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ and a ``setup.py`` file that looks like:
# Include our package.xml file
(os.path.join('share', package_name), ['package.xml']),
# Include all launch files.
(os.path.join('share', package_name, 'launch'), glob(os.path.join('launch', '*.launch.py'))),
(os.path.join('share', package_name, 'launch'), glob('launch/*')),
],
# This is important as well
install_requires=['setuptools'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ Add the ``import`` statements to the top of the file, and the other new statemen
# ...
data_files=[
# ...
(os.path.join('share', package_name), glob('launch/*launch.[pxy][yma]*')),
(os.path.join('share', package_name, 'launch'), glob('launch/*')),
]
)

Expand Down
2 changes: 1 addition & 1 deletion source/Tutorials/Intermediate/Launch/Launch-system.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Make sure to create a ``launch`` directory at the top-level of the package you c
data_files=[
# ... Other data files
# Include all launch files.
(os.path.join('share', package_name, 'launch'), glob(os.path.join('launch', '*launch.[pxy][yma]*')))
(os.path.join('share', package_name, 'launch'), glob('launch/*'))
]
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -494,11 +494,11 @@ The ``data_files`` field should now look like this:
data_files=[
...
(os.path.join('share', package_name, 'launch'),
glob(os.path.join('launch', '*.launch.py'))),
glob('launch/*')),
(os.path.join('share', package_name, 'config'),
glob(os.path.join('config', '*.yaml'))),
glob('config/*.yaml')),
(os.path.join('share', package_name, 'rviz'),
glob(os.path.join('config', '*.rviz'))),
glob('config/*.rviz')),
],

2 Build and run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Finally, make sure to install the launch files:
data_files=[
# ... Other data files
# Include all launch files.
(os.path.join('share', package_name, 'launch'), glob(os.path.join('launch', '*launch.[pxy][yma]*')))
(os.path.join('share', package_name, 'launch'), glob('launch/*'))
]
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ The ``data_files`` field should now look like this:

data_files=[
...
(os.path.join('share', package_name, 'launch'), glob(os.path.join('launch', '*launch.[pxy][yma]*'))),
(os.path.join('share', package_name, 'launch'), glob('launch/*')),
],

Also add the appropriate imports at the top of the file:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ Edit the ``second_ros2_ws/src/urdf_tutorial_r2d2/setup.py`` file as follows:

data_files=[
...
(os.path.join('share', package_name, 'launch'), glob(os.path.join('launch', '*launch.[pxy][yma]*'))),
(os.path.join('share', package_name, 'launch'), glob('launch/*')),
(os.path.join('share', package_name), glob('urdf/*')),
],

Expand Down