Software icon indicating copy to clipboard operation
Software copied to clipboard

[Thunderscope] Remove Extra Robots and Add Missing Robots during Simulator + Fixes

Open Andrewyx opened this issue 9 months ago • 0 comments

Please fill out the following before requesting review on this PR

Description

This PR provides support for dynamic robot removal & re-addition during simulation per acquired cards during play. Addition is then called after cards expire (yellow), and robots are placed back onto the field along the field margin along the halfway line (per RoboCup rules). Also addresses the following:

  • Introduces a new ThreadSafeCircularBuffer for more efficient proto handling
  • this ticket also resolves a few other Thunderscope bugs. See below.

Testing Done

Modifying GC during sims works.

Screencast from 2025-03-30 13-19-52.webm

Resolved Issues

Resolves #3116

Extras:

  • Small fix to #3405
  • Cleans up ThreadSafeBuffer usage
  • Fixes fullsystem termination upon AutoRef goal score
  • Refactors ThreadSafeBuffer for better OOP

Length Justification and Key Files to Review

Review Checklist

It is the reviewers responsibility to also make sure every item here has been covered

  • [x] 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.
  • [x] Remove all commented out code
  • [x] Remove extra print statements: for example, those just used for testing
  • [x] Resolve all TODO's: All TODO (or similar) statements should either be completed or associated with a github issue

Andrewyx avatar Mar 30 '25 20:03 Andrewyx