Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion utama_core/run/strategy_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def __init__(
field_bounds: FieldBounds = Field.full_field_bounds,
opp_strategy: Optional[AbstractStrategy] = None,
control_scheme: str = "pid",
opp_control_scheme: Optional[str] = None, # For testing
Copy link

Copilot AI Nov 26, 2025

Choose a reason for hiding this comment

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

[nitpick] Unclear inline comment. The comment "For testing" is too vague. Consider making it more descriptive, e.g., "Optional separate control scheme for opponent (used in testing to avoid obstacle avoidance interference)".

Suggested change
opp_control_scheme: Optional[str] = None, # For testing
opp_control_scheme: Optional[str] = None, # Optional separate control scheme for opponent (used in testing to avoid obstacle avoidance interference)

Copilot uses AI. Check for mistakes.
replay_writer_config: Optional[ReplayWriterConfig] = None,
print_real_fps: bool = False, # Turn this on for RSim
profiler_name: Optional[str] = None,
Expand All @@ -103,6 +104,10 @@ def __init__(
self.opp_strategy = opp_strategy

self.motion_controller = get_control_scheme(control_scheme)
if opp_control_scheme is not None:
self.opp_motion_controller = get_control_scheme(opp_control_scheme)
else:
self.opp_motion_controller = self.motion_controller

self.my_strategy.setup_behaviour_tree(is_opp_strat=False)
if self.opp_strategy:
Expand Down Expand Up @@ -356,7 +361,7 @@ def _load_robot_controllers(self):
self.my_strategy.load_motion_controller(self.motion_controller(self.mode, self.rsim_env))
if self.opp_strategy:
self.opp_strategy.load_robot_controller(opp_robot_controller)
self.opp_strategy.load_motion_controller(self.motion_controller(self.mode, self.rsim_env))
self.opp_strategy.load_motion_controller(self.opp_motion_controller(self.mode, self.rsim_env))

def _load_game(self):
"""
Expand Down
Loading
Loading