diff --git a/depthai_ros_driver/include/depthai_ros_driver/dai_nodes/nn/detection.hpp b/depthai_ros_driver/include/depthai_ros_driver/dai_nodes/nn/detection.hpp index 3986f6c4..f0798124 100644 --- a/depthai_ros_driver/include/depthai_ros_driver/dai_nodes/nn/detection.hpp +++ b/depthai_ros_driver/include/depthai_ros_driver/dai_nodes/nn/detection.hpp @@ -65,6 +65,9 @@ class Detection : public BaseNode { if(ph->getParam("i_disable_resize")) { width = ph->getOtherNodeParam(socketName, "i_preview_width"); height = ph->getOtherNodeParam(socketName, "i_preview_height"); + } else if(ph->getParam("i_desqueeze_output")) { + width = ph->getOtherNodeParam(socketName, "i_width"); + height = ph->getOtherNodeParam(socketName, "i_height"); } else { width = imageManip->initialConfig.getResizeConfig().width; height = imageManip->initialConfig.getResizeConfig().height; @@ -132,6 +135,7 @@ class Detection : public BaseNode { ptPub = setupOutput(pipeline, ptQName, [&](dai::Node::Input input) { detectionNode->passthrough.link(input); }); } }; + /** * @brief Closes the queues for the DetectionNetwork node and the passthrough. */ diff --git a/depthai_ros_driver/include/depthai_ros_driver/param_handlers/nn_param_handler.hpp b/depthai_ros_driver/include/depthai_ros_driver/param_handlers/nn_param_handler.hpp index 40656c1b..b22fb0de 100644 --- a/depthai_ros_driver/include/depthai_ros_driver/param_handlers/nn_param_handler.hpp +++ b/depthai_ros_driver/include/depthai_ros_driver/param_handlers/nn_param_handler.hpp @@ -40,6 +40,7 @@ class NNParamHandler : public BaseParamHandler { template void declareParams(std::shared_ptr nn, std::shared_ptr imageManip) { declareAndLogParam("i_disable_resize", false); + declareAndLogParam("i_desqueeze_output", false); declareAndLogParam("i_enable_passthrough", false); declareAndLogParam("i_enable_passthrough_depth", false); declareAndLogParam("i_get_base_device_timestamp", false); diff --git a/depthai_ros_driver/src/dai_nodes/nn/nn_wrapper.cpp b/depthai_ros_driver/src/dai_nodes/nn/nn_wrapper.cpp index b7d56f80..65a580e1 100644 --- a/depthai_ros_driver/src/dai_nodes/nn/nn_wrapper.cpp +++ b/depthai_ros_driver/src/dai_nodes/nn/nn_wrapper.cpp @@ -20,15 +20,15 @@ NNWrapper::NNWrapper(const std::string& daiNodeName, auto family = ph->getNNFamily(); switch(family) { case param_handlers::nn::NNFamily::Yolo: { - nnNode = std::make_unique>(getName(), getROSNode(), pipeline); + nnNode = std::make_unique>(getName(), getROSNode(), pipeline, socket); break; } case param_handlers::nn::NNFamily::Mobilenet: { - nnNode = std::make_unique>(getName(), getROSNode(), pipeline); + nnNode = std::make_unique>(getName(), getROSNode(), pipeline, socket); break; } case param_handlers::nn::NNFamily::Segmentation: { - nnNode = std::make_unique(getName(), getROSNode(), pipeline); + nnNode = std::make_unique(getName(), getROSNode(), pipeline, socket); break; } }