Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR standardizes formation generation by changing get_formations to return formations in (right, left) order (instead of (left, right)), and updates relevant call sites/tests to match.
Changes:
- Flips
get_formationsreturn tuple order to(right, left). - Updates StrategyRunner/RSIM env initialization and strategy example usage to consume the new ordering.
- Updates GRSim/RSIM tests to align expected formations with the new ordering.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
utama_core/config/formations.py |
Changes get_formations return order (and also reorders parameters). |
utama_core/run/strategy_runner.py |
Updates sim loading to unpack (right_start, left_start) and pass correct counts. |
utama_core/rsoccer_simulator/src/ssl/envs/standard_ssl.py |
Updates fallback formation assignment to match (right, left) return ordering. |
utama_core/strategy/examples/startup_strategy.py |
Updates example strategy to unpack (right_formation, left_formation). |
utama_core/tests/strategy_runner/test_rsim_formations.py |
Updates RSIM formation test to match new ordering. |
utama_core/tests/strategy_runner/test_grsim_sim_setup.py |
Updates GRSim sim-setup test to match new ordering. |
Comments suppressed due to low confidence (1)
utama_core/strategy/examples/startup_strategy.py:22
- This call uses positional arguments for
n_right/n_left(both ints) right after the function’s parameter order was changed, which makes it easy to accidentally swap sides when the counts differ. Prefer passingn_right=andn_left=as keyword arguments here to make the side assignment explicit and robust to future signature changes.
right_formation, left_formation = get_formations(
STANDARD_FIELD_DIMS.full_field_bounds,
MAX_ROBOTS,
MAX_ROBOTS,
formation_type=FormationType.START_ONE,
)
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.
flip get_formation to return right, left instead of left, right for standardisation and the order of function parameters:
n_rightthenn_left.