Go to Post Do you guys mind if we postpone kick-off to around January 26 or so? We can still keep the ship date on February 20, if that isn't a problem. - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 10-10-2003, 03:37
Sachiel7's Avatar
Sachiel7 Sachiel7 is offline
<Yes I managed to flip it
AKA: Shayne Helms
FRC #1132 (RAPTAR Robotics)
 
Join Date: Sep 2002
Rookie Year: 2002
Location: Richmond, VA
Posts: 541
Sachiel7 is just really niceSachiel7 is just really niceSachiel7 is just really niceSachiel7 is just really niceSachiel7 is just really nice
Send a message via AIM to Sachiel7
Talking Multi Drive Fun...

Well, as I've posted in a few other threads, I've got this great Multi-Drive system cooked up for this year. I'll list the Drive types one more time:

-Skid-Steer
-Crab/Swerve (I will refer to it as Crab)
-Car
-Angle

Well, as far as the designs go, they're done. I've "proto'd" them about 3 times, and each attempt was a success.
Anyway, I had some concepts for control/sensors, and decided to prep the programming pre-season as well. So, I worked on getting down the math.
So far, I've gotten the Crab done. That's the only thing I've worked on so far.
Anyway, for those who are interested in crab control, here's what I came up with:
-First off, Jump for Joy! The new PIC can calculate negative numbers! This has always been a pain for 1 joystick drive in the past.
-Plot your Joysticks X and Y axis' at a point on a graph(for visual example)
-Get the Dx (Distance of X from origin) and Dy (same of y).
-Flip Dx and Dy so Dx=Dy, Dy=Dx
-Get the Hypotenuse of the Vector to form a triangle. Basically
H = SQR(DX^2+DY^2)
-Next, you need the Angle that H is from DX.
To get an accurate readout, you need the inverse sign (sin-1) of (DX/Y) Remember, DX is actually the original DY value.
Since no known Programming Language (or none I've used) has a function for sin-1, or ArcSin, you must define it as this:

A = (2 * ATN((DX / H) / (1 + SQR(1 - (DX / H) ^ 2)))) * (180 / PI)

This will give you the Angle in Degrees.
Now, you know the angle. Orient it properly with the graph.
My system is designed to have the wheels pivot 180 degrees. They start in the 90 degree position. We Want (-127,0) to be 0 degrees, (0,0) to be 90 degrees, and (127,0) to be 180 degrees.
Instead of a fancy wheel turning system, it's smoother, and worth a little math. If you look carefully you will begin to realize that the angle of the wheel when reflected over both axis' is the same. In other words, if you know the direction of the hypotenuse (negative, for example) than you know which direction to turn your drive motor, and how many degrees to pivot the wheel(s). So, if you wanted to drive forward, without pivoting the wheels, and then you shift backward, you don't need to waste time and energy rotating your wheels all the way around, just reverse the drive. The same applies for angles reflected over the x axis.

Now, to determine your PWM output:
-Get the Hypotenuse, and make sure it has the proper sign for it's quadrant.
-Double the Hypotenuse. This allows the maximum output to the motors

When tinkering with this, you may realize that when corners are approached, the output is well over 254. That's simply because the hypotenuse is longer than the sides in a 45 degree angle. So in other words, you need to limit the Hypotenuse.
Now, there are better ways to do this, I'm sure. This is just the path I decided to take, because it is good enough for the application we're using it for.
Here's Some simple math:

C=H
If C > 127 then C = 127
if C < -127 then C = /127
C=C*2
Drive =C

You will notice that the range in which 127 resides as C is from 127 to 90, roughly 37 values set the same.
Now, for us, this is just fine. We're glad that we can achieve full speed when one value is 0.
Anyway, I put together a small program that takes a used defined point, and displays the drive speed/direction, the Hypotenuse, Wheel Angle, DX, DY, etc., and draws it as a triangle.
It works just right, and even though it's dull looking, it still shows that the math works. I need to go back and clean out the code, but I'm just glad it's working.

Anyway, the Skid/Car/Angle coding is simple as pie.
For those wondering what I'm calling "Angle" drive, it is like car where a set of wheels pivot, but 2 setd pivot opposite directions on the front and back. It's really easy to do some figure 8's with that one
Car only pivots 2 wheels, Crab pivots all 4, and Skid locks 'em in back at 90 deg.
I think we may be one (if not the) first teams to build this kind of system on the east coast. Another slight variant from typical designs is the fact that motors aren't connected to the wheel assemblies. Their force is transferred out to 2 sets of wheels each, across a chain system.
I won't post tooo much info on my lovely system, though. At least, not until it's built...
__________________
-=Sachiel7=-

There's no such thing as being too simple!
Look for Team #1132, RAPTAR Robotics at the VCU Regional this year!

Last edited by Sachiel7 : 10-10-2003 at 03:40.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
1 stick drive to 2 stick drive wayne 05 Programming 18 01-04-2004 16:41
center-wheel drive Mercutio Technical Discussion 27 02-02-2004 21:19
how does crab drive work? Soukup Technical Discussion 13 25-04-2003 11:31
Direct drive or Chain? Suneet Technical Discussion 32 27-03-2003 23:00
"Motors and Drive train edition" of Fresh From the Forum Ken Leung CD Forum Support 6 29-01-2002 12:32


All times are GMT -5. The time now is 12:59.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi