m-abr / FCPCodebase

FC Portugal Codebase
GNU General Public License v3.0
35 stars 7 forks source link

The number of the player who is currently dribbling #26

Closed Dionysus7777777 closed 1 month ago

Dionysus7777777 commented 1 month ago

Hello, we are trying to figure out how to obtain the number of the player who is currently dribbling. However, by "dribbling," we are not referring to the entire dribbling motion. Dribbling typically includes moving toward the ball and then executing the specific action of handling the ball. What we want to know is how to get the number of the player who is currently in the handling phase. Is this a simple question, or does it involve communication processing?

m-abr commented 1 month ago

The answer depends on the level of precision required in identifying the player handling the ball during the dribbling phase.

Precise Approach:

If you need to detect with high precision when a player is specifically dribbling the ball (or get the intention of the player or any other kind of information that is hard to detect visually), you will likely need to use communication. This would be more complex, as it requires precious communication cycles, but provides a much higher level of accuracy.

Approximation:

If an approximate solution is sufficient, you can infer that the player close to the ball is likely the one dribbling. Track the positions of all players and the ball. If a player's position is consistently near the ball and the ball is in motion, it's reasonable to assume that this player is handling the ball.

Ultimately, it depends on how critical it is for you to differentiate between "handling" the ball and just being close to it.

Dionysus7777777 commented 1 month ago

Thank you for your response. I previously used the approximation method, where we replaced with the nearest players, but the actual results were not ideal (the accuracy was low). Moving forward, we plan to achieve this through communication methods. Do you have any suggestions?

m-abr commented 1 month ago

If you're exploring the communication route, the following information may be useful:


Personally, I would recommend refining the approximation method for detecting the dribbler rather than altering the communication protocol. You might enhance your proximity-based logic by incorporating velocity and analyzing previous time steps. However, if you choose to pursue the communication approach, I hope the steps outlined above will be helpful.

Dionysus7777777 commented 1 month ago

Thank you very much for your reply. As always, your response is precise and helpful. We will try to achieve this goal through two approaches.