Feature/hsl gamecontroller migration#767
Conversation
f8147b9 to
8404c35
Compare
8404c35 to
785e5f9
Compare
b57d286 to
18757e0
Compare
cleWu03
left a comment
There was a problem hiding this comment.
All relevant changes should be included and correct
| 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) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
We don't have the ball_age right now. This should be adapted
7039086 to
5ec3d39
Compare
to `game_controller_hsl` as the new [Gamecontroller] only expectes an `(x, y)` coordinate. [Gamecontroller]: https://github.com/RoboCup-HumanoidSoccerLeague/GameController/
…in bodybehaviour too
…/lib/game_controller_hsl subrepo: subdir: "src/lib/game_controller_hsl" merged: "b92a26936" upstream: origin: "git@github.com:bit-bots/game_controller_hsl.git" branch: "rolling" commit: "b92a26936" git-subrepo: version: "0.4.9" origin: "https://github.com/ingydotnet/git-subrepo" commit: "ea10886"
so we don't have to fix cpp code and formatting rule changes
5ec3d39 to
65dfe24
Compare
as we will fix them in our fork `bit-bots/game_controller_hsl`
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
pixi run build