Right now, I’m looking forward to include PID in my autonomous programs to move in a straight line and also turn accurately. I’ve researched a bit about PID and the basics but no idea how to integrate or use it. Can anyone share me a python template for both drive and turns? Also attach an explaination please so I can understand it.
This guide to PID by George Gillard is quite friendly and less daunting to understand in my opinion, it helped me greatly when I was in your situation.
Please do not just blindly accept a template or library that does the work for you that you do not understand (R2, G4).
I do think the Guide to PID by George Gillard is an excellent reference, and worth reading. But if you do not understand the mathematical models and just blinding plugging in numbers, maybe it is too soon for you to use PID.
It is unclear if you are MS or HS competitor. MS teams usually start with simple approaches, turn and see if you are pointing the way you want (depending on sensors). and brute force it. You might not have the maths to totally do it perfectly, but it might be good enough.
I’m not sure understanding the mathematical models is really too important. As long as they understand how a larger or smaller constant changes how the feed-back control reacts, I would say they understand enough abou PID to use it. I haven’t stayed in a Holiday Inn Express recently, so take this with a grain of salt.