Go to Post I have no desire to watch a battle of who sucks less. - Cory [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 17-02-2010, 08:45
furiousgeorge's Avatar
furiousgeorge furiousgeorge is offline
Registered User
FRC #3055
 
Join Date: Jan 2009
Location: Austin
Posts: 74
furiousgeorge will become famous soon enoughfuriousgeorge will become famous soon enough
Re: 4 motor Mecanum wheel code request

Quote:
Originally Posted by daltore View Post
There is a Holonomic.vi in the WPIlib LabView files (should be under RobotDrive?). This VI takes 4 required inputs:

1) RobotDrive data cluster
2) Magnitude - Requires a value from -1 to 1. If you're using one joystick for strafing, this will be Pythgorean theorem (sqrt(Xaxis^2 + Yaxis^2)).
3) Direction - Requires a value from -180 to 180 (degrees). If you're using one joystick for strafing, this will be the Arctan2 between the two joysticks (found under Mathematics>Elementary>Trigonometric, it should be the last VI). Plug in the Y axis to Y and the X axis to X. This returns a value in radians, so you have to convert to degrees by dividing by Pi (Numeric>Constants>Pi) and multiplying by 180.
4) Rotation - Requires a value from -1 to 1. You can use the X axis of a second joystick, the rotation axis from a 3-axis joystick, or anything else that's convenient.

You can actually split the duties up between joysticks so you have forward/backward on one joystick and strafing on another joystick, and it will still work perfectly, just run the wires correctly. Our Girl Scouts team last year used this VI and to rotate, used the left and right buttons on top of one of the joysticks (full rotate left or full rotate right). We're using a 3-axis joystick this year that controls all of the driving. To rotate, you have to push the trigger, and to rotate with more control, you can push the button under the thumb, and it squares the value being sent to Rotate (all of the strafing still works, we just didn't want to accidentally rotate because the Z axis is so sensitive).

Hope this helps. If you were planning on using a different setup (like what Alan said with the tank steering with strafing) let us know and someone will be able to help you with that. This is just one way.
I am actually interested in finding out how to program our team's mecanum wheels so that we can have a tank drive style steering with strafing. This is our second year of FRC and so I know some of the lingo of LabView, but pictures help a lot. Thanks
Reply With Quote
  #2   Spotlight this post!  
Unread 17-02-2010, 10:18
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,065
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: 4 motor Mecanum wheel code request

Quote:
Originally Posted by furiousgeorge View Post
I am actually interested in finding out how to program our team's mecanum wheels so that we can have a tank drive style steering with strafing.
The following post might be of interest to you:

http://www.chiefdelphi.com/forums/sh...383#post916383


~
Reply With Quote
  #3   Spotlight this post!  
Unread 17-02-2010, 11:03
eovnu87435ds eovnu87435ds is offline
Registered User
FRC #0087
 
Join Date: Jan 2010
Location: Mt. Holly NJ
Posts: 19
eovnu87435ds has a spectacular aura abouteovnu87435ds has a spectacular aura abouteovnu87435ds has a spectacular aura about
Re: 4 motor Mecanum wheel code request

Ether's Post was a lifesaver for holonomic drive(partly because it is so easy to make sense of.) I whipped this up after reading it. All you need to do is plug in your joystick dev ref to the one side, and then plug the 4 values that output on the right into your 4 drive VI's.

Download it here: http://files.me.com/eovnu87435ds/k0i3pn
(Link expires March 19, 2010)

Note, I did not test this yet, since we didn't get our mechanum wheels yet

hope this helps, and of course, all credit goes to Ether
Reply With Quote
  #4   Spotlight this post!  
Unread 17-02-2010, 11:27
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,065
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: 4 motor Mecanum wheel code request

Quote:
Originally Posted by eovnu87435ds View Post
I did not test this yet, since we didn't get our mechanum wheels yet
When you get your wheels, make sure you mount them properly:


http://www.chiefdelphi.com/forums/sh...d.php?p=907174

http://www.chiefdelphi.com/forums/sh...d.php?p=907168



~
Reply With Quote
  #5   Spotlight this post!  
Unread 19-02-2010, 19:14
inventor1254 inventor1254 is offline
Registered User
FRC #1254
 
Join Date: Feb 2010
Location: Van Buren Technology Center
Posts: 5
inventor1254 is an unknown quantity at this point
Re: 4 motor Mecanum wheel code request

Sorry I've been pretty busy I have 4 college classes to keep up with too.

I talked with our machine tool instructor and he explained a little better what we need, and to answer Alan Anderson's question way back, we need Tank drive plus strafe, 2 joysticks both controlling one side of the robot on the y for tank drive and one or both as strafe on the x. He is going to have some more students look for code through emailing people on youtube.

Again sorry I haven't been keeping up on this thread vary well, our tech center has 8th grade visits right now, so I wasn't even any where near the robot to try any of this code all week, nor am I now, and I won't be until Tuesday (Feb 23)

Again thanks for all the help the! The pdf that Ether posted http://lib.store.yahoo.net/lib/yhst-...lSpecSheet.pdf has has defiantly cleared a few things up for me, and the code http://files.me.com/eovnu87435ds/k0i3pn looks interesting, will try it when If I ever get my hands on the robot before the deadline lol.
Reply With Quote
  #6   Spotlight this post!  
Unread 20-02-2010, 22:19
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,112
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: 4 motor Mecanum wheel code request

Quote:
Originally Posted by inventor1254 View Post
...we need Tank drive plus strafe, 2 joysticks both controlling one side of the robot on the y for tank drive and one or both as strafe on the x.
That's very easy to do using the "Mecanum - Cartesian" vi. Use the average of the joysticks' X values as the X input, the average of the joysticks' Y values as the Y input, and the difference between the Y values (divided by 2) as the rotation input.
Reply With Quote
  #7   Spotlight this post!  
Unread 21-02-2010, 12:09
inventor1254 inventor1254 is offline
Registered User
FRC #1254
 
Join Date: Feb 2010
Location: Van Buren Technology Center
Posts: 5
inventor1254 is an unknown quantity at this point
Re: 4 motor Mecanum wheel code request

Quote:
Originally Posted by Alan Anderson
That's very easy to do using the "Mecanum - Cartesian" vi. Use the average of the joysticks' X values as the X input, the average of the joysticks' Y values as the Y input, and the difference between the Y values (divided by 2) as the rotation input.
"Mecanum - Cartesian" vi, is that in the example files? I don't know because I still don't have direct access to them, just a basic evaluation copy of LabView on my laptop.

Is there any where I can download those example files onto my computer so I don't have to be at the school?

Thanks to all the help again!
Reply With Quote
  #8   Spotlight this post!  
Unread 21-02-2010, 21:41
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,112
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: 4 motor Mecanum wheel code request

You can use the disks from the Kit of Parts to load LabVIEW for FRC on your own computer. Then download and install the LabVIEW update (see http://www.usfirst.org/frccontrolsystem for the link).

The HolonomicDrive vi is in the RobotDrive palette of the WPI Robotics Library functions. Once placed on the block diagram, it can be changed from Polar to Cartesian input.
Reply With Quote
  #9   Spotlight this post!  
Unread 22-02-2010, 23:54
smcmahon's Avatar
smcmahon smcmahon is offline
The Architect
AKA: Sean McMahon
FRC #2656 (QUASICS)
Team Role: Coach
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Pittsburgh, PA
Posts: 197
smcmahon is an unknown quantity at this point
Question Re: 4 motor Mecanum wheel code request

Alan- is this sort of what you were talking about?

I guess I should note that Axis 3 and Axis 4 are a second set of X+Y axis from our Logitech Dual-Action Gamepad
Attached Thumbnails
Click image for larger version

Name:	mecanum_cartesian.png
Views:	140
Size:	77.1 KB
ID:	8782  
Reply With Quote
  #10   Spotlight this post!  
Unread 23-02-2010, 08:45
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,112
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: 4 motor Mecanum wheel code request

Quote:
Originally Posted by smcmahon View Post
Alan- is this sort of what you were talking about?
That looks exactly like what I was talking about.
Reply With Quote
Reply


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
Mecanum Wheel Setup Help Dylan5019 NI LabVIEW 16 10-02-2011 15:39
Mecanum Wheel Considerations abross General Forum 20 23-01-2010 19:34
Mecanum wheel size Mr. A Technical Discussion 7 18-01-2010 08:58
pic: New mecanum wheel? scottydoh Extra Discussion 5 16-01-2010 21:29
pic: 2" Mecanum Wheel Tytus Gerrish Technical Discussion 17 22-04-2006 12:22


All times are GMT -5. The time now is 11:56.

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