Skip to content

Commit f3aad80

Browse files
address review comments.
Signed-off-by: Tomoya Fujita <[email protected]> Co-authored-by: Christophe Bedard <[email protected]>
1 parent 965d922 commit f3aad80

File tree

3 files changed

+21
-18
lines changed

3 files changed

+21
-18
lines changed

source/Concepts/Intermediate/About-Composition.rst

+9-10
Original file line numberDiff line numberDiff line change
@@ -33,29 +33,28 @@ By making the process layout a deploy-time decision the user can choose between:
3333

3434
Additionally ``ros2 launch`` can be used to automate these actions through specialized launch actions.
3535

36-
Component container
36+
.. _ComponentContainerTypes:
37+
38+
Component Container
3739
-------------------
3840

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+
A component container is a host process that allows you to load and manage multiple components at runtime within the same process space.
4142

42-
As of now, these are generic component container types available.
43+
As of now, the following generic component container types are available:
4344

4445
* `component_container <https://github.com/ros2/rclcpp/blob/{REPOS_FILE_BRANCH}/rclcpp_components/src/component_container.cpp>`__
4546

46-
* The most generic component container that uses a single ``SingleThreadedExecutor`` to execute all components including component container itself.
47+
* The most generic component container that uses a single ``SingleThreadedExecutor`` to execute all components.
4748

4849
* `component_container_mt <https://github.com/ros2/rclcpp/blob/{REPOS_FILE_BRANCH}/rclcpp_components/src/component_container_mt.cpp>`__
4950

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``.
51+
* Component container that uses a single ``MultiThreadedExecutor`` to execute the components.
5252

5353
* `component_container_isolated <https://github.com/ros2/rclcpp/blob/{REPOS_FILE_BRANCH}/rclcpp_components/src/component_container_isolated.cpp>`__
5454

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``.
55+
* Component container that uses a dedicated executor for each component: either ``SingleThreadedExecutor`` (default) or ``MultiThreadedExecutor``.
5756

58-
See more details for :doc:`Types of Executors <../../Concepts/Intermediate/About-Executors>`.
57+
For more information about the types of executors, see the :ref:`TypesOfExecutors`.
5958

6059
Writing a Component
6160
-------------------

source/Concepts/Intermediate/About-Executors.rst

+2
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ The *wait set* is also used to detect when timers expire.
5959

6060
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.
6161

62+
.. _TypesOfExecutors:
63+
6264
Types of Executors
6365
------------------
6466

source/Tutorials/Intermediate/Composition.rst

+10-8
Original file line numberDiff line numberDiff line change
@@ -210,29 +210,31 @@ Advanced Topics
210210

211211
Now that we have seen the basic operation of components, we can discuss a few more advanced topics.
212212

213-
Component container types
213+
Component Container Types
214214
^^^^^^^^^^^^^^^^^^^^^^^^^
215215

216-
As introduced in :doc:`Component container <../../Concepts/Intermediate/About-Composition>`, there is a few component container types with options.
216+
As introduced in :ref:`ComponentContainerTypes`, there are a few component container types with different options.
217217
You can choose the most appropriate component container type for your requirement.
218218

219219
* ``component_container`` (No options / parameters available)
220220

221-
.. code-block:: bash
221+
.. code-block:: bash
222222
223-
ros2 run rclcpp_components component_container
223+
ros2 run rclcpp_components component_container
224224
225225
* ``component_container_mt`` with ``MultiThreadedExecutor`` composed of 4 threads.
226+
* ``thread_num`` parameter option is available to specify the number of threads in ``MultiThreadedExecutor``.
226227

227-
.. code-block:: bash
228+
.. code-block:: bash
228229
229-
ros2 run rclcpp_components component_container_mt --ros-args -p thread_num:=4
230+
ros2 run rclcpp_components component_container_mt --ros-args -p thread_num:=4
230231
231232
* ``component_container_isolated`` with ``MultiThreadedExecutor`` for each component.
233+
* ``--use_multi_threaded_executor`` argument specifies executor type used for each component to ``MultiThreadedExecutor``.
232234

233-
.. code-block:: bash
235+
.. code-block:: bash
234236
235-
ros2 run rclcpp_components component_container_isolated --use_multi_threaded_executor
237+
ros2 run rclcpp_components component_container_isolated --use_multi_threaded_executor
236238
237239
Unloading components
238240
^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)