Software icon indicating copy to clipboard operation
Software copied to clipboard

Improve findBlockThreatPoint in CreaseDefenderFSM

Open williamckha opened this issue 2 years ago • 0 comments

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:

diagram

We want to rewrite the implementation of findBlockThreatPoint in CreaseDefenderFSM to avoid these issues. The new implementation should space out the robots evenly:

diagram

Acceptance criteria

  • [x] Add a geometry function to step along the perimeter of a rectangle. See #2994
  • [ ] Rewrite findBlockThreatPoint in CreaseDefenderFSM to 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

williamckha avatar Sep 12 '23 23:09 williamckha