I am currently in a robotics class at my university and we are using the GoPiGo3 with Raspbian for Robots as our OS, a RaspberryPi3, and we are using the GoPiGo3 Golang packages to write programs for our robot. My current issue is when using the the methods SetMotorPosition and getMotorEncoder, the right motor seems to be either rotating faster than the left one or starts moving before the left one so it slowly veers left as it moves forward until eventually the left one catches up with the right motor and straightens out. Is this an issue with the hardware or is it an issue with the methods?
This is my function that I am using, I am new to Golang so if my coding skills look weak its because they definitely are.
This is my output, I printed out the encoder position of the left and right motor so it reads left position on top and right position directly below it.
In my test I am only having the GoPiGo3 drive six feet and then stop.