Go to Post The ever popular Safety Tip Of The Day: Do Not Lick Wheel While In Motion The other popular one was: Remember Stupid Hurts - Joe J. [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 19-03-2010, 20:27
JohnFogarty's Avatar
JohnFogarty JohnFogarty is offline
Trapped under a pile of MECANUMS :P
AKA: @doctorfogarty
FTC #11444 (Garnet Squadron) & FRC#1102 (M'Aiken Magic)
Team Role: Mentor
 
Join Date: Aug 2009
Rookie Year: 2006
Location: SC
Posts: 1,580
JohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond repute
XBOX Controller Triggers is an axis but which one?

I have a MADCATZ Xbox 360 gaming controller, and according to the classmate the two back triggers are another axis. In Labview what axis is the axis 3(Throttle), or axis 6? i think it registers as the Z- axis and the RZ- (Z Rotational).

John Fogarty
Team 1102
__________________
John Fogarty
2010 FTC World Championship Winner & 2013-2014 FRC Orlando Regional Winner
Mentor FRC Team 1102 M'Aiken Magic
"Head Bot Coach" FTC Team 11444 Garnet Squadron
Former Student & Mentor FLL 1102, FTC 1102 & FTC 3864, FRC 1772, FRC 5632
2013 FTC World Championship Guest Speaker
  #2   Spotlight this post!  
Unread 19-03-2010, 20:35
Tanner's Avatar
Tanner Tanner is offline
Registered User
FRC #1261 (Roblions)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Suwanee, GA
Posts: 311
Tanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to behold
Re: XBOX Controller Triggers is an axis but which one?

If you take the axis (or button for the matter) cluster coming out from the Get (or Get Axis/Button) VI, you can create a indicator and see what buttons/axis are what number in the code.

-Tanner
  #3   Spotlight this post!  
Unread 19-03-2010, 20:46
Chris Hibner's Avatar Unsung FIRST Hero
Chris Hibner Chris Hibner is offline
Eschewing Obfuscation Since 1990
AKA: Lars Kamen's Roadie
FRC #0051 (Wings of Fire)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1997
Location: Canton, MI
Posts: 1,488
Chris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond repute
Re: XBOX Controller Triggers is an axis but which one?

Tanner is right, but if he wasn't clear enough, this is how we did it:

-In your teleop VI, go to the block diagram and wire in two "Unbundle by Name" blocks (one for the axes and one for the buttons).

-Drag the bottom handle of the Unbundle blocks so every button and axis can be read.

-Go to your teleop VI front panel, and drop in one Numeric Indicator for each axis, and one LED for each button. Label them Axis1, Axis2, Button1, etc.

- On the block diagram, wire each button and axis to the corresponding indicator.

- Make a drawing of the controller.

- Deploy your code with the Play button, press each button and axes. Make a note of which indicator does what when you operate the controller. Use this to label your drawing.

- Once your drawing is fully labeled, you can start hooking up the axes and buttons to what you want them to control.


I know this is a pain, but this is how we did it. I have our drawing so I can't tell you which is which, but doing this process only takes 15 minutes or so. good luck.
__________________
-
An ounce of perception is worth a pound of obscure.
  #4   Spotlight this post!  
Unread 19-03-2010, 20:50
Tanner's Avatar
Tanner Tanner is offline
Registered User
FRC #1261 (Roblions)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Suwanee, GA
Posts: 311
Tanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to behold
Re: XBOX Controller Triggers is an axis but which one?

Quote:
Originally Posted by Chris Hibner View Post
Tanner is right, but if he wasn't clear enough, this is how we did it:
...
I know this is a pain, but this is how we did it. I have our drawing so I can't tell you which is which, but doing this process only takes 15 minutes or so. good luck.
Actually, if you just follow what I said, you'll save yourselves 14.5 minutes. Although, yours does have the pro of having a actual picture of the controller, though generally it's fine to just have real-time values coming back as you push buttons.

Somebody could probably make a VI that does this. Would be nice if you could tell what type of joystick you were calling upon so you could make the VI work for any controller that is plugged in. Though how would that capability help the robot? It wouldn't unless your robot has a strange passion for XBox 360 controllers and won't work otherwise.

-Tanner
  #5   Spotlight this post!  
Unread 19-03-2010, 21:07
Chris Hibner's Avatar Unsung FIRST Hero
Chris Hibner Chris Hibner is offline
Eschewing Obfuscation Since 1990
AKA: Lars Kamen's Roadie
FRC #0051 (Wings of Fire)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1997
Location: Canton, MI
Posts: 1,488
Chris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond repute
Re: XBOX Controller Triggers is an axis but which one?

Quote:
Originally Posted by Tanner View Post
Actually, if you just follow what I said, you'll save yourselves 14.5 minutes. Although, yours does have the pro of having a actual picture of the controller, though generally it's fine to just have real-time values coming back as you push buttons.

Somebody could probably make a VI that does this. Would be nice if you could tell what type of joystick you were calling upon so you could make the VI work for any controller that is plugged in. Though how would that capability help the robot? It wouldn't unless your robot has a strange passion for XBox 360 controllers and won't work otherwise.

-Tanner
I don't know about saving 14.5 minutes. The drawing took us all of 1 minute - and it was good for documentation purposes. Creating the front panel and putting in all the wires, deploying the code, than rewiring to your PWM outputs took the vast bulk of the time.
__________________
-
An ounce of perception is worth a pound of obscure.
  #6   Spotlight this post!  
Unread 19-03-2010, 21:09
Tanner's Avatar
Tanner Tanner is offline
Registered User
FRC #1261 (Roblions)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Suwanee, GA
Posts: 311
Tanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to behold
Re: XBOX Controller Triggers is an axis but which one?

True, though whatever serves the purpose is great as it doesn't matter how it is constructed.

-Tanner
  #7   Spotlight this post!  
Unread 21-03-2010, 18:16
Robototes2412's Avatar
Robototes2412 Robototes2412 is offline
1 * 4 != 14
FRC #2412 (Robototes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Bellevue
Posts: 312
Robototes2412 is on a distinguished road
Re: XBOX Controller Triggers is an axis but which one?

It its axis 3
  #8   Spotlight this post!  
Unread 21-03-2010, 19:43
mobilegamer999 mobilegamer999 is offline
Registered User
FRC #3357 (Comets)
Team Role: Programmer
 
Join Date: Feb 2008
Rookie Year: 2008
Location: Michigan
Posts: 124
mobilegamer999 is a jewel in the roughmobilegamer999 is a jewel in the roughmobilegamer999 is a jewel in the rough
Re: XBOX Controller Triggers is an axis but which one?

It is axis number 3, and it defaults to value of 0.0 and goes negative when right trigger is down and goes positive when left trigger is down.
__________________
  #9   Spotlight this post!  
Unread 22-03-2010, 14:25
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: XBOX Controller Triggers is an axis but which one?

Quote:
Originally Posted by Chris Hibner View Post
I don't know about saving 14.5 minutes. The drawing took us all of 1 minute - and it was good for documentation purposes. Creating the front panel and putting in all the wires, deploying the code, than rewiring to your PWM outputs took the vast bulk of the time.
It's the "creating the front panel and putting in all the wires" part that Tanner's simple procedure makes essentially instantaneous. You might not be recognizing that you can right-click on the Axis and Buttons clusters coming out of the Joystick Get vi and create an indicator of the entire cluster at once. There's no need to unbundle them, or to create a whole bunch of separate LEDs and numeric indicators.
  #10   Spotlight this post!  
Unread 22-03-2010, 14:32
Bmcdonnell Bmcdonnell is offline
Registered User
FRC #2062 (C.O.R.E. 2062)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Waukesha,WI
Posts: 9
Bmcdonnell is an unknown quantity at this point
Re: XBOX Controller Triggers is an axis but which one?

Go to control panel --> game controllers --> properties. It shows up what button and axis is what when you press it. We have everything except the rumble. There's some threads, I believe in WindRiver, for using rumble, but does any one know how to do it in Labview? I would love to be able to have it rumble when our robot senses a ball.+
  #11   Spotlight this post!  
Unread 22-03-2010, 17:36
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: XBOX Controller Triggers is an axis but which one?

Quote:
Originally Posted by Bmcdonnell View Post
Go to control panel --> game controllers --> properties. It shows up what button and axis is what when you press it. We have everything except the rumble. There's some threads, I believe in WindRiver, for using rumble, but does any one know how to do it in Labview? I would love to be able to have it rumble when our robot senses a ball.+
I remember seeing those threads, and you have two options (assuming I remember correctly): write your own xbox driver for windows, OR, open the xbox controller, find the rumble wire, and wire it to a digital out on the cypress board.
the default code and the DS software prevent writes to the joystick, so you would have to circumvent it using one of the methods above
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
  #12   Spotlight this post!  
Unread 22-03-2010, 19:36
JohnFogarty's Avatar
JohnFogarty JohnFogarty is offline
Trapped under a pile of MECANUMS :P
AKA: @doctorfogarty
FTC #11444 (Garnet Squadron) & FRC#1102 (M'Aiken Magic)
Team Role: Mentor
 
Join Date: Aug 2009
Rookie Year: 2006
Location: SC
Posts: 1,580
JohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond repute
Re: XBOX Controller Triggers is an axis but which one?

Thanks for all your help I hope to try this out at Palmetto.

Just another quick Question. when I wired axis 3 into a True False Selector the true and False changed to 1 and 0 which i put my true code in 1, and my false code in 0. see attached pictures tell me if im doing this right. If the button is true then set the motor speed to the percentage of the button press, for variable control. If the button i...s false, then I made another true/false case for the sensor. In the false case, I set the motor speed to 0.1. In the true case, I set the motor speed to 0.

This way, when the button is NOT being hit, it looks for the sensor, and it spins it around REALLY SLOWLY until the sensor is tripped, and then it stops there.



and another
__________________
John Fogarty
2010 FTC World Championship Winner & 2013-2014 FRC Orlando Regional Winner
Mentor FRC Team 1102 M'Aiken Magic
"Head Bot Coach" FTC Team 11444 Garnet Squadron
Former Student & Mentor FLL 1102, FTC 1102 & FTC 3864, FRC 1772, FRC 5632
2013 FTC World Championship Guest Speaker
  #13   Spotlight this post!  
Unread 22-03-2010, 20:48
Chris Hibner's Avatar Unsung FIRST Hero
Chris Hibner Chris Hibner is offline
Eschewing Obfuscation Since 1990
AKA: Lars Kamen's Roadie
FRC #0051 (Wings of Fire)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1997
Location: Canton, MI
Posts: 1,488
Chris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond repute
Re: XBOX Controller Triggers is an axis but which one?

Quote:
Originally Posted by John_1102 View Post
Thanks for all your help I hope to try this out at Palmetto.

Just another quick Question. when I wired axis 3 into a True False Selector the true and False changed to 1 and 0 which i put my true code in 1, and my false code in 0. see attached pictures tell me if im doing this right. If the button is true then set the motor speed to the percentage of the button press, for variable control. If the button i...s false, then I made another true/false case for the sensor. In the false case, I set the motor speed to 0.1. In the true case, I set the motor speed to 0.
I would recommend that you delete the wire from axis 3 and change your case structure back to TRUE and FALSE. Test axis three against "> 0.5" and if it's greater than 0.5, it will tigger the TRUE case, and if it's less than 0.5 it will trigger FALSE.

The problem with using the 0 and 1 cases is that it is possible that you cannot get to the 1 case if your XBox controller is out of calibration. If you use the 0.5 compare, you will be covered.
__________________
-
An ounce of perception is worth a pound of obscure.
  #14   Spotlight this post!  
Unread 30-06-2010, 13:46
MCeGEAR MCeGEAR is offline
Registered User
FRC #1243
 
Join Date: Jan 2010
Location: US
Posts: 12
MCeGEAR is an unknown quantity at this point
Re: XBOX Controller Triggers is an axis but which one?

Quote:
Originally Posted by byteit101 View Post
I remember seeing those threads, and you have two options (assuming I remember correctly): write your own xbox driver for windows, OR, open the xbox controller, find the rumble wire, and wire it to a digital out on the cypress board.
the default code and the DS software prevent writes to the joystick, so you would have to circumvent it using one of the methods above
There are Drivers, non-Microsoft, that support the rumble packs, you just have to risk the viruses and spend some time looking.
  #15   Spotlight this post!  
Unread 30-06-2010, 13:58
Zme Zme is offline
Registered User
FRC #2619
 
Join Date: Jan 2009
Location: Michigan
Posts: 83
Zme is on a distinguished road
Re: XBOX Controller Triggers is an axis but which one?

for a controller mapping of the xbox 360 controllers please see this post
http://www.chiefdelphi.com/forums/sh...3&postcount=12
Closed Thread


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Xbox Controller Team1710 FRC Control System 9 30-06-2010 13:17
Which axis for accelerometer? bitsoglass NI LabVIEW 1 23-01-2009 17:42
Xbox Controller? ScottieDo555 Technical Discussion 24 29-01-2008 16:24
Which is better? (Xbox 360 or PS3) 842.001 Games/Trivia 29 11-11-2006 16:06
Do the Dew... but which one? OneAngryDaisy Chit-Chat 13 16-06-2003 16:17


All times are GMT -5. The time now is 23:27.

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