File tree 3 files changed +53
-0
lines changed
3 files changed +53
-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:
33
33
34
34
Additionally ``ros2 launch `` can be used to automate these actions through specialized launch actions.
35
35
36
+ .. _ComponentContainer :
37
+
38
+ Component Container
39
+ -------------------
40
+
41
+ A component container is a host process that allows you to load and manage multiple components at runtime within the same process space.
42
+
43
+ As of now, the following generic component container types are available:
44
+
45
+ * `component_container <https://github.com/ros2/rclcpp/blob/{REPOS_FILE_BRANCH}/rclcpp_components/src/component_container.cpp >`__
46
+
47
+ * The most generic component container that uses a single ``SingleThreadedExecutor `` to execute all components.
48
+
49
+ * `component_container_mt <https://github.com/ros2/rclcpp/blob/{REPOS_FILE_BRANCH}/rclcpp_components/src/component_container_mt.cpp >`__
50
+
51
+ * Component container that uses a single ``MultiThreadedExecutor `` to execute the components.
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 that uses a dedicated executor for each component: either ``SingleThreadedExecutor `` (default) or ``MultiThreadedExecutor ``.
56
+
57
+ For more information about the types of executors, see the :ref: `TypesOfExecutors `.
58
+ For more information about the options of each component container, see :ref: `ComponentContainerTypes ` in the composition tutorial.
59
+
36
60
Writing a Component
37
61
-------------------
38
62
Original file line number Diff line number Diff line change @@ -59,6 +59,8 @@ The *wait set* is also used to detect when timers expire.
59
59
60
60
The Single-Threaded Executor is also used by the container process for :doc: `components <./About-Composition >`, i.e. in all cases where nodes are created and executed without an explicit main function.
61
61
62
+ .. _TypesOfExecutors :
63
+
62
64
Types of Executors
63
65
------------------
64
66
Original file line number Diff line number Diff line change @@ -210,6 +210,33 @@ 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
+ .. _ComponentContainerTypes :
214
+
215
+ Component container types
216
+ ^^^^^^^^^^^^^^^^^^^^^^^^^
217
+
218
+ As introduced in :ref: `ComponentContainer `, there are a few component container types with different options.
219
+ You can choose the most appropriate component container type for your requirement.
220
+
221
+ * ``component_container `` (No options / parameters available)
222
+
223
+ .. code-block :: bash
224
+
225
+ ros2 run rclcpp_components component_container
226
+
227
+ * ``component_container_mt `` with ``MultiThreadedExecutor `` composed of 4 threads.
228
+ * ``thread_num `` parameter option is available to specify the number of threads in ``MultiThreadedExecutor ``.
229
+
230
+ .. code-block :: bash
231
+
232
+ ros2 run rclcpp_components component_container_mt --ros-args -p thread_num:=4
233
+
234
+ * ``component_container_isolated `` with ``MultiThreadedExecutor `` for each component.
235
+ * ``--use_multi_threaded_executor `` argument specifies executor type used for each component to ``MultiThreadedExecutor ``.
236
+
237
+ .. code-block :: bash
238
+
239
+ ros2 run rclcpp_components component_container_isolated --use_multi_threaded_executor
213
240
214
241
Unloading components
215
242
^^^^^^^^^^^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments