richardson-area-wide-robotics / infinite-recharge-2020

Source code for 2020 FRC season - Infinite Recharge
0 stars 0 forks source link

Implement code to check that robot is flat to floor before shooting #21

Open nbgray opened 4 years ago

nbgray commented 4 years ago

Could be implemented using the Limelite/Ricklite to determine angle to target, or using accelerometer.

nbgray commented 4 years ago

Robot will have a drop center, so flat needs to be a range of values.

elizaBarnett commented 4 years ago

seems like we'd have to modify the the gyroscope library in order to get multiple angles at once.

nbgray commented 4 years ago

@kushagharahi @elizaBarnett I'm not sure that the library we have will give us this information. However, I saw a round where the rear end of the robot was on a power cell, which made us miss the shot. I still think this is a good feature to have, just not sure at this time how to do it.

kushagharahi commented 4 years ago

@nbgray Can we use the y accelerometer values from the adis lib? https://github.com/juchong/ADIS16470-RoboRIO-Driver/blob/master/java/src/main/java/com/analog/adis16470/frc/ADIS16470_IMU.java#L938

nbgray commented 4 years ago

@kushagharahi The accelerometer returns our current acceleration in that plane. If we're tilted but not moving, the acceleration is 0.

We can use that if we want to double integrate it ourselves, which will eat up computation time. It would be best for the ADIS to handle it for us.