Skip to content

Project Orgarnization

Yonatan Vigiser edited this page May 27, 2025 · 1 revision

This is an example of how you might want to organize your project structure when using our library. It is not a must, but we find this organization to be easy to navigate and maintain, and it works well with separated IO classes (read more about IO separetion). So, this is our project structure.

Project Structure

In the main directory, we put only the important things (e.g. Robot, RobotMap, RobotContainer and so on).

Then we create a "subsystems" directory from the main one. Each subsystem gets it's own directory in that folder.

Inside each subsystem folder (for example, inside the "pivot" subsystem folder) there is the main subsystem file, a constants file that relates only for that specific subsystem, a commands file that defines basic commands for the subsytem, and a IO folder. It is separated because so we won't accidently use the protected IO methods from within the subsystem (read more in the Log Fields Page).

Inside the IO folder, we create an abstract IO class (for example, "PivotIO"), and all the other implementations of the IO, which inherits the generic IO (for example, "PivotIOSparkMax"). In the subsystem main file, we just create an instance of the generic IO class, for example:

Clone this wiki locally