Go to Post I'll not deprive you of the practice in reading the manual; you'll need it if you want to be an effective part of an FRC team. - Alan Anderson [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 13-02-2011, 08:22
Austin3324 Austin3324 is offline
Lead Programmer Team 3324
FRC #3324 (Metrobots)
Team Role: Programmer
 
Join Date: Apr 2010
Rookie Year: 2008
Location: Columbus, Ohio
Posts: 10
Austin3324 is an unknown quantity at this point
Mecanum Drive System Issues

Hello all,

First of all, thank you to everyone who has helped me in the past and thank you to those who will help me here!

My team (at my recommendation) opted to use mecanum wheels for our robot. This is all fine and dandy, especially since our track record from last year using them really is pretty good. This year, though, I've run into an issue that really perplex's me. When we go to turn, the front wheels of the robot spin one way and the rear two wheels spin the other. (In case you don't know, what should happen is that the two left wheels should spin one way and the two right wheels should spin the other.)

I am very confused because every time that I run through the math to check that the motors should be running properly, I get the corect output, but once I test it by driving the robot, it functions improperly. I am going to do some more testing to check the values to see that they line up with my calculations today, but I'll probably still be very confused. If any one has any ideas and would like to help, I would be most greatful.

Sincerely,

Austin
Lead Programmer, Team 3324
Reply With Quote
  #2   Spotlight this post!  
Unread 13-02-2011, 08:42
Geocacher Geocacher is offline
Registered User
AKA: Jake Urben
FRC #3067 (Robovikes)
 
Join Date: Feb 2011
Rookie Year: 2011
Location: Geneva IL
Posts: 10
Geocacher is an unknown quantity at this point
Re: Mecanum Drive System Issues

Hello first off I am not the Programmer for our team but I drive the robot a lot (yes we are using Mecanum too) and after we set it up things weird. sort of like you just described. The problem was that the PWM outputs from the dig. sidecar were slightly messed up
Reply With Quote
  #3   Spotlight this post!  
Unread 13-02-2011, 08:47
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,071
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: Mecanum Drive System Issues

Quote:
Originally Posted by Austin3324 View Post
Hello all,

First of all, thank you to everyone who has helped me in the past and thank you to those who will help me here!

My team (at my recommendation) opted to use mecanum wheels for our robot. This is all fine and dandy, especially since our track record from last year using them really is pretty good. This year, though, I've run into an issue that really perplex's me. When we go to turn, the front wheels of the robot spin one way and the rear two wheels spin the other. (In case you don't know, what should happen is that the two left wheels should spin one way and the two right wheels should spin the other.)

I am very confused because every time that I run through the math to check that the motors should be running properly, I get the corect output, but once I test it by driving the robot, it functions improperly. I am going to do some more testing to check the values to see that they line up with my calculations today, but I'll probably still be very confused. If any one has any ideas and would like to help, I would be most greatful.

Sincerely,

Austin
Lead Programmer, Team 3324
Austin,

Put the robot up on blocks and tell us what the four wheels are doing when you give it each of the following commands: pure forward, reverse, strafe right, strafe left, rotate right, and rotate left.

That info should be sufficient to identify exactly what needs to be changed.


Reply With Quote
  #4   Spotlight this post!  
Unread 13-02-2011, 08:48
Geocacher Geocacher is offline
Registered User
AKA: Jake Urben
FRC #3067 (Robovikes)
 
Join Date: Feb 2011
Rookie Year: 2011
Location: Geneva IL
Posts: 10
Geocacher is an unknown quantity at this point
Re: Mecanum Drive System Issues

Quote:
Originally Posted by Ether View Post
Austin,

Put the robot up on blocks and tell us what the four wheels are doing when you give it each of the following commands: pure forward, reverse, strafe right, strafe left, rotate right, and rotate left.

That info should be sufficient to identify exactly what needs to be changed.

Yes, this is what we did to test our robot too
Reply With Quote
  #5   Spotlight this post!  
Unread 13-02-2011, 09:57
SudoSammich SudoSammich is offline
A pretty big deal...
AKA: Corey
FRC #0514 (Entropy)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2007
Location: Miller Place
Posts: 31
SudoSammich is an unknown quantity at this point
Re: Mecanum Drive System Issues

Well first off, there's not really enough information to fully diagnose your problem, but we're using holonomic drive this year (controlled the same way), so I've got a couple things that might cause a problem like that.

First off, are you using the RobotDrive class (Java) or .vi (LabVIEW) or...whatever the equivalent library in C++ is? That actually does work really well right out of the box for controlling mecanum drive. I was originally going to write our own code for the drive system, but it does save a lot of time to not reinvent the wheel (if it is a little less fun).

Second, make sure your jaguars are plugged in and instantiated correctly. We've had enough times throughout the years where "lfJaguar" actually turned out to be the back right one for this not to come to mind. Also, if you're using the RobotDrive object, make sure the jags are in the correct places.

Lastly, check how you put in your joysticks. Earlier this year we had an interesting problem with the arcade drive mode for our bot before we realized the X axis was plugged into Y and Y was plugged into X.

Not sure if any of these will help, but good luck!
Reply With Quote
  #6   Spotlight this post!  
Unread 17-02-2011, 16:23
Hadi379's Avatar
Hadi379 Hadi379 is offline
Registered User
FRC #0379
 
Join Date: Jan 2007
Location: Girard
Posts: 165
Hadi379 is a splendid one to beholdHadi379 is a splendid one to beholdHadi379 is a splendid one to beholdHadi379 is a splendid one to beholdHadi379 is a splendid one to beholdHadi379 is a splendid one to beholdHadi379 is a splendid one to behold
Re: Mecanum Drive System Issues

We are having the same problem as the OP...everything works except the rotation. when we try to rotate the robot, the back wheels spin forward and the front wheels spin backwards. any ideas?
Reply With Quote
  #7   Spotlight this post!  
Unread 17-02-2011, 16:29
SudoSammich SudoSammich is offline
A pretty big deal...
AKA: Corey
FRC #0514 (Entropy)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2007
Location: Miller Place
Posts: 31
SudoSammich is an unknown quantity at this point
Re: Mecanum Drive System Issues

Quote:
Originally Posted by Hadi379 View Post
We are having the same problem as the OP...everything works except the rotation. when we try to rotate the robot, the back wheels spin forward and the front wheels spin backwards. any ideas?
Once again, I'd ask exactly how your code works. If you used the out-of-box code, there's one set of problems you might have (motor polarity wrong, arguments passed in incorrectly/in the wrong order etc.). If you created your own control system, then it's likely a problem with your calculations or logic. Not really enough information for us to diagnose what's going on. Oh, and toss it up on blocks.
Reply With Quote
  #8   Spotlight this post!  
Unread 17-02-2011, 16: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,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: Mecanum Drive System Issues

Quote:
Originally Posted by Hadi379 View Post
We are having the same problem as the OP...everything works except the rotation. when we try to rotate the robot, the back wheels spin forward and the front wheels spin backwards. any ideas?
That would happen if you had the controls swapped between two diagonally opposite motors. For example, you could be controlling the left front motor with the right rear PWM signal, and vice versa. Make sure the wires match the programming.
Reply With Quote
  #9   Spotlight this post!  
Unread 17-02-2011, 17:16
Hadi379's Avatar
Hadi379 Hadi379 is offline
Registered User
FRC #0379
 
Join Date: Jan 2007
Location: Girard
Posts: 165
Hadi379 is a splendid one to beholdHadi379 is a splendid one to beholdHadi379 is a splendid one to beholdHadi379 is a splendid one to beholdHadi379 is a splendid one to beholdHadi379 is a splendid one to beholdHadi379 is a splendid one to behold
Re: Mecanum Drive System Issues

with the robot on blocks:

full forward = all wheels forward
full reverse = all wheels reverse
strafe right = right side spins towards each other; left side spins away from each other
strafe left = left side spins towards each other; right side spins away from each other

Rotate = front 2 wheels spin same direction; back 2 wheels spin same direction

this is in labview
Reply With Quote
  #10   Spotlight this post!  
Unread 17-02-2011, 17:32
j.cole j.cole is offline
Registered User
FRC #0379
 
Join Date: Jan 2010
Location: Girard
Posts: 159
j.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud of
Re: Mecanum Drive System Issues

Here is the code we are using I have the begin in the upper left hand corner and the teleop is the rest of it. I have tried different combinations of the true/false constants to invert the motors and I can get the rotate to work when I change them to how (i think) they should be (one side inverted and the other not). But then the forward/reverse/diagonals/strafe don't work.

I checked the wiring (polarities and PWM's) and nothing was wrong there.
Attached Thumbnails
Click image for larger version

Name:	Drive.PNG
Views:	34
Size:	21.9 KB
ID:	10175  
__________________

It's not normally a good idea to give a programmer a drill but rules are made to be broken.
Reply With Quote
  #11   Spotlight this post!  
Unread 17-02-2011, 22:08
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: Mecanum Drive System Issues

Quote:
Originally Posted by j.cole View Post
I checked the wiring (polarities and PWM's) and nothing was wrong there.
Prove it.

Which PWM channel do you have going to each motor? I can't be absolutely certain, but your code seems to have it this way:

PWM1: front left (inverted)
PWM2: front right (inverted)
PWM3: rear left (not inverted)
PWM4: rear right (not inverted)

It's rather odd to have both front motors inverted and neither rear motor inverted. One typically sees only the right motors inverted, or occasionally only the left ones. The other common situation is for none of them to be inverted and have the compensation occur in the wiring.

It still looks to me like you have your front left and rear right motor controls swapped.
Reply With Quote
  #12   Spotlight this post!  
Unread 17-02-2011, 23:37
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,071
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: Mecanum Drive System Issues

Quote:
Originally Posted by Hadi379 View Post
with the robot on blocks:

full forward = all wheels forward
full reverse = all wheels reverse
strafe right = right side spins towards each other; left side spins away from each other
strafe left = left side spins towards each other; right side spins away from each other

Rotate = front 2 wheels spin same direction; back 2 wheels spin same direction

this is in labview
See attached drawing. Notice how the diagonally opposite wheels are always turning in the same direction as each other for forward, reverse, strafe left, and strafe right motion. But they go in opposite directions from one another for rotation.

Trace the wiring back from each front motor to make sure it isn't being controlled by the diagonally opposite rear wheel command.

Also, are you using home-brew code or the WPI Holonomic Drive vi? Cartesian or Polar?




Attached Thumbnails
Click image for larger version

Name:	mec wheel directions.png
Views:	29
Size:	10.7 KB
ID:	10192  

Last edited by Ether : 18-02-2011 at 01:36.
Reply With Quote
  #13   Spotlight this post!  
Unread 18-02-2011, 10:29
j.cole j.cole is offline
Registered User
FRC #0379
 
Join Date: Jan 2010
Location: Girard
Posts: 159
j.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud of
Re: Mecanum Drive System Issues

I got fed up and decided to go through every inversion possible (all 16 of em') and on the 10th one it worked (yes I ran from robot main 10 times). The correct inversion is Rear Right and Front Right inverted and the left ones not inverted.
__________________

It's not normally a good idea to give a programmer a drill but rules are made to be broken.
Reply With Quote
  #14   Spotlight this post!  
Unread 18-02-2011, 11:02
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: Mecanum Drive System Issues

Quote:
Originally Posted by j.cole View Post
The correct inversion is Rear Right and Front Right inverted and the left ones not inverted.
Yep, that's what I said was the typical setup.

But that can't be the only thing you changed, can it? The robot was reportedly driving forward fine before. If you now have different Motor Invert settings with the same wiring, some of the motors would be running the wrong direction when you tried driving straight.
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


All times are GMT -5. The time now is 09:54.

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