FTC pidf loop creation help

Hey guys, I am using TensorFlow to find the center point of the stone block to take the input from TensorFlow into the PIDF loop. Could someone point me into the right direction on how to use a pidf loop with ftc.

Though I’m not 100% sure if this is accurate, I think there are still two independent problems here. This is my mental model of what you’re describing:

The first problem is using a Camera & Tensorflow to generate numbers which describe “where is your robot, relative to the stone block”.

The second problem is generating motor commands to cause the robot to move to a given location, relative to the detected block.

The two can (and should) be solved independently, then joined together.

To focus on #2 - what’s your comfort level with closed-loop control algorithms in general? Have you implemented and tuned PID before, inside or outside of FRC?

A rigorous and generalized approach to #2 will involve a decent chunk of control theory and math, though given enough information folks around here can help guide through the tough parts. If you are looking for a taste of where the rigorous approach starts, this blog post might be helpful.

Keep in mind - there are many functional answers here, and choosing the most optional answer depends very heavily on your particular application. Therefor, I do not expect you will get a response pointing to the right direction, but rather a set of recommendations you’ll have to work through.