frc6377 / crescendo_2024

Other
5 stars 1 forks source link

Add Tag searching for when Odometry Fails #246

Closed ModBoyex closed 6 months ago

ModBoyex commented 6 months ago

Justification

We need a last-chance option for when our odometry fails us, and we still need to score. Odometry normally gets messed up when we are being defended by other robots (which happens a lot at comp), and this causes the turret to calculate where it should be shooting wrongfully.

Implementaion

The idea for this implementation is that the turret will first use the Pigeon2 on the robot as a gyro to point toward the general speaker side of the field, if it does not find an April tag there, we move to 2 other setpoints that are 45 degrees in each direction of were the Pigeon says we would go. This covers most cases, and the driver is mostlikey going to face that general direction