Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for API that returns how many messages are ready for a subscription #1109

Open
sloretz opened this issue Oct 12, 2023 · 1 comment
Open
Labels

Comments

@sloretz
Copy link
Contributor

sloretz commented Oct 12, 2023

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.

@fujitatomoya
Copy link
Collaborator

+1 👍 it would be useful if we have something like rcl_peek_messages without taking it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants