Skip to content

Commit d648528

Browse files
calcmogulpjbuterbaugh
authored andcommitted
Update gyro docs (#2294)
* Update gyro docs The Gyro interface was deprecated in wpilibsuite/allwpilib#5445. * Fix title levels
1 parent 2b73d22 commit d648528

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

source/docs/software/hardware-apis/sensors/gyros-software.rst

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,14 @@ Gyroscopes - Software
55

66
.. note:: This section covers gyros in software. For a hardware guide to gyros, see :ref:`docs/hardware/sensors/gyros-hardware:Gyroscopes - Hardware`.
77

8-
A gyroscope, or "gyro," is an angular rate sensor typically used in robotics to measure and/or stabilize robot headings. WPILib natively provides specific support for the ADXRS450 gyro available in the kit of parts, as well as more general support for a wider variety of analog gyros through the `AnalogGyro`_ class. Most common 3rd party gyros inherit from the :code:`Gyro` interface making them easily usable too!
8+
A gyroscope, or "gyro," is an angular rate sensor typically used in robotics to measure and/or stabilize robot headings. WPILib natively provides specific support for the ADXRS450 gyro available in the kit of parts, as well as more general support for a wider variety of analog gyros through the `AnalogGyro`_ class.
99

10-
The Gyro interface
11-
------------------
12-
13-
All natively-supported gyro objects in WPILib implement the :code:`Gyro` interface (`Java <https://github.wpilib.org/allwpilib/docs/release/java/edu/wpi/first/wpilibj/interfaces/Gyro.html>`__, `C++ <https://github.wpilib.org/allwpilib/docs/release/cpp/classfrc_1_1_gyro.html>`__). This interface provides methods for getting the current angular rate and heading, zeroing the current heading, and calibrating the gyro.
10+
There are getters the current angular rate and heading and functions for zeroing the current heading and calibrating the gyro.
1411

1512
.. note:: It is crucial that the robot remain stationary while calibrating a gyro.
1613

1714
ADIS16448
18-
^^^^^^^^^
15+
---------
1916

2017
The ADIS16448 uses the :code:`ADIS16448_IMU` class (`Java <https://github.wpilib.org/allwpilib/docs/release/java/edu/wpi/first/wpilibj/ADIS16448_IMU.html>`__, `C++ <https://github.wpilib.org/allwpilib/docs/release/cpp/classfrc_1_1_a_d_i_s16448___i_m_u.html>`__). See the `Analog Devices ADIS16448 documentation <https://wiki.analog.com/first/adis16448_imu_frc>`__ for additional information and examples.
2118

@@ -34,7 +31,7 @@ The ADIS16448 uses the :code:`ADIS16448_IMU` class (`Java <https://github.wpilib
3431
ADIS16448_IMU gyro;
3532

3633
ADIS16470
37-
^^^^^^^^^
34+
---------
3835

3936
The ADIS16470 uses the :code:`ADIS16470_IMU` class (`Java <https://github.wpilib.org/allwpilib/docs/release/java/edu/wpi/first/wpilibj/ADIS16470_IMU.html>`__, `C++ <https://github.wpilib.org/allwpilib/docs/release/cpp/classfrc_1_1_a_d_i_s16470___i_m_u.html>`__). See the `Analog Devices ADIS16470 documentation <https://wiki.analog.com/first/adis16470_imu_frc>`__ for additional information and examples.
4037

@@ -53,7 +50,7 @@ The ADIS16470 uses the :code:`ADIS16470_IMU` class (`Java <https://github.wpilib
5350
ADIS16470_IMU gyro;
5451

5552
ADXRS450_Gyro
56-
^^^^^^^^^^^^^
53+
-------------
5754

5855
The :code:`ADXRS450_Gyro` class (`Java <https://github.wpilib.org/allwpilib/docs/release/java/edu/wpi/first/wpilibj/ADXRS450_Gyro.html>`__, `C++ <https://github.wpilib.org/allwpilib/docs/release/cpp/classfrc_1_1_a_d_x_r_s450___gyro.html>`__) provides support for the Analog Devices ADXRS450 gyro available in the kit of parts, which connects over the SPI bus.
5956

@@ -72,7 +69,7 @@ The :code:`ADXRS450_Gyro` class (`Java <https://github.wpilib.org/allwpilib/docs
7269
frc::ADXRS450_Gyro gyro;
7370

7471
AnalogGyro
75-
^^^^^^^^^^
72+
----------
7673

7774
The :code:`AnalogGyro` class (`Java <https://github.wpilib.org/allwpilib/docs/release/java/edu/wpi/first/wpilibj/AnalogGyro.html>`__, `C++ <https://github.wpilib.org/allwpilib/docs/release/cpp/classfrc_1_1_analog_gyro.html>`__) provides support for any single-axis gyro with an analog output.
7875

@@ -91,9 +88,9 @@ The :code:`AnalogGyro` class (`Java <https://github.wpilib.org/allwpilib/docs/re
9188
frc::AnalogGyro gyro{0};
9289

9390
navX
94-
^^^^
91+
----
9592

96-
The navX uses the :code:`AHRS` class and implements the :code:`Gyro` interface. See the `navX documentation <https://pdocs.kauailabs.com/navx-mxp/guidance/selecting-an-interface/>`__ for additional connection types.
93+
The navX uses the :code:`AHRS` class. See the `navX documentation <https://pdocs.kauailabs.com/navx-mxp/guidance/selecting-an-interface/>`__ for additional connection types.
9794

9895
.. tabs::
9996

@@ -108,9 +105,9 @@ The navX uses the :code:`AHRS` class and implements the :code:`Gyro` interface.
108105
AHRS gyro{SPI::Port::kMXP};
109106

110107
Pigeon
111-
^^^^^^
108+
------
112109

113-
The Pigeon should use the :code:`WPI_PigeonIMU` class that implements :code:`Gyro`. The Pigeon can either be connected with CAN or by data cable to a TalonSRX. The `Pigeon IMU User's Guide <https://store.ctr-electronics.com/content/user-manual/Pigeon%20IMU%20User's%20Guide.pdf>`__ contains full details on using the Pigeon.
110+
The Pigeon should use the :code:`WPI_PigeonIMU` class. The Pigeon can either be connected with CAN or by data cable to a TalonSRX. The `Pigeon IMU User's Guide <https://store.ctr-electronics.com/content/user-manual/Pigeon%20IMU%20User's%20Guide.pdf>`__ contains full details on using the Pigeon.
114111

115112
.. tabs::
116113

@@ -138,7 +135,7 @@ Gyros are extremely useful in FRC for both measuring and controlling robot headi
138135
Displaying the robot heading on the dashboard
139136
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
140137

141-
:ref:`Shuffleboard <docs/software/dashboards/shuffleboard/getting-started/shuffleboard-tour:Tour of Shuffleboard>` includes a widget for displaying heading data from a :code:`Gyro` in the form of a compass. This can be helpful for viewing the robot heading when sight lines to the robot are obscured:
138+
:ref:`Shuffleboard <docs/software/dashboards/shuffleboard/getting-started/shuffleboard-tour:Tour of Shuffleboard>` includes a widget for displaying heading data from a gyro in the form of a compass. This can be helpful for viewing the robot heading when sight lines to the robot are obscured:
142139

143140
.. tabs::
144141

0 commit comments

Comments
 (0)