Skip to content

Commit a2ac2c7

Browse files
Update rclcpp section in Lyrical release with disable_callbacks() API (#6490) (#6494)
- Introduced disable_callbacks() and enable_callbacks() APIs to manage subscription lifecycle effectively. (cherry picked from commit acc1cb0) Signed-off-by: Michael Orlov <morlovmr@gmail.com> Co-authored-by: Michael Orlov <morlovmr@gmail.com>
1 parent 199284f commit a2ac2c7

1 file changed

Lines changed: 27 additions & 6 deletions

File tree

source/Releases/Release-Lyrical-Luth.rst

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,34 @@ See https://github.com/ros2/rcl/issues/1178, https://github.com/ros2/rcl/pull/12
161161

162162
``rclcpp``
163163
^^^^^^^^^^
164-
Added new `Callback Group Events Executor <https://github.com/ros2/rclcpp/pull/3097>`__.
165-
Like its predecessor the experimental ``EventsExecutor``, the ``EventsCBGExecutor`` uses an events queue to process ready entities.
166-
Builds on the experimental ``EventsExecutor`` by adding support for multiple sources of ROS time and multiple threads.
167-
Compared to the Single and Multithreaded Executors, the ``EventsCBGExecutor`` exhibits around 10 to 15% less CPU usage.
168-
Note: The experimental ``EventsExecutor`` is now deprecated. For similar performance, use the ``EventsCBGExecutor`` with one thread.
169164

170-
`Unified component container interface <https://github.com/ros2/rclcpp/pull/3134>`__ - ``component_container`` is now the single entrypoint for launching both regular and isolated component containers with all types of executors.
165+
* Added new `Callback Group Events Executor <https://github.com/ros2/rclcpp/pull/3097>`__.
166+
Like its predecessor the experimental ``EventsExecutor``, the ``EventsCBGExecutor`` uses
167+
an events queue to process ready entities.
168+
Builds on the experimental ``EventsExecutor`` by adding support for multiple sources of
169+
ROS time and multiple threads.
170+
Compared to the Single and Multithreaded Executors, the ``EventsCBGExecutor`` exhibits
171+
around 10 to 15% less CPU usage.
172+
Note: The experimental ``EventsExecutor`` is now deprecated. For similar performance, use
173+
the ``EventsCBGExecutor`` with one thread.
174+
175+
* `Unified component container interface <https://github.com/ros2/rclcpp/pull/3134>`__ -
176+
``component_container`` is now the single entrypoint for launching both regular and
177+
isolated component containers with all types of executors.
178+
179+
* Added ``disable_callbacks()`` and ``enable_callbacks()`` APIs to ``SubscriptionBase``.
180+
By design the subscription itself is a shared pointer and its callbacks are propagated to
181+
the executor, making it difficult to manage subscription lifecycle from the application
182+
side.
183+
When a subscription is deleted at the application layer, it may still be referenced by
184+
the node and executor, causing callbacks to be invoked unexpectedly.
185+
This can lead to undefined behavior when the callback accesses resources that have been
186+
cleaned up.
187+
The new APIs allow users to disable subscription callbacks at runtime without destroying
188+
the subscription, preventing unexpected callback invocations.
189+
190+
See `ros2/rclcpp#2984 <https://github.com/ros2/rclcpp/issues/2984>`__ and
191+
`ros2/rclcpp#2985 <https://github.com/ros2/rclcpp/pull/2985>`__ for more details.
171192

172193
``rosbag2``
173194
^^^^^^^^^^^

0 commit comments

Comments
 (0)