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

Implement no-op on IPC subscription #38

Conversation

mauropasse
Copy link
Collaborator

Now trying to take a message when there's any, provoques just an error to be logged, but the program continues.

In the following image, the output of a pub-sub where the subscription has depth=1 and the publisher publishes several messages before the subscription start spinning, so accumulates events in the queue but there's only one message in the buffer.

In this case there are 4 events in the queue when the subscription starts, so it takes the 1st message but the rest 3 are no-ops.

image

@@ -73,6 +73,7 @@ class RingBufferImplementation : public BufferImplementationBase<BufferT>
ring_buffer_[write_index_] = std::move(request);

if (is_full_()) {
RCLCPP_ERROR(rclcpp::get_logger("rclcpp"), "Ring buffer is full! Buffer capacity: %lu", capacity_);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This log is useful but can happen often, don't know if it's a good idea to have it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's useful for us, but not for standard users.
We could change it to debug, rather than error

@irobot-ros irobot-ros merged commit 89b07f6 into irobot-ros:irobot/add-events-executor Feb 8, 2021
@mauropasse mauropasse deleted the mauro/clean-events-executor branch February 11, 2021 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants