Skip to content
Domenic Rodriguez edited this page Feb 13, 2014 · 8 revisions

Welcome to the 2014-Robot wiki!

New to FRC programming on the LuNaTeCs? Check out the Essential Reading page to get started.

Need something to work on? Tasks are listed on the Issues page.

Development Model

GitHub will serve as the central organizational tool for our code. We will be using the Feature Branch Git workflow as our collaboration model. Here's how it works:

  1. Clone the central repository from GitHub
  2. Make a branch for your feature
  3. Write code, make changes, commit, etc.
  4. Push your feature branch to GitHub and submit a pull request.
  5. Code will be reviewed, merged into master

One very important rule for this workflow is that you should never make changes directly on master! Working directly on master will complicate the process of merging code changes.

Code structure

The main robot program is divided into several categories of classes such as Subsystems, Autonomous Modes and Teleop Controllers.

Subsystems

Subsystems are a logical grouping of related robot actuators and sensors into a class. Example subsystems might include a drivetrain or a ball pickup mechanism. Subsystems follow the singleton pattern in that there is only one shared instance of each subsystem. See the Robot Subsystems page for more details.

Teleop

The TeleopControl class manages control of the robot during teleop mode. It contains the joystick instances, and maps robot actions to joystick buttons/axes.

Autonomous

All autonomous routines inherit from the AutonomousMode abstract base class, which provides access to the subsystem instances and the ability to change the autonomous program at run time. BasicAutonomous is a simple mode that drives forwards, checks if the goal is hot, and then either waits for the goal to become hot or fires if the goal is already hot.

Other features

  • Constants: The Constants class provides a way to update robot constants on the fly. It parses a text file uploaded to the cRIO via FTP, and then changes those value in the program.
  • RobotMap: RobotMap provides a simple method of containing all of the IO port definitions in one place. Instead of searching through the code for the given WPILib object, simply go to the RobotMap to find or change an IO port.
  • org.lunatecs316.frc2014.lib: The lib package contains an assortment of helper and utility classes.