Go to Post I think I have a warning label saved somewhere on my computer that says "Warning: All photos taken with this camera may be photoshopped" but I keep forgetting to put it on my camera. - MissInformation [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-10-2011, 14:26
Slendyman Slendyman is offline
Registered User
FTC #0532
 
Join Date: Oct 2011
Location: Florida
Posts: 3
Slendyman is an unknown quantity at this point
Custom drive train: Right joystick

Hello world, our team is currently having trouble with joysticks. We are attempting to program a custom drive train, our issue is getting the left joystick to do anything. We are able to move the robot using the right joystick, I suppose our question is how would it be possible to get both joysticks to work? I apologize if I'm not providing enough details. If there is any questions I would love to answer them, I hope some one can help us out. Cheers!

Note: This is for the FTC competition.

Last edited by Slendyman : 27-10-2011 at 14:30.
Reply With Quote
  #2   Spotlight this post!  
Unread 27-10-2011, 15:06
Aren Siekmeier's Avatar
Aren Siekmeier Aren Siekmeier is offline
on walkabout
FRC #2175 (The Fighting Calculators)
Team Role: Mentor
 
Join Date: Apr 2008
Rookie Year: 2008
Location: 대한민국
Posts: 735
Aren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond repute
Re: Custom drive train: Right joystick

Yes details would be very helpful here since your problem could be any number of things:

What is your drive setup? How are the joysticks supposed to control the drive train? How do they (or don't they) actually control the drivetrain? See if you can't narrow down if the problem is with the drive, electrical, code, or the joysticks themselves, and people here will have plenty of ideas. Pictures are good too, of your wiring or something, also screenshots/copy-pastes of the code.

Are the joysticks plugged in? (silly question I know)
Are they enumerated properly in the code? If you're setting both of them to USB 1, then you will have a problem.
Does it work to swap joysticks? Do you get signal out to your speed controllers, out from your speed contollers, etc.?
All just ideas of things to check, but without more detail it's hard to know where the problem is.

Hope that helps.
Reply With Quote
  #3   Spotlight this post!  
Unread 28-10-2011, 14:06
Slendyman Slendyman is offline
Registered User
FTC #0532
 
Join Date: Oct 2011
Location: Florida
Posts: 3
Slendyman is an unknown quantity at this point
Re: Custom drive train: Right joystick

Well what is wanted is having the X of the right joystick turn the robot while the left joystick Y controls the speed. What we need to know is how the use both the X and Y of two separate joysticks. We are very new to LabVIEW. Right now we are trying to get some knowledge on that with a basic Tri-Bot. Currently it is only one controller right now. Sorry if it is something really basic that I am missing with this.
Reply With Quote
  #4   Spotlight this post!  
Unread 28-10-2011, 15:29
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: Custom drive train: Right joystick

Quote:
Originally Posted by Slendyman View Post
Well what is wanted is having the X of the right joystick turn the robot while the left joystick Y controls the speed. What we need to know is how the use both the X and Y of two separate joysticks. We are very new to LabVIEW. Right now we are trying to get some knowledge on that with a basic Tri-Bot. Currently it is only one controller right now. Sorry if it is something really basic that I am missing with this.
See the TankDrive software example that comes with the FRC2011 LabVIEW installation.

Click on "Axis2" and change it to "Axis1" to access the X axis.

Then use Axis1 (X) to control rotation and Axis2 (Y) to control speed.


Attached Thumbnails
Click image for larger version

Name:	_joystick.png
Views:	46
Size:	38.8 KB
ID:	11027  Click image for larger version

Name:	TankDrive.png
Views:	33
Size:	42.3 KB
ID:	11028  
Reply With Quote
  #5   Spotlight this post!  
Unread 28-10-2011, 15:37
Aren Siekmeier's Avatar
Aren Siekmeier Aren Siekmeier is offline
on walkabout
FRC #2175 (The Fighting Calculators)
Team Role: Mentor
 
Join Date: Apr 2008
Rookie Year: 2008
Location: 대한민국
Posts: 735
Aren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond repute
Re: Custom drive train: Right joystick

Quote:
Originally Posted by Slendyman View Post
Well what is wanted is having the X of the right joystick turn the robot while the left joystick Y controls the speed. What we need to know is how the use both the X and Y of two separate joysticks. We are very new to LabVIEW. Right now we are trying to get some knowledge on that with a basic Tri-Bot. Currently it is only one controller right now. Sorry if it is something really basic that I am missing with this.
By Tri-Bot do you mean this? It won't work as expected to control that with the tank drive or arcade drive VIs.

Also, talking about code is inherently vague, and we might be able to spot some small issues just in how the code is written if you can post some screenshots.
Reply With Quote
  #6   Spotlight this post!  
Unread 28-10-2011, 15:53
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: Custom drive train: Right joystick

Quote:
Originally Posted by Slendyman View Post
Note: This is for the FTC competition.
We need to grow some FTC experts here on Chief Delphi.
Reply With Quote
  #7   Spotlight this post!  
Unread 28-10-2011, 16:04
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: Custom drive train: Right joystick

Quote:
Originally Posted by compwiztobe View Post
By Tri-Bot do you mean this? It won't work as expected to control that with the tank drive or arcade drive VIs.
I should have been clearer. I wasn't suggesting he use the FRC TankDrive vi; I was merely using a screenshot of the TankDrive as an example to illustrate how to access the different joystick axes (since that was his stated problem, as I understood it).

If his problem isn't that he doesn't know how to access the joystick X-axis, but rather that he doesn't know what to do with the X axis in order to control the Tri-Bot, then that's a different problem. Slendyman: would you please clarify?


Reply With Quote
  #8   Spotlight this post!  
Unread 28-10-2011, 16:42
Aren Siekmeier's Avatar
Aren Siekmeier Aren Siekmeier is offline
on walkabout
FRC #2175 (The Fighting Calculators)
Team Role: Mentor
 
Join Date: Apr 2008
Rookie Year: 2008
Location: 대한민국
Posts: 735
Aren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond repute
Re: Custom drive train: Right joystick

And I should have read the last line of his post... my mistake.
Reply With Quote
  #9   Spotlight this post!  
Unread 28-10-2011, 21:24
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,579
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Custom drive train: Right joystick

Quote:
Originally Posted by compwiztobe View Post
By Tri-Bot do you mean this? It won't work as expected to control that with the tank drive or arcade drive VIs.
For FTC, I bet tribot means the standard two driven wheels and one undriven caster.
Reply With Quote
  #10   Spotlight this post!  
Unread 31-10-2011, 19:45
Alzir's Avatar
Alzir Alzir is offline
Registered User
FRC #2152 (S*M*A*S*H)
Team Role: Programmer
 
Join Date: Oct 2011
Rookie Year: 2010
Location: Ormond Beach Florida
Posts: 4
Alzir is an unknown quantity at this point
Re: Custom drive train: Right joystick

Quote:
Originally Posted by Ether View Post
I should have been clearer. I wasn't suggesting he use the FRC TankDrive vi; I was merely using a screenshot of the TankDrive as an example to illustrate how to access the different joystick axes (since that was his stated problem, as I understood it).

If his problem isn't that he doesn't know how to access the joystick X-axis, but rather that he doesn't know what to do with the X axis in order to control the Tri-Bot, then that's a different problem. Slendyman: would you please clarify?

Actually the issue is finding out how to get the X axis value seperate on the left and right joystick; we have the Lego Mindstorms 2010 version of LabVIEW also. Once we have that we probably can get the rest done easily.
(I am also a programmer on the same team as Slendyman)
Reply With Quote
  #11   Spotlight this post!  
Unread 31-10-2011, 22:57
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: Custom drive train: Right joystick

Quote:
Originally Posted by Alzir View Post
Actually the issue is finding out how to get the X axis value seperate on the left and right joystick; ... Once we have that we probably can get the rest done easily.
Did you try this?
Quote:
Originally Posted by Ether View Post

Click on "Axis2" and change it to "Axis1" to access the X axis.

Then use Axis1 (X) to control rotation and Axis2 (Y) to control speed.

Reply With Quote
  #12   Spotlight this post!  
Unread 01-11-2011, 12:03
Alzir's Avatar
Alzir Alzir is offline
Registered User
FRC #2152 (S*M*A*S*H)
Team Role: Programmer
 
Join Date: Oct 2011
Rookie Year: 2010
Location: Ormond Beach Florida
Posts: 4
Alzir is an unknown quantity at this point
Re: Custom drive train: Right joystick

Quote:
Originally Posted by Ether View Post
Did you try this?


We have the 2010 Lego Mindstorms version of LabVIEW. And I think I found the solution to the problem. I just have to use the calculate motor power from joystick function in the FTC toolkit that allows the axis to be chosen. Thank you for the help anyway.
Reply With Quote
  #13   Spotlight this post!  
Unread 01-11-2011, 14:02
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: Custom drive train: Right joystick

If I can toot my own horn a bit, the new version of LabVIEW that FTC and FLL are using this year have a few features that could make it easier for you to pick up these things faster.

The Joystick editor allows you to quickly try out different behaviours before you have to write any code. Then the code generator can write LabVIEW code for you that uses the FTC template.

You are describing arcade drive, but with an unusual selection of which axes go where. Try creating configuration that uses arcade steering, code-gen it, and then modify it to use the axes you want.
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:43.

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