Stopplay intelligent positioning fsm#3630
Stopplay intelligent positioning fsm#3630annieisawesome2 wants to merge 14 commits intoUBC-Thunderbots:masterfrom
Conversation
| robot_positioning_unit_vector * 4 * ROBOT_MAX_RADIUS_METERS; | ||
| Point ball_defense_point_right = | ||
| ball_defense_point_center + | ||
| robot_positioning_unit_vector * 4 * ROBOT_MAX_RADIUS_METERS; |
There was a problem hiding this comment.
Some ideas on how to improve stop play:
- Only 2 robots near the ball. For example. keep defense point right and defense point center. Defense point left will be reflected off the center axis on the other side of field to receive the ball and 'stretch the field'
// +--------------------+--------------------+
// | | |
// | 4 x | |
// | 0 2 | |
// +--+ 1 | +--+
// | | | | |
// |G | +-+-+ | |
// | | | | | |
// | | +-+-+ | |
// | | | | |
// +--+ | +--+
// | | |
// | 3 | |
// | | |
// +----------- ---------+--------------------+
- Robots spread across the y axis. but the two robots closer (4,2) to the ball will move closer to the ball)
// +--------------------+--------------------+
// | | |
// | 4 x | |
// | 0 | |
// +--+ 2 | +--+
// | | | | |
// |G | +-+-+ | |
// | | | | | |
// | | +-+-+ | |
// | | 1 | | |
// +--+ | +--+
// | | |
// | 3 | |
// | | |
// +----------- ---------+--------------------+
Just some ideas that came up randomly. There could be better ways to do this.
There was a problem hiding this comment.
ok formatting is messed up but u can still see the relative robot positions by the numbers
There was a problem hiding this comment.
THANK YOU!!! I will give this a try
There was a problem hiding this comment.
New python test file added for visualizing. I will probably implement something similar to your first idea after I get the test working. Do you think we should have a different setup depending on how far the ball is from friendly net? If it is past the middle, we can spread out more to play offensively vs if it is near our net, we should cluster to play more defensively?
StarrryNight
left a comment
There was a problem hiding this comment.
lgtm. left a nit and a comment on how you can improve stop play
Description
** WORKING ON OPTIMIZATION STILL
This PR converts StopPlay into an FSM and improves robot positioning. The update enables robots to spread out more strategically across the field rather than clustering around the ball, while remaining prepared to receive or intercept a pass. All positioning logic continues to comply with the rules associated with the Stop referee command.
Testing Done
After converting stop play into an fsm, I tested by running
bazel test //software/ai/hl/stp/play:stop_play_test --cache_test_results=noResolved Issues
#3290
Length Justification and Key Files to Review
Review Checklist
It is the reviewers responsibility to also make sure every item here has been covered
.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.TODO(or similar) statements should either be completed or associated with a github issue