I am making my own robot (quite similar to Turtlebot in terms of components) and I am working on a P controller to make my robot go straight forward: both motors should have the same velocity, regardless the surface differences in each wheel and the unbalances of the robot itself. The controller is implemented on an Arduino board.
So I wonder, how does the Turtlebot go straight? There must be some kind of control made! Is the code on the Opencr (the “Arduino” that serves as motor controller) open source? When you run the Teleop package in the Turtlebot, you just move it and it works, but… is there any way to research what is happening in a lower level?