Skip to content

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

@mrawding

Description

@mrawding

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.

#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions