Offline installation of NavX-FRC library on Non-Windows systems

I am attempting to perform an offline installation of the navX_FRC Library for RoboRIO on Linux (Ubuntu 18.04 64-bit), but it appears that KauaiLab’s website only provides offline installation instructions using their Windows-only installer application:

The Offline Installation method can be used even when you are not connected to the Internet.  In this method, you must first run the latest setup program.

The setup program will all the navX-Sensor tools and libraries.  The C++ libraries for FRC are automatically installed into a local “maven” repository located at C:\Users\Public\frc2019\maven.

I am unable to find a method of obtaining the maven files and json file themselves for use in offline installation (similar to the CTRE manual installation zip) without using the installer.

There is a “cross-platform library package” link at the top, but inside there is no maven directory nor vendordeps directory inside, instead it contains only a few gradle projects with source in the incorrect line-ending format. Even after the line-endings are fixed, the gradle projects still do not build and instead fail with: the line-endings are fixed an error appears:

Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
Caused by: java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain

Is there any documentation for performing an offline installation of the NavX-FRC library on Linux that I am overlooking?

I believe that an online install will work (VS Code Palette -> WPILib: Manage Vendor Libraries -> Install new library (online), then paste in – at least for the moment, while you’ve got Internet access. “Test to make sure we can build sans-Internet” is on the pre-competition checklist.

I couldn’t find any documentation on a non-Windows, offline install beyond what you pointed out. I reverse engineered the following process based on what the CTRE offline installer installs. After completing this process and installing the offline library in my VS Code project, I could compile and link code with references to the AHRS class. Note that this was for C++ on a Mac. I expect this would work for Linux as well. For Java, I’d try replacing “navx-cpp” with “navx-java” in steps 4, 5, and 6, and replace all of the curl commands in the remaining steps to fetch all of the .jar and .pom files in

  1. cd ~/frc2019/vendordeps
  2. curl -O
  3. cd ../maven
  4. mkdir -p kauailabs/navx/frc/navx-cpp/3.1.344
  5. cd kauailabs/navx/frc/navx-cpp
  6. curl -O
  7. cd 3.1.344
  8. curl -O
  9. curl -O
  10. curl -O
  11. curl -O
  12. curl -O
  13. curl -O
  14. curl -O

That did the trick, thank you!

This is an extremely useful post; but the version has updates and it only works for C++. I used it as a basis for an automated script that I have attached it. It installs the libraries under ~/navx-mxp like the readme tries to describe (probably unnecessary) and then does the vscode modules. It extracts the version from the first json file and downloads the corresponding C++ and JAVA files from maven (so you have to be connected to the internet). If you re-run the script, it deletes existing files and gets them again, so it makes for a good reset. It should also continue to work as is if a new version gets released. (2.5 KB)

1 Like

Very nice. Thanks for the update and the automation!

Thanks. Couldn’t have done it without you :grinning:.