So to help my thinking (hopefully) I’ve categorized the major (common) motor controlled mechanisms into the following types. I’m ignoring drivetrain components at the moment. If I’m missing any feel free to let me know. I would love some feedback on this. I’ve separated shooter from intakes for angular/linear purposes.
- Single jointed arm (arms, shooter tilts, etc.) (Position control primary, velocity control for emergencies)
- Elevators (Position control primary, velocity control for emergencies)
- Turrets (Position control primary, velocity control for emergencies)
- Intakes (Velocity control)
- Shooters (Velocity control)
If I wanted to take advantage of Voltage and Torque control with CTRE along with no profile, expo profile, and torque profile I would have to allow for 10 different setups (not for each mechanism, but at most). I’d love to have each mechanism support the most set of options, just for the fun of it.
This would mean the CTRE control requests would be for
Elevators and Arms and Turrets Control Requests
- Position Control Requests
- PositionVoltage
- PositionTorqueFOC
- MotionMagicVoltage
- MotionMagicTorqueCurrentFOC
- MotionMagicExpoVoltage
- MotionMagicExpoTorqueCurrentFOC
- Velocity Control Request
- VelocityVoltage
- VelocityTorqueCurrentFOC
- MotionMagicVelocityVoltage
- MotionMagicVelocityTorqueCurrentFOC
Intakes and Shooters Control Requests
- Velocity Control Request
- VelocityVoltage
- VelocityTorqueCurrentFOC
- MotionMagicVelocityVoltage
- MotionMagicVelocityTorqueCurrentFOC
I’d love for a thought check down below.
So I would need ks, kv, ka, (and kg depending) for volts and current.
I need kv, ka voltage for expo (if doing either voltage or current control, need the voltage)
max velocity, max acceleration I can get from WPILib’s feedforward classes (or just use the equations in the source code.
EDIT. If I were to maximize this for an Arm or an Elevator with lots of options I would need Closed Loop slots on the TalonFX. I only have 3.