Skip to content

Kickoff enemy play and kickoff friendly play to FSM with targeting changes#3578

Merged
Muxite merged 39 commits intoUBC-Thunderbots:masterfrom
Muxite:kickoff_fsm
Mar 22, 2026
Merged

Kickoff enemy play and kickoff friendly play to FSM with targeting changes#3578
Muxite merged 39 commits intoUBC-Thunderbots:masterfrom
Muxite:kickoff_fsm

Conversation

@Muxite
Copy link
Contributor

@Muxite Muxite commented Jan 24, 2026

Description

Converts kickoff enemy play and kickoff friendly play to FSMs, while improving the kickoff targeting, and rewriting tests.

For kickoff friendly play:
FInd the largest open circle on the opponent side of the field, and chip the ball into that area. It chooses a viable target that is preferably close to the enemy net center. It also filters out points too close to the edges. Good preliminary settings for X and Y padding were found in Thunderscope. However, I think this should be parameterized and run with a barrage of simulated tests to evaluate these settings, or a better algorithm/heuristic should be found.

Testing Done

The kickoff works on thunderscope with both sides of robots working properly. Testing works for the regular largest-open-circle chip.

Resolved Issues

3296, 3287

Length Justification and Key Files to Review

software/ai/hl/stp/play/kickoff_enemy/
software/ai/hl/stp/play/kickoff_friendly/
software/ai/hl/stp/play/kickoff_play_test.py

Review Checklist

  • 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

Muxite and others added 6 commits November 15, 2025 07:50
# Conflicts:
#	src/software/ai/hl/stp/play/kickoff_enemy_play.cpp
#	src/software/ai/hl/stp/play/kickoff_enemy_play.h
#	src/software/ai/hl/stp/play/kickoff_friendly/kickoff_friendly_play.h
#	src/software/ai/hl/stp/play/kickoff_friendly_play.cpp
#	src/software/ai/hl/stp/play/kickoff_play_test.py
Copy link
Contributor

@GrayHoang GrayHoang left a comment

Choose a reason for hiding this comment

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

Needs some minor changes to fit within the new fsm hierarchy

Comment out the kickoff_friendly_play_cpp_test target in BUILD file.
Copy link
Contributor

@StarrryNight StarrryNight left a comment

Choose a reason for hiding this comment

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

LGTM. Left some comments.

StarrryNight
StarrryNight previously approved these changes Mar 14, 2026
Copy link
Contributor

@StarrryNight StarrryNight left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@williamckha williamckha left a comment

Choose a reason for hiding this comment

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

Looks good overall! Small nits

@Muxite Muxite merged commit 69f939f into UBC-Thunderbots:master Mar 22, 2026
10 of 11 checks passed
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.

4 participants