But a workaround is to use image_transport::create_subscriber() and pass it default qos profile if one is not found for the publisher of that topic, or dynamically get it from the rclcpp/rcl interface. I have implemented this workaround here.
This is an important issue because some networks can not handle the increased traffic of a reliable QoS policy for image streaming. I have submitted a PR that dynamically configures the subscriber to the QoS policy advertised by the publisher.
The use of image transport for subscribing only allows rqt_image_view to display 1 type of QoSProfile, default.
https://github.com/ros-visualization/rqt_image_view/blob/foxy-devel/src/rqt_image_view/image_view.cpp#L316
image_transport::ImageTransport it(node_);
const image_transport::TransportHints hints(node_.get(), transport.toStdString());
subscriber_ = it.<span class="pl-c1">subscribe</span>(topic.<span class="pl-c1">toStdString</span>(), <span class="pl-c1">1</span>, &ImageView::callbackImage, <span class="pl-c1">this</span>, &hints);
Unfortunately,
ImageTransport->subscribe
automatically assigns the subscriber a default QoS implementation here.https://github.com/ros-perception/image_common/blob/ros2/image_transport/src/image_transport.cpp#L161
But a workaround is to use image_transport::create_subscriber() and pass it default qos profile if one is not found for the publisher of that topic, or dynamically get it from the rclcpp/rcl interface. I have implemented this workaround here.
https://github.com/ros-visualization/rqt_image_view/pull/53
This is an important issue because some networks can not handle the increased traffic of a reliable QoS policy for image streaming. I have submitted a PR that dynamically configures the subscriber to the QoS policy advertised by the publisher.