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
* Component container with dedicated either ``SingleThreadedExecutor`` (default) or ``MultiThreadedExecutor`` executors for each component. (Component container is executed by ``SingleThreadedExecutor``)
53
+
* ``--use_multi_threaded_executor`` argument specifies executor type used for each component to ``MultiThreadedExecutor``.
54
+
55
+
See more details for :doc:`Types of Executors <../Concepts/About-Executors#types-of-executors>`.
Copy file name to clipboardExpand all lines: source/Tutorials/Intermediate/Composition.rst
+23
Original file line number
Diff line number
Diff line change
@@ -210,6 +210,29 @@ Advanced Topics
210
210
211
211
Now that we have seen the basic operation of components, we can discuss a few more advanced topics.
212
212
213
+
Component container types
214
+
^^^^^^^^^^^^^^^^^^^^^^^^^
215
+
216
+
As introduced in :doc:`Component container <../../Concepts/About-Composition#component-container>`, there is a few component container types with options.
217
+
You can choose the most appropriate component container type for your requirement.
218
+
219
+
* ``component_container`` (No options / parameters available)
220
+
221
+
.. code-block:: bash
222
+
223
+
ros2 run rclcpp_components component_container
224
+
225
+
* ``component_container_mt`` with ``MultiThreadedExecutor`` composed of 4 threads.
226
+
227
+
.. code-block:: bash
228
+
229
+
ros2 run rclcpp_components component_container_mt --ros-args -p thread_num:=4
230
+
231
+
* ``component_container_isolated`` with ``MultiThreadedExecutor`` for each component.
232
+
233
+
.. code-block:: bash
234
+
235
+
ros2 run rclcpp_components component_container_isolated --use_multi_threaded_executor
0 commit comments