Recent Updates

  • Updated on: Dec 11, 2013

    Camera Settings

    It is very difficult to achieve good image processing results without good images. With a light mounted near the camera lens, you should be able to use the provided examples, the dashboard or SmartDashboard, NI Vision Assistant or a web browser to view camera images and experiment with camera settings.

  • Updated on: Dec 11, 2013

    Building with the WPILib source code

    Often it is desirable to build your robot project with the WPILib source code rather than just using the supplied libraries. This might be because you are modifying the library or just trying to understand how it works. WindRiver Workbench has provisions for having one project (your robot program) reference another project (WPILib in this case). So the strategy to build with WPILib is to open it as a project in Workbench.

  • This document details how to build your own custom version of the WPILibJ library, then use that library to build your robot program.

  • This document covers how to build and load an FRC LabVIEW program onto a cRIO. Before beginning, make sure that you have installed LabVIEW for FRC and the NI FRC Update and that you have imaged your cRIO as described in the Getting Started with the 2014 Control System manual.

  • Updated on: Nov 26, 2013

    What is Command based programming?

    WPILib supports a method of writing programs called "Command based programming". Command based programming is a design pattern to help you organize your robot programs. Some of the characteristics of robot programs that might be different from other desktop programs are:

    • Activities happen over time, for example a sequence of steps to shoot a Frisbee or raise an elevator and place a tube on a goal.
    • These activities occur concurrently, that is it might be desirable for an elevator, wrist and gripper to all be moving into a pickup position at the same time to increase robot performance.
    • It is desirable to test the robot mechanisms and activities each individually to help debug your robot.
    • Often the program needs to be augmented with additional autonomous programs at the last minute, perhaps at competitions, so easily extendable code is important.

    Command based programming supports all these goals easily to make the robot program much simpler than using some less structured technique.

  • Updated on: Nov 26, 2013

    Installing the C++ Development Tools

    WindRiver Workbench is the development environment used for creating and loading C++ code onto a cRIO for FRC. This document describes how to install the Wind River Workbench environment as well as other supporting software you will need to program your robot. All images used in this document show the 2012 media, please refer to the text instructions for proper 2014 file names where necessary.

  • Updated on: Nov 25, 2013

    Creating a robot project

    The simplest way to create a robot program, is to start from one of the supplied templates. Two choices are SimpleRobot and IterativeRobot. SimpleRobot is an easier to use template that is somewhat more limiting when creating more complex programs. The IterativeRobot template is a little more complex to get started, but in the long run lets you do more.

    The templates will get you the basis of a robot program, organizing a larger project can often be a complex task. RobotBuilder is recommended for creating and organizing your robot programs. You can learn more about RobotBuilder here. To create a command-based robot program that takes advantage of all the newer tools look at Creating a command based robot project in C++.

  • Here's how to create the shortest possible robot program that actually does something useful. In this case, it provides tank steering in teleop mode and drives a few feet and stops in autonomous mode. This program uses the SimpleRobotTemplate which lets you write very simple programs very easily. For larger programs we recommend using the CommandBasedRobot template and RobotBuilder.

  • Updated on: Nov 05, 2013

    Debugging a robot program

    You can monitor, control, and manipulate cRIO processes using the debugger. This section will describe how to set up a debug session for a robot control program. (See the Wind River Workbench User’s Guide for complete documentation on how to use the debugger: Help > Help Contents > Wind River Documentation > Guides > Host Tools > Wind River Workbench User’s Guide.)

  • Using the C++ IDE there are two ways to load programs onto the cRIO

    • "Deploy" it onto the cRIO flash and run it on a reboot. This will keep the program in the cRIO's persistent memory and will load it each time the device reboots, but will not allow any of the debugging discussed above. This method is covered in this article
    • Attach to the cRIO and run the program using the debugger from your development system directly to the cRIO memory. This method will allow you to set breakpoints, step through code, view variable values and perform other debugging operations, however the code will not persist when the cRIO is rebooted. When the cRIO reboots, no code will be running! This method is covered in the next article, "Debugging a Robot Program".

    For tournaments you should always Deploy the program so that it will be there when the robot is restarted and the match is played.