Skip to content

Fix python simulated test no robots loading and ai running#3626

Open
nycrat wants to merge 15 commits intoUBC-Thunderbots:masterfrom
nycrat:avah/fix_simulated_tests_not_loading_robots
Open

Fix python simulated test no robots loading and ai running#3626
nycrat wants to merge 15 commits intoUBC-Thunderbots:masterfrom
nycrat:avah/fix_simulated_tests_not_loading_robots

Conversation

@nycrat
Copy link
Member

@nycrat nycrat commented Feb 28, 2026

Description

There are two bugs that are causing flaky/inconsistent simulated gameplay tests. Firstly, the issue where the WorldState is not initialized when a test starts, and the other when running thunderscope with the simulated tests the tactics get re-assigned automatically.

The first issue is fixed by running setup() repeatedly until WorldStateReceived proto is received. The second issue is fixed by removing the parameters tab (ProtoConfigurationWidget) which sends a ThunderbotsConfig proto that enables PlaySelectionFSM by default.

Testing Done

Ran simulated tests repeatedly, especially the ball placement and HRVO tests which were particularly flaky, and HRVO passes consistently now. Ball placement still fails sometimes, but reviewing the replays, its because of the tactic reassignment oscillation.

Resolved Issues

resolves #3621, resolves #2858

Length Justification and Key Files to Review

Did a lot of refactors to existing pytests to follow best practice and also use the setup parameter for simulated_test_runner.run_test so that the WorldStateReceived is checked.

Review Checklist

It is the reviewers responsibility to also make sure every item here has been covered

  • Function & Class comments: All function definitions (usually in the .h file) should have a javadoc style comment at the start of them. For examples, see the functions defined in thunderbots/software/geom. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class.
  • Remove all commented out code
  • Remove extra print statements: for example, those just used for testing
  • Resolve all TODO's: All TODO (or similar) statements should either be completed or associated with a github issue

@nycrat nycrat force-pushed the avah/fix_simulated_tests_not_loading_robots branch from 81167c6 to 793298d Compare February 28, 2026 00:54
@GrayHoang GrayHoang mentioned this pull request Feb 28, 2026
4 tasks
@GrayHoang
Copy link
Contributor

Can you link #3621

@nycrat nycrat force-pushed the avah/fix_simulated_tests_not_loading_robots branch from 5f64ffe to 57f95b5 Compare February 28, 2026 20:52
@nycrat nycrat marked this pull request as ready for review March 1, 2026 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix Simulated Hrvo test [Gameplay] Root cause why simulated tests aren't consistent in CI/locally headless on Thunderscope/with Thunderscope UI

2 participants