PID looping in Blocks

Hi, I’m trying to learn how to code for next season, we heard about PID looping and are trying to learn more about it. We’re trying on move to python, but currently we are using blocks.

If you now how to code, or explain PID looping to me, please do!

https://www.vexforum.com/uploads/short-url/buexv3XI4CflyuDzkxC9wNzTOg4.pdf

Let us know what questions you have after reading this!

I would highly recommend looking into odometry (just google it). While PID by itself just using the motor encoders is a great first step, actually knowing where you are on the field is also important.

Many people call it the development stack!

You have multiple systems working simultaneously to solve a larger problem.

My favorite stack is:

  1. Odometry to get x and y of the robot
  2. Dubins Curves to generate the path the robot has to travel while respecting a turn radius
  3. Pure pursuit to act as the conductor to figure out an angle the robot has to turn to and the distance
  4. A Forward/Backwards PID, a Point Turn PID (activates when not moving forwards or backwards, like if the robot is turned away from the path), and a steer PID (Activates when moving forward, a PID that never adds positive motor value along a path, but rather negates motor value from one side or the other). Left motor power is fPID + tPID - abs(sPID[if negative, otherwise 0]), and right motor power is fPID - tPID - abs(sPID[if positive, otherwise 0])

It is really hard to code something like this in blocks. Therefore I would suggest switching to C++ or Python. Good luck!

I am in a similar spot with coding, but here is a post I found that was very helpful. It may be a bit repetitive, but I hope it will help! I think this is learning python or c++ from scratch. Let me know if this helps. Credit to the original poster.