Skip to content

Commit b308385

Browse files
authored
Fixed transport name in DepthCloud plugin (#1134)
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
1 parent 02cff12 commit b308385

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

rviz_default_plugins/src/rviz_default_plugins/displays/depth_cloud/depth_cloud_display.cpp

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -200,15 +200,10 @@ void DepthCloudDisplay::setTopic(const QString & topic, const QString & datatype
200200
depth_transport_property_->setStdString("raw");
201201
depth_topic_property_->setString(topic);
202202
} else {
203-
int index = topic.lastIndexOf("/");
204-
if (index == -1) {
205-
return;
206-
}
207-
QString transport = topic.mid(index + 1);
208-
QString base_topic = topic.mid(0, index);
209-
210-
depth_transport_property_->setString(transport);
211-
depth_topic_property_->setString(base_topic);
203+
setStatus(
204+
rviz_common::properties::StatusProperty::Warn,
205+
"Message",
206+
"Expected topic type of 'sensor_msgs/msg/Image', saw topic type '" + datatype + "'");
212207
}
213208
}
214209

0 commit comments

Comments
 (0)