<< | FRC | >>

How to write a robot program Using this methodology writing the robot program becomes following these steps:

  1. Create the project. In Java create a CommandBasedRobotTemplate project.
  2. Create the subsystems for your robot. Once you have done the initial design for the robot (you know what subsystems it has but not necessarily how they work or what sensors or motors each uses) create Subsystem classes. This is important: you don’t have to have a working or even fully designed robot for this step. Just create the subsystem classes and methods that define the capabilities of each subsystem. As the design of each subsystem is completed, fill in the missing details in the subsystems.
  3. Create commands to make the subsystems perform the tasks to do. Commands define the tasks and sequencing of tasks to perform more complex operations on the robot. Commands execute sequentially and can be tied to autonomous modes and operator interface buttons to determine when they should run.
  4. Tie the commands to the user interface buttons to get the robot operating. Create an OI (operator interface) class that connects all your commands (and groups) to OI buttons and controls. Then when buttons are pressed the commands will be scheduled.
  5. Write any additional commands needed for autonomous operation. Autonomous programs are usually multistep, more complex sequences of commands to do some task. Once you have defined the basic commands (previous step) it’s easy to combine them into larger groups for doing complex operations.
  6. Instrument the robot using the SmartDashboard. You can easily create a dashboard program for your robot that shows status as it operates. You can even have it tell you what commands are operating at any time, the status of each subsystem, or even control it through buttons and other UI elements. These features are all built into the library and the dashboard.
  1. Simple Kenect Driver
  2. SmartDashboard great to see how your movements look
  3. Spike Coding spike relays like the ball collector and elevator belts
  4. Jaguar Coding for driver motors, bridgePusher, shooterMotors and elevatorArm, azimuthMotor
  5. Launcher Wheels here is a way of controlling the launcher wheels
  6. links to videos and resources