Skip to content

Jan17 robot placement#91

Merged
energy-in-joles merged 14 commits intomainfrom
Jan17_robot_placement
Jan 21, 2026
Merged

Jan17 robot placement#91
energy-in-joles merged 14 commits intomainfrom
Jan17_robot_placement

Conversation

@fred-huang122
Copy link
Copy Markdown
Collaborator

@fred-huang122 fred-huang122 commented Jan 20, 2026

  • One and Two robot placement strategies
  • added unit test for real runtime error handling
  • Dynamic Field bound for robot placement strategies
  • added centre property to field bounds
  • real testing bug fixes

Copilot AI review requested due to automatic review settings January 20, 2026 13:22
@fred-huang122 fred-huang122 requested review from energy-in-joles and removed request for Copilot January 20, 2026 13:25
Copilot AI review requested due to automatic review settings January 20, 2026 13:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 center property to FieldBounds class for calculating geometric centers
  • Implemented RobotPlacementStrategy (one robot) and TwoRobotPlacementStrategy (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

Copilot AI review requested due to automatic review settings January 20, 2026 20:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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

fred-huang122 and others added 2 commits January 20, 2026 22:26
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@energy-in-joles energy-in-joles merged commit 7b47a88 into main Jan 21, 2026
2 checks passed
@energy-in-joles energy-in-joles deleted the Jan17_robot_placement branch January 21, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants