diff --git a/stereo_image_proc/src/stereo_image_proc/disparity_node.cpp b/stereo_image_proc/src/stereo_image_proc/disparity_node.cpp index dbebb5e3f..9316e14d5 100644 --- a/stereo_image_proc/src/stereo_image_proc/disparity_node.cpp +++ b/stereo_image_proc/src/stereo_image_proc/disparity_node.cpp @@ -327,11 +327,11 @@ DisparityNode::DisparityNode(const rclcpp::NodeOptions & options) sub_l_image_.subscribe( this, left_topic, hints.getTransport(), sensor_data_qos, sub_opts); sub_l_info_.subscribe(this, left_info_topic, - rclcpp::QoS(rclcpp::QoSInitialization::from_rmw(sensor_data_qos)), sub_opts); + sensor_data_qos.get_rmw_qos_profile(), sub_opts); sub_r_image_.subscribe( this, right_topic, hints.getTransport(), sensor_data_qos, sub_opts); sub_r_info_.subscribe(this, right_info_topic, - rclcpp::QoS(rclcpp::QoSInitialization::from_rmw(sensor_data_qos)), sub_opts); + sensor_data_qos.get_rmw_qos_profile(), sub_opts); } }; diff --git a/stereo_image_proc/src/stereo_image_proc/point_cloud_node.cpp b/stereo_image_proc/src/stereo_image_proc/point_cloud_node.cpp index 90a1e3e62..fa324d100 100644 --- a/stereo_image_proc/src/stereo_image_proc/point_cloud_node.cpp +++ b/stereo_image_proc/src/stereo_image_proc/point_cloud_node.cpp @@ -192,11 +192,11 @@ PointCloudNode::PointCloudNode(const rclcpp::NodeOptions & options) sub_l_image_.subscribe( this, left_topic, hints.getTransport(), sensor_data_qos, sub_opts); sub_l_info_.subscribe(this, left_info_topic, - rclcpp::QoS(rclcpp::QoSInitialization::from_rmw(sensor_data_qos)), sub_opts); + sensor_data_qos.get_rmw_qos_profile(), sub_opts); sub_r_info_.subscribe(this, right_topic, - rclcpp::QoS(rclcpp::QoSInitialization::from_rmw(sensor_data_qos)), sub_opts); + sensor_data_qos.get_rmw_qos_profile(), sub_opts); sub_disparity_.subscribe(this, disparity_topic, - rclcpp::QoS(rclcpp::QoSInitialization::from_rmw(sensor_data_qos)), sub_opts); + sensor_data_qos.get_rmw_qos_profile(), sub_opts); } }; pub_points2_ = create_publisher("points2", 1, pub_opts);