Here is a navx_install.sh script for version 3.1.413 of the navx-mxp cross-platform libraries for linux and macos. It is based off of the one mandrews281 did back in 2019. -Updated for the 2021 season.
Works for me, but hasn’t had much testing. Please let me know if it works for you.
navx_install.sh (3.6 KB)
It assumes you have installed wpilib into the default location ~/wpilib/2021
- create a ~/navx-mxp directory
- download and unzip the navx mxp libs into it
- download the navx_frc.json into ~/wpilib/2021/vendordeps
- create the ~/wpilib/2021/maven directories for c++ and java
- download the maven-metadata.xml and zip files into the correct directories
After running the script, you will still need to right-click on build.gradle in vscode, select manage vendor libraries, and “install new libraries (offline)” (or “check for updates (offline)” if there is an update)
If you re-run the script, it deletes existing files and downloads them again, so it makes for a clean reset. It should also continue to work if a new version gets released. The library version number is read from the navx_frc.json.
The curious things is that kauai still has the vendordeps/navx_frc.json file for the latest version of the libraries hosted on a 2020 url: https://www.kauailabs.com/dist/frc/2020/navx_frc.json. There is no 2021 url as of yet.
So when you check for updates, periodically check to see if Kauai decides to move this json file to https://www.kauailabs.com/dist/frc/2020/navx_frc.json. If so, you’ll need to update the bash script accordingly.