How do I 'fuse' together two different kinds of data to get a final result?

32 Views Asked by At

I am building a robot (2 powered wheels and one ball bearing). The problem is that I can't seem to make it drive straight. I literally find it impossible, I have been trying for weeks.

Currently I am able to rely on rotations (of both motors) or the gyro readings.

Is there a way I can fuse those together, giving me a more accurate way to determine which motor I need to speed up?

My motors accept a value from 0-900 (although the speed should be determined by me and not fixed). Also if an algorithm exists, I'd like some directions of what I'd need to swap if I make the motors go backwards.