Pytest validation
Please fill out the following before requesting review on this PR
Description
This PR addresses issue #2809. kickoff_play_test.py has been written to test the following rules for kickoff:
- During friendly kickoff, a maximum of one friendly robot is within the center circle and the remaining friendly robots are within the friendly half.
- After friendly kickoff is initiated, the ball leaves its starting point by a distance of at least 0.05m within 15 seconds.
- During enemy kickoff, all friendly robots are in the friendly half and none are in the center circle.
kickoff_play_test.py uses NumberOfRobotsAlwaysStaysInRegion() in the always validation sequence set and BallEventuallyExitsRegion() in the eventually validation sequence set to verify the above rules.
robot_enters_regions.py was modified so that NumberOfRobotsAlwaysStaysInRegion() is able to accept multiple regions as parameters.
or_validation.py was created to implement OR logic when running a group of tests - this is used in kickoff_play_test.py to check that either 0 or 1 robots are in centerCircle.
This test discovered that our AI currently violates kickoff rule #3 outlined above - a friendly robot enters the enemy half during enemyKickoff. As such, issue #3119 was created.
Testing Done
./tbots.py test //software/ai/hl/stp/play:kickoff_play_test -t was used to visualize the kickoff_play_test on Thunderscope. All three tests can be seen in this GIF:
Resolved Issues
resolves #2809
Length Justification and Key Files to Review
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
.hfile) should have a javadoc style comment at the start of them. For examples, see the functions defined inthunderbots/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
Ok in the previous PR the the CI Simulated Gameplay Tests were failing because of kickoff_play_test.py. I fixed that issue but now it's failing because of ball_placement_test.py.
I was asking about this on Thursday and I think Nima mentioned that this is a problem that others are having as well, and that sometimes it just gets resolved by running it a few times? If I run ball placement test individually on CLion, it'll pass for me, but if I execute bazel test //... , then ball_placement_test will fail.
How should I proceed?
It's affecting multiple people, I'll try to take a look today
This PR is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This PR was closed because it has been stalled for 5 days with no activity.
This PR is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This PR is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This PR is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Note: pushed PR right now to allow others to debug. Not yet ready for review to merge PR.