My question is aimed at Java/C++ teams, but LabVIEW/other teams could provide helpful information here too.
How does your team architect it’s codebase?
A search of “architecture” in the Programming family of forums only brings the 2011 Cheesy Poof code release as a discussion about code architecture from what I can tell.
I’ve been wondering about how other teams plan out structure their codebase. 1675 has come from a “one file” team in the olden days to something that resembles OOP now. FRC robots are a seeming simple yet sometimes complex system, especially when you have preset routines that run autonomously during teleop. 1675 (and from what I perused yesterday, 254) had an “autoscore” last year, a series of action where given the robot and tube in a certain state took all the repetitive actions out of the drivers hands and performed them precisely for each hang.
This year we were trying for classes to represent each system, which would have different methods for teleoperated and autonomous. As we wanted to do some things (semi)autonomously in teleop, and communicate between systems, this broke down and it was too late to do a redesign, so there are a lot of hack jobs.
We also wanted to make classes “plug-and-play” as we iterated, using interfaces to represent things like our Hood (implemented later as SimpleHood, EncoderHood, and PIDHood) and Shooter (implemented later as SteppingShooter, VoltageShooter, and PIDShooter). This also ended up breaking down a bit as the different combinations of components tended to interact in different ways, breaking the purpose of an interface.
Things that would be awesome for this thread:
- The general plan your team has when starting the codebase for a season
- Any design diagrams you might have generated along the way
- Links to codebases shared on the web
- Challenges you had integrating a system/action into your design, and how you overcame them (or what went wrong)
Our code for Rebound Rumble can be found at https://github.com/pordonj/frc1675-2012 (There were some changes over the weekend that I need to commit once I get access to the code again this week).