Go to Post "Heres a band aid to keep your blood off the robot." - littleelectron [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 16-02-2011, 18:42
sonicwingmode sonicwingmode is offline
Registered User
FRC #3404
 
Join Date: Feb 2011
Location: Macon
Posts: 11
sonicwingmode is an unknown quantity at this point
how to program mecanum wheel drive?

our team searched the forums and found how to start program a mecanum wheel drive, but we are stuck.

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

We can't find the Mecanum Drive block. Do we have to download the Mecanum Drive block or do we have to make the program from scratch?
  #2   Spotlight this post!  
Unread 16-02-2011, 21:54
bmxer51 bmxer51 is offline
Registered User
FRC #2874
 
Join Date: Jan 2011
Location: Missouri
Posts: 26
bmxer51 is an unknown quantity at this point
Re: how to program mecanum wheel drive?

We also use mecanum wheels and last year our program was terrible. We have a pretty decent program this year after i sat down and learned labview. What controls are you using? We are using an xbox controller but it would be very simple to change it to the two joysticks provided in the kit. If you could give me that info I could help you come up with your equations to write for each wheel.
  #3   Spotlight this post!  
Unread 16-02-2011, 21:59
Teamcodeorange's Avatar
Teamcodeorange Teamcodeorange is offline
Registered User
FRC #3476
 
Join Date: Jan 2011
Location: US
Posts: 236
Teamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant future
Wink Re: how to program mecanum wheel drive?

When you say "block" I am going to assume that you are programing in labview. If you are available tomorrow (or today), I can help you program it using remote desktop software if that's ok with you. Send an email to therobotmaker@gmail.com if you are interested.
  #4   Spotlight this post!  
Unread 16-02-2011, 22:35
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: how to program mecanum wheel drive?

Quote:
Originally Posted by sonicwingmode View Post
We can't find the Mecanum Drive block.
There's a Search button at the top of the Functions Palette. It'll show you where to find anything you can name. In this case, the name of the function you're looking for is actually Holonomic Drive.
  #5   Spotlight this post!  
Unread 17-02-2011, 08:30
Chexposito's Avatar
Chexposito Chexposito is offline
Registered User
AKA: Expo
FRC #1730
Team Role: Alumni
 
Join Date: Feb 2009
Rookie Year: 2007
Location: Missouri
Posts: 272
Chexposito is a glorious beacon of lightChexposito is a glorious beacon of lightChexposito is a glorious beacon of lightChexposito is a glorious beacon of lightChexposito is a glorious beacon of lightChexposito is a glorious beacon of light
Re: how to program mecanum wheel drive?

i looked through the robot drive function and there is a mechanum drive...
  #6   Spotlight this post!  
Unread 17-02-2011, 09:59
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: how to program mecanum wheel drive?




See attached screenshots.



Attached Thumbnails
Click image for larger version

Name:	mec vi.png
Views:	290
Size:	1.2 KB
ID:	10159  Click image for larger version

Name:	functions palette.png
Views:	398
Size:	16.2 KB
ID:	10161  Click image for larger version

Name:	mec cart vi help.png
Views:	302
Size:	1.8 KB
ID:	10162  
  #7   Spotlight this post!  
Unread 17-02-2011, 15:32
sonicwingmode sonicwingmode is offline
Registered User
FRC #3404
 
Join Date: Feb 2011
Location: Macon
Posts: 11
sonicwingmode is an unknown quantity at this point
Re: how to program mecanum wheel drive?

oh! there it is, I'm going to try to program it
  #8   Spotlight this post!  
Unread 18-02-2011, 19:34
sonicwingmode sonicwingmode is offline
Registered User
FRC #3404
 
Join Date: Feb 2011
Location: Macon
Posts: 11
sonicwingmode is an unknown quantity at this point
Re: how to program mecanum wheel drive?

what do we put in the rotation?
  #9   Spotlight this post!  
Unread 18-02-2011, 23:43
Owen Meaker Owen Meaker is offline
Registered User
FRC #4180
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Kent, Washington
Posts: 17
Owen Meaker is an unknown quantity at this point
Re: how to program mecanum wheel drive?

Quote:
Originally Posted by sonicwingmode View Post
what do we put in the rotation?
rotation is the, well, rotation of the robot. If you have a joystick that can be twisted, you can use that (for our joystick its axis 4, but it could be different for other joysticks). If your joystick does not support twisting, you will need to have buttons that are wired in (for example, put in a case structure that determines which button is being pressed, that then outputs a 1 or -1 depending on which way you want to rotate it).
  #10   Spotlight this post!  
Unread 19-02-2011, 00:00
kornjones kornjones is offline
Registered User
AKA: samuel
FRC #1522 (DOTM)
Team Role: Leadership
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Hanover, Virginia
Posts: 17
kornjones is an unknown quantity at this point
Re: how to program mecanum wheel drive?

My team has been using mecanums for a few years and at the beginning of the year an alumni asked me to make a program that could take full advantage of the mecanum wheels instead of our usual tank drive with trigger strafe boringness. after much thought and many matrices i realized that if you subtract the y axis form the x axis for the front right and back left and add y and x axes for the front right and back left we could make what i like to call omnidrive. it basically made it so that the robot would move in any direction the stick was pointing. after some more finagling i put the controls on two sticks and fixed a few value issues and now we have 2 stick mecanum omnidrive. its pretty difficult to explain but its fantastic to drive. if anyone needs any help i am also available for assistance
  #11   Spotlight this post!  
Unread 19-02-2011, 09:11
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: how to program mecanum wheel drive?

Quote:
Originally Posted by kornjones View Post
My team has been using mecanums for a few years and at the beginning of the year an alumni asked me to make a program that could take full advantage of the mecanum wheels instead of our usual tank drive with trigger strafe boringness. after much thought and many matrices i realized that if you subtract the y axis form the x axis for the front right and back left and add y and x axes for the front right and back left we could make what i like to call omnidrive. it basically made it so that the robot would move in any direction the stick was pointing. after some more finagling i put the controls on two sticks and fixed a few value issues and now we have 2 stick mecanum omnidrive. its pretty difficult to explain but its fantastic to drive. if anyone needs any help i am also available for assistance
What you have described has no rotation. Perhaps you left something out of your description?

Also, I assume there's a typo in there, because you said "front right and back left" twice.



  #12   Spotlight this post!  
Unread 19-02-2011, 16:23
sjspry sjspry is offline
Registered User
FRC #1984
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Kansas
Posts: 125
sjspry has a spectacular aura aboutsjspry has a spectacular aura aboutsjspry has a spectacular aura about
Re: how to program mecanum wheel drive?



That picture should make it fairly obvious. If not, look below. mainJoy is the one used for forward/back and strafing, rotJoy is used for rotation (pretty much like a FPS game, we even wired our camera's tilt up to rotJoy's Y axis so it is exactly like the usual FPS controls ) For best results, use an Xbox/PS3 controller. Remember forward is -1.

Assuming you get -1..1:

front_Left = -mainJoy.getY() - rotJoy.getX() + mainJoy.getX()
front_Right = -mainJoy.getY() + rotJoy.getX() - mainJoy.getX()

back_Left = -mainJoy.getY() - rotJoy.getX() - mainJoy.getX()
back_Right = -mainJoy.getY() + rotJoy.getX() + mainJoy.getX()
  #13   Spotlight this post!  
Unread 19-02-2011, 16:38
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: how to program mecanum wheel drive?

Quote:
Originally Posted by sjspry View Post
mainJoy is the one used for forward/back and strafing, rotJoy is used for rotation... Remember forward is -1.

front_Left = -mainJoy.getY() - rotJoy.getX() + mainJoy.getX()
front_Right = -mainJoy.getY() + rotJoy.getX() - mainJoy.getX()

back_Left = -mainJoy.getY() - rotJoy.getX() - mainJoy.getX()
back_Right = -mainJoy.getY() + rotJoy.getX() + mainJoy.getX()
Two suggestions:

1) I would think it would be more intuitive if pushing rotJoy to the right would cause clockwise rotation*.

2) You need to normalize the 4 wheel commands, in a way that preserves their holonomic relationship, before sending them to the motors.


* I am assuming that the motors are set up so that issuing a + command causes the wheels to rotate in the "forward" direction


  #14   Spotlight this post!  
Unread 19-02-2011, 17:23
sjspry sjspry is offline
Registered User
FRC #1984
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Kansas
Posts: 125
sjspry has a spectacular aura aboutsjspry has a spectacular aura aboutsjspry has a spectacular aura about
Re: how to program mecanum wheel drive?

Quote:
Originally Posted by Ether View Post
Two suggestions:

1) I would think it would be more intuitive if pushing rotJoy to the right would cause clockwise rotation*.

2) You need to normalize the 4 wheel commands, in a way that preserves their holonomic relationship, before sending them to the motors.


* I am assuming that the motors are set up so that issuing a + command causes the wheels to rotate in the "forward" direction

As for #1, yeah, as far as I know everything should be backwards because of the Joystick output. They might need to modify it....

Didn't know about the handy PDF, though. Thanks
  #15   Spotlight this post!  
Unread 19-02-2011, 23:23
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: how to program mecanum wheel drive?

Quote:
Originally Posted by sjspry View Post
As for #1, yeah, as far as I know everything should be backwards because of the Joystick output. They might need to modify it....
The joystick X-axis is + to the right. So your code should be

Code:
front_Left = -mainJoy.getY() + rotJoy.getX() + mainJoy.getX()
front_Right = -mainJoy.getY() - rotJoy.getX() - mainJoy.getX()

back_Left = -mainJoy.getY() + rotJoy.getX() - mainJoy.getX()
back_Right = -mainJoy.getY() - rotJoy.getX() + mainJoy.getX()

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


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

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