Robot Development Environment Lesson

Setting Up Your Workshop

Before you can write code, you need to set up your tools. A development environment is the collection of software you'll use to write, test, and deploy code to the robot. For FRC, this environment is specifically designed to make programming your robot as smooth as possible.

The Core Components

The FRC development environment has a few key parts that work together. The great news is that the official FRC WPILib installer bundles almost everything you need.

1. IntelliJ IDEA: Your Code Editor

This is your Integrated Development Environment (IDE), or code editor. You'll spend most of your time here, writing and organizing your Java files. With the special FRC plugin, IntelliJ can create, build, and deploy robot projects.

2. Java Development Kit (JDK)

Since we're writing code in Java, we need the JDK. It acts as the compiler that translates your human-readable Java code into bytecode that the roboRIO (the robot's main computer) can understand and execute.

3. FRC Game Tools

This is a separate suite of programs that runs on your driver station laptop. It includes:

  • Driver Station: The program used to enable, disable, and control your robot during a match. It also shows vital diagnostic information and logs.
  • roboRIO Imaging Tool: A tool to install the base operating system onto the roboRIO.
  • SmartDashboard/Shuffleboard: A customizable dashboard for displaying live data from your robot's sensors or showing camera feeds.

Setting Up IntelliJ IDEA

While some teams use VS Code, our team uses IntelliJ. Here’s how you get it ready for FRC development.

// Step 1: Install IntelliJ IDEA Community Edition (it's free!)

// Step 2: Install the FRC Plugin
//    - Open IntelliJ and go to File > Settings > Plugins.
//    - Go to the 'Marketplace' tab and search for "FRC".
//    - Install the plugin and restart IntelliJ.

// Step 3: Create a New FRC Project
//    - Go to File > New > Project...
//    - Select 'FRC' from the project types on the left.
//    - Follow the wizard to choose a project template (like 'Command Robot'),
//      set your team number, and name your project.

// Step 4: Configure the JDK
//    - The WPILib installer places the correct JDK in a public folder.
//    - In your project settings, you may need to point IntelliJ to this
//      specific JDK if it isn't found automatically.
    

Test Your Knowledge

Question: Which FRC Game Tool is used to enable and disable the robot during a match and view real-time log messages?