Go to Post FIRST isn't a competition. It's a learning experience. Share the knowledge, and you'll learn more because there's bound to be someone who sees something about your project that even your own team didn't realize it can do. - CalTran [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-06-2010, 10:16
Straberrie's Avatar
Straberrie Straberrie is offline
The Plague
AKA: Rebecca
FRC #0375 (Robotic Plague)
Team Role: Programmer
 
Join Date: Feb 2008
Rookie Year: 2007
Location: New York
Posts: 59
Straberrie will become famous soon enough
Programming Andy Mark Killough Omni Directional Drive/ C++?

Hey everyone,

How would I use windriver to program the Killough Omni Directional Drive? Is there a present function for a four wheel Omni directional drive already? I know there is a function for Tank Drive and Arcade drive; is there something similar for Killough?

If not, do you know any manuals or do you have any suggestions?

Thank you very much!
__________________
Team 375: The Robotic Plague
Current Robot: I-Chihuahua
Last Event: Big Apple Breakaway
  #2   Spotlight this post!  
Unread 08-06-2010, 10:34
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Programming Andy Mark Killough Omni Directional Drive/ C++?

I can't tell you anything C++ specific, but I can tell you fairly generic things I learned in LabVIEW.

There *might* be a Holonomic Drive or Mecanum Drive class. If so, that is what you want. I know it exists in LabVIEW, but I do not know about C++.

If there is not, you can write a function or class to utilize four motor controllers in a holonomic arrangement and a vector from the joystick.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
  #3   Spotlight this post!  
Unread 08-06-2010, 13:26
Stephen Kowski's Avatar
Stephen Kowski Stephen Kowski is offline
BSEE, MSEE, JD
AKA: employed
no team
Team Role: Alumni
 
Join Date: Jun 2001
Rookie Year: 2000
Location: Saint Petersburg, FL
Posts: 1,144
Stephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond repute
Send a message via AIM to Stephen Kowski
Re: Programming Andy Mark Killough Omni Directional Drive/ C++?

Quote:
Originally Posted by Straberrie View Post
Hey everyone,

How would I use windriver to program the Killough Omni Directional Drive? Is there a present function for a four wheel Omni directional drive already? I know there is a function for Tank Drive and Arcade drive; is there something similar for Killough?

If not, do you know any manuals or do you have any suggestions?

Thank you very much!
http://www.chiefdelphi.com/media/papers/1836

It is all in the math if you are just looking for open loop control. Now if you want field oriented control or feedback that is a different story

look at the mecanum example, it is very similar to the holonomic calculations

good luck

-JSK

Last edited by Stephen Kowski : 08-06-2010 at 13:28.
  #4   Spotlight this post!  
Unread 08-06-2010, 14:04
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,101
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Programming Andy Mark Killough Omni Directional Drive/ C++?

If you just want some practical help for writing your own mecanum code... you can write your own code, which uses -1 to +1 joystick output values, as follows:


Quote:
Let x, y, and z be the rev/fwd, slide left/right, and spin CCW/CW joystick commands, respectively, which each vary from -1 to +1.


So:

x= -1 corresponds to full speed reverse, x= +1 corresponds to full speed forward,

y= -1 corresponds to full speed slide left, y= +1 corresponds to full speed slide right,

z= -1 corresponds to full speed spin CCW, z= +1 corresponds to full speed spin CW


If your joystick outputs don't look like the above (eg the signs are reversed), simply convert them.


Let w1, w2, w3, and w4 be the commands to send to each of the 4 wheels, where w1 is front left, w2 is front right, w3 is rear left, w4 is rear right, as viewed from the top.

set the four wheel speed commands as follows:

w1 = x + y + z

w2 = x - y - z

w3 = x - y + z

w4 = x + y - z


You're almost done. All that remains is to normalize the above commands so that their range is -1 to +1. Proceed as follows:

- look at the magnitude (absolute value) of each of the four commands, and select the MAXIMUM. for sake of discussion, call this maximum value Wmax

- if Wmax is less than or equal to 1, no scaling is required. Just use the four w commands as-is

- if Wmax is greater than 1, then divide EACH of the four w values by Wmax.

That's all there is to it. Send each w command to the corresponding wheel.

One note of caution: make sure the polarity of the motors on each side of the bot is wired correctly (each wheel must be spinning in the "forward" direction when it gets a +1 command). The easiest way to observe this is to elevate the bot and push the joystick forward; all four wheels should be spinning forward.


Here's a way to program tank drive on mecanum bot so that you can tune the joystick sensitivity to all three motions (fwd/rev, turn, stafe) independently:

Quote:
Let X1 and Y1 represent the joystick outputs for the driver's left-hand joystick;

Let Y2 represent the joystick outputs for the driver's right-hand joystick (X2 is not used).

Y1 and Y2 control the bot like a standard tank drive for fwd/rev and spinning. X1 provides the strafe command.

When each joystick is pushed forward, its Y output should be positive. When the joystick is pushed to the right, its X output should be positive. If not, add code to invert the sign if necessary.

Let Kf, Kt, and Ks be the tuning parameters (0 to +1) for the forward/reverse, turn, and strafe motions, respectively.

Let W1, W2, W3, and W4 be the front left, front right, rear left, and rear right wheels, respectively. ("left" and "right" in this context means "port" and "starboard", respectively)


Calculate the following:

Yf = (Y1 + Y2)/2

Yt = (Y1 - Y2)/2


Now calculate the four wheel speed commands:

W1 = Kf*Yf + Kt*Yt + Ks*X1

W2 = Kf*Yf - Kt*Yt - Ks*X1

W3 = Kf*Yf + Kt*Yt - Ks*X1

W4 = Kf*Yf - Kt*Yt + Ks*X1



Now normalize the wheel speed commands:

Let Wmax be the maximum absolute of the four wheel speed commands. If Wmax is greater than 1, then divide each of the four wheel speed commands by Wmax.


Finally, send each of the four normalized wheel speed commands to the respective wheels.


Adjust the values of Kf, Kt, and Ks (over the range 0 to +1) to adjust the joystick sensitivity for the forward/reverse, turn, and strafe motions, respectively.


If you want to understand the theory of mecanum kinematics and forces, take a look at these papers:

Quote:
Inverse and Forward Kinematic Equations for 4-wheel mecanum vehicle:

http://www.chiefdelphi.com/media/papers/2390


Force vector analysis of 4-wheel mecanum vehicle:

http://www.chiefdelphi.com/media/papers/2385

Last edited by Ether : 08-06-2010 at 14:20.
  #5   Spotlight this post!  
Unread 08-06-2010, 14:22
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Programming Andy Mark Killough Omni Directional Drive/ C++?

Quote:
Originally Posted by Ether View Post
If you just want some practical help for writing your own mecanum code...
Rebecca, don't let the word "mecanum" fool you into ignoring the advice.

Stephen didn't quite say it strongly enough: both mecanum and Killough are holonomic drivebases. The analysis and programming are the same for mecanum and for the AndyMark product you're asking about.

(I myself usually reserve the name "Killough" for a holonomic platform using a specific kind of dual wheel, though many people will apply it to omniwheel platforms as well.)
  #6   Spotlight this post!  
Unread 08-06-2010, 20:13
Straberrie's Avatar
Straberrie Straberrie is offline
The Plague
AKA: Rebecca
FRC #0375 (Robotic Plague)
Team Role: Programmer
 
Join Date: Feb 2008
Rookie Year: 2007
Location: New York
Posts: 59
Straberrie will become famous soon enough
Re: Programming Andy Mark Killough Omni Directional Drive/ C++?

Wow, Thank you all- apalrd, Stephen Kowski, Ether, Alan Anderson - SO much! =D It's really appreciated!
__________________
Team 375: The Robotic Plague
Current Robot: I-Chihuahua
Last Event: Big Apple Breakaway
Closed Thread


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
Tank Drive vs. Omni Directional Drive jamie_1930 General Forum 9 24-01-2010 22:50
In need of Inventor download of 8" andy mark black plastic omni wheel Abole CAD 2 19-01-2010 17:50
Store bought(andy mark) drive modules legal?? Bruceb General Forum 3 13-11-2009 15:45
Omni Directional Wheels Will Seymour General Forum 3 11-01-2003 12:43


All times are GMT -5. The time now is 23:21.

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