Skip to content

Commit 243d0fb

Browse files
KazutoMurasejihoonl
authored andcommitted
lax rule for topic name (#77)
1 parent 4d58229 commit 243d0fb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/image_streamer.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ void ImageTransportImageStreamer::start()
2828
ros::master::getTopics(available_topics);
2929
inactive_ = true;
3030
for (size_t it = 0; it<available_topics.size(); it++){
31-
if(available_topics[it].name == topic_){
31+
std::string available_topic_name = available_topics[it].name;
32+
if(available_topic_name == topic_ || (available_topic_name.find("/") == 0 &&
33+
available_topic_name.substr(1) == topic_)) {
3234
inactive_ = false;
3335
}
3436
}

0 commit comments

Comments
 (0)