My GoPiGo is drifting and wont drive in a straight line, and I’ve noticed that this is due to the motors running at different speeds. To fix this I was going to write a feedback controller program in the firmware such that the motors take their “actual speed” (speed calculated from the encoders) into account when they’re being powered and that way they always maintain the same speed. But I seem to have found that this is already implemented.
I’m currently trying to determine how to always enable PID for the motors. Any suggestions/advice? Thanks for your help.
PID is not enabled on the GoPiGo yet and there is an option to use trim to reduce the speed of one of the motors. You can try adding trim to the motors following the tutorial here.