Team138Entropy / Entropy2022

FIRST Robotics Team Entropy 138's code for the 2022 season
Other
3 stars 0 forks source link

Arm Subsystem #1

Closed joecaraccio closed 2 years ago

joecaraccio commented 2 years ago

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)

joecaraccio commented 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.

joecaraccio commented 2 years ago

Updated Plan of Attack. I think we are close on the tuning.

@TrueDemoknight

Team138Entropy commented 2 years ago

TODO: Tune new arm and test arm in auto