Skip to content
This repository has been archived by the owner on Sep 4, 2022. It is now read-only.

Gyro #61

Open
drewwhis opened this issue Mar 10, 2020 · 6 comments
Open

Gyro #61

drewwhis opened this issue Mar 10, 2020 · 6 comments
Labels
software Write software

Comments

@drewwhis
Copy link
Member

drewwhis commented Mar 10, 2020

We have a gyro attached to the robot but we're not doing anything with it right now.

We could easily add it to the Swerve Drive Subsystem and zero it on initialize. Then we could easily rotate until it reads the value we want it to read.

Example: https://github.com/juchong/ADIS16470-RoboRIO-Driver-Examples/blob/master/java/src/main/java/frc/robot/Robot.java

@drewwhis
Copy link
Member Author

private ADIS16470_IMU mGyro = new ADIS16470_IMU(); should be how to instantiate it

@drewwhis
Copy link
Member Author

drewwhis commented Mar 10, 2020

mGyro.reset() can be called when the robot is facing forward to zero out the gyro.

@drewwhis
Copy link
Member Author

It reads like the default axis of rotation is when the gyro/roboRIO are mounted flat, facing upward, so we won't need to configure that.

@drewwhis drewwhis added the software Write software label Mar 10, 2020
@drewwhis
Copy link
Member Author

We may want to add a button on Shuffleboard and a command to zero the gyro. Note that the gyro should ONLY be zeroed when the robot is on the field facing directly forward.

@drewwhis
Copy link
Member Author

Actually, we may just want to zero the gyro every match. We could do that during the start of autonomous.

@drewwhis
Copy link
Member Author

Looks like this isn't done after all.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
software Write software
Projects
None yet
Development

No branches or pull requests

1 participant