From 982e9b49ecc041e043f55e0add4adfb3b578382a Mon Sep 17 00:00:00 2001 From: chameau5050 Date: Tue, 3 Feb 2026 15:45:04 +0000 Subject: [PATCH] Fix lazy publishing --- depthai_bridge/include/depthai_bridge/BridgePublisher.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/depthai_bridge/include/depthai_bridge/BridgePublisher.hpp b/depthai_bridge/include/depthai_bridge/BridgePublisher.hpp index 5f6e5939e..372937c0c 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;