You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/Tutorials/Intermediate/Launch/Using-ROS2-Launch-For-Large-Projects.rst
+2-74Lines changed: 2 additions & 74 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,11 +39,7 @@ Simulation of multiple turtles in the turtle simulator can serve as a good examp
39
39
The turtle simulation consists of multiple turtle nodes, the world configuration, and the TF broadcaster and listener nodes.
40
40
Between all of the nodes, there are a large number of ROS parameters that affect the behavior and appearance of these nodes.
41
41
ROS 2 launch files allow us to start all nodes and set corresponding parameters in one place.
42
-
<<<<<<< HEAD
43
-
By the end of a tutorial, you will build the ``launch_turtlesim.launch.py`` launch file in the ``launch_tutorial`` package.
44
-
=======
45
42
By the end of a tutorial, you will build the ``launch_turtlesim_launch`` launch file in the ``launch_tutorial`` package.
46
-
>>>>>>> 536c723 (Add XML/YAML launch equivalents for large project tutorial (#6021))
47
43
This launch file will bring up different nodes responsible for the simulation of two turtlesim simulations, starting TF broadcasters and listener, loading parameters, and launching an RViz configuration.
48
44
In this tutorial, we'll go over this launch file and all related features used.
49
45
@@ -66,11 +62,7 @@ Even a change such as moving from a real robot to a simulated one can be done wi
66
62
67
63
We will now go over the top-level launch file structure that makes this possible.
68
64
Firstly, we will create a launch file that will call separate launch files.
69
-
<<<<<<< HEAD
70
-
To do this, let's create a ``launch_turtlesim.launch.py`` file in the ``/launch`` folder of our ``launch_tutorial`` package.
71
-
=======
72
65
To do this, let's create a ``launch_turtlesim_launch`` file in the ``/launch`` folder of our ``launch_tutorial`` package.
73
-
>>>>>>> 536c723 (Add XML/YAML launch equivalents for large project tutorial (#6021))
74
66
75
67
.. attention::
76
68
@@ -118,11 +110,7 @@ However, there are cases when some nodes or launch files have to be launched sep
118
110
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
119
111
120
112
We will begin by writing a launch file that will start our first turtlesim simulation.
121
-
<<<<<<< HEAD
122
-
First, create a new file called ``turtlesim_world_1.launch.py``.
123
-
=======
124
113
First, create a new file called ``turtlesim_world_1_launch``.
125
-
>>>>>>> 536c723 (Add XML/YAML launch equivalents for large project tutorial (#6021))
126
114
127
115
.. tabs::
128
116
@@ -153,11 +141,7 @@ This launch file starts the ``turtlesim_node`` node, which starts the turtlesim
153
141
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
154
142
155
143
In the second launch, we will start a second turtlesim simulation with a different configuration.
156
-
<<<<<<< HEAD
157
-
Now create a ``turtlesim_world_2.launch.py`` file.
158
-
=======
159
144
Now create a ``turtlesim_world_2_launch`` file.
160
-
>>>>>>> 536c723 (Add XML/YAML launch equivalents for large project tutorial (#6021))
161
145
162
146
.. tabs::
163
147
@@ -208,11 +192,7 @@ These nodes could have different namespaces or names but still have the same par
208
192
Defining separate YAML files that explicitly define namespaces and node names is not efficient.
209
193
A solution is to use wildcard characters, which act as substitutions for unknown characters in a text value, to apply parameters to several different nodes.
210
194
211
-
<<<<<<< HEAD
212
-
Now let's create a new ``turtlesim_world_3.launch.py`` file similar to ``turtlesim_world_2.launch.py`` to include one more ``turtlesim_node`` node in a new namespace ``turtlesim3``:
213
-
=======
214
195
Now let's create a new ``turtlesim_world_3_launch`` file similar to ``turtlesim_world_2_launch`` to include one more ``turtlesim_node`` node in a new namespace ``turtlesim3``:
215
-
>>>>>>> 536c723 (Add XML/YAML launch equivalents for large project tutorial (#6021))
216
196
217
197
.. tabs::
218
198
@@ -263,21 +243,13 @@ We will now update the ``turtlesim.yaml``, in the ``/config`` folder in the foll
263
243
background_g: 86
264
244
background_r: 150
265
245
266
-
<<<<<<< HEAD
267
-
Now include the ``turtlesim_world_3.launch.py`` launch description in our main launch file.
268
-
=======
269
246
Now include the ``turtlesim_world_3_launch`` launch description in our main launch file.
270
-
>>>>>>> 536c723 (Add XML/YAML launch equivalents for large project tutorial (#6021))
271
247
Using that configuration file in our launch descriptions will assign ``background_b``, ``background_g``, and ``background_r`` parameters to specified values in ``turtlesim3/sim`` and ``turtlesim2/sim`` nodes.
272
248
273
249
3 Namespaces
274
250
^^^^^^^^^^^^
275
251
276
-
<<<<<<< HEAD
277
-
As you may have noticed, we have defined the namespace for the turlesim world in the ``turtlesim_world_2.launch.py`` file.
278
-
=======
279
252
As you may have noticed, we have defined the namespace for the turlesim world in the ``turtlesim_world_2_launch`` file.
280
-
>>>>>>> 536c723 (Add XML/YAML launch equivalents for large project tutorial (#6021))
281
253
Unique namespaces allow the system to start two similar nodes without node name or topic name conflicts.
282
254
283
255
.. code-block:: Python
@@ -290,30 +262,11 @@ Every nested node will inherit that namespace automatically.
290
262
291
263
.. attention:: ``PushRosNamespace`` has to be the first action in the list for the following actions to apply the namespace.
292
264
293
-
<<<<<<< HEAD
294
-
To do that, firstly, we need to remove the ``namespace='turtlesim2'`` line from the ``turtlesim_world_2.launch.py`` file.
295
-
Afterwards, we need to update the ``launch_turtlesim.launch.py`` to change the ``IncludeLaunchDescription(... 'turtlesim_world_2.launch.py' ...)`` value to the following:
296
-
=======
297
265
To do that, firstly, we need to remove the ``namespace='turtlesim2'`` line from the ``turtlesim_world_2_launch`` file.
298
266
Afterwards, we need to update the ``launch_turtlesim_launch`` to change the include statement to the following:
299
-
>>>>>>> 536c723 (Add XML/YAML launch equivalents for large project tutorial (#6021))
0 commit comments