View Single Post
  #9   Spotlight this post!  
Unread 07-04-2004, 23:15
gnormhurst's Avatar
gnormhurst gnormhurst is offline
Norm Hurst
AKA: gnorm
#0381 (The Tornadoes)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Trenton, NJ
Posts: 138
gnormhurst will become famous soon enoughgnormhurst will become famous soon enough
Re: trentonDrive.c: our joystick/wheel drive code

Quote:
Originally Posted by Astronouth7303
Yes. I've been thinking about similar things.
Basically, you can determine the center (and angle) of rotation from the width of the bot and the distance the left and right sides travel in the same time. The only problem is that I don't know the formulas in that context.
I'm not sure what formula you wish you had, but think about this: while the bot is turning the wheels will trace out two concentric circles. In general, when any wheeled vehicle is turning, you want the wheels to all travel in concentric circles, with each wheel tangent to the circle it traces out. If this is not the case, something will have to give, and that's why you see four-wheeled bots jumping around as they try to turn on the carpet.

If you think about it, the front wheels of a car are not always parallel -- during a turn the inside front wheel should be turned at a sharper angle.

So this note applies only to two-wheeled bots.

If the two wheels are 30" apart, and the outer one runs at three times the RPMs of the inner one, the outer one will trace a circle with three times the circumference, and thus three times the radius. The difference between the outer and inner radii is always 30", so in this case the inner radius must be 15" and the outer, 15 + 30 = 45".

radiusInner = radiusOuter - 30;

wheelSpeedRatio = radiusInner / radiusOuter;

substituting ( radiusOuter - 30 ) for radiusInner:

wheelSpeedRatio = ( radiusOuter - 30 ) / radiusOuter ;

So if you want a certain turning radius, that is a formula for computing the ratio of wheel speeds that you need.
__________________
Trenton Tornadoes 381
2004 Philadelphia Regional Winners
2006 Xerox Creativity Award
---
My corner of the USPTO.
My favorite error message from gcc: main is usually a function
My favorite error message from Windows: There is not enough disk space available to delete this file.