Skip to content

Commit

Permalink
Update documentation as per suggestions + release_notes
Browse files Browse the repository at this point in the history
  • Loading branch information
saikishor committed Dec 20, 2024
1 parent 250c02d commit 11b1da1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ hardware_interface
* With (`#1421 <https://github.com/ros-controls/ros2_control/pull/1421>`_) a key-value storage is added to InterfaceInfo. This allows to define extra params with per Command-/StateInterface in the ``.ros2_control.xacro`` file.
* With (`#1763 <https://github.com/ros-controls/ros2_control/pull/1763>`_) parsing for SDF published to ``robot_description`` topic is now also supported.
* With (`#1567 <https://github.com/ros-controls/ros2_control/pull/1567>`_) all the Hardware components now have a fully functional asynchronous functionality, by simply adding ``is_async`` tag to the ros2_control tag in the URDF. This will allow the hardware components to run in a separate thread, and the controller manager will be able to run the controllers in parallel with the hardware components.
* Add documentation for asynchronous hardware components (`#1961 <https://github.com/ros-controls/ros2_control/pull/1961>`_)

joint_limits
************
Expand Down
13 changes: 12 additions & 1 deletion hardware_interface/doc/asynchronous_components.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,20 @@ Running Hardware Components Asynchronously

The ``ros2_control`` framework allows to run hardware components asynchronously. This is useful when some of the hardware components need to run in a separate thread or executor. For example, a sensor takes longer to read data that affects the periodicity of the ``controller_manager`` control loop. In this case, the sensor can be run in a separate thread or executor to avoid blocking the control loop.

Parameters
-----------

The following parameters can be set in the ``ros2_control`` hardware configuration to run the hardware component asynchronously:

* ``is_async``: (optional) If set to ``true``, the hardware component will run asynchronously. Default is ``false``.
* ``thread_priority``: (optional) The priority of the thread that runs the hardware component. The priority is an integer value between 0 and 99. The default value is 50.

.. note::
The thread priority is only used when the hardware component is run asynchronously.
When the hardware component is run asynchronously, it uses the FIFO scheduling policy.

Examples
***********
---------

The following examples show how to use the different hardware interface types synchronously and asynchronously with ``ros2_control`` URDF.
They can be combined together within the different hardware component types (system, actuator, sensor) (:ref:`see detailed documentation <overview_hardware_components>`) as follows
Expand Down

0 comments on commit 11b1da1

Please sign in to comment.