Software
Software copied to clipboard
Improve findBlockThreatPoint in CreaseDefenderFSM
Description of the task
Crease defenders move around the perimeter of our defense area to block shots from enemy robots. We can assign multiple crease defenders to block against the same threat, so we align the crease defenders left, center, or right of a potential enemy shot. The way we currently calculate these alignments is with a shot cone, which has some issues:
We want to rewrite the implementation of findBlockThreatPoint in CreaseDefenderFSM to avoid these issues. The new implementation should space out the robots evenly:
Acceptance criteria
- [x] Add a geometry function to step along the perimeter of a rectangle. See #2994
- [ ] Rewrite
findBlockThreatPointinCreaseDefenderFSMto calculate positions for LEFT and RIGHT aligned crease defenders by starting from the CENTER aligned position, and then stepping the length of a robot's diameter along the defense area perimeter - [ ] Handle edge cases (e.g. stepping along perimeter might land you on a point on the goal line, which we don't want)
Blocked By
#2994