I am a programmer by profession and new to Robotics. I have studied ECE, so know electronics, but not very familiar with mechanical aspects of robotics. I am working on a learning project with Dagu Rover 5 platform.
I am trying to control the 4 DC motors with PWM and want to use the optical encoders for feedback. I am looking for some algorithms, example code in C to effectively control the rover. I know how to control the GPIO, PWM and interrupts from the processor. I am more interested in learning the algorithm that controls the motors based on this. For now, i am working on a manual robot, controlled with up/down/left/right keys. In future, I would like to add sensors, camera etc and work on autonomous aspects. Any pointers would be helpful.
For reference, I am working on the Raspberry Pi platform to control the rover.