3rd Party Libraries

New for 2017 - A number of software components were broken out of WPILib for 2017 and are now maintained by third parties. See this blog for more details.

Libraries

CTRE Toolsuite - Contains TalonSRX Libraries and Lifeboat program for updating roboRIO webdashboard with latest CTRE features

Kauai Labs - Libraries for NavX-MXP, NavX-Micro, and Sensor Fusion

Mindsensors Libraries - Contains libraries for SD540C and CANLight.

Scanse Sweep - C++\Java Libraries for Scansense Sweep LIDAR (packaged by Peter Johnson)

 C++ and Java teams should close Eclipse before running any 3rd party installer. If you do install with Eclipse open, make sure to restart Eclipse before trying to use the library.

The Mechanism

In support of this effort NI (for LabVIEW) and FIRST\WPI (for C++\Java) have developed mechanisms that should make it easy for vendors to plug their code into the WPILib software and for teams to use that code once it has been installed. A brief description of how the system works for each language can be found below. The mechanisms for C++ and Java are very similar but they have been split to describe exact usage and folders for each language.

The Mechanism - LabVIEW

For LabVIEW teams, you may notice a few new Third Party items on various paletes (specifically, one in Actuators, one in Actuators->Motor Control labeled "CAN Motor", and one in "Sensors"). These correspond to folders in Program Files\National Instruments\LabVIEW 2016\vi.lib\Rock Robotics\WPI\Third Party. For a library to insert VI's in these palettes, they simply make a subfolder in one of these three Third Party folders containing their VIs and they will be added automatically. To control the appearance of the palette (have some VI's not show up, set the Icon for the folder, etc.) there is a process to create a dir.mnu file for your directory. We will be working on documenting that process shortly.

To use installed Third Party libraries, simply locate the VIs in one of these 3 locations and drag them into your project as you would with any other VI.

The Mechanism - C++

For C++ teams, third party libraries will be installed to a subdirectory of your WPILib install that is created by the Eclipse plugins. The plugins create a directory inside USER or USERHOME (C:\Users\USERNAME on Windows) called "wpilib". Third party libraries install inside this directory in "wpilib\user". Libraries may choose to put examples or documentation in this root location. C++ libraries install include files to \wpilib\user\cpp\include and and library files (.a or .so) to wpilib\user\cpp\lib. Files in the "include" folder are automatically added to the include path of all WPILib projects (including old projects that you open with new WPILib plugins) for you to include in your programs. Files in the "lib" folder are automatically added to the build command of all WPILib projects and any .so files are automatically copied to the roboRIO into /usr/local/frc/lib which allows the robot program to load them.

To use installed Third Party libraries, simply include the appropriate header in your C++ program. You can either locate the appropriate include in the documentation provided by the library provider or browse to USER\wpilib\user\cpp\include to see what third party includes are available.

Note that libraries may also choose to include C++ specific source, examples or documentation into either the root of \wpilib\user\cpp or into subdirectories

The Mechanism - Java

For Java teams, third party libraries will be installed to a subdirectory of your WPILib install that is created by the Eclipse plugins. The plugins create a directory inside USER or USERHOME (C:\Users\USERNAME on Windows) called "wpilib". Third party libraries install inside this directory in "wpilib\user". Libraries may choose to put examples or documentation in this root location. Java libraries install JAR files containing java code and any .so files containing native code used by the library to \wpilib\user\java\lib. JAR files in the "lib" folder are automatically added to the classpath of all WPILib projects (including old projects that you open with new WPILib plugins) for you to include in your programs and packaged into your robot program jar on deploy. Native library (.so) files in the "lib" folder are automatically copied to the roboRIO into /usr/local/frc/lib which allows the robot program to load them.

To use installed Third Party libraries, simply import the appropriate package or class into your Java program.

Note that libraries may also choose to include Java specific source, examples or documentation into either the root of \wpilib\user\java or into subdirectories

0 Report Errors

Use this form to report any errors with the documentation. For help with WPILib, please use the FIRST Forums at http://forums.usfirst.org For reporting WPILib bugs, please submit an issue on GitHub at https://github.com/wpilibsuite/allwpilib/issues/new

Ignore