bitbots_main
bitbots_main copied to clipboard
Fix duplication of team data information in robot filter
Summary
Currently, the poses of the other robots from the team data are added to the robot filter, but they are not deduplicated. Instead, they stack up until a couple of hundred robots are present inside the filter. They are only removed after being in the filter for 10 seconds. This pr changes that, so the team data is only added before we publish the filter result. It does not influence the filter state and a lower timeout of 1 sec is applied, so we don't include team data of robots that have been removed.
Example
This image shows the 10-second trail from the team data of another robot. This should not happen. Instead, it should be a singular point.
This image also shows the team data of a robot that thought it was playing, but it was taken out and not localized. We should be careful with that are wrong team data might mess things up. So we should remember to turn them off if they are taken out.
I am not really sure how to properly test this. We might need a team data simulator.
We already talked about this in person, but I add it here for completion. The ball filter currently only includes the positions of the team mates via team com. It does not include the robots detected by the team mates. It also does not consider if we or the team mates are localized properly, as we don't have a good way of knowing if this is the case.