diff --git a/depthai_bridge/include/depthai_bridge/BridgePublisher.hpp b/depthai_bridge/include/depthai_bridge/BridgePublisher.hpp index 5f6e5939..372937c0 100644 --- a/depthai_bridge/include/depthai_bridge/BridgePublisher.hpp +++ b/depthai_bridge/include/depthai_bridge/BridgePublisher.hpp @@ -236,11 +236,11 @@ void BridgePublisher::publishHelper(std::shared_ptr inDa while(opMsgs.size()) { RosMsg currMsg = opMsgs.front(); - if(mainSubCount > 0) { + if(!_lazyPublisher || mainSubCount > 0) { _rosPublisher->publish(currMsg); } - if(infoSubCount > 0) { + if(!_lazyPublisher || infoSubCount > 0) { auto localCameraInfo = _camInfoManager->getCameraInfo(); localCameraInfo.header.stamp = currMsg.header.stamp; localCameraInfo.header.frame_id = currMsg.header.frame_id;