File tree Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,30 @@ By making the process layout a deploy-time decision the user can choose between:
3333
3434Additionally ``ros2 launch `` can be used to automate these actions through specialized launch actions.
3535
36+ Component container
37+ -------------------
38+
39+ Component container is a host process that allows you to load and manage multiple components at runtime within the same process space.
40+ This enables better performance and memory efficiency because it avoids inter-process communication overhead when nodes interact.
41+
42+ As of now, these are generic component container types available.
43+
44+ * `component_container <https://github.com/ros2/rclcpp/blob/{REPOS_FILE_BRANCH}/rclcpp_components/src/component_container.cpp >`__
45+
46+ * The most generic component container that uses a single ``SingleThreadedExecutor `` to execute all components including component container itself.
47+
48+ * `component_container_mt <https://github.com/ros2/rclcpp/blob/{REPOS_FILE_BRANCH}/rclcpp_components/src/component_container_mt.cpp >`__
49+
50+ * Component container that uses a single ``MultiThreadedExecutor `` to execute the components including component container itself.
51+ * ``thread_num `` parameter option is available to specify the number of threads in ``MultiThreadedExecutor ``.
52+
53+ * `component_container_isolated <https://github.com/ros2/rclcpp/blob/{REPOS_FILE_BRANCH}/rclcpp_components/src/component_container_isolated.cpp >`__
54+
55+ * Component container with dedicated either ``SingleThreadedExecutor `` (default) or ``MultiThreadedExecutor `` executors for each component. (Component container is executed by ``SingleThreadedExecutor ``)
56+ * ``--use_multi_threaded_executor `` argument specifies executor type used for each component to ``MultiThreadedExecutor ``.
57+
58+ See more details for :doc: `Types of Executors <../../Concepts/Intermediate/About-Executors >`.
59+
3660Writing a Component
3761-------------------
3862
Original file line number Diff line number Diff line change @@ -210,6 +210,29 @@ Advanced Topics
210210
211211Now that we have seen the basic operation of components, we can discuss a few more advanced topics.
212212
213+ Component container types
214+ ^^^^^^^^^^^^^^^^^^^^^^^^^
215+
216+ As introduced in :doc: `Component container <../../Concepts/Intermediate/About-Composition >`, 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
213236
214237 Unloading components
215238^^^^^^^^^^^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments