-
Notifications
You must be signed in to change notification settings - Fork 522
Closed
Labels
Description
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.
void GenericPublisher::try_publish_loaned_msg(const rclcpp::SerializedMessage & message)
{
if (this->can_loan_messages()) {
rcl_borrow_loaned_message(.., loaned_msg);
rmw_deserialize(message.get_rcl_serialized_message(), .., loaned_msg);
rcl_publish_loaned_message(..., loaned_msg, null);
} else {
publish(message); // Call original publish()
}
}Any thoughts?
Reactions are currently unavailable