Go to Post AndyMark is proud to announce that we will now be offering banana same-day shipping during build season for those food-deprived students on your team. - Hitchhiker 42 [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 13-01-2014, 15:38
WPDavid WPDavid is offline
Registered User
no team
 
Join Date: Sep 2012
Location: Haymarket, Virginia
Posts: 1
WPDavid is an unknown quantity at this point
Use of gamepads in replacement of buttonboards

My team has been considering the use of gamepads(ps4, xbox, ftc, etc) and was wondering if any team has done this previously and if so, what programming language they used with the gamepads and if there was any lag while using the gamepads. My team is using logitech gamepad f310 and c++.
  #2   Spotlight this post!  
Unread 13-01-2014, 15:41
sergioCorral842's Avatar
sergioCorral842 sergioCorral842 is offline
College Student
FRC #0842 (Falcon Robotics)
Team Role: Alumni
 
Join Date: Aug 2011
Rookie Year: 2012
Location: Phoenix, Arizona
Posts: 161
sergioCorral842 is a splendid one to beholdsergioCorral842 is a splendid one to beholdsergioCorral842 is a splendid one to beholdsergioCorral842 is a splendid one to beholdsergioCorral842 is a splendid one to beholdsergioCorral842 is a splendid one to beholdsergioCorral842 is a splendid one to beholdsergioCorral842 is a splendid one to behold
Re: Use of gamepads in replacement of buttonboards

Quote:
Originally Posted by WPDavid View Post
My team has been considering the use of gamepads(ps4, xbox, ftc, etc) and was wondering if any team has done this previously and if so, what programming language they used with the gamepads and if there was any lag while using the gamepads. My team is using logitech gamepad f310 and c++.
For our driving, we currently use an RC controller for driving, and a logitech gamepad for co pilot. We run this using Java and we have not had any issues with the gamepad what so ever.
__________________
Team 842 Falcon Robotics: 2011-2015 (President, Head Programmer, Drive Team)
Arizona Regional Winners: 2012-2014 (Thanks 610, 1212, 1726, 3944, 2486, 2403)
Curie Division Semi-Finalists: 2014 (Thanks 1311, 2013, 2928)
Las Vegas Semi-Finalists: 2015 (Thanks 3495, 4415)
Curie Division Quarter-Finalists: 2015 (Thanks 107, 228, 649)

2015 - 2016: Programming, Drive Team, and Strategy Mentor for Team 3187, The Titans

Studying Computer Science- Software Engineering at ASU (Class of 2019)
  #3   Spotlight this post!  
Unread 13-01-2014, 15:46
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 443
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Re: Use of gamepads in replacement of buttonboards

2168 has used the F310 for at least the last 3 years, possibly longer, can't remember. It's been a while. We've always used Java.

Do a search for F310 on the forums here, you'll find lots of teams using them.

There's no perceivable difference in "lag" using these vs any other option. All IO into the robot has to go through the driver station and you're limited there to a maximum update frequency of 20Hz? if I remember correctly. They're just as reliable as the KOP Joysticks. Just make sure your drive team doesn't abuse the USB cables. Theat's the only problem we've had with them over the years. When the cables get wrapped around the controllers too tightly, there's no strain relief and over time the USB cables become frayed. We buy new ones each competition season because of this.

We have also used an arcade style joystick (something like this)
And played around with the wired Xbox 360 controllers a few years back - the deadband on the joysticks was not acceptable for our use.
__________________
http://team2168.org
  #4   Spotlight this post!  
Unread 13-01-2014, 16:49
Abhishek R Abhishek R is offline
Registered User
FRC #0624
Team Role: Alumni
 
Join Date: Mar 2013
Rookie Year: 2012
Location: Texas
Posts: 892
Abhishek R has a reputation beyond reputeAbhishek R has a reputation beyond reputeAbhishek R has a reputation beyond reputeAbhishek R has a reputation beyond reputeAbhishek R has a reputation beyond reputeAbhishek R has a reputation beyond reputeAbhishek R has a reputation beyond reputeAbhishek R has a reputation beyond reputeAbhishek R has a reputation beyond reputeAbhishek R has a reputation beyond reputeAbhishek R has a reputation beyond repute
Re: Use of gamepads in replacement of buttonboards

We used the gamepads (F310 or something similar) with LabVIEW in 2013. We didn't have any lag as compared with the joysticks or other controllers.

If you experience lag, you'll likely encounter the same problem with any control system because the issue probably stems from your connection with the robot. Check your settings on the robot and on your laptop to make sure they are all correct. Sometimes it will take a reset of the cRIO and/or your laptop to fix that one problem you may never be able to figure out because upon compiling or other transfer of data an error occurred. Redeploy the code too as well, and make sure you're saving at regular intervals so you always have a backup copy of code that does work, at least somewhat.
__________________
2012 - 2015 : 624 CRyptonite
Team Website
  #5   Spotlight this post!  
Unread 13-01-2014, 16:50
AdamHeard's Avatar
AdamHeard AdamHeard is offline
Lead Mentor
FRC #0973 (Greybots)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2004
Location: Atascadero
Posts: 5,526
AdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond reputeAdamHeard has a reputation beyond repute
Send a message via AIM to AdamHeard
Re: Use of gamepads in replacement of buttonboards

We've used F310s for 2 seasons and 3 offseasons now. We're very happy with them.
  #6   Spotlight this post!  
Unread 15-01-2014, 23:29
tcjinaz tcjinaz is offline
Tim
FRC #3853
Team Role: Mentor
 
Join Date: May 2011
Rookie Year: 2011
Location: Arizona
Posts: 206
tcjinaz has a spectacular aura abouttcjinaz has a spectacular aura about
Re: Use of gamepads in replacement of buttonboards

Do the Logitech F310's work on plug-in, or do we need to code up something that maps them from a 16 bit signed integer to a 32 bit real ranging +-1.0 (or even more manipulations) ? And from one set of "axis" definitions to what the WhoPpIe code expects?
Using the standard LabView joystick read, we see the integer range (on some funny axis assignments). So far, we've been too distracted to try the simple, plug in the F310 and see what happens (What does this button do
TIA,
Tim
__________________
Software Mentor
3853 Pridetronics[

  #7   Spotlight this post!  
Unread 16-01-2014, 00:00
tStano tStano is offline
Registered User
AKA: Sparks
no team
Team Role: Electrical
 
Join Date: Jan 2014
Rookie Year: 2012
Location: Madison, WI
Posts: 177
tStano will become famous soon enough
Re: Use of gamepads in replacement of buttonboards

My team has used xbox controllers for as long as I've been on the team. As a previous poster noted, the deadzone is rather large. That hasn't been a big issue for us; just remember to account for it in code. The triggers do weird stuff, and we haven't been able to implement them. Otherwise, we just wrote a class called xBoxControllerMap which has a list of ints named for the buttons on the controller so we only had to figure out what does what once.

Last edited by tStano : 16-01-2014 at 10:29.
  #8   Spotlight this post!  
Unread 16-01-2014, 00:08
TheJoe's Avatar
TheJoe TheJoe is offline
Registered User
AKA: Joe Neyhart
FRC #0279 (Tech Fusion)
Team Role: Alumni
 
Join Date: Apr 2013
Rookie Year: 2011
Location: Toledo, Ohio
Posts: 33
TheJoe has a spectacular aura aboutTheJoe has a spectacular aura about
Re: Use of gamepads in replacement of buttonboards

Unfortunately I can't tell you the exact gamepads we use, but one is Logitech and the other is a Cyborg.

Our programmers code in Java

And as a driver for two seasons (as well as a lot of offseason events and demos) I haven't noticed any lag between the controller and robot.

Hope it works out well for you
  #9   Spotlight this post!  
Unread 16-01-2014, 00:08
BigJ BigJ is offline
Registered User
AKA: Josh P.
FRC #1675 (Ultimate Protection Squad)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Milwaukee, WI
Posts: 947
BigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond repute
Re: Use of gamepads in replacement of buttonboards

Quote:
Originally Posted by tStano View Post
My team has used xbox controllers for as long as I've been on the team. As a previous poster noted, the deadzone is rather large. That hasn't been a big issue for us; just remember to account for it in code. The triggers do weird stuff, and we haven't been able to implement them. Otherwise, we just wrote a class called xBoxControllerMap which has a list of ints named for the buttons on the controller so we only had to figure out what does what once.

They are also, as we learned this preseason; attractive targets for theft; so if you work in a school or other public place; lock them up.
Here is our XBoxControllerMap class for Java. We use another custom class called DPadButton to turn the accessible directions of the d-pad into buttons that can trigger commands. The implementation should be relatively easy to get the gist of from a C++ point of view.

Last edited by BigJ : 16-01-2014 at 00:11.
  #10   Spotlight this post!  
Unread 16-01-2014, 00:14
Oak1477 Oak1477 is offline
Registered User
FRC #1477
Team Role: Alumni
 
Join Date: Jun 2012
Rookie Year: 2011
Location: texas
Posts: 10
Oak1477 is an unknown quantity at this point
Re: Use of gamepads in replacement of buttonboards

Our team has been using gamepads for as long as I have been on the team. I have seen them programmed in java, c++, and labveiw with no lag issues. We even used a custom arduino controller last year either no lag. If there is lag it is usually something else code wise.
  #11   Spotlight this post!  
Unread 16-01-2014, 01:25
BBray_T1296's Avatar
BBray_T1296 BBray_T1296 is offline
I am Dave! Yognaut
AKA: Brian Bray
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Rockwall, TX
Posts: 947
BBray_T1296 has a reputation beyond reputeBBray_T1296 has a reputation beyond reputeBBray_T1296 has a reputation beyond reputeBBray_T1296 has a reputation beyond reputeBBray_T1296 has a reputation beyond reputeBBray_T1296 has a reputation beyond reputeBBray_T1296 has a reputation beyond reputeBBray_T1296 has a reputation beyond reputeBBray_T1296 has a reputation beyond reputeBBray_T1296 has a reputation beyond reputeBBray_T1296 has a reputation beyond repute
Re: Use of gamepads in replacement of buttonboards

Quote:
Originally Posted by otherguy View Post
<snip>
...played around with the wired Xbox 360 controllers a few years back - the deadband on the joysticks was not acceptable for our use.
You can program in a deadband to encompass the inaccuracies (over-accuracies, I guess, if that is a thing). We use wired Xbox controllers, and we have to do the same.
Just last week we were diagnosing a wonky motor-controller on our kit bot. After immediately blaming the software team (it is always software's fault! ) and then checking all the wiring, including replacing the motor-controller, we determined that that it was, in fact, a deadband issue. Once we determined the culprit it was quickly fixed. I am not a programmer, so I have no idea how they did it (witchcraft, I presume) but the kit bot works fine now.
__________________
If molecular reactions are deterministic, are all universes identical?

RIP David Shafer: you will be missed


  #12   Spotlight this post!  
Unread 16-01-2014, 09:11
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 443
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Re: Use of gamepads in replacement of buttonboards

Quote:
You can program in a deadband to encompass the inaccuracies (over-accuracies, I guess, if that is a thing). We use wired Xbox controllers, and we have to do the same.
Our problem with the sticks wasn't that there was not enough dead band, it was that there was too much. If I rmember correctly, about 30% of the sticks motion (all the way up to all the way down) accounted for no change in the analog value reported to the robot.

That just means there's less controllable area over which the driver can adjust speeds. We don't see this problem wit the F310. So that
s what we have used. Maybe there are different hardware versions of the wired 360 controller... The one we bought back in 2010 had this problem, and we haven't checked again since.
__________________
http://team2168.org
  #13   Spotlight this post!  
Unread 16-01-2014, 13:33
MamaSpoldi's Avatar
MamaSpoldi MamaSpoldi is offline
Programming Mentor
AKA: Laura Spoldi
FRC #0230 (Gaelhawks)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 2007
Location: Shelton, CT
Posts: 307
MamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant future
Re: Use of gamepads in replacement of buttonboards

Team 230 has been using the Logitech gamepad (now the F310) for 6 years now and programming in C++. We too have had an excellent experience with them. They are supported through the WPILib just like the kit joysticks as well as many others you can buy. Although we do not use it to drive the robot but rather for our operator controls, in particular we use the gamepad rather than xbox or other similar controllers because the joysticks have better sensitivity and deadband area. This makes those joysticks more useful for controlling other mechanisms too. I agree that they do have an issue with stress on the cord which can fray/break causing issues so we also get new ones for competition use each year. No matter how much we remind people not to wind up the cord so tightly... they still do it.

If you need any help with interfacing to them with your C++ code feel free to pm me or post questions here.
__________________
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


All times are GMT -5. The time now is 03:35.

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