Set past_detections_length to some low number, and add more detections than this. The detection age will not be set after being "added" when discarded.
Expected behavior
Even when discarded, the detection age should still be set after being added, because this affects the last_detection.
Seems like the above lines should always set the detection age. It should also probably assert that the age has not already been set / added to a tracker.
Screenshots or videos
N/A
Environment (please complete the following information):
Describe the bug
Age is not set on all newly added detections.
To Reproduce
Set
past_detections_length
to some low number, and add more detections than this. The detection age will not be set after being "added" when discarded.Expected behavior
Even when discarded, the detection age should still be set after being added, because this affects the
last_detection
.https://github.com/tryolabs/norfair/blob/009a1b171ab14336d79d7b7b02dfa5f45066c79e/norfair/tracker.py#L700-L715
Seems like the above lines should always set the detection age. It should also probably assert that the age has not already been set / added to a tracker.
Screenshots or videos N/A
Environment (please complete the following information):
Additional context N/A