Improve FreeKickPlay behaviour and convert it to use FSMs
Please fill out the following before requesting review on this PR
Description
Improved FreeKickPlay:
- Reimplemented it using FSMs
- Used KickTactic instead of AttackerTactic to ensure that we do not dribble
Testing Done
Resolved Issues
resolves #2950
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
@raymond212 is this PR still good to be merged (not sure if we changed this on the robocup branch)? Is it implemented the way we want it? (cc: @itsarune @williamckha)
@nimazareian This PR will probably get somewhat overhauled when we rewrite our gameplay architecture but it definitely improves upon the current implementation and I think it can be merged for now.
@raymond212 What's the status of this PR? Do you think you could update it? I think it could be nice to get it in and not wait on the gameplay overhaul since we don't have an exact timeline on that. What do you think @itsarune?
@raymond212 Once this PR is ready, similar to to #3146, could you also include some videos of what the new gameplay looks like?
@raymond212 Once this PR is ready, similar to to #3146, could you also include some videos of what the new gameplay looks like?
Yes, I'll be sure to do that.
Chip pass example (0.5 speed simulation).
I've made this PR a draft until #3200 is merged (more details in the PR description). However, the play/FSM have been updated and are good to be reviewed again.
I've added some basic validations for the friendly freekick simulated tests. The tests show how the receivers position themselves and the best passes/shots which are selected. I'm not sure if I will have the time to add more complex validations.
@itsarune I've removed the extra LOGs. I decided to keep the two LOGs for the Kick and Chip actions, since I was thinking it might be helpful to explicitly know during a game if the AI decides to kick or chip instead of taking the usual pass (specially given that kicks might be hard to differentiate from passes). Let me know if you think I should remove those as well.