Skip to content

Feature/hsl gamecontroller migration#767

Merged
texhnolyze merged 14 commits intomainfrom
feature/hsl-gamecontroller-migration
Mar 12, 2026
Merged

Feature/hsl gamecontroller migration#767
texhnolyze merged 14 commits intomainfrom
feature/hsl-gamecontroller-migration

Conversation

@texhnolyze
Copy link
Copy Markdown
Contributor

@texhnolyze texhnolyze commented Mar 12, 2026

Summary

I've tried to extract, clean up and condense the game controller changes...

And there still is some stuff I'd like to improve ideally, before merging (i.e. remove TODOs, don't make HCM depend on behavior for game controller, move publishing of return data to central place and maybe create a full custom Message for the whole return object to the gamecontroller in https://github.com/bit-bots/game_controller_hsl reducing the number of pub/subs one needs).

We will just do the fixes/changes at a later stage, after the competition (see comments).

Proposed changes

Related issues

Checklist

  • Run pixi run build
  • Write documentation
  • Test on your machine
  • Test on the robot
  • Create issues for future work
  • Triage this PR and label it

@github-project-automation github-project-automation bot moved this to 🆕 New in Software Mar 12, 2026
@texhnolyze texhnolyze force-pushed the feature/hsl-gamecontroller-migration branch 2 times, most recently from f8147b9 to 8404c35 Compare March 12, 2026 01:30
@texhnolyze texhnolyze mentioned this pull request Mar 12, 2026
6 tasks
@texhnolyze texhnolyze force-pushed the feature/hsl-gamecontroller-migration branch from 8404c35 to 785e5f9 Compare March 12, 2026 01:59
@texhnolyze texhnolyze self-assigned this Mar 12, 2026
@texhnolyze texhnolyze moved this from 🆕 New to 🏗 In progress in Software Mar 12, 2026
@texhnolyze texhnolyze force-pushed the feature/hsl-gamecontroller-migration branch 2 times, most recently from b57d286 to 18757e0 Compare March 12, 2026 10:28
Copy link
Copy Markdown
Contributor

@cleWu03 cleWu03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All relevant changes should be included and correct

@github-project-automation github-project-automation bot moved this from 🏗 In progress to 👀 In review in Software Mar 12, 2026
self.free_kick_kickoff_team: Optional[bool] = None
self.game_controller_stop: bool = False
# publish stopped msg for hcm
self.stop_pub = node.create_publisher(Bool, "game_controller/stop_msg", 1)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is sent to the HCM. I think in the HCM we also subscribe to the Gamestate, so there we could handle it ourselves without needing an extra publisher.

FIRST --> @ChangeAction + action:positioning, @LookAtFieldFeatures, @AvoidBallActive, @GoToDefensePosition + mode:freekick_first
SECOND --> @ChangeAction + action:positioning, @LookAtFieldFeatures, @AvoidBallActive, @GoToDefensePosition + mode:freekick_second
THIRD --> @ChangeAction + action:positioning, @LookAtFieldFeatures, @AvoidBallActive, @GoToDefensePosition
YES --> $RankToBallNoGoalie
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We assume normal behavior in default situations, maybe this could be improved?

def perform(self, reevaluate=False):
# Check of the fallen detection is active
if not self.blackboard.is_stand_up_active:
self.publish_if_fallen(False)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently there is a RobotControlState where we could read the info if we are fallen from, not requiring extra logic here.


def create_publishers(self):
self.team_data_publisher = self.node.create_publisher(TeamData, self.topics["team_data_topic"], qos_profile=1)
self.game_controller_player_pose_publisher = self.node.create_publisher(
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of having multiple messages with different object I think it might make sense to adjust https://github.com/bit-bots/game_controller_hsl to take a single custom message according to RoboCupGameControlReturnData and collect all data for it in a single place.

self.ball_state_position = numpify(ball_measurement_map.point)
self.ball_state_covariance = covariance
# @TODO: actually give last ball time
self.last_ball_time = self.get_clock().now()
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have the ball_age right now. This should be adapted

@texhnolyze texhnolyze force-pushed the feature/hsl-gamecontroller-migration branch from 7039086 to 5ec3d39 Compare March 12, 2026 12:03
@texhnolyze texhnolyze marked this pull request as ready for review March 12, 2026 12:11
so we don't have to fix cpp code and formatting rule changes
@texhnolyze texhnolyze force-pushed the feature/hsl-gamecontroller-migration branch from 5ec3d39 to 65dfe24 Compare March 12, 2026 12:14
as we will fix them in our fork `bit-bots/game_controller_hsl`
@texhnolyze texhnolyze merged commit 329a031 into main Mar 12, 2026
2 checks passed
@texhnolyze texhnolyze deleted the feature/hsl-gamecontroller-migration branch March 12, 2026 12:38
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Software Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants