Gyros and IMUs
Robots can use gyroscopes(gyros) and Inertial Measurement Units (IMUs) to provide a measurement of angles or accelerations that the robot chassis experiences. These devices can range from single axis gyros that only provide heading measurements to 6 axis IMUs with 3 axes of angular measurements and 3 axes of linear acceleration.
Some of the gyros and IMUs available for use in FRC include the ADXRS450 single axis gyro and the ADIS16470 IMU. Gyros usually have a different coordinate system than what is used for the chassis in WPILib, so the software needs to handle the conversion between the two.
References:
https://docs.wpilib.org/en/stable/docs/hardware/sensors/gyros-hardware.html#three-axis-gyros
https://docs.wpilib.org/en/stable/docs/hardware/sensors/accelerometers-hardware.html
https://en.wikipedia.org/wiki/Inertial_measurement_unit
https://github.wpilib.org/allwpilib/docs/release/java/edu/wpi/first/wpilibj/ADIS16470_IMU.html

Discussion