Skip to content

Commit

Permalink
fix(autoware_multi_object_tracker): enable trigger publish when delay…
Browse files Browse the repository at this point in the history
…_compensation is false (#8484)

fix: enable trigger publish when delay_compensation is false

Signed-off-by: Taekjin LEE <[email protected]>
  • Loading branch information
technolojin authored Aug 15, 2024
1 parent 3470824 commit c656530
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -222,7 +228,7 @@ void MultiObjectTracker::onTimer()
onMessage(objects_list);
}

// Publish
// Publish with delay compensation
checkAndPublish(current_time);
}

Expand Down

0 comments on commit c656530

Please sign in to comment.