Skip to content

Commit 004b205

Browse files
In setuptools packages, install everything in launch directory (backport #5156) (#5172)
Signed-off-by: Emerson Knapp <[email protected]> Signed-off-by: Emerson Knapp <[email protected]> Co-authored-by: Christophe Bedard <[email protected]> (cherry picked from commit d002d60) Co-authored-by: Christophe Bedard <[email protected]>
1 parent caff230 commit 004b205

7 files changed

+9
-9
lines changed

source/How-To-Guides/Developing-a-ROS-2-Package.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ and a ``setup.py`` file that looks like:
119119
# Include our package.xml file
120120
(os.path.join('share', package_name), ['package.xml']),
121121
# Include all launch files.
122-
(os.path.join('share', package_name, 'launch'), glob(os.path.join('launch', '*.launch.py'))),
122+
(os.path.join('share', package_name, 'launch'), glob('launch/*')),
123123
],
124124
# This is important as well
125125
install_requires=['setuptools'],

source/Tutorials/Beginner-Client-Libraries/Using-Parameters-In-A-Class-Python.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ Add the ``import`` statements to the top of the file, and the other new statemen
365365
# ...
366366
data_files=[
367367
# ...
368-
(os.path.join('share', package_name), glob('launch/*launch.[pxy][yma]*')),
368+
(os.path.join('share', package_name, 'launch'), glob('launch/*')),
369369
]
370370
)
371371

source/Tutorials/Intermediate/Launch/Launch-system.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Make sure to create a ``launch`` directory at the top-level of the package you c
115115
data_files=[
116116
# ... Other data files
117117
# Include all launch files.
118-
(os.path.join('share', package_name, 'launch'), glob(os.path.join('launch', '*launch.[pxy][yma]*')))
118+
(os.path.join('share', package_name, 'launch'), glob('launch/*'))
119119
]
120120
)
121121

source/Tutorials/Intermediate/Launch/Using-ROS2-Launch-For-Large-Projects.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -494,11 +494,11 @@ The ``data_files`` field should now look like this:
494494
data_files=[
495495
...
496496
(os.path.join('share', package_name, 'launch'),
497-
glob(os.path.join('launch', '*.launch.py'))),
497+
glob('launch/*')),
498498
(os.path.join('share', package_name, 'config'),
499-
glob(os.path.join('config', '*.yaml'))),
499+
glob('config/*.yaml')),
500500
(os.path.join('share', package_name, 'rviz'),
501-
glob(os.path.join('config', '*.rviz'))),
501+
glob('config/*.rviz')),
502502
],
503503
504504
2 Build and run

source/Tutorials/Intermediate/Launch/Using-Substitutions.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Finally, make sure to install the launch files:
103103
data_files=[
104104
# ... Other data files
105105
# Include all launch files.
106-
(os.path.join('share', package_name, 'launch'), glob(os.path.join('launch', '*launch.[pxy][yma]*')))
106+
(os.path.join('share', package_name, 'launch'), glob('launch/*'))
107107
]
108108
)
109109

source/Tutorials/Intermediate/Tf2/Writing-A-Tf2-Broadcaster-Py.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ The ``data_files`` field should now look like this:
334334
335335
data_files=[
336336
...
337-
(os.path.join('share', package_name, 'launch'), glob(os.path.join('launch', '*launch.[pxy][yma]*'))),
337+
(os.path.join('share', package_name, 'launch'), glob('launch/*')),
338338
],
339339
340340
Also add the appropriate imports at the top of the file:

source/Tutorials/Intermediate/URDF/Using-URDF-with-Robot-State-Publisher-py.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ Edit the ``second_ros2_ws/src/urdf_tutorial_r2d2/setup.py`` file as follows:
266266
267267
data_files=[
268268
...
269-
(os.path.join('share', package_name, 'launch'), glob(os.path.join('launch', '*launch.[pxy][yma]*'))),
269+
(os.path.join('share', package_name, 'launch'), glob('launch/*')),
270270
(os.path.join('share', package_name), glob('urdf/*')),
271271
],
272272

0 commit comments

Comments
 (0)