You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/docs/software/hardware-apis/sensors/gyros-software.rst
+11-14Lines changed: 11 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,17 +5,14 @@ Gyroscopes - Software
5
5
6
6
.. note:: This section covers gyros in software. For a hardware guide to gyros, see :ref:`docs/hardware/sensors/gyros-hardware:Gyroscopes - Hardware`.
7
7
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.
9
9
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.
14
11
15
12
.. note:: It is crucial that the robot remain stationary while calibrating a gyro.
16
13
17
14
ADIS16448
18
-
^^^^^^^^^
15
+
---------
19
16
20
17
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.
21
18
@@ -34,7 +31,7 @@ The ADIS16448 uses the :code:`ADIS16448_IMU` class (`Java <https://github.wpilib
34
31
ADIS16448_IMU gyro;
35
32
36
33
ADIS16470
37
-
^^^^^^^^^
34
+
---------
38
35
39
36
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.
40
37
@@ -53,7 +50,7 @@ The ADIS16470 uses the :code:`ADIS16470_IMU` class (`Java <https://github.wpilib
53
50
ADIS16470_IMU gyro;
54
51
55
52
ADXRS450_Gyro
56
-
^^^^^^^^^^^^^
53
+
-------------
57
54
58
55
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.
59
56
@@ -72,7 +69,7 @@ The :code:`ADXRS450_Gyro` class (`Java <https://github.wpilib.org/allwpilib/docs
72
69
frc::ADXRS450_Gyro gyro;
73
70
74
71
AnalogGyro
75
-
^^^^^^^^^^
72
+
----------
76
73
77
74
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.
78
75
@@ -91,9 +88,9 @@ The :code:`AnalogGyro` class (`Java <https://github.wpilib.org/allwpilib/docs/re
91
88
frc::AnalogGyro gyro{0};
92
89
93
90
navX
94
-
^^^^
91
+
----
95
92
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.
97
94
98
95
.. tabs::
99
96
@@ -108,9 +105,9 @@ The navX uses the :code:`AHRS` class and implements the :code:`Gyro` interface.
108
105
AHRS gyro{SPI::Port::kMXP};
109
106
110
107
Pigeon
111
-
^^^^^^
108
+
------
112
109
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.
114
111
115
112
.. tabs::
116
113
@@ -138,7 +135,7 @@ Gyros are extremely useful in FRC for both measuring and controlling robot headi
138
135
Displaying the robot heading on the dashboard
139
136
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
140
137
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:
0 commit comments