My 3pi has slightly mismatched motors and setting both motors to move forward at the same speed always causes the 3pi to veer to the right. For example, In a run of 20cm, it can veer as much as 7.5cm off heading. The tires, motor shafts, and running surface are clean and the robot has done this since I pulled it out of the box 2 weeks ago.
The degree to which it veers is not a constant difference between motors, nor is it directly proportional to the speed at which the 3pi is run. So I am not able to compensate for the difference by increasing the right motor speed by a constant offset:
set_motors(speed,speed + offset); // eg. offset = 10
I also cannot compensate by increasing right motor speed by a percentage of the current speed:
set_motors(speed, speed * offset); // eg. offset = 1.08 to increase by 8%
I will be adding PID control which will allow my 3pi to correct itself and drive perfectly straight with sensor feedback; however, I anticipate the requirement to run the 3pi in a straight line for periods when the sensors do not see anything so it appears my only option is to generate a look-up table with calibration values. The table may provide me with an alternate proportionality (exponential?); although, once the table exists, I would of course not waste cycles with unnecessary math.
I also have a design which will allow me add encoders to the 3pi, but do not have spare i/o pins on this version.
I was hoping the constant voltage to the motors would provide more consistent motion, but of course the veering is only consistent at a single speed. I may also have to create another table to enable accurate 90º and 180º turns at various speeds.
Have others experienced this same issue? Am I missing alternatives to a calibration table?