Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1d3d61d

Browse files
committedMar 12, 2025·
Try elapsed time
1 parent 4f9e9ee commit 1d3d61d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed
 

‎perception/multi_object_tracker/src/multi_object_tracker_core.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -507,9 +507,8 @@ void MultiObjectTracker::sanitizeTracker(
507507
}
508508

509509
if (delete_candidate_tracker) {
510-
/* erase only when prioritized one has a measurement or the other one doesn't */
511-
if (sorted_list_tracker[i]->getNoMeasurementCount() <= 0 or
512-
sorted_list_tracker[j]->getNoMeasurementCount() > 0) {
510+
/* erase only when prioritized one has later(or equal time) meas than the other one doesn't */
511+
if (sorted_list_tracker[i]->getElapsedTimeFromLastUpdate() <= sorted_list_tracker[j]->getElapsedTimeFromLastUpdate()) {
513512
// Remove from original list_tracker
514513
list_tracker.remove(sorted_list_tracker[j]);
515514
// Remove from sorted list

0 commit comments

Comments
 (0)
Please sign in to comment.