Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
first:adxrs450_gyro_board_frc:java [24 Oct 2018 18:33] – [Using getAngle() and getRate()] Kristen Chongfirst:adxrs450_gyro_board_frc:java [10 Dec 2018 21:10] (current) – [Re-Zeroing the Gyro] Kristen Chong
Line 13: Line 13:
 \\ \\
 \\ \\
-===== Sensor Initialization and Calibration =====+===== Sensor Initialization and Calibration with calibrate() =====
 Once your gyro is defined and instantiated, you will need to initialize it with a calibration where it will execute as soon as the robot is powered on, typically robotInit(). To do this, you will need to call the calibrate() method. Calibration is necessary for proper operation and **MUST** be performed before the gyro can be used. For more information, please see the [[first:adxrs450_gyro_board_frc|general FRC Gyro page]]. Once your gyro is defined and instantiated, you will need to initialize it with a calibration where it will execute as soon as the robot is powered on, typically robotInit(). To do this, you will need to call the calibrate() method. Calibration is necessary for proper operation and **MUST** be performed before the gyro can be used. For more information, please see the [[first:adxrs450_gyro_board_frc|general FRC Gyro page]].
 \\ \\
Line 24: Line 24:
 \\ \\
 \\ \\
-===== Re-Zeroing the Gyro =====+===== Re-Zeroing the Gyro with reset() =====
 Sometimes it may be necessary to reset the gyro's "zero degrees" position. All gyros will have some amount of drift over time and it's physically impossible to calibrate out all sources of drift. In this case, you can use reset() to reset the current gyro heading to 0 degrees. When doing this, your robot should be facing the direction you want zero degrees to be, particularly if you are driving with field-oriented drive using an omnidirectional drive base. Otherwise, your robot may begin to behave incorrectly. For this reason, you should never automate this routine. Note that this **does not** recalibrate the gyro, so you don't have to be sitting still to perform this method properly. Sometimes it may be necessary to reset the gyro's "zero degrees" position. All gyros will have some amount of drift over time and it's physically impossible to calibrate out all sources of drift. In this case, you can use reset() to reset the current gyro heading to 0 degrees. When doing this, your robot should be facing the direction you want zero degrees to be, particularly if you are driving with field-oriented drive using an omnidirectional drive base. Otherwise, your robot may begin to behave incorrectly. For this reason, you should never automate this routine. Note that this **does not** recalibrate the gyro, so you don't have to be sitting still to perform this method properly.
 \\ \\
first/adxrs450_gyro_board_frc/java.txt · Last modified: 10 Dec 2018 21:10 by Kristen Chong