Skip to content

Commit 506171b

Browse files
small fixes
1 parent 75fe177 commit 506171b

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

utama_core/config/formations.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ def _validate_formation(
8585
Args:
8686
formation: List of (x, y, theta) tuples for robots.
8787
bounds: FieldBounds object with top_left and bottom_right coordinates.
88-
n_left: Expected number of robots on the left team.
89-
n_right: Expected number of robots on the right team.
9088
"""
9189
# --- Bounding box edges (center can touch boundary) ---
9290
x_min = bounds.top_left[0]

utama_core/run/strategy_runner.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,10 @@ def _load_sim(
356356
SSLBaseEnv: The RSim environment (Otherwise None).
357357
AbstractSimController: The simulation controller for the environment (Otherwise None).
358358
"""
359+
# No sim to load for real mode.
360+
if self.mode == Mode.REAL:
361+
return None, None
362+
359363
left_start, right_start = get_formations(
360364
bounds=self.field_bounds,
361365
n_left=self.exp_enemy if self.my_team_is_right else self.exp_friendly,
@@ -387,7 +391,8 @@ def _load_sim(
387391

388392
return rsim_env, RSimController(field_bounds=self.field_bounds, exp_ball=self.exp_ball, env=rsim_env)
389393

390-
elif self.mode == Mode.GRSIM:
394+
# GRSIM Mode
395+
else:
391396
# can consider baking all of these directly into sim controller
392397
sim_controller = GRSimController(self.field_bounds, self.exp_ball)
393398
n_yellow, n_blue = map_friendly_enemy_to_colors(self.my_team_is_yellow, self.exp_friendly, self.exp_enemy)
@@ -418,9 +423,6 @@ def _load_sim(
418423

419424
return None, sim_controller
420425

421-
else:
422-
return None, None
423-
424426
def _setup_vision_and_referee(self) -> Tuple[deque, deque]:
425427
"""Setup the vision and referee buffers.
426428

0 commit comments

Comments
 (0)