The SF2 C++ software library supports access to the navX-MXP and navX-Micro. Several example programs are provided, demonstrating how to use the Sf2 in a RoboRIO-based robot control application.
To use the library, you can download the latest build of the libraries; advanced users can checkout the source code with Git. To learn more about the library, online help for the SF2 core and FRC-specific components is available.
Getting Started
Before getting started, ensure you have installed Eclipse and the latest WPI Library Plugins and the latest navX-MXP build or navX-Micro build.
An example SF2 Application is provided. After running the setup program included in the latest build, the libraries and samples will be installed to the following location:
<HomeDirectory>\sf2\
For example, if your user name is Robot, the directory name will be C:\Users\Robot\sf2.
Java examples can be found within the “<HomeDirectory>\sf2\cpp\frc\examples” directory. Select the example you wish to start with and import the sample project into the Eclipse IDE.
The SF2 C++ Library itself will be installed to the WPI Library “user” directory at <HomeDirectory>\wpilib\user\cpp\lib, and header files will be installed to <HomeDirectory>\wpilib\user\cpp\include.
Configuring Eclipse Project Settings
A small configuration change must be made to your Eclipse C++ Project in order that the C++ compiler can locate the SF2 library:
Add the sf2-frc library to the list of libraries. Within the “Paths and Symbols” click on the “Add…” button to add the sf2-frc library to the list of libraries in the “Libraries”.
Note: the sf2-frc library should be listed before the navx_frc_cpp and wpi libraries.
Next Steps
Once the Eclipse C++application is configured to access the SF2 Library, the next step is modify the C++ robot application to incorporate features like those in the Video Processing Latency Correction Example.