Conversation
There was a problem hiding this comment.
Pull request overview
This pull request implements fixes and enhancements made on November 26th, including new strategy examples, robot controller updates, and configuration changes for real robot hardware.
- Adds four new strategy example implementations (startup, defense, go-to-ball, robot placement)
- Updates real robot controller with
get_robots_responses()method and modified test code - Increases REAL_PARAMS values for better real robot performance
- Changes serial port configuration from
/dev/ttyACM0to/dev/ttyUSB0
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 18 comments.
Show a summary per file
| File | Description |
|---|---|
| utama_core/team_controller/src/controllers/real/real_robot_controller.py | Adds get_robots_responses() stub method, imports for testing, and updates test code with timing and loop changes |
| utama_core/strategy/examples/startup_strategy.py | New strategy for moving robots to starting formation positions |
| utama_core/strategy/examples/one_robot_placement_strategy.py | New strategy for testing single robot movement between positions |
| utama_core/strategy/examples/go_to_ball_ex.py | New example strategy demonstrating go-to-ball behavior with possession checking |
| utama_core/strategy/examples/defense_strategy.py | New defensive strategy with blocking, goalkeeping, and role assignment |
| utama_core/strategy/examples/init.py | Exports the new strategy classes for external use |
| utama_core/config/settings.py | Updates serial port from ACM0 to USB0 for real robot communication |
| utama_core/config/robot_params.py | Significantly increases REAL_PARAMS velocity and acceleration limits |
| main.py | Updates import path to use new strategy.examples module structure |
Comments suppressed due to low confidence (1)
utama_core/strategy/examples/one_robot_placement_strategy.py:48
- This assignment to 'friendly_robots' is unnecessary as it is redefined before this value is used.
friendly_robots = game.friendly_robots
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 11 comments.
Comments suppressed due to low confidence (1)
utama_core/strategy/examples/one_robot_placement_strategy.py:48
- This assignment to 'friendly_robots' is unnecessary as it is redefined before this value is used.
friendly_robots = game.friendly_robots
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
utama_core/team_controller/src/controllers/real/real_robot_controller.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
utama_core/strategy/examples/one_robot_placement_strategy.py:79
- The variable
cmdis only assigned inside theif switch:block (lines 55-72) but is used unconditionally at line 79. This will cause anUnboundLocalErrorwhenswitchisFalseon the first update. The command creation logic should be moved outside theifblock, orcmdshould be initialized before the condition.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
utama_core/team_controller/src/controllers/real/real_robot_controller.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
utama_core/strategy/examples/one_robot_placement_strategy.py:81
- The variable
cmdis only defined inside theif switch:block (lines 67-73), but it's used unconditionally on line 80. WhenswitchisFalse(i.e., whenerror >= 0.05), this will raise aNameError: name 'cmd' is not defined.
Solution: Move the cmd assignment (lines 67-73) outside the if switch: block so it's always defined, or ensure cmd is defined before the conditional block.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 14 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
utama_core/strategy/examples/one_robot_placement_strategy.py:80
- The variable
cmdis only assigned inside theif switch:block (line 67), but is used unconditionally at line 80. This will cause aNameError: name 'cmd' is not definedwhenswitchis False (i.e., when the robot is not within 0.05m of the target). Thecmdassignment should be moved outside theif switch:block to ensure it's always defined before use.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Real changes made on 26 Nov: