2Partial stand-in for `rclpy.callback_groups` in ROS1, providing `CallbackGroup` classes.
4------------------------------------------------------------------------------
5This file is part of rosros - simple unified interface to ROS1 / ROS2.
6Released under the BSD License.
11------------------------------------------------------------------------------
13## @namespace rosros.rclify.callback_groups
19 The base class for a callback group.
21 A callback group controls when callbacks are allowed to be executed.
23 This
class should not be instantiated.
24 Instead, classes should extend it
and implement :meth:`can_execute`,
25 :meth:`beginning_execution`,
and :meth:`ending_execution`.
32 """Adds an entity to this group."""
33 self.
entities.add(weakref.ref(entity))
36 """Returns whether an entity has been added to this group."""
37 return weakref.ref(entity)
in self.
entities
40 """Returns True (ROS2 compatibility stand-in)."""
44 """Returns True (ROS2 compatibility stand-in)."""
48 """Does nothing (ROS2 compatibility stand-in)."""
51class MutuallyExclusiveCallbackGroup(CallbackGroup):
52 """API stand-in for ROS2 compatibility."""
54class ReentrantCallbackGroup(CallbackGroup):
55 """API stand-in for ROS2 compatibility."""
58__all__ = [
"CallbackGroup",
"MutuallyExclusiveCallbackGroup",
"ReentrantCallbackGroup"]
add_entity(self, entity)
Adds an entity to this group.
ending_execution(self, entity)
Does nothing (ROS2 compatibility stand-in).
has_entity(self, entity)
Returns whether an entity has been added to this group.
can_execute(self, entity)
Returns True (ROS2 compatibility stand-in).
beginning_execution(self, entity)
Returns True (ROS2 compatibility stand-in).