Skip to content

Commit dd34bc9

Browse files
Mr-Anyonewilliamckhapre-commit-ci-lite[bot]
authored
Useful Warning Message for No Ball on Field (#3437)
* added some stuff * wip * Update src/software/sensor_fusion/sensor_fusion.cpp * [pre-commit.ci lite] apply automatic fixes --------- Co-authored-by: William Ha <[email protected]> Co-authored-by: williamckha <[email protected]> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
1 parent 8c508a4 commit dd34bc9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/software/sensor_fusion/sensor_fusion.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ void SensorFusion::processSensorProto(const SensorProto &sensor_msg)
7878
}
7979
}
8080

81+
8182
void SensorFusion::updateWorld(const SSLProto::SSL_WrapperPacket &packet)
8283
{
8384
if (packet.has_geometry())
@@ -95,7 +96,15 @@ void SensorFusion::updateWorld(const SSLProto::SSL_WrapperPacket &packet)
9596
// Process the geometry again
9697
updateWorld(packet.geometry());
9798
}
99+
98100
updateWorld(packet.detection());
101+
102+
if (!ball && (packet.detection().robots_blue().size() != 0 ||
103+
packet.detection().robots_yellow().size() != 0))
104+
{
105+
LOG(WARNING)
106+
<< "There are robots on the field, but no ball. It is highly likely that sensor fusion has filtered the ball out!";
107+
}
99108
}
100109
}
101110

0 commit comments

Comments
 (0)