Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Custom drive train: Right joystick (http://www.chiefdelphi.com/forums/showthread.php?t=98018)

Slendyman 27-10-2011 14:26

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.

Aren Siekmeier 27-10-2011 15:06

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.

Slendyman 28-10-2011 14:06

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.

Ether 28-10-2011 15:29

Re: Custom drive train: Right joystick
 
2 Attachment(s)
Quote:

Originally Posted by Slendyman (Post 1083070)
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.



Aren Siekmeier 28-10-2011 15:37

Re: Custom drive train: Right joystick
 
Quote:

Originally Posted by Slendyman (Post 1083070)
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.

Alan Anderson 28-10-2011 15:53

Re: Custom drive train: Right joystick
 
Quote:

Originally Posted by Slendyman (Post 1082899)
Note: This is for the FTC competition.

We need to grow some FTC experts here on Chief Delphi.

Ether 28-10-2011 16:04

Re: Custom drive train: Right joystick
 
Quote:

Originally Posted by compwiztobe (Post 1083082)
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?



Aren Siekmeier 28-10-2011 16:42

Re: Custom drive train: Right joystick
 
And I should have read the last line of his post... my mistake.

Joe Ross 28-10-2011 21:24

Re: Custom drive train: Right joystick
 
Quote:

Originally Posted by compwiztobe (Post 1083082)
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.

Alzir 31-10-2011 19:45

Re: Custom drive train: Right joystick
 
Quote:

Originally Posted by Ether (Post 1083086)
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)

Ether 31-10-2011 22:57

Re: Custom drive train: Right joystick
 
Quote:

Originally Posted by Alzir (Post 1083387)
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 (Post 1083080)

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.



Alzir 01-11-2011 12:03

Re: Custom drive train: Right joystick
 
Quote:

Originally Posted by Ether (Post 1083421)
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.

EricVanWyk 01-11-2011 14:02

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.


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

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi