We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0fb23a6 commit 39729b2Copy full SHA for 39729b2
perception/multi_object_tracker/src/multi_object_tracker_core.cpp
@@ -437,9 +437,9 @@ void MultiObjectTracker::sanitizeTracker(
437
}
438
439
if (delete_candidate_tracker) {
440
- /* erase only when prioritized one has a measurement or the other one doesn't */
441
- if (sorted_list_tracker[i]->getNoMeasurementCount() <= 0 or
442
- sorted_list_tracker[j]->getNoMeasurementCount() > 0) {
+ /* erase only when prioritized one has later(or equal time) meas than the other's */
+ if (sorted_list_tracker[i]->getElapsedTimeFromLastUpdate(time) <=
+ sorted_list_tracker[j]->getElapsedTimeFromLastUpdate(time)) {
443
// Remove from original list_tracker
444
list_tracker.remove(sorted_list_tracker[j]);
445
// Remove from sorted list
0 commit comments