ros-sports / soccer_interfaces

A set of packages which contain common soccer interface files
Apache License 2.0
8 stars 3 forks source link

MarkingEllipse being used incorrectly in example #12

Closed ijnek closed 2 years ago

ijnek commented 2 years ago

The MarkingEllipse is being used incorrectly for the centre circle in the example image obstacle_fieldboundary_markings_visualized.png

From memory, MarkingEllipse should be used for penalty spot detections. I think we agreed on detecting the centre circle as a list of MarkingSegments for the time being. Am I right? @Flova @jaagut

Flova commented 2 years ago

I don't think so. It is definitely a valid way to detect the center circle using a bounding box detector resulting in an ellipse. I also think that expressing the perspective projection of the center circle as an ellipse is the most accurate model. But I also get that teams have different approaches and most teams have no special way of handling the circle as an ellipse (even if some do), so I think that approximating it with MarkingSegments should also be a valid option. Penalty marks in the humanoid league are crosses, so the MarkingIntersection should be the most matching, but maybe some leagues use circles where an ellipse would be the way to go.

tl;dr I think both are valid and one is an approximation done by some teams and we should support both in the same way as we support a team that might detect lines as a pixel wise mask.

ijnek commented 2 years ago

I don't think we should use the same msg for a PenaltySpot and a CentreCircle. Do you agree with this point?

When I wrote MarkingEllipse, it was intended to be used for PenaltySpots, and not Centre Circles. I think the best way to resolve this would be to modify the example image to use MarkingSegments for the centre circle.

I am fine to add a Centre Circle msg later, if a team requests one. For now, I don't think we need one.

ps. I 100% agree with your point that we shouldn't force teams to use segments for detecting circles.

Flova commented 2 years ago

I don't know why we shouldn't. They should be on different topics, but the data structure is fundamentaly the same.

But never the less I agree that this image is missing the marking for the penalty spots where the said message works well.

ijnek commented 2 years ago

Closed by https://github.com/ros-sports/soccer_interfaces/pull/20