Skip to content

Implement no-op on IPC subscription#38

Merged
irobot-ros merged 6 commits intoirobot-ros:irobot/add-events-executorfrom
mauropasse:mauro/clean-events-executor
Feb 8, 2021
Merged

Implement no-op on IPC subscription#38
irobot-ros merged 6 commits intoirobot-ros:irobot/add-events-executorfrom
mauropasse:mauro/clean-events-executor

Conversation

@mauropasse
Copy link
Copy Markdown
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

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
Copy Markdown
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
Copy Markdown
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