My team wants to implement either motor encoder control or PID control into our autonomous for more accurate maneuvering. With the encoders, we would set the number of degrees we want the wheel to turn. But, from what I have seen, PID control would be easier. So does PID just let you run the motors as you would normally, except with a more accurate speed? As in, PID control just adjusts the motor’s power to account for other variables that might be slowing it down/speeding it up, no?
This also begs another question. If we enable PID control, and set a motor to 100 power, then how is the PID controller going to give the motor extra power when it needs it? Wouldn’t it already be at maximum power? Because if this, it may be necessary to use, say, 95 as the max power of motors, so PID can increase the power.
If we get PID working in autonomous, we might as well enable it in teleop for more consistent control, correct?
Also, I have heard of problems where a robot’s motors can slow down to 65% speed in automomous, possibly due to PID control. Has anyone heard of this?
Finally, PID control is just added with the following line, correct?
nMotorPIDSpeedCtrl[motorX] = mtrSpeedReg;
When the above line is implemented, it should make the standard “turn on motor, wait 3 seconds, turn off motor”-type autonomous movements more accurate, right?
Thanks a lot, an answer to any of these questions will be very helpful.