We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c8afe97 commit 2433ef7Copy full SHA for 2433ef7
perception/multi_object_tracker/src/multi_object_tracker_core.cpp
@@ -221,8 +221,9 @@ void MultiObjectTracker::onTrigger()
221
} else {
222
// Publish if the next publish time is close
223
const double minimum_publish_interval = publisher_period_ * 0.70; // 70% of the period
224
- if ((current_time - last_published_time_).seconds() > minimum_publish_interval) {
225
- checkAndPublish(current_time);
+ const rclcpp::Time publish_time = this->now();
+ if ((publish_time - last_published_time_).seconds() > minimum_publish_interval) {
226
+ checkAndPublish(publish_time);
227
}
228
229
0 commit comments