Default params for get formations - #116
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR standardizes formation generation by adding sensible defaults to get_formations, reducing repeated boilerplate across runners, simulator setup, and example strategy code.
Changes:
- Added default values for
n_right,n_left, andformation_typeinconfig.formations.get_formations. - Updated call sites (runner, simulator env, tests, and example strategy) to rely on the new defaults where appropriate.
- Cleaned up imports now made redundant by the defaulted parameters.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
utama_core/tests/strategy_runner/test_rsim_formations.py |
Removes explicit formation_type argument to rely on get_formations defaults in RSIM-related tests. |
utama_core/tests/strategy_runner/test_grsim_sim_setup.py |
Removes explicit formation_type argument to rely on get_formations defaults in GRSIM setup tests. |
utama_core/strategy/examples/startup_strategy.py |
Simplifies example strategy startup formation generation using get_formations(bounds) defaults. |
utama_core/run/strategy_runner.py |
Removes explicit formation_type argument when generating spawn formations. |
utama_core/rsoccer_simulator/src/ssl/envs/standard_ssl.py |
Removes explicit formation_type argument for standalone rsim formation initialization. |
utama_core/config/formations.py |
Introduces default parameters for get_formations and updates related documentation. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…m/First-Order-RoboCup-SSL/Utama-Core into default_params_for_get_formations
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.
Allow better standardisation and also reduce redundant boilerplate params.