diff --git a/depth_image_proc/src/disparity.cpp b/depth_image_proc/src/disparity.cpp index 9e1c18329..3267bcc7c 100644 --- a/depth_image_proc/src/disparity.cpp +++ b/depth_image_proc/src/disparity.cpp @@ -95,7 +95,8 @@ DisparityNode::DisparityNode(const rclcpp::NodeOptions & options) delta_d_ = this->declare_parameter("delta_d", 0.125); // Synchronize inputs. Topic subscriptions happen on demand in the connection callback. - sync_ = std::make_shared(sub_depth_image_, sub_info_, queue_size); + sync_ = std::make_shared(queue_size); + sync_->connectInput(sub_depth_image_, sub_info_); sync_->registerCallback( std::bind( &DisparityNode::depthCb, this, std::placeholders::_1, std::placeholders::_2));