navX2-MXP libraries for use with the RoboRIO Libraries from WPI are available in each of the languages/development environments commonly used to development FIRST FRC robot applications:
These libraries provide access to a navX2-MXP sensor (as well as the “Classic” navX-MXP sensor) via SPI, I2C and USB and UART – as well as USB and I2C interfaces to navX2-Micro, and USB Interfaces to VMX-pi.
[Update: 1/7/2022 – Version 4.0.442 is now available – which is compatible with the FRC WPILib 2022 Release Candidate 1. For more details on installation, see the page corresponding to your chosen development language.]