-
Notifications
You must be signed in to change notification settings - Fork 418
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
Support loaned message for serialized data #1837
Comments
@ivanpauno @wjwwood @jacobperron this is |
I agree with the approach you are taking. I think that this new interface would be very useful, and it's good to put it in |
@emersonknapp thanks for the comment.
agree 👍 |
@ivanpauno @wjwwood friendly ping, what would you think about this? |
@ivanpauno @wjwwood @jacobperron friendly ping. |
IMO, I would just throw an error if the publisher doesn't support loaned messages. Otherwise, it's not clear exactly what the call will do unless the user calls if (publisher->can_loan_messages()) {
publisher->publish_loaned_message(message);
} else {
publisher->publish(message);
} It just seems more clear from the outside what is happening compared with having the |
I agree with @jacobperron, have it throw and let callers do the try if they want. |
rosbag2 sends serialized data by rclcpp::GenericPublisher.
Now there is no interface to use loaned message for serialized data (DDS not support it).
In order to use current loaned message implementation, whether we can add new interface to rclcpp::GenericPublisher ?
e.g.
Any thoughts?
The text was updated successfully, but these errors were encountered: