Closed jcorcoran closed 2 years ago
We've moved the control of the turret w/ limelight to the red button. I still think lineup could be faster if we didn't have to go through the motions of:
I'd still like to investigate giving the operator the ability to change the position of the turret: If we free up one of the joystick axis we could have a field-oriented turret position control.
press the joystick in the direction you want the turret to aim (relative to where it is on the field presently).
the command would subtract(add?) the angle of the joystick axis from the current chassis heading (from gyro) to get a robot relative turret heading.
When the analog stick returns back to the center position, it should re-enable turreting with limelight.
This should allow the operator to just pint the stick where the goal is at relative to the robot on the field, and then let go and it will fine tune the position based on the limelight feedback.
Should be able to get the angle (in radians) of the X & Y axes of the joystick using something like:
double theta = Math.atan2(y, x);
And then convert that to degrees with the wpilib util method
using the turret w/ limelight button is awkward while driving.
Eliot suggested moving to the red button on the controller.
I don't think this is currently wired up, but once it is, we should use move the command to that button so its easier to use during a match.
Would also be nice if the operator could toggle between turreting w/ limelight and a set of fixed hood positions, to held get the turret aimed in the right direction