The repository for our 2021 season code. This document outlines our code and explains the more complex processes in depth where it is preferred over in-code documentation, as well as giving a general overview of the project.
This section outlines the subsystems of our robot, what control systems they have, and the commands which use them.
This subsystem outlines our robot's four-motor drivetrain. We use four Falcon 500 motors with integrated TalonFX motor controllers. These controllers are declared in the Drivetrain class and bundled into two SpeedControllerGroup objects: left and right. These objects bind the two motors on each side together to prevent fighting between the motors in each gearbox. The two groups are then connected into a DifferentialDrive object which handles the calculations used to translate joystick input to motor output.
This section outlines the commands of our robot, the subsystems they use, and the control logic they implement to create efficient function.
This command controls the drivetrain subsystem by inputting the x and y values of the left joystick on our primary Xbox controller and passing them into the arcadeDrive method of the DifferentialDrive object. The input values are also multiplied by a coefficient slightly less that 1.0 which slows the drivetrain slightly to avoid jittering and jerky control.