fix(slam): rect gray topic sub logic

This commit is contained in:
TinyOh 2019-04-15 13:35:05 +08:00
parent 6dab54117d
commit 0c0c299c84

View File

@ -619,7 +619,8 @@ class ROSWrapperNodelet : public nodelet::Nodelet {
}
void publishOthers(const Stream &stream) {
if (getStreamSubscribers(stream) > 0 && !is_published_[stream]) {
if ((getStreamSubscribers(stream) > 0 && !is_published_[stream]) ||
mono_publishers_[stream].getNumSubscribers() > 0) {
api_->EnableStreamData(stream);
api_->SetStreamCallback(
stream, [this, stream](const api::StreamData &data) {