From 4ea8da50115e159414d3cc8f897521abe8f819e3 Mon Sep 17 00:00:00 2001 From: Viktor Walter Date: Thu, 16 May 2024 13:09:11 +0200 Subject: [PATCH] Fix for the legacy HT4D implementation producing invalid initial messages --- src/blink_processor.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/blink_processor.cpp b/src/blink_processor.cpp index c3b9d0e..72a60cc 100755 --- a/src/blink_processor.cpp +++ b/src/blink_processor.cpp @@ -216,6 +216,7 @@ namespace uvdar{ // for extracting the received sequences from the AMI/4DHT struct BlinkData{ + bool valid = false; ros::Time last_sample_time; ros::Time last_sample_time_diagnostic; unsigned int sample_count = -1; @@ -573,6 +574,7 @@ namespace uvdar{ } blink_data_[img_index].last_sample_time = pts_msg->stamp; + blink_data_[img_index].valid = true; if (_debug_) { ROS_INFO_STREAM("[UVDARBlinkProcessor]: Received contours: " << pts_msg->points.size()); @@ -736,6 +738,11 @@ namespace uvdar{ } if(_use_4DHT_){ + + if (!(blink_data_[image_index].valid)){ + return; + } + uvdar_core::ImagePointsWithFloatStamped msg; if (_debug_){