Let's Make Robots!

2 Wheel Drift

I have a 2 wheeled robot - 2 GM10's with little thin wheels.  I've hooked them up to an arduino with an L293.  I have it going forwards, backwards & turning well enough.  The problem is when going forward, it seems to drift to the right slightly.  Any suggestions as to what the problem might be?  Do I need wider wheels?  A proper castor?  (ATM, the front of the chassis rests on the ground). 

Basically, what I'm asking is, with 2 small motors and thin wheels, can I expect a bot to go in a perfectly straight line?


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
That's to assume you can't be both.  Besides, an understanding of why something happens (in this case drift) can only help with future work, arty or otherwise.  So I understand where you're coming from, but I'm still going to try to make my robot more accurate :-)
Stuff is either straight or it isn't in my world. I believe I may have mild OCD.

those lenses do tend to see only details


It can't be done (cheaply).

Basically, both sides of your system are different. Your motors have a slightly different lengh of wire winding, your gearboxes have different amounts of friction, your  wheels are slightly different diameters and have different amounts of friction with the ground, one wheel might encounter more dust thanthe other one... etc.

You could add rotation sensors to make sure the two wheels are going at the same speed, which overcomes the differences in the systems up to the point they meet the wheels, but the wheels might still be slightly different diameters, etc...

What makes matters worse is that the two halves of the system are different in completely unpredictable ways. We can't know how old or how used each motor is or the difference between them, for example.

I would put my neck out and say the only way to get a bot to go in a perfectly straight line is using GPS or a compass.

(Now, I sit back and wait for all the comments from the number of people who think they have robots which go in "perfectly" straight lines.)

given that all BOA said is right, i think the problem can be mitigated but by building the robot case correctly.. My first robot (the one on the picture) had no correction system but it showed very little deviation. Some thing you could check:

-Is the weight in the middle? ie maybe your battery pack is placed more on a side than on the other.

-Is the contact point of the draggin on the middle? If the piece of the case that touches the ground is on one side, i think it can affect direction greatly.

-Is the case symmetrical? ie maybe it's longer/wider/heavier on one side.

Macdonag's comment on the castor inspired me.

Would a dragging castor not have a big effect on the deviation? The longer the castor's tail (in relation to the width between wheels), the better? I am thinking wind vane on a wind turbine.

Indeed, I can think of very little which does not affect the straightness of the path!

Castors are a pain sometimes. If the bot is tootling along in a relatively straight line, then stops and turns through what should be a known angle, it will not achieve it. the nature of a castor is that the centre cannot be the pivot point. So as the castor starts to turn, it pushes the robot back or forward ever so slightly.

Likewise, having just turned, the castor will be lying out to one side. If the robot then sets off on what should be a straight line, as the castor strightens relative to the bot, it will pull the bot off course.

I was hoping to hear the opposite 8-) .

I was comparing the straightening effect of a vane with that of a dragged objectin the robot's "tail". Hoping it would somehow form some sort of directional negative feedback. That would help the vehicle maintain a straight course. It would not guarantee it. And it would probably make turning less accurate.