Mechanics and Construction > Mechanics and Construction

Driving straight for 4 meters

(1/5) > >>

silvers:
Hello, I'm looking to build a robot which will quite simply drive along a perfectly straight line for 4 meters. So far the one I made has slight curves to one side or another. Is there a way I can fix the curving? Or are there tips in design which can help a robot drive straight?

Which is better? Two stepper motors / Two DC motors with seperate shaft encoders / or Dual Differential Drive?

Even if the mechanical part is done right, you still have to be sure that friction on one end is equal to the other end. This seems like a difficulut task. Any suggestions?

hgordon:
Have you considered using a rate gyro ?  Any measurements based on wheel rotation are subject to error because of slippage or slight differences in wheel diameters.

http://www.dprg.org/projects/2003-01a/

trigger:

--- Quote from: silvers on February 20, 2007, 01:22:42 PM ---Hello, I'm looking to build a robot which will quite simply drive along a perfectly straight line for 4 meters. So far the one I made has slight curves to one side or another. Is there a way I can fix the curving? Or are there tips in design which can help a robot drive straight?

Which is better? Two stepper motors / Two DC motors with seperate shaft encoders / or Dual Differential Drive?

Even if the mechanical part is done right, you still have to be sure that friction on one end is equal to the other end. This seems like a difficulut task. Any suggestions?

--- End quote ---

You need some form of feedback control. Usually that means some kind of sensor giving position feedback. In software, you can compute the difference between the desired position and the actual position, and then adjust your position accordingly. The simplest way to do this is called PID control. See http://www.societyofrobots.com/programming_PID.shtml. Which sensor you will pick depends on your implementation requirements. For example, if you are allowed to modify your environment, you could put a 4 m line of white tape on the floor to guide the robot. With a photoresistor on either side of the robot's underside, you can follow the line fairly straightly. There are "photovore" tutorials eslewhere on this site. There are other ways to do this of course, but they're all probably more expensive. :)