This code is intended to be a learning repository that gives an example of how I would have written the 5419 clone robot's arm code.
-
Contains the robot's central functions and holds a class with all numerical constants used throughout the code ( see
Constants.java
). For example, theRobot
class controls all routines depending on the robot mode. -
Contains codes for loops, which are routines that run periodically on the robot, such as for calculating robot pose, processing vision feedback, or updating subsystems. All loops implement the
Loop
interface and are handled (started, stopped, added) by theLooper
class, which runs at 100 Hz. TheRobot
class has one main looper,mEnabledLooper
, that runs all loops when the robot is enabled. -
com.team5419.frc2023.subsystems
Contains code for subsystems, which are consolidated into one central class per subsystem, all of which extend the
Subsystem
abstract class. Each subsystem uses state machines for control and is a singleton, meaning that there is only one instance of each. Subsystems also contain an enabled loop, a read periodic inputs method, and a write periodic outputs method, which are controlled by theSubystemManager
class. -
Contains a list of IDs for each motor on the robot.
-
com.team5419.frc2023.DriverControls
Contains calls that decipher inputs from
Xbox Controllers
and runs on the enabled loop. This class gets updated prior to the subsystem manager so the robot will respond with your inputs on the same loop. -
com.team5419.frc2023.subsystems.ServoMotorSubsystem
Custom class that builds out functions needed to move most subsystems. Has error checking for parameters that are set.
-
Contains a set of custom classes for motor controllers, color sensors, and solenoids for simplifying motor configuration, reducing CAN Bus usage, and checking motors.
-
Contains all motion profiling code. Trapezoidal motion profiles are used for smooth acceleration and minimal slip.
-
Contains a collection of assorted utilities classes used in the robot code. Check each file for more information.