rclpy.waitable module
- class rclpy.waitable.NumberOfEntities(num_subs: int = 0, num_gcs: int = 0, num_timers: int = 0, num_clients: int = 0, num_services: int = 0, num_events: int = 0)
Bases:
object
- num_clients
- num_events
- num_guard_conditions
- num_services
- num_subscriptions
- num_timers
- class rclpy.waitable.Waitable(callback_group: CallbackGroup)
Bases:
Generic
[T
]Add something to a wait set and execute it.
This class wraps a collection of entities which can be added to a wait set.
- add_to_wait_set(wait_set: rpyutils.import_c_library.WaitSet) None
Add entities to wait set.
- async execute(taken_data: T) None
Execute work after data has been taken from a ready wait set.
- get_num_entities() NumberOfEntities
Return number of each type of entity used.
- is_ready(wait_set: rpyutils.import_c_library.WaitSet) bool
Return True if entities are ready in the wait set.
- take_data() T
Take stuff from lower level so the wait set doesn’t immediately wake again.