Background

FIRST Robotics Competition, or FRC, is an international high school robotics competition. Every year since 1992, FIRST kicks off the FRC season by announcing a new multi-team game for robots. For the next six weeks, teams of high school students and adult mentors work to design, build, program, and test large game-playing robots. Each robot must satisfy all of the safety and game requirements, are often 6 feet tall and weigh up to 120 pounds, and perform in autonomous and tele-operated modes. Teams compete with and against other teams in their region, and the top teams advance to the FIRST World Championships.

In 2015, FRC introduced a new control system for all teams to use. The new system is easier to use, and is more capable than its predecessors. At its center is the new main robotics controller called the RoboRIO. Each team programs their robot using one of three languages: C++, Java, and National Instruments LabVIEW.

Those teams writing their robot code in Java or C++ use a library called WPILib to interface with the hardware. The WPILib makes it relatively easy to work with a variety of sensors, actuators, motor controllers, compressors, pneumatic solenoids, and other devices. Both libraries offer nearly identical functionality and a similar API. This API changed slightly in 2015, but for the most part has been stable for several years.

Using the WPILib can still be challenging, though. Since the library requires hardware, testing your robot code often requires running your code on the robot. That means that most tests are manual and time consuming. It also means that, during competition season, an FRC team's programmers can do little testing before the team's robot is ready.

Designing testable robot code is critically important, yet doing this with WPILib requires a lot of extra work. This is where Strongback comes in.

Introducing Strongback

Strongback is an open source Java library that makes it easier for you to write and test your robot code for FIRST Robotics Competition. You use it along with WPILib for Java, and you deploy it and your codebase to your RoboRIO. Strongback is:

  • Simple - Strongback's API is simple and natural, and it uses Java 8 lambdas and fluent APIs extensively to keep your code simple and readable.
  • Safe - Strongback itself uses WPILib for Java, so there are no surprises and behavior remains consistent.
  • Testable - When your code uses Strongback, you can test much more of your robot code on your computer without requiring real robot hardware.
  • Timely - Strongback's commands and asynchronous function to share a single dedicated thread. This reduces or eliminates context switches in the JVM, and on the dual-core RoboRIO results in consistent timing required for control system logic.

There are several major parts of Strongback, and you can choose which parts you want to use: hardware components, command framework, data and event recorders, asynchronous execution framework, and simple logging. We'll cover each of these areas in a separate chapter.

results matching ""

    No results matching ""