diff --git a/r2r/src/publishers.rs b/r2r/src/publishers.rs index cb3bd3b..25c45a3 100644 --- a/r2r/src/publishers.rs +++ b/r2r/src/publishers.rs @@ -38,6 +38,8 @@ unsafe impl Send for Publisher where T: WrappedTypesupport {} pub(crate) struct Publisher_ { handle: rcl_publisher_t, + topic_name: String, + qos_profile: QosProfile, // TODO use a mpsc to avoid the mutex? poll_inter_process_subscriber_channels: Mutex>>, @@ -155,6 +157,8 @@ pub fn create_publisher_helper( if result == RCL_RET_OK as i32 { Ok(Publisher_ { handle: publisher_handle, + topic_name: topic.to_string(), + qos_profile, poll_inter_process_subscriber_channels: Mutex::new(Vec::new()), }) } else {