Programming Guide

Once, programming the robot was simple as long as no extra sensors were needed. But if you wanted to use an encoder (to find how fast the gears were moving) or set up a different drive method than the one given by default, each team needed to write essentially the same code for the task. So to save work, WPILib was developed. This is a library developed by Worchester Polytechnic Institute that contains the common tasks teams need to do, such as use different drive control systems and control sensors.

WPILib comes in two flavors: Java and C++. We are currently employing Java, an object-oriented programming language, for our robot’s programming. It is the default language for the AP Computer Science course, offered at many high schools throughout the US.

In 2012, we grew from a team of 2 to a team of 20 due to an influx of aspiring programmers. We taught them using the Mechanical Simulation Library (MechSim). One of our programming officers developed the library to provide a robust Java environment in which new members could learn principles and algorithms without a physical robot. We also used the documentation and references provided by FIRST to transition to WPILib (below).

The 2012 FRC competition, Rebound Rumble, features vision targets so that scoring can be computer-guided. Performing this seemingly simple task requires computer vision techniques. Vision processing can be complex, but the demands of FRC competitions are less exacting than those of researchers and AI competitions. The resources below assume some basic familiarity with image processing already, so you may want to view: an intro; an example of vision processing; and/or a computer vision contest (all on YouTube).