Closed joecaraccio closed 2 years ago
Use this class for controlling the Talon via PWM: https://first.wpi.edu/wpilib/allwpilib/docs/release/java/edu/wpi/first/wpilibj/Talon.html
For controlling it via CAN, we can use the typical class we use.
Updated Plan of Attack. I think we are close on the tuning.
@TrueDemoknight
TODO: Tune new arm and test arm in auto
The Arm Subsystem is a new experimental subsystem that we are predicating will be a part of the 2022 game. Worse case scenario it stays in our utility library and we utilize it on the future.
The Arm has 2 motors (each controlled by a talon). One part of the arm controls the extension of the arm, the other controls the 'shoulder'. Encoders will be available on extension arm, and encoder will be available on shoulder. Limit switches pending, but I believe will be on each end of the extending arm, to indicate maximum or minimum extension
Here is a basic checklist of what we need to do to get this working:
Look for; mTurretTalon.set(ControlMode.Position, mPeriodicIO.demand);
if you look at line 151 of link, there is an example of the 'error angle' (amount our turret needs to rotate) to reach. In this case we determined how much error our camera was off from the goal target (usually somewhere within 20 degrees or less) and then calculated how many 'ticks' that is. We will have to quantify how much distance ticks are on the arms motors. For example, on the extending arm...to move 1 centimeter it might take 1000 ticks (guessing)