Adam's Climber Prototype tests
- Poly's code is currently not using PID for shooter motor. It's just straight voltage, -1.0 to 1.0. To change the value, set SHOOTER_SPEED in const.py and re-deploy
- The live-update trigger from Smart Dashboard is not working reliably, do not use it.
- This encoder supports both Mag and Quadrature outputs, but at > 6600 RPMs you're supposed to use Quadrature
- Bound a reverse-shooter command to left trigger, so prototype can be moved up and down
- Remounted Talon with zipties so it doesn't fall off and yank out encoder cable again. :(
- The Talon SRX + CTRE Mag Encoder is supposed to be configureable to output RPMs, but I cannot work out how to do it. The CTRE doc on this is vague and awful. Same one I was disgusted with in 2016.
- It does, however, put out native encoder units. You can call getQuadratureDistance to see how many "units" it's traveled, or getQuadratureVelocity to see how many units per ms it's moving.
- I added "Shooter Quad Distance" and "Shooter Quad Velocity" to SD.
- As of this year, the official testing tool for Talons and other CAN devices is "Phoenix Tuner". There's a shortcut to it on the desktop of DS1 and DS2. Go to the "Plot" tab, choose the SRX from the "Selected Device" dropdown at the top, and click "plot disabled" to turn on graphing, press again to stop. Suggest hitting Auto Scale at least once.
- I ran some tests using native encoder units (aka ticks)
- One revolution of the screw shaft = 20,417 encoder ticks
- At full speed (1.0) with no bucket load, going upwards on the prototype, it travels 979,012 ticks per second (or so)
- The climber screw shafts are 8mm per rotation. Chris said with the 5:1 gear reduction the climber goes 0.8mm per revolution of the motor shaft
- Using above, we should be able to find the velocity (in ticks) the PID will need to be set to in order to run at 14,000 RPMs, which is our goal according to Chris.
- Given the above:
ticks_per_output_rev = 20417
motor_revs_per_output_rev = 5
ticks_per_motor_rev = ticks_per_output_rev / motor_revs_per_output_rev (= 4083.40)
desired_motor_rpm = 14000
goal_ticks_per_sec = ticks_per_motor_rev * desired_motor_rpm / 60 (= 952793.33)
goal_ticks_per_100_ms = goal_ticks_per_sec / 10 (= 95279.33)