Go to Post The real question is not whether any teams have had metal in a speed controller, it's whether any teams haven't. - EricH [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 13-01-2015, 18:20
bloom_kelsey's Avatar
bloom_kelsey bloom_kelsey is offline
Registered User
FRC #2874
 
Join Date: Jan 2013
Location: Grain Valley, MO
Posts: 3
bloom_kelsey is an unknown quantity at this point
2015 Mecanum Drive/Joystick Example

Hello,
The programmers on my team are having issues using 2015 LabVIEW to program our mecanum drive. We seem to be having trouble figuring out where to implement the joystick code with the mecanum code in the teleop.vi. Could someone please show us how the new joystick index array works with our type of drive system?

Thanks!
Reply With Quote
  #2   Spotlight this post!  
Unread 14-01-2015, 22:54
pastelpony's Avatar
pastelpony pastelpony is offline
Programmer/Electrical
AKA: Zach M
FRC #3525 (Nuts and Bolts of Fury)
Team Role: Programmer
 
Join Date: Feb 2014
Rookie Year: 2013
Location: Waterbury, Connecticut
Posts: 152
pastelpony will become famous soon enough
Re: 2015 Mecanum Drive/Joystick Example

There's always a default project that utilizes mecanum. You could just use HolonomicDrive and wire it up like arcade drive.
__________________
Team 3525 Head Programmer (2014- ) - Java (Formerly LabVIEW)
Reply With Quote
  #3   Spotlight this post!  
Unread 16-01-2015, 14:40
ProffessorGordo ProffessorGordo is offline
Registered User
FRC #2883
 
Join Date: Jan 2015
Location: Warroad MN
Posts: 2
ProffessorGordo is an unknown quantity at this point
Re: 2015 Mecanum Drive/Joystick Example

My team hooked up a Xbox controller with joysticks so the left joystick would move the robot north-south-east-west. then we used the RB and the LB to control rotation. Here is a guide we found extremely helpful.

http://www.pobots.com/files/8213/5726/0394/mecanum.pdf
Reply With Quote
  #4   Spotlight this post!  
Unread 18-01-2015, 09:24
NeilR NeilR is offline
Adjunct Lecturer, UNC Asheville
FRC #3971 (Kai Orbus)
Team Role: Mentor
 
Join Date: Dec 2005
Rookie Year: 2002
Location: Asheville, NC
Posts: 6
NeilR is on a distinguished road
Re: 2015 Mecanum Drive/Joystick Example

Mechanum Sample for 2015 seems to be faulty.

We have noticed (and fixed) a few problems in the sample Holonomic Mechanum Cartesian code:

1. The joystick inputs have Rotation, X and Y messed up. We had to fine-tooth-comb which should be hooked to what, but once we found the right VI, it was not difficult.

2. The motor comments that specify which motor gets which port has an error which prevents lateral X motion. We switched the wires between port/motor 1 and 3 and now it works fine.

Not sure how this slipped through, I hope this helps other teams (particularly newbies) to get their mechanums working.

Neil
Reply With Quote
  #5   Spotlight this post!  
Unread 18-01-2015, 10:16
pastelpony's Avatar
pastelpony pastelpony is offline
Programmer/Electrical
AKA: Zach M
FRC #3525 (Nuts and Bolts of Fury)
Team Role: Programmer
 
Join Date: Feb 2014
Rookie Year: 2013
Location: Waterbury, Connecticut
Posts: 152
pastelpony will become famous soon enough
Re: 2015 Mecanum Drive/Joystick Example

Quote:
Originally Posted by NeilR View Post
Mechanum Sample for 2015 seems to be faulty.

We have noticed (and fixed) a few problems in the sample Holonomic Mechanum Cartesian code:

1. The joystick inputs have Rotation, X and Y messed up. We had to fine-tooth-comb which should be hooked to what, but once we found the right VI, it was not difficult.

2. The motor comments that specify which motor gets which port has an error which prevents lateral X motion. We switched the wires between port/motor 1 and 3 and now it works fine.

Not sure how this slipped through, I hope this helps other teams (particularly newbies) to get their mechanums working.


Neil
Would you please mind sharing an example of your mecanum code? I'm having difficulty fine tuning it myself.
__________________
Team 3525 Head Programmer (2014- ) - Java (Formerly LabVIEW)
Reply With Quote
  #6   Spotlight this post!  
Unread 18-01-2015, 10:59
NeilR NeilR is offline
Adjunct Lecturer, UNC Asheville
FRC #3971 (Kai Orbus)
Team Role: Mentor
 
Join Date: Dec 2005
Rookie Year: 2002
Location: Asheville, NC
Posts: 6
NeilR is on a distinguished road
Re: 2015 Mecanum Drive/Joystick Example

In "WPI_RobotDriveMecanumDrive_Cartesian.vi" (accessed by double clicking on the "Drive -- Holonomic Drive" block in the Teleop vi) over on the far left toward the bottom you see "Rotation", "X", "Y" inputs. By rewiring which goes to which input, you can control which joystick motion/wheel controls what behavior.

Please see this image, this is what works for us:

http://pho.to/8fJab

We use the z-axis input for side-to-side motion. On our old joystick that's a little wheel just below the handle.

Neil

P.S. Also, don't forget to swap the wires for motors 1 and 3.

Last edited by NeilR : 18-01-2015 at 11:05.
Reply With Quote
  #7   Spotlight this post!  
Unread 18-01-2015, 11:13
pastelpony's Avatar
pastelpony pastelpony is offline
Programmer/Electrical
AKA: Zach M
FRC #3525 (Nuts and Bolts of Fury)
Team Role: Programmer
 
Join Date: Feb 2014
Rookie Year: 2013
Location: Waterbury, Connecticut
Posts: 152
pastelpony will become famous soon enough
Re: 2015 Mecanum Drive/Joystick Example

We found that Z axis controls strafing too, though moving forward was a great issue.
__________________
Team 3525 Head Programmer (2014- ) - Java (Formerly LabVIEW)
Reply With Quote
  #8   Spotlight this post!  
Unread 20-01-2015, 17:29
ChocolateTiger ChocolateTiger is offline
Registered User
FRC #3654
 
Join Date: Nov 2014
Location: Connecticut
Posts: 3
ChocolateTiger is an unknown quantity at this point
Re: 2015 Mecanum Drive/Joystick Example

After methodically testing the motors on our breadboard with the original, unchanged holonomic drive roboRIO project, we discovered that the only issue with the program is that the Y and Z (Rotation) axes coming from the array going into the Holonomic Drive VI are switched. It was a minor wiring issue and once corrected, everything worked fine. I have attached a copy of the table showing the correct mapping including the rotational directions of our motors and the true axis to which each belongs.

On the attachment, CW=clockwise, CCW=counter-clockwise

Hope this helps.
Attached Thumbnails
Click image for larger version

Name:	Joystick to Holonomic Drive Mapping.png
Views:	95
Size:	8.9 KB
ID:	17911  Click image for larger version

Name:	Screenshot of Fixed Holonomic Program.png
Views:	133
Size:	8.1 KB
ID:	17913  

Last edited by ChocolateTiger : 20-01-2015 at 19:17.
Reply With Quote
  #9   Spotlight this post!  
Unread 21-01-2015, 22:20
icq10 icq10 is offline
Registered User
no team
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Unknown
Posts: 24
icq10 is an unknown quantity at this point
Re: 2015 Mecanum Drive/Joystick Example

Quote:
Originally Posted by ChocolateTiger View Post
After methodically testing the motors on our breadboard with the original, unchanged holonomic drive roboRIO project, we discovered that the only issue with the program is that the Y and Z (Rotation) axes coming from the array going into the Holonomic Drive VI are switched. It was a minor wiring issue and once corrected, everything worked fine. I have attached a copy of the table showing the correct mapping including the rotational directions of our motors and the true axis to which each belongs.

On the attachment, CW=clockwise, CCW=counter-clockwise

Hope this helps.
Thank you so much for the suggestion! I got almost crazy here and then I started making a chart with the movements and how it is supposed to be. Turned out that the Motors 1 and 2 at the begin.vi had to be switched. I am so happy!
Reply With Quote
  #10   Spotlight this post!  
Unread 23-01-2015, 18:54
ShadowBot's Avatar
ShadowBot ShadowBot is offline
Registered User
FRC #3577
 
Join Date: Jan 2013
Location: Scottsdale, AZ
Posts: 9
ShadowBot is an unknown quantity at this point
Re: 2015 Mecanum Drive/Joystick Example

Quote:
Originally Posted by ProffessorGordo View Post
My team hooked up a Xbox controller with joysticks so the left joystick would move the robot north-south-east-west. then we used the RB and the LB to control rotation. Here is a guide we found extremely helpful.

http://www.pobots.com/files/8213/5726/0394/mecanum.pdf
This is the exact control scheme I am going for. I tried everything else in this thread as well as the pdf you linked (which is code-wise outdated but still a great resource). The motors are just not behaving correctly. Would you be willing to share you code so I can figure out what I'm doing wrong?
Reply With Quote
  #11   Spotlight this post!  
Unread 24-01-2015, 08:24
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,748
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: 2015 Mecanum Drive/Joystick Example

If you are able to built a similar table showing the outcome of your code, you may find your bug. Or others can more quickly identify the issues with the wheels, motor addressing, or joystick mapping.

Greg McKaskle
Reply With Quote
  #12   Spotlight this post!  
Unread 24-01-2015, 19:43
ShadowBot's Avatar
ShadowBot ShadowBot is offline
Registered User
FRC #3577
 
Join Date: Jan 2013
Location: Scottsdale, AZ
Posts: 9
ShadowBot is an unknown quantity at this point
Re: 2015 Mecanum Drive/Joystick Example

Alright, I made the diagram which helped me get four of six the basic directions/functions working. However, the last one isn't lining up correctly with the mecanum function meaning I can't switch the two around to make them work. I don't see a basic way to make it work without messing up the other directions. (i might be misinterpreting turning/rotating)

Holonomic Code
Table Showing Wheel Directions
Teleop Code

I am going for the same control scheme as ProfessorGordo on the Xbox controller.
Quote:
Originally Posted by ProffessorGordo View Post
the left joystick would move the robot north-south-east-west. then we used the RB and the LB to control rotation.

Last edited by ShadowBot : 24-01-2015 at 19:52.
Reply With Quote
  #13   Spotlight this post!  
Unread 24-01-2015, 19:59
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,034
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: 2015 Mecanum Drive/Joystick Example

Quote:
Originally Posted by ShadowBot View Post
Alright, I made the diagram which helped me get four of six the basic directions/functions working
Table Showing Wheel Directions
Your Desired(moveLeft) arrows are incorrect.

So are the Desired(moveRight).

They should be swapped with each other.



Last edited by Ether : 24-01-2015 at 20:04.
Reply With Quote
  #14   Spotlight this post!  
Unread 25-01-2015, 21:01
icq10 icq10 is offline
Registered User
no team
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Unknown
Posts: 24
icq10 is an unknown quantity at this point
Re: 2015 Mecanum Drive/Joystick Example

Quote:
Originally Posted by ShadowBot View Post
Alright, I made the diagram which helped me get four of six the basic directions/functions working. However, the last one isn't lining up correctly with the mecanum function meaning I can't switch the two around to make them work. I don't see a basic way to make it work without messing up the other directions. (i might be misinterpreting turning/rotating)

Holonomic Code
Table Showing Wheel Directions
Teleop Code

I am going for the same control scheme as ProfessorGordo on the Xbox controller.
Change to front right and back left motor in the begin.vi and it would work perfectly. then you just have to figure out the Controller. Good luck!
Reply With Quote
  #15   Spotlight this post!  
Unread 25-01-2015, 21:40
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,034
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: 2015 Mecanum Drive/Joystick Example

Quote:
Originally Posted by icq10 View Post
Change to front right and back left motor in the begin.vi and it would work perfectly.
Just to be clear: are you recommending swapping the front right and back left motors?


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 03:46.

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