UBC-Thunderbots / Software

Robot Soccer Playing AI
http://www.ubcthunderbots.ca
GNU Lesser General Public License v3.0
47 stars 98 forks source link

Broken or misaligned breakbeams should not produce incorrect ball position in SensorFusion #3197

Closed itsarune closed 18 hours ago

itsarune commented 1 month ago

A problem that we had in Robocup last year was that our breakbeams would fault in a tripped state (i.e. they would say that we have a ball when we actually don't). Our sensor fusion code assumed that since we had the ball in our dribbler, the ball must be near our robot even if the camera data says we are somewhere else. This led to situations where we would think we had the ball on one side of the field while the enemy team had an open shot on net.

We want to solve this problem by making sensor_fusion (which is in charge of creating the World object that the rest of our AI depends on) more robust.

If we get a breakbeam tripped message from the robot and the camera data says that the ball is more than a X threshold away from the actual robot, we're going to rely on camera data instead. Relevant code: https://github.com/UBC-Thunderbots/Software/blob/1528173facd4b72d7fd4265e99da5ca9e26b1e3d/src/software/sensor_fusion/sensor_fusion.cpp#L253

Checklist:

itsarune commented 1 month ago

related ticket #3182