Go to Post [*]"Dewtoxification" is a real plague among teenagers. - JesseK [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 12-01-2011, 23:15
tomy tomy is offline
Registered User
FRC #3038 (I.C.E. Robotics)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Stacy, Minnesota
Posts: 496
tomy has a spectacular aura abouttomy has a spectacular aura about
Re: Best way to control the mechanum wheels

Wow thanks I can wait to try it out
  #17   Spotlight this post!  
Unread 12-01-2011, 23:17
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
Re: Best way to control the mechanum wheels

Quote:
Originally Posted by tomy View Post
Wow thanks I can wait to try it out
Actually I lied, more like 8-10 but you get the point. Good luck, if you need any help ask.
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
  #18   Spotlight this post!  
Unread 12-01-2011, 23:40
JewishDan18's Avatar
JewishDan18 JewishDan18 is offline
Registered User
FRC #1700
Team Role: Engineer
 
Join Date: Feb 2009
Rookie Year: 2007
Location: Sunnyvale, CA
Posts: 185
JewishDan18 is a splendid one to beholdJewishDan18 is a splendid one to beholdJewishDan18 is a splendid one to beholdJewishDan18 is a splendid one to beholdJewishDan18 is a splendid one to beholdJewishDan18 is a splendid one to behold
Re: Best way to control the mechanum wheels

The algorithms for the speeds to drive each wheel are in white papers here, i'm sure. For omnidirectional drives, I like to use the setup with one joystick doing direction, plus one more axis doing turning. My team has found that twisting a stick makes it harder to drive. This setup is ideal for a game controller, which is quite trivial to program if you know how to do a normal joystick (see getRawAxis). If you are up to it, making the drive field-centric using a gyroscope makes it much more intuitive to drive.
  #19   Spotlight this post!  
Unread 13-01-2011, 02:00
EricH's Avatar
EricH EricH is offline
New year, new team
FRC #1197 (Torbots)
Team Role: Engineer
 
Join Date: Jan 2005
Rookie Year: 2003
Location: SoCal
Posts: 19,813
EricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond repute
Re: Best way to control the mechanum wheels

Quote:
Originally Posted by davidthefat View Post
The only library allowed is the WPILib.
Show me the rule, because I can't find that one in the Game Manual Section 4.

In 2008, I know I found a link to some "canned" mecanum code lying around CD. However, the programming language that year was C, so it wouldn't work this year without modification. I might be able to find it again... but it would take a while.
__________________
Past teams:
2003-2007: FRC0330 BeachBots
2008: FRC1135 Shmoebotics
2012: FRC4046 Schroedinger's Dragons

"Rockets are tricky..."--Elon Musk

  #20   Spotlight this post!  
Unread 13-01-2011, 04:35
Mr. Lim Mr. Lim is offline
Registered User
AKA: Mr. Lim
no team
Team Role: Leadership
 
Join Date: Jan 2004
Rookie Year: 1998
Location: Toronto, Ontario
Posts: 1,125
Mr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond repute
Re: Best way to control the mechanum wheels

http://runnymede-robotics.googlecode..._Team_1310_V2/

http://www.youtube.com/user/1310Robo.../0/7mBxVPvyYwQ
__________________
In life, what you give, you keep. What you fail to give, you lose forever...
  #21   Spotlight this post!  
Unread 13-01-2011, 08:17
The Lucas's Avatar
The Lucas The Lucas is offline
CaMOElot, it is a silly place
AKA: My First Name is really "The" (or Brian)
FRC #0365 (The Miracle Workerz); FRC#1495 (AGR); FRC#4342 (Demon)
Team Role: Mentor
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Dela-Where?
Posts: 1,564
The Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond repute
Send a message via AIM to The Lucas
Re: Best way to control the mechanum wheels

tomy,
For C++ (LV, & Java also) WPILib provides a couple Mecanum drive methods in the RobotDrive Class. I recommend you start out with MecanumDrive_Cartesian() function. Documentation of this function (generated using Doxygen on comments in WPILib) is provided online by Dustin Spicuzza of Team 2423 is here. It hasn't been updated since last Feb 5th but I dont expect any changes since then.

I don't know enough about how the left and right thumbsticks for the Xbox controller are mapped to axises in WPILib to give you a specific call. However, my suggestion is if you have a driver with experience on an Arcade Drive (single joystick for 4wd or 6wd) then use one thumbstick for y and rotation parameters in MecanumDrive_Cartesian() and the x-axis of another thumbstick for x. With this configuration, the driver can use one thumbstick to drive like the arcade drive (that they are experienced with) and add strafing with the other thumbstick. If you do not have experienced driver then decide which thumbstick mapping you think is best.

I encourage you to develop advanced features like the ones in Team 1310's code above once you are comfortable with Mecanum. The MecanumDrive_Cartesian() should be all you need to protoype the Mecanum and start training drivers. If you need any help initializing the RobotDrive with your 4 motors or anything else, just ask and I am sure someone on this forum will help ASAP

Good Luck
__________________
Electrical & Programming Mentor ---Team #365 "The Miracle Workerz"
Programming Mentor ---Team #4342 "Demon Robotics"
Founding Mentor --- Team #1495 Avon Grove High School
2007 CMP Chairman's Award - Thanks to all MOE members (and others) past and present who made it a reality.
Robot Inspector
"I don't think I'm ever more ''aware'' than I am right after I burn my thumb with a soldering iron"

Last edited by The Lucas : 13-01-2011 at 08:20.
  #22   Spotlight this post!  
Unread 13-01-2011, 10:11
efoote868 efoote868 is offline
foote stepped in
AKA: E. Foote
FRC #0868
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2005
Location: Noblesville, IN
Posts: 1,416
efoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond repute
Re: Best way to control the mechanum wheels

Grab a sheet of paper and a writing utensil, hook up your controller to the robot's controller, and use labview to output all inputs to the screen. Write down what inputs are where.

For mecanum drive, we have always found its best to separate twist from your cardinal directions, make it the x-axis of a separate joystick. Some 3-axis joysticks have a tendency to twist while moving any other direction.

Another thing you should seriously consider doing with mecanum drive is field-centric positioning with a gyro. It takes a little extra trigonometry, a little extra debugging, but it makes driving the robot SO much easier. In my experience, anyone could drive this type of robot without any training at all, and do it very well. I'd like to think 868's success last year was in part due to this.

Let us know if you need help getting set up with that, I may have my old tutorials lying around.
__________________
Be Healthy. Never Stop Learning. Say It Like It Is. Own It.

Like our values? Flexware Innovation is looking for Automation Engineers. Check us out!
  #23   Spotlight this post!  
Unread 13-01-2011, 13:40
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: Best way to control the mechanum wheels

Quote:
Originally Posted by davidthefat View Post
The only library allowed is the WPILib.
I'm not aware of that restriction. Where did you find it?
  #24   Spotlight this post!  
Unread 13-01-2011, 13:44
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: Best way to control the mechanum wheels

Quote:
Originally Posted by efoote868 View Post
Grab a sheet of paper and a writing utensil, hook up your controller to the robot's controller, and use labview to output all inputs to the screen. Write down what inputs are where.
If you're not adept with LabVIEW, you can easily use the Game Controllers control panel in Windows to see what physical bits and bobs correspond to which axis and button numbers.
  #25   Spotlight this post!  
Unread 13-01-2011, 16:04
Nemo's Avatar
Nemo Nemo is offline
Team 967 Mentor
AKA: Dan Niemitalo
FRC #0967 (Iron Lions)
Team Role: Coach
 
Join Date: Nov 2009
Rookie Year: 2009
Location: Iowa
Posts: 804
Nemo has a reputation beyond reputeNemo has a reputation beyond reputeNemo has a reputation beyond reputeNemo has a reputation beyond reputeNemo has a reputation beyond reputeNemo has a reputation beyond reputeNemo has a reputation beyond reputeNemo has a reputation beyond reputeNemo has a reputation beyond reputeNemo has a reputation beyond reputeNemo has a reputation beyond repute
Re: Best way to control the mechanum wheels

You get a holonomic drive VI with the Labview libraries. All you have to do is plug your three joystick axes into that VI, and it gives you the output levels for each of the four drive motors.
  #26   Spotlight this post!  
Unread 13-01-2011, 19:26
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
Re: Best way to control the mechanum wheels

Quote:
Originally Posted by EricH View Post
Show me the rule, because I can't find that one in the Game Manual Section 4.

In 2008, I know I found a link to some "canned" mecanum code lying around CD. However, the programming language that year was C, so it wouldn't work this year without modification. I might be able to find it again... but it would take a while.
Quote:
Originally Posted by Alan Anderson View Post
I'm not aware of that restriction. Where did you find it?
I thought wrong then. So ,in the off season, technically I can spend my time writing my own library that would directly communicate with the FPGA or even modifying the FPGA to run my own library?
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
  #27   Spotlight this post!  
Unread 13-01-2011, 19:36
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Best way to control the mechanum wheels

During the season, or in the offseason, you can modify, rewrite, or replace any of the libraries above the FPGA access libraries. Since writing that from scratch would literally take you years, may I suggest learning to read the code that is there.

FYI, one of my biggest turn-offs when interviewing job candidates is the NIH syndrome. NIH == Not Invented Here. It seems to be a phase all programmers and engineers go through, but almost nobody is productive enough to be able to compete well until they get over it. Learn to read, debug, analyze, criticize, praise, understand, extend, and communicate the designs of others. It will serve you well.

You cannot modify the FPGA. That would remove the ability for FIRST to control the outputs and provide a safe experience for team members, volunteers, etc.

Greg McKaskle
  #28   Spotlight this post!  
Unread 13-01-2011, 22:33
Jogo Jogo is offline
Registered User
FRC #0353 (Pobots)
Team Role: Programmer
 
Join Date: May 2009
Rookie Year: 2007
Location: NY
Posts: 83
Jogo is on a distinguished road
Re: Best way to control the mechanum wheels

Seems like a lot of teams (ours included) are giving mecanum a shot this year. Here are a few things I've picked up...

-Basic mecanum is pretty easy to achieve using the built in "holonomic drive" function, which either taken in 3 axis values (x=strafe,y=fwd/rev,z=rotation) or a polar coordinate (magnitude and direction). The derived equations are based on the solution to the Inverse Kinematics Problem (see: http://www.simbotics.org/files/first...irectional.pdf).

-There are various ways to taken in inputs. One method is a twisting joystick. Another method is using two joysticks--one for x and y translation, and one for rotation. A final method is a joystick and two buttons--the joystick handles translation, and the two buttons handle left and right rotation at constant speed.

-To make mecanum better, use closed-loop control on the robot's header angle and/or wheel speeds. This can be accomplished with a gyro and encoders.

-To make mecanum better better, you can consider driver-centric control. This means that, no matter what the robot's header angle is, pushing the joystick away from you means that the robot moves away from you. This can be best accomplished by using the Polar coordinates implementation of mecanum, and using the gyro angle to modify the angle.

-To make mecanum better better better, consider using steering curves (see: http://www.chiefdelphi.com/media/papers/2421).
  #29   Spotlight this post!  
Unread 13-01-2011, 23:36
kinganu123 kinganu123 is offline
Registered User
FRC #1747
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Piscataway, NJ
Posts: 243
kinganu123 is on a distinguished road
Re: Best way to control the mechanum wheels

mecanum wheels were so much fun using last year
if you'd like to see how we used it in our labview code, just download our code
See attachment from this thread
http://www.chiefdelphi.com/forums/sh...ad.php?t=87949
__________________
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:58.

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