From 062826f0570febefee7c7eec0c5c7f18faba6709 Mon Sep 17 00:00:00 2001 From: Taekjin LEE Date: Thu, 15 Aug 2024 15:22:16 +0900 Subject: [PATCH] fix: enable trigger publish when delay_compensation is false Signed-off-by: Taekjin LEE --- .../src/multi_object_tracker_node.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/perception/autoware_multi_object_tracker/src/multi_object_tracker_node.cpp b/perception/autoware_multi_object_tracker/src/multi_object_tracker_node.cpp index 89d8cbaeb3bd8..4b3240d81e68f 100644 --- a/perception/autoware_multi_object_tracker/src/multi_object_tracker_node.cpp +++ b/perception/autoware_multi_object_tracker/src/multi_object_tracker_node.cpp @@ -209,6 +209,12 @@ void MultiObjectTracker::onTrigger() const bool is_objects_ready = input_manager_->getObjects(current_time, objects_list); if (!is_objects_ready) return; onMessage(objects_list); + + // Publish without delay compensation + if (!publish_timer_) { + const auto latest_object_time = rclcpp::Time(objects_list.back().second.header.stamp); + checkAndPublish(latest_object_time); + } } void MultiObjectTracker::onTimer() @@ -222,7 +228,7 @@ void MultiObjectTracker::onTimer() onMessage(objects_list); } - // Publish + // Publish with delay compensation checkAndPublish(current_time); }