Lesson: Introduction

Introduction to Java programming for the Tetrix platform.

Understand the main concepts of the Tetrix robot control system hardware and software.


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 Tetrix (FTC) robotics control system.

Tetrix based robots use a far more complex control system than the EV3 (FLL) based robots. At the FTC level robots engage in autonomous activity, meaning the robot is not under the control of a human, just like EV3 robots. 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, where the robot is under remote control by human operators. As such, the control system consists of two hardware devices, a robot controller device and a driver station device. The two devices are connected (paired) over a WiFi Direct network. With the Tetrix system, the two devices are Android based cell phones.

The driver station cell phone is fairly straight forward. The software for the driver station is provided by FIRST and is not modified by you. Xbox game controllers plug into the driver station phone and are the input devices for robot control.

The controller cell phone is more complex. This phone is attached to the robot and interfaces with controller hardware that allows the phone to connect to the various robot hardware devices like motors and sensors. You write the software that runs on the controller phone and operates the robot with input from the driver station phone's game controllers.

The software tools needed to write Tetrix robot control programs are:

  • Driver Station phone program (phone)
  • Java SDK (PC)
  • Interactive Develpment Environment (PC)
  • Plugins for the Interactive Development Environment (PC)
  • Android Development Kit (PC)
  • Control program SDK from FIRST for FTC (Tetrix) (PC)

We will discuss each of these tools and how to install them in detail in the following lesson.

The Driver Station phone software is provided by FIRST and downloaded from Google Play.

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. Because the robot controller  is an Android cell phone, the control program is actually a phone application. The IDE we will be using is Android Studio. Android Studio (AS) is similar to Eclipse or Visual Studio but is optimized for creating phone applications. There are plugins to AS supplied by FIRST that customize AS for use in developing Tetrix control programs.

The final piece is the FTC SDK provided by FIRST. Since the robot control program is an Android phone application, FIRST has provided a base phone application which handles the details of phone applications and includes the libraries (API) needed to access robot hardware and communicate with the Driver Station phone. The design of this base application allows you to modify the application by simply adding your own classes (called OpModes) to the base application. The base application hides the details of Android phone applications so you can focus on programming your robot. The base phone application does not do any robot control, that is the resposibility of the classes you add. This base phone application is delivered to you as an Android Studio project that generates the phone application. This project, for the base phone application is referred to as the FTC SDK.


Lesson navigation: