Can someone explain the design of waitable? Is there any document to describe its purpose, usage, trigger method, etc.?
Can you please post a link to the source code so everyone has some context?
I think you are referring to the Waitable classes in rclcpp and rclpy.
The earliest written record I know of is this issue: Add thing which adds things to wait set · Issue #588 · ros2/rclcpp · GitHub
Basically, there was a need for the concept of a “waitable” born out of ROS Actions. It provides a general way to add ROS entities (like actions) to the rcl
wait set. E.g. Subscriptions, timers, and services could directly implement the waitable interface (though this hasn’t been done because of the the non-trivial amount of work involved in refactoring the code).
There is no design document or other documentation besides the API docs, as far as I know.
Sorry, I’m referring this waitable
That’s what I want, thanks a lot!