Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual referee update: Kicking team filtering #1647

Open
wants to merge 30 commits into
base: main
Choose a base branch
from

Conversation

ThagonDuarte
Copy link
Contributor

Why? What?

This PR expands and depends on #1646. It uses the detected free kick signals and uses them to filter the kicking team. In the case, we are not sent a kicking team, the filter either determines it by use of the last ball position, or uses the detected free kick signal. This is then propagated to the FilteredGameControllerState.

Fixes #1476

ToDo / Known Issues

  • Handle not knowing the kicking_team
  • Use detection to set kicking_team and propagate to other Naos.
  • Filter kicking_team to directly compute it in the SubStates CornerKick and GoalKick.
  • Implement bevyhavior simulator scenarios for
    • Check that all roles only perform passive Actions while kicking_team is not known yet (is None), i.e. that no NAO directly walks to the ball and tries to kick it.
    • Check that None as kicking_team is handled correctly
    • Check KickingTeamFilter works as intended

Ideas for Next Iterations (Not This PR)

  • Determine kicking_team directly by looking at the Penalty set in the same GameControllerMessage as the transition to the SubState PushingFreeKick.
  • Also use team_ball in KickingTeamFilter. Depends on Time to reach rework #1634

How to Test

  • In play, trigger the four free kicks CornerKick, GoalKick, KickIn, and PushingFreeKick.
    • Check that during GoalKick and CornerKick the correct kicking_team is produced by KickingTeamFilter and is correctly propagated to all nodes ready kicking_team.
  • Check that the detected kicking_team is propagated correctly to all nodes importing kicking_team.

Please also test where behavior had to be adapted to not knowing the kicking_team some of the time:

  • In ball_state_composer.rs a side_factor uses the kicking_team. What is its value for kicking_team == None`?
  • In stand.rs the kicking_team is read multiple times to determine the Half.
  • In localization.rs the kicking_team is used to modify_state().
  • In rule_obstacle_composer.rs the create_penalty_box() uses the kicking_team.
  • In search_suggestor.rs uses the kicking_team to determine the Half.
  • The PathDeserialize implementation of Option requires a default to be defined for the underlying type T. Here this means Team has to receive a default value. Is Opponent a reasonable choice for this?

@ThagonDuarte ThagonDuarte added rules:2025 Changes needed to comply to rule changes for the SPL 2025 Season. GO25 labels Feb 21, 2025
@ThagonDuarte ThagonDuarte force-pushed the kicking-team-filtering branch 2 times, most recently from 8fdb49b to f0ccbd8 Compare March 5, 2025 15:08
@ThagonDuarte ThagonDuarte force-pushed the kicking-team-filtering branch from f0ccbd8 to 85126fe Compare March 5, 2025 17:26
Readded removed functions for sending and
receiving detection messages
With the updated version of the game controller, the
`RoboCupGameControlData.h` now specifies a team number for
`kicking_team = None`. This is now parsed correctly into the
`GameControllerStateMessage`.
@ThagonDuarte ThagonDuarte force-pushed the kicking-team-filtering branch from 85126fe to e849086 Compare March 5, 2025 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GO25 rules:2025 Changes needed to comply to rule changes for the SPL 2025 Season.
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

Rule Changes: Visual Referee
1 participant