We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4f9e9ee commit 1d3d61dCopy full SHA for 1d3d61d
perception/multi_object_tracker/src/multi_object_tracker_core.cpp
@@ -507,9 +507,8 @@ void MultiObjectTracker::sanitizeTracker(
507
}
508
509
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) {
+ /* erase only when prioritized one has later(or equal time) meas than the other one doesn't */
+ if (sorted_list_tracker[i]->getElapsedTimeFromLastUpdate() <= sorted_list_tracker[j]->getElapsedTimeFromLastUpdate()) {
513
// Remove from original list_tracker
514
list_tracker.remove(sorted_list_tracker[j]);
515
// Remove from sorted list
0 commit comments