frc2399 / 2022-Season

This is our NEW repository for the 2022 Season.
Other
0 stars 5 forks source link

Create a complete command that turns toward the hub, finds the distance, sets the shooter motor speed and shoots #89

Open hschilling opened 2 years ago

edf42001 commented 2 years ago

The TurnToHub command looks good! Currently the command ends when the robot is pointed +- 5 degrees of the target. In teleop, robots could bump us around. It would be good to have the command indicate it is in range, and then keep running to keep us pointed there. You could run the command, and then follow it immediately with another with the end condition removed:https://docs.wpilib.org/en/stable/docs/software/commandbased/convenience-features.html#perpetually

Or, the command never ends, but Math.abs(modAngle(error)) <= errorTolerance is moved into a function called inRange in PhotonLimelight, which is used to trigger the shooting to start with a WaitUntilCommand https://docs.wpilib.org/en/stable/docs/software/commandbased/convenience-features.html#waituntilcommand

Or something else, there's lots of ways of doing this.

edf42001 commented 2 years ago

Thoughts on tuning shooter, somewhat in order of importance: