ros-visualization / rqt_image_view

http://wiki.ros.org/rqt_image_view
25 stars 59 forks source link

Image view does not allow for non default image transport QOS. #54

Open mrawding opened 3 years ago

mrawding commented 3 years ago

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>, &amp;ImageView::callbackImage, <span class="pl-c1">this</span>, &amp;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.

quentingllmt commented 3 years ago

Friendly ping. When do you think to merge this PR ?