Instructional Material: Introduction
This lesson is the first in the "off ramp" unit for RoboRio programmers. This unit contains a detailed exploration of writing Java programs for the RoboRio. Don't forget to complete the rest of the Java curriculum starting with Unit 12.
We have been learning a lot about the Java programming language. Now its time to explore how we actually write, compile and deploy Java programs for the RoboRio (FRC) robotics control system.
RoboRio based robots use a far more complex control system than the EV3 (FLL) based robots but is similar to Tetrix (FTC) robots. At the FRC level robots engage in autonomous activity, that is, not under the control of a human, just like EV3/Tetrix robots do. However, autonomous activity is a relatively small part of the match that is played in competition. The larger portion of match time is teleoperated activity, that is, the robot is under remote control by human players. As such, the control system consists of three hardware devices, a robot controller device, a robot attached wireless router (also called the radio) and a driver station PC. The controller and driver station PC are connected over a WiFi network created by the wireless router. Your code development PC may be the same PC as the driver station or a different PC. A different PC is recommended.
The robot controller is the RoboRio device which is a Linux based computer with hardware interfaces (ports) that connect to external devices. The RoboRio hosts the Java JVM that will execute your program. The RoboRio connects to the router (via cable) which functions as a wireless access point, creating a wireless network that the driver station and development PCs can connect to. The RoboRio is manufactured by National Instruments and is also called an NI-roboRIO. The RoboRio manual can be found here. A simpler overview of the RoboRio by FRC team 2168 is found here.
The driver station (DS) PC is a Windows PC running the driver station application provided by FIRST. This application communicates with the RoboRio over the network created by the router. You attach joysticks and other control devices to the DS PC and the DS app sends input information from these devices to the RoboRio and then to your program. The driver station also has a software component called the Dashboard which is a customizable program that you can use to display information from your program or send control information to your program.
The software tools needed to write RoboRio robot control programs are:
- Java SDK (development PC)
- Interactive Development Environment (development PC)
- Plugins for the Interactive Development Environment (development PC)
- SDK for RoboRio programs (development PC)
We will discuss each of these tools and how to install them in detail.
The Java SDK is required on your development PC to be able to compile Java programs.
An Interactive Development Environment (IDE) is a tool that makes it easy to create, compile and deploy programs to devices. The IDE we will be using is Visual Studio Code (VSCode) from Microsoft. There are plugins to VSCode supplied by FIRST that customize VSCode for use in developing RoboRio control programs and the plugin installer includes the SDK for RoboRio. VSCode was adopted by FIRST in 2019. Previously the IDE was Eclipse.