Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements robot placement strategies with dynamic field bounds, enabling robots to operate in custom field regions rather than being restricted to the full field.
Changes:
- Added
centerproperty toFieldBoundsclass for calculating geometric centers - Implemented
RobotPlacementStrategy(one robot) andTwoRobotPlacementStrategy(two robots) with support for custom field bounds - Added comprehensive tests for error handling in REAL mode and integration tests for robot placement behavior
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| utama_core/entities/game/field.py | Added center property to FieldBounds and Field classes for geometric center calculation |
| utama_core/strategy/examples/one_robot_placement_strategy.py | Updated to support dynamic field bounds via CalculateFieldCenter behavior |
| utama_core/strategy/examples/two_robot_placement.py | New strategy for coordinating two robots with turn-based movement in custom field bounds |
| utama_core/strategy/examples/init.py | Exported TwoRobotPlacementStrategy for external use |
| utama_core/tests/strategy_examples/test_placement_coords.py | Integration tests verifying robot placement with custom and default field bounds |
| utama_core/tests/strategy_runner/test_error_handling.py | Tests for REAL mode safety mechanisms and stop command behavior |
| utama_core/team_controller/src/controllers/real/real_robot_controller.py | Minor formatting change consolidating bytearray construction to single line |
| main.py | Updated example to demonstrate TwoRobotPlacementStrategy with custom bounds |
Comments suppressed due to low confidence (2)
utama_core/strategy/examples/one_robot_placement_strategy.py:95
- This assignment to 'bx' is unnecessary as it is redefined before this value is used.
bx, by = game.ball.p.x, game.ball.p.y
utama_core/strategy/examples/one_robot_placement_strategy.py:95
- This assignment to 'by' is unnecessary as it is redefined before this value is used.
bx, by = game.ball.p.x, game.ball.p.y
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.
Comments suppressed due to low confidence (2)
utama_core/strategy/examples/one_robot_placement_strategy.py:75
- This assignment to 'bx' is unnecessary as it is redefined before this value is used.
bx, by = game.ball.p.x, game.ball.p.y
utama_core/strategy/examples/one_robot_placement_strategy.py:75
- This assignment to 'by' is unnecessary as it is redefined before this value is used.
bx, by = game.ball.p.x, game.ball.p.y
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
energy-in-joles
approved these changes
Jan 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.