Tutorial for creating a new FRC robot from scratch.
- Install Visual Studio Code
- Install java extensions and wpi lib extensions
- Install the gradle Vistual Studio Code plugin
- create the new robot as "Timed" - the "Iterative" robot is deprecated. We may still use other custom threads for some things but this should improve timing that does not depend on operator interfaces
- Use only the WPI_TalonSRX class for motor control - this allows full access to all of the CTRE Phoenix functions
- Create the project in VS Code
- Use a static RobotMap class with the ID constants - place the RobotMap in the frc.robot package
- Keep the DriveSubsystem class in its own package (e.g., frc.robot.driveSubsystem)
- consider adding a SendableChooser to the DriveSubsystem that allows enumerated selection of different drive styles offered by the DifferentialDrive class
- Initialize ALL configurable motor controller constants - consider creating a utility function that accepts a structured type
- Bonus - consider using the dependency injection pattern to construct and initialize the DriveSubsystem with the motor IDs, controller constants, and the joystick or joystick axes dependencies (i.e., see if you can avoid the RobotMap import and the naming dependencies and identify what the pros and cons of doing such is)
This tutorial is broken into subfolders with various steps for creating a new robot codebase from scratch. Start with step1.