This is a project I've been working on the past 2 weeks (started 5/16/19) in order to give the student members of FRC Team 3230 an example of FRC programming in Java. At the next meeting, I'll explain the documentation here, as well as basics of each class in the library and the function of each element in the code in a basic way. The goal of this project is to begin to get students thinking about Java programming and it's essential to have a sample to look towards.
This project assumes a robot with a Limelight subsystem and a drivetrain currently coded for Talon SRX motor controllers (easily switchable to Neos when needed) where it is able to follow a designated path with Jaci's Pathfinder, move towards a vision target using (really quite rudimentary) Limelight vision tracking, and show the vital elements of data logging of subsystems without the use of SmartDashboard (this is an element easily added in the future)
- Clone this repo
- Run
./gradlewto download gradle and needed FRC libraries - Run
./gradlew tasksto see available build options - Enjoy!
- Run
./gradlew eclipse - Open Eclipse and go to "File > Open Projects" from "File System..."
- Set the import source to the
TestTrajLibfolder then click finish - NOT RECOMMENDED
- Run
./gradlew idea - Open the
TestTrajLib.iprfile with IntelliJ - NOT RECOMMENDED
- Open repository in your Visual Studio Code install with the WPILib extension enabled
- Test build the project using the command palette and selecting
WPILib: Build Robot Code
- Run
./gradlew buildto build the code. Use the--infoflag for more details - Run
./gradlew deployto deploy to the robot in Terminal (Mac) or Powershell (Windows)
- On the command palette, select
Deploy Robot Code(or press Shift+F5) when connected to the RoboRio
- On the command palette, select
Simulate Robot Code on Desktop - Wait for a dropdown menu and select
halsim_ds_socket.dll - Open DriverStation on your computer and enjoy!
- General Camel Case (i.e.
leftMasterinstead of another variant) - k*** (i.e.
kLeftMasterID): Final constants - m*** (i.e.
mInstance): Private instance variables