Bit of a rant here. We’ve been trying for days, weeks, this season, and in past seasons, to get a handle on using PIDs. For what seem to be relatively simple use cases like turning to a certain angle, or centering on a Limelight target. Both of which we had working fairly well without using PIDs. We use similar logic, of basically, ‘as we approach the target, we reduce the power’. It seems to work fairly well. For example, we can reliably get centered on the limelight target to < 0.50. Half a degree. Without PIDs. Even for a long range shooter at 30ft I think that’s only a couple inches off, which is probably negligible, because you’re probably going to have at least that much error just from ball spin, balls drifting in the air, etc.
So where’s the benefit of using PIDs in these use cases?
We use % motor power for our drive, using Talon controllers. So the range of inputs are around 0.20 (minimum power) to 1.0. Maybe there are better options. But once I realized that the output from the PID loop for this Limelight example is producing a tiny error, 0.5 - 5.0, as you get close to being centered, and that we’d then have to convert that into a meaningful adjustment to our % power, it doesn’t seem worth it. We can do something simpler, like stair step the power down at certain thresholds, and get the same result.
Also, we’ve never gotten PID tuning via the Shuffleboard to work, either. I’ve run it in Test mode, added the PIDSubsystem to the Shuffleboard, and the widgets just randomly disable, or grey out and don’t take the inputs, etc. More lost time.
But it seems like there’s so much discussion, articles written, documentation, etc. on the benefits of PIDs that we’ve spent/wasted so much time trying to get them to work. And now I’m wondering why, and lamenting over that lost time. I’d love to get to using Trajectories for nice looking, efficient paths in auto. I’ve skimmed through the tutorial for that and see that they use PIDs, so some understanding is probably helpful.
I’ve been assuming we’re going to use PID to maintain speed for our shooter. Maybe that’s a better use case.
But so far, trying to get PIDs to work, has only been a great deal of lost time, with no benefit. Anyone have a similar experience, or can convince me of the benefit of continuing to try to get them to work?
Also, FYI, I have minimal electrical and mechanical experience. I’m more of a pure coding mentor. I’ve tried to learn some of the wiring, electrical, motor control, etc. from a other mentors who are MEs with experience in electrical controls, but still, there’s a vast void of stuff I don’t know.