diff --git a/rosbag2_transport/src/rosbag2_transport/recorder.cpp b/rosbag2_transport/src/rosbag2_transport/recorder.cpp index acc9b3d45..ad34185a3 100644 --- a/rosbag2_transport/src/rosbag2_transport/recorder.cpp +++ b/rosbag2_transport/src/rosbag2_transport/recorder.cpp @@ -229,7 +229,8 @@ void Recorder::warn_if_new_qos_for_subscribed_topic(const std::string & topic_na // Already warned about this topic return; } - const auto & used_profile = existing_subscription->second->qos_profile().get_rmw_qos_profile(); + const auto actual_qos = existing_subscription->second->get_actual_qos(); + const auto & used_profile = actual_qos.get_rmw_qos_profile(); auto publishers_info = node_->get_publishers_info_by_topic(topic_name); for (const auto & info : publishers_info) { auto new_profile = info.qos_profile().get_rmw_qos_profile();