Skip to content

Commit

Permalink
Fixed transport name in DepthCloud plugin (#1134)
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
  • Loading branch information
ahcorde authored Feb 13, 2024
1 parent 02cff12 commit b308385
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,15 +200,10 @@ void DepthCloudDisplay::setTopic(const QString & topic, const QString & datatype
depth_transport_property_->setStdString("raw");
depth_topic_property_->setString(topic);
} else {
int index = topic.lastIndexOf("/");
if (index == -1) {
return;
}
QString transport = topic.mid(index + 1);
QString base_topic = topic.mid(0, index);

depth_transport_property_->setString(transport);
depth_topic_property_->setString(base_topic);
setStatus(
rviz_common::properties::StatusProperty::Warn,
"Message",
"Expected topic type of 'sensor_msgs/msg/Image', saw topic type '" + datatype + "'");
}
}

Expand Down

0 comments on commit b308385

Please sign in to comment.