From a9392c9d1c8025d2683b08cb0a71c50163c267b8 Mon Sep 17 00:00:00 2001 From: kminoda Date: Wed, 14 Feb 2024 21:12:01 +0900 Subject: [PATCH] fix(image_projection_based_fusion): fix bug Signed-off-by: kminoda --- perception/image_projection_based_fusion/src/fusion_node.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/perception/image_projection_based_fusion/src/fusion_node.cpp b/perception/image_projection_based_fusion/src/fusion_node.cpp index 76dc50980a926..4ce3acf00eb71 100644 --- a/perception/image_projection_based_fusion/src/fusion_node.cpp +++ b/perception/image_projection_based_fusion/src/fusion_node.cpp @@ -167,7 +167,6 @@ void FusionNode::subCallback(const typename Msg::ConstSharedPtr timer_->cancel(); postprocess(*(cached_msg_.second)); publish(*(cached_msg_.second)); - cached_msg_.second = nullptr; std::fill(is_fused_.begin(), is_fused_.end(), false); // add processing time for debug @@ -187,6 +186,8 @@ void FusionNode::subCallback(const typename Msg::ConstSharedPtr "debug/pipeline_latency_ms", pipeline_latency_ms); processing_time_ms = 0; } + + cached_msg_.second = nullptr; } std::lock_guard lock(mutex_cached_msgs_);