Go to Post Corrected, math isn't my strong point (I went to art school for a reason) - KelliV [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 Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 27-01-2015, 18:40
REDBARON's Avatar
REDBARON REDBARON is offline
Registered User
AKA: Jack
FRC #3556 (Get Smart)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2015
Location: FL
Posts: 16
REDBARON is an unknown quantity at this point
Mecanum Trouble

Our team is trying mecanum this year with four Talon SRXs and CAN, however we've been having troubles with the motors not behaving as expected, we are aware that the code from NI is not correct, but we've tried various configurations, and nothing has worked, we've ensured our SRXs are ID-ed properly yet still the code refuses to work, forward/backward, and rotate will work fine but strafing fail, or strafing and rotate work but forward/backward fail, all help is appreciated,
-Jack
Reply With Quote
  #2   Spotlight this post!  
Unread 27-01-2015, 18:44
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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 Trouble

Quote:
Originally Posted by REDBARON View Post
forward/backward, and rotate will work fine but strafing fail, or strafing and rotate work but forward/backward fail, all help is appreciated,
Run this test and post your results here.


Reply With Quote
  #3   Spotlight this post!  
Unread 27-01-2015, 18:46
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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 Trouble

Quote:
Originally Posted by Ether View Post
Run this test and post your results here.
Also, tilt your bot on its side and take a picture of the bottom showing all 4 wheels. Post the picture here.


Reply With Quote
  #4   Spotlight this post!  
Unread 27-01-2015, 21:30
REDBARON's Avatar
REDBARON REDBARON is offline
Registered User
AKA: Jack
FRC #3556 (Get Smart)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2015
Location: FL
Posts: 16
REDBARON is an unknown quantity at this point
Re: Mecanum Trouble

Update: we achieved strafing and forward/backward, but rotation is not working, the front motors run forwards and the back backwards, or vice-versa based on direction of rotation, so that all motors are pulling outward and are fighting each other, the wheels are arranged in the proper X-formation, we arranged our input values and everything else is functioning properly, here is the code we used that fixed the problem: http://pho.to/8fJab from this thread: http://www.chiefdelphi.com/forums/sh...light=mechanum
We also used this link to setup or rotation values: http://www.pobots.com/files/8213/5726/0394/mecanum.pdf
Again, all help is appreciated,
-Jack
Reply With Quote
  #5   Spotlight this post!  
Unread 27-01-2015, 21:48
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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 Trouble

Quote:
Originally Posted by REDBARON View Post
the wheels are arranged in the proper X-formation
As viewed from the top of the bot, or from below? (They won't be the same).


Quote:
we achieved strafing and forward/backward, but rotation is not working... Again, all help is appreciated
Do this:
http://www.chiefdelphi.com/forums/sh...89&postcount=2


Reply With Quote
  #6   Spotlight this post!  
Unread 27-01-2015, 22:19
Dawg2T4's Avatar
Dawg2T4 Dawg2T4 is offline
Registered User
AKA: Chandler Douglas
FRC #3556 (GET SMART)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Lake City, Fl.
Posts: 31
Dawg2T4 is an unknown quantity at this point
Re: Mecanum Trouble

The wheels are arranged in the proper X as viewed from the top of the bot, as I believe they should be. Right now, sending a pure forward, backward, left, or right signal has the bot going in the right direction. The rotate, however, has all of the wheels going outward from each other (the two front go forward while the two back go backward) or all inward (front go backward, back go forward).
__________________
- Chander, star of Frisbeez in the Trap

http://www.youtube.com/watch?v=3bM_Sv3xJ54
Reply With Quote
  #7   Spotlight this post!  
Unread 27-01-2015, 22:24
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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 Trouble

Quote:
Originally Posted by Dawg2T4 View Post
The rotate, however, has all of the wheels going outward from each other (the two front go forward while the two back go backward) or all inward (front go backward, back go forward).
Which rotate command direction (clockwise or counterclockwise) corresponds to which behavior (all outward or all inward)?



Last edited by Ether : 27-01-2015 at 23:01.
Reply With Quote
  #8   Spotlight this post!  
Unread 27-01-2015, 23:07
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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 Trouble

Quote:
Originally Posted by Cecil View Post
From the top, the wheels should look like a diamond, an X from the bottom.
The above advice is incorrect.

From the top, rollers should look like X.
From the bottom, rollers should look like diamond.

http://www.chiefdelphi.com/forums/sh...4&postcount=18


Reply With Quote
  #9   Spotlight this post!  
Unread 27-01-2015, 23:20
Cecil's Avatar
Cecil Cecil is offline
Registered User
AKA: Alex Hummel
FRC #2010 (Lightning Bots)
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2006
Location: Champion
Posts: 343
Cecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to behold
Re: Mecanum Trouble

Quote:
Originally Posted by Ether View Post
The above advice is incorrect.
You got me there... My interpretation of "X from the top" is different than others apparently. After looking at the linked PDF, based on the description the wheels are in the correct orientation.

My apologies.. Carry on..

(I often describe it to the team as diamond from the top because the rollers face each other in a diamond shape. Guess I should tell them differently. Never thought to look at the way the rollers relate to each other...)
__________________
I'm right 90% of the time, so why worry about the other 3%?
Reply With Quote
  #10   Spotlight this post!  
Unread 27-01-2015, 23:35
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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 Trouble

Quote:
Originally Posted by Ether View Post
Which rotate command direction (clockwise or counterclockwise) corresponds to which behavior (all outward or all inward)?
If a rotate clockwise command causes all the wheels to run outward you need to swap the FrontRight and BackLeft motor commands.

If a rotate clockwise command causes all the wheels to run inward you need to swap the FrontLeft and BackRight motor comands.

Others here can advise you how to do that in the software, or you can swap the appropriate motor wires.



Last edited by Ether : 28-01-2015 at 02:02.
Reply With Quote
  #11   Spotlight this post!  
Unread 28-01-2015, 01:23
Levansic's Avatar
Levansic Levansic is offline
Registered User
AKA: Len Evansic
FRC #0585 (Cyber Penguins)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2008
Location: Tehachapi, CA
Posts: 185
Levansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud of
Re: Mecanum Trouble

Outward or inward is a bit confusing, try looking directly at the wheels from the outside of the robot, while the robot is elevated and not touching the floor. If you crank the joystick clockwise, all of the wheels should appear to turn counter-clockwise, when viewed from the outside. Take note of the ones that are going clockwise.

Go into begin.vi, and right-click on the terminal on the left side of the 4-motor drive open vi, that matches the inversion for the motors which spin clockwise. Click on the new boolean constant to turn it from false to true. Do this for all motors that are turning the wrong way.

If you have trouble finding the motor inversion terminals (which likely are unconnected), use Control-H to bring up the context-sensitive help, and mouse over the drive open vi.

All of this assumes that your motors are called in the correct position. In most cases, you will likely have to invert two of the four motors.
Reply With Quote
  #12   Spotlight this post!  
Unread 28-01-2015, 01:45
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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 Trouble

Quote:
Originally Posted by Levansic View Post
Outward or inward is a bit confusing
He defined exactly what he meant by those terms in his earlier post:

Quote:
Originally Posted by Dawg2T4 View Post
The rotate, however, has all of the wheels going outward from each other (the two front go forward while the two back go backward) or all inward (front go backward, back go forward).
... but he didn't clearly specify which rotate command (clockwise or counterclockwise) was causing which wheel motion ("outward" or "inward").



Quote:
Originally Posted by Levansic View Post
If you crank the joystick clockwise, all of the wheels should appear to turn counter-clockwise, when viewed from the outside. Take note of the ones that are going clockwise.

Go into begin.vi, and right-click on the terminal on the left side of the 4-motor drive open vi, that matches the inversion for the motors which spin clockwise. Click on the new boolean constant to turn it from false to true. Do this for all motors that are turning the wrong way.
If he does what you recommended above, it will fix the rotate problem, but break the forward/reverse and strafe right/left motions which are presently working correctly.

What he needs to do is swap the FrontRight and BackLeft motor commands (if the rotate clockwise command is causing the wheels to turn "outward") or swap the FrontLeft and BackRight motor commands (if the rotate clockwise command is causing the wheels to turn "inward").

Quote:
All of this assumes that your motors are called in the correct position.
They are not. That's the problem.



Last edited by Ether : 28-01-2015 at 02:01.
Reply With Quote
  #13   Spotlight this post!  
Unread 28-01-2015, 10:14
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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 Trouble

Quote:
Originally Posted by Ether View Post
What he needs to do is swap the FrontRight and BackLeft motor commands (if the rotate clockwise command is causing the wheels to turn "outward") or swap the FrontLeft and BackRight motor commands (if the rotate clockwise command is causing the wheels to turn "inward").
The attached chart shows the situation if OP meant to say that a rotate clockwise command
caused the front wheels to rotate forward and the back wheels to rotate backward.
  • Green means wheel rotation forward
  • Red means wheel rotation backward
  • Columns B D F H J L show what it should be
  • Columns labeled "?" show what it is actually doing (per OP's testing)

As you can see, swapping the FrontRight and BackLeft motor commands will correct the problem:
  • the RCW and RCC will be corrected, and
  • the already correct FWD, REV, STR, & STL will be unaffected
Attached Thumbnails
Click image for larger version

Name:	wheel_rotation_chart.png
Views:	41
Size:	14.0 KB
ID:	18022  

Last edited by Ether : 28-01-2015 at 12:08.
Reply With Quote
  #14   Spotlight this post!  
Unread 28-01-2015, 16:55
Dawg2T4's Avatar
Dawg2T4 Dawg2T4 is offline
Registered User
AKA: Chandler Douglas
FRC #3556 (GET SMART)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Lake City, Fl.
Posts: 31
Dawg2T4 is an unknown quantity at this point
Re: Mecanum Trouble

Just for some clarification, when you say swap the Front Right and Back Left motors, do you mean within the HolonomicDrive.vi, or is there a place within the teleop.vi to do that? Our Build session starts in about half an hour, so we can tell how well it worked then.
__________________
- Chander, star of Frisbeez in the Trap

http://www.youtube.com/watch?v=3bM_Sv3xJ54
Reply With Quote
  #15   Spotlight this post!  
Unread 28-01-2015, 17:26
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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 Trouble

Quote:
Originally Posted by Dawg2T4 View Post
Just for some clarification, when you say swap the Front Right and Back Left motors...
Just to be clear, I said swap the motor commands, not the motors. This can be accomplished in software, or in hardware by swapping the motor wires (while leaving the motors themselves unmoved). Swapping the physical motors themselves would serve no purpose here.

Quote:
do you mean within the HolonomicDrive.vi, or is there a place within the teleop.vi to do that? Our Build session starts in about half an hour, so we can tell how well it worked then.
I don't do LabVIEW. Do whatever you have to do so that the motor commands are swapped. What that means is this:
  • the command that presently is going to the FrontRight motor should be sent instead to the BackLeft motor, and

  • the command that presently is going to the BackLeft motor should be sent instead to the FrontRight motor

I think that can be accomplished in the Begin vi, wherever you assign the CAN addresses for the 4 motor locations. If there are any LabVIEW gurus reading, please chime in here.


PS: you never did answer this post. It's important; it determines which motor commands should be swapped.



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 20:09.

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