How to use feedforward/pid to keep shooter speed constant

Though you have to convert from volts to percent output.

2 Likes

I know this has been posted before but wanted to toss it over -

frc-docs has some examples of how to tune a shooter flywheel by hand. It could help build some intuition about the different parameters do, and what order to tweak them in.

In turn, use this intuition to tune on your real robot - or to identify when a bug in software is causing a parameter not to have the expected impact.

1 Like

Sure, that works fine since the Talon doesn’t have to do anything. My team’s mechanisms have worked great with setting the Talon kF once and letting it take care of the calculation - it’s easy to determine kF and code with minimal effort.

For drive motors currently my team uses the SwerveBot example with it’s use of WPILib PID for both the drive and turn motors. We are happy with those results that don’t involve the Talon. For teams looking to perform a scientific study - use several varieties of PID and report back to us (WPILib PID and profiled; Talon PID and profiled (motion profiling, motion magic)

The Talon can do the feedback control locally while using a feedforward voltage that is calculated on the RIO using the full ks, kv, ka model (or an augmented model including external loading). This is what the arbitraryFeedforward param is for, fundamentally.

The internal Talon kF will work fine for a motor that only runs at a single speed with no substantial friction or sustained external loading. As you deviate from that situation, a more-complicated feedforward strategy becomes necessary for good control.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.