Open
Description
Feature request
Context: #1106 test_subscription.cpp
testing rcl_take_sequence
has an arbitrary sleep for 500 ms to wait for at least 3 messages to become ready. It cant just wait for the subscription itself to be ready because that only means at least one message is ready.
Feature description
The feature request is an api that returns how many messages are ready to be taken. Thsi of course can't be more than the history size QoS setting.
rcl_ret_t rcl_how_many_messages_ready(rcl_subscription_t sub, size_t * num);
Implementation considerations
This likely needs a new rmw API and RMW implementation support.