Skip to content

Preseason Learning Java

Ben edited this page Oct 18, 2024 · 10 revisions

All of the steps below work on Windows 10 and 11, the operating systems on the Hackbots team laptops. They can also be run at home on a home laptop or desktop. For a computer that will not be used to drive a robot, only the following are needed (see Software We Track):

  • Git Bash (Windows, for Linux and Mac, install git from your distribution's software center or download from https://git-scm.com/)
  • WPILib (download VS Code via the WPILib installer)
  • NavX (may prompt you to install a computer-wide Java 8 for using NavX calibration tools, don't need this for "just programming")
  • CTRE TalonSRX / TalonFX / Phoenix Tuner for Pneumatics and PDP

Laptop Setup

  1. Ensure all Software We Track is current
  2. Setup a directory on your laptop to work from

Critical Concepts

  1. Git and GitHub, docs.wpilib's Git and GitHub Intro
  2. Java basics
  • Language
  • main()
  • class
  • visibility modifiers (public vs. private)
  • inheritance
  • Methods
  • control flow (if / then / else)
  • looping (for / while / do while)
  • Logging
  1. Unit tests
  • Note that after adding src/test/java, you may need to run Ctrl-Shift-P Java:Clean Java Language Server Workspace to get the JUnit tests on the vscode classpath
  1. Command Framework
  2. Controller Inputs (Joystick, XBoxController)
  3. Sensor Inputs (IR, Encoder, Pigeon2)
  4. LED Outputs
  5. Motor Outputs
  6. Odometry
  7. Swerve Drive

Advanced Topics

  1. PID
  2. Path Planning
  3. April Tags
  4. Algorithmic thinking / command sequencing
  5. AI Object Detection
  6. State space and model-based control

Clone this wiki locally