Skip to content

Commit

Permalink
Fixing ros-visualization#41 - using sensor data QoS profile with BEST…
Browse files Browse the repository at this point in the history
…_EFFORT
  • Loading branch information
karl-schulz committed Mar 8, 2022
1 parent 5844d95 commit 9b15dc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rqt_image_view/image_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,10 +313,10 @@ void ImageView::onTopicChanged(int index)

if (!topic.isEmpty())
{
image_transport::ImageTransport it(node_);
const image_transport::TransportHints hints(node_.get(), transport.toStdString());
try {
subscriber_ = it.subscribe(topic.toStdString(), 1, &ImageView::callbackImage, this, &hints);
subscriber_ = image_transport::create_subscription(node_.get(), topic.toStdString(), std::bind(&ImageView::callbackImage, this, std::placeholders::_1),
hints.getTransport(), rmw_qos_profile_sensor_data);
qDebug("ImageView::onTopicChanged() to topic '%s' with transport '%s'", topic.toStdString().c_str(), subscriber_.getTransport().c_str());
} catch (image_transport::TransportLoadException& e) {
QMessageBox::warning(widget_, tr("Loading image transport plugin failed"), e.what());
Expand Down

0 comments on commit 9b15dc8

Please sign in to comment.