File tree Expand file tree Collapse file tree 5 files changed +6
-17
lines changed
rsoccer_simulator/src/ssl/envs Expand file tree Collapse file tree 5 files changed +6
-17
lines changed Original file line number Diff line number Diff line change 55from numpy .random import normal
66
77from utama_core .config .field_params import STANDARD_FIELD_DIMS , FieldDimensions
8- from utama_core .config .formations import FormationEntry , FormationType , get_formations
8+ from utama_core .config .formations import FormationEntry , get_formations
99from utama_core .config .robot_params import RSIM_PARAMS
1010from utama_core .config .settings import (
1111 MAX_BALL_SPEED ,
@@ -121,7 +121,6 @@ def __init__(
121121 STANDARD_FIELD_DIMS .full_field_bounds ,
122122 n_right = n_robots_yellow ,
123123 n_left = n_robots_blue ,
124- formation_type = FormationType .START_ONE ,
125124 )
126125
127126 # Ball start position is expressed in normal field coordinates used by
Original file line number Diff line number Diff line change 1313
1414from utama_core .config .enums import Mode , mode_str_to_enum
1515from utama_core .config .field_params import STANDARD_FIELD_DIMS , FieldDimensions
16- from utama_core .config .formations import FormationType , get_formations
16+ from utama_core .config .formations import get_formations
1717from utama_core .config .physical_constants import MAX_ROBOTS
1818from utama_core .config .settings import (
1919 FPS_PRINT_INTERVAL ,
@@ -351,7 +351,6 @@ def _load_sim(
351351 bounds = self .field_bounds ,
352352 n_right = self .exp_friendly if self .my_team_is_right else self .exp_enemy ,
353353 n_left = self .exp_enemy if self .my_team_is_right else self .exp_friendly ,
354- formation_type = FormationType .START_ONE ,
355354 )
356355
357356 yellow_start , blue_start = map_left_right_to_colors (
Original file line number Diff line number Diff line change 22from py_trees .composites import Sequence
33
44from utama_core .config .field_params import STANDARD_FIELD_DIMS
5- from utama_core .config .formations import FormationType , get_formations
6- from utama_core .config .physical_constants import MAX_ROBOTS
5+ from utama_core .config .formations import get_formations
76from utama_core .entities .data .vector import Vector2D
8- from utama_core .global_utils .math_utils import compute_bounding_zone_from_points
97from utama_core .skills .src .go_to_point import go_to_point
108from utama_core .strategy .common import AbstractBehaviour , AbstractStrategy
119
@@ -14,12 +12,7 @@ def generate_starting_positions(is_right_team: bool):
1412 """
1513 Generate starting and target formations based on team side.
1614 """
17- right_formation , left_formation = get_formations (
18- STANDARD_FIELD_DIMS .full_field_bounds ,
19- MAX_ROBOTS ,
20- MAX_ROBOTS ,
21- formation_type = FormationType .START_ONE ,
22- )
15+ right_formation , left_formation = get_formations (STANDARD_FIELD_DIMS .full_field_bounds )
2316 start_formation = right_formation if is_right_team else left_formation
2417 target_formation = start_formation .copy ()
2518 target_formation .reverse ()
Original file line number Diff line number Diff line change 11from unittest .mock import patch
22
3- from utama_core .config .formations import FormationType , get_formations
3+ from utama_core .config .formations import get_formations
44from utama_core .entities .game .field import FieldBounds
55from utama_core .global_utils .mapping_utils import (
66 map_friendly_enemy_to_colors ,
@@ -87,7 +87,6 @@ def test_grsim_spawn_positions_and_ball_use_field_bounds_center():
8787 bounds = bounds ,
8888 n_right = exp_enemy ,
8989 n_left = exp_friendly ,
90- formation_type = FormationType .START_ONE ,
9190 )
9291 expected_yellow , expected_blue = map_left_right_to_colors (
9392 my_team_is_yellow ,
Original file line number Diff line number Diff line change 44import pytest
55
66from utama_core .config .field_params import GREAT_EXHIBITION_FIELD_DIMS
7- from utama_core .config .formations import FormationType , get_formations
7+ from utama_core .config .formations import get_formations
88from utama_core .entities .game .field import FieldBounds
99from utama_core .global_utils .mapping_utils import map_left_right_to_colors
1010from utama_core .run .strategy_runner import StrategyRunner
@@ -85,7 +85,6 @@ def test_rsim_formation_allocation_and_spawn_positions(
8585 bounds = runner .field_bounds ,
8686 n_right = n_friendly if team_on_right else n_enemy ,
8787 n_left = n_enemy if team_on_right else n_friendly ,
88- formation_type = FormationType .START_ONE ,
8988 )
9089 expected_yellow , expected_blue = map_left_right_to_colors (
9190 team_is_yellow ,
You can’t perform that action at this time.
0 commit comments