Go to Post They had me at "chocolate-covered bacon".... - Foster [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 Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 25-10-2013, 19:04
jperl35's Avatar
jperl35 jperl35 is offline
Registered User
FRC #2638
 
Join Date: Oct 2013
Location: new york
Posts: 4
jperl35 is an unknown quantity at this point
how to program an xbox controller to drive a robot

can someone explain how to do this???
  #2   Spotlight this post!  
Unread 25-10-2013, 19:16
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,906
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: how to program an xbox controller to drive a robot

An xbox game controller shows up in your code looking like any other joystick.
In your code you have to map the buttons and sticks to whatever you want them to do.

For example, to setup a 2-stick tank drive you might use Axis 2 for the left drive and Axis 5 for the right drive.

__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #3   Spotlight this post!  
Unread 25-10-2013, 21:12
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: how to program an xbox controller to drive a robot

Remember, though, You must have a wired controller (with the USB cable) for competition play, because any wireless communication* is forbidden.

*-Other than the robot router, of course
__________________
If molecular reactions are deterministic, are all universes identical?

RIP David Shafer: you will be missed


  #4   Spotlight this post!  
Unread 25-10-2013, 21:30
RyanCahoon's Avatar
RyanCahoon RyanCahoon is offline
Disassembling my prior presumptions
FRC #0766 (M-A Bears)
Team Role: Engineer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Mountain View
Posts: 689
RyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond repute
Re: how to program an xbox controller to drive a robot

Quote:
Originally Posted by jperl35 View Post
can someone explain how to do this???
Quote:
Originally Posted by Mark McLeod View Post
In your code you have to map the buttons and sticks to whatever you want them to do.
To go with Mark's post, you can follow the getting started instructions in the WPILib Documentation explaining how to create a basic robot drive program, if you don't know already.
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor
  #5   Spotlight this post!  
Unread 25-10-2013, 21:55
Chadfrom308's Avatar
Chadfrom308 Chadfrom308 is offline
Slave to the bot
AKA: Chad Krause
FRC #0308 (The Monsters)
Team Role: Driver
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Novi
Posts: 272
Chadfrom308 is a splendid one to beholdChadfrom308 is a splendid one to beholdChadfrom308 is a splendid one to beholdChadfrom308 is a splendid one to beholdChadfrom308 is a splendid one to beholdChadfrom308 is a splendid one to beholdChadfrom308 is a splendid one to behold
Re: how to program an xbox controller to drive a robot

What are you programming it in?
  #6   Spotlight this post!  
Unread 27-10-2013, 17:47
jperl35's Avatar
jperl35 jperl35 is offline
Registered User
FRC #2638
 
Join Date: Oct 2013
Location: new york
Posts: 4
jperl35 is an unknown quantity at this point
Re: how to program an xbox controller to drive a robot

thanks for the help i will let my team's programer know what you have posted so far
  #7   Spotlight this post!  
Unread 28-10-2013, 02:14
MichaelBick MichaelBick is offline
Registered User
FRC #1836 (MilkenKnights)
Team Role: Alumni
 
Join Date: Oct 2011
Rookie Year: 2010
Location: Los Angeles
Posts: 734
MichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant future
Re: how to program an xbox controller to drive a robot

We tried Xbox controllers and drivers preferred Logitech gamepads because the joysticks are symetrical.
__________________
Team 1836 - The Milken Knights
2013 LA Regional Champions with 1717 and 973
2012 LA Regional Finalists with 294 and 973
To follow Team 1836 on Facebook, go to http://www.facebook.com/MilkenKnights
To go to our website, go to http://milkenknights.com/index.html

Last edited by MichaelBick : 28-10-2013 at 04:12.
  #8   Spotlight this post!  
Unread 28-10-2013, 03:13
SoftwareBug2.0's Avatar
SoftwareBug2.0 SoftwareBug2.0 is offline
Registered User
AKA: Eric
FRC #1425 (Error Code Xero)
Team Role: Mentor
 
Join Date: Aug 2004
Rookie Year: 2004
Location: Tigard, Oregon
Posts: 487
SoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant futureSoftwareBug2.0 has a brilliant future
Re: how to program an xbox controller to drive a robot

Quote:
Originally Posted by MichaelBick View Post
joysticks are syndical.
I didn't even know that was a word, but I looked it up and it is. I guess you learn something new every day.
  #9   Spotlight this post!  
Unread 28-10-2013, 04:12
MichaelBick MichaelBick is offline
Registered User
FRC #1836 (MilkenKnights)
Team Role: Alumni
 
Join Date: Oct 2011
Rookie Year: 2010
Location: Los Angeles
Posts: 734
MichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant future
Re: how to program an xbox controller to drive a robot

Quote:
Originally Posted by SoftwareBug2.0 View Post
I didn't even know that was a word, but I looked it up and it is. I guess you learn something new every day.
I should learn to not post from my phone. I corrected the original post
__________________
Team 1836 - The Milken Knights
2013 LA Regional Champions with 1717 and 973
2012 LA Regional Finalists with 294 and 973
To follow Team 1836 on Facebook, go to http://www.facebook.com/MilkenKnights
To go to our website, go to http://milkenknights.com/index.html
  #10   Spotlight this post!  
Unread 28-10-2013, 04:17
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: how to program an xbox controller to drive a robot

Quote:
Originally Posted by MichaelBick View Post
I should learn to not post from my phone. I corrected the original post
...Yeah. I was a bit confused
__________________
If molecular reactions are deterministic, are all universes identical?

RIP David Shafer: you will be missed


  #11   Spotlight this post!  
Unread 28-10-2013, 10:34
JamesTerm's Avatar
JamesTerm JamesTerm is offline
Terminator
AKA: James Killian
FRC #3481 (Bronc Botz)
Team Role: Engineer
 
Join Date: May 2011
Rookie Year: 2010
Location: San Antonio, Texas
Posts: 298
JamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to behold
Re: how to program an xbox controller to drive a robot

Quote:
Originally Posted by jperl35 View Post
can someone explain how to do this???
http://gaming.stackexchange.com/ques...ectinput-games

Keep in mind the Driver Station uses direct input (not xinput). This may change for 2015 (fingers crossed).


FYI: The left right trigger buttons acting as one is a side effect for Logitech F310 controller as well.
  #12   Spotlight this post!  
Unread 28-10-2013, 10:55
eli2410's Avatar
eli2410 eli2410 is offline
Alumni/UCF Student
FRC #2410 (Metal Mustangs)
Team Role: College Student
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Leawood, KS
Posts: 124
eli2410 is a glorious beacon of lighteli2410 is a glorious beacon of lighteli2410 is a glorious beacon of lighteli2410 is a glorious beacon of lighteli2410 is a glorious beacon of lighteli2410 is a glorious beacon of light
Re: how to program an xbox controller to drive a robot

Quote:
Originally Posted by MichaelBick View Post
We tried Xbox controllers and drivers preferred Logitech gamepads because the joysticks are symetrical.
I'm surprised they prefer joysticks. Our team prefers xbox/logitech controllers because we are all so used to the feel and location of buttons on xbox type controllers since we play video games so much (whenever a visitor asks about the controller, our coach comments that he thinks that someday, cars will be driven with xbox controllers. Que up MIB2). We used to use joysticks, but now we exclusively use the controllers.

Our biggest problem with them is that the controllers keep disappearing when we need them most! In fact, at the Razorback Regional last year, we realized that we had forgotten to bring one and had to run to Best Buy and get one. We bought a pink one, figuring few people would ever take it. Low and behold, it was gone by August.
__________________
Co-captain:
2013: Cowtown Throwdown-Winners
2014: Greater KC Regional-Judges Award & Oklahoma Regional-Judges Award and Dean's List Finalist (Lauren Pudvan)
Team Member:
2013: Razorback Regional-Team Spirit & Woody Flowers (Mr. Ritter) & Greater Kansas City Regional- Gracious Professionalism
2012: FIRST Championship in St. Louis, Oklahoma Regional- Team Spirit Award, & Greater Kansas City Regional
2011: Midwest Regional & Greater Kansas City Regional- Innovation in Control
Little Brother (Spectator):
2008: FIRST Championship in Atlanta & Greater Kansas City Regional
  #13   Spotlight this post!  
Unread 28-10-2013, 12:56
MichaelBick MichaelBick is offline
Registered User
FRC #1836 (MilkenKnights)
Team Role: Alumni
 
Join Date: Oct 2011
Rookie Year: 2010
Location: Los Angeles
Posts: 734
MichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant future
Re: how to program an xbox controller to drive a robot

Quote:
Originally Posted by eli2410 View Post
I'm surprised they prefer joysticks
The gamepads are the logitech controllers: http://gaming.logitech.com/en-us/product/f310-gamepad . They are not independent joysticks. They prefer the OVER the xbox controllers because the joysticks on the controller are in the same place. We still have used independent logitech joysticks for the operator the past two years because for shooting the trigger makes more sense.
__________________
Team 1836 - The Milken Knights
2013 LA Regional Champions with 1717 and 973
2012 LA Regional Finalists with 294 and 973
To follow Team 1836 on Facebook, go to http://www.facebook.com/MilkenKnights
To go to our website, go to http://milkenknights.com/index.html
  #14   Spotlight this post!  
Unread 31-10-2013, 11:16
Invictus3593's Avatar
Invictus3593 Invictus3593 is offline
time you like wasting is not wasted
FRC #3593 (Team Invictus)
Team Role: Leadership
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Tulsa, OK
Posts: 318
Invictus3593 is just really niceInvictus3593 is just really niceInvictus3593 is just really niceInvictus3593 is just really nice
Re: how to program an xbox controller to drive a robot

We've used an Xbox controller since we began our team. It just shows up in Labview as another USB Joystick, all you have to do is make sure you have slescted the correct USB slot in Begin.vi and you can get values from there!
__________________
Per Audacia Ad Astra
  #15   Spotlight this post!  
Unread 31-10-2013, 12:19
Domenic Rodriguez's Avatar
Domenic Rodriguez Domenic Rodriguez is offline
Registered User
FRC #0316 (LuNaTeCs)
Team Role: College Student
 
Join Date: Sep 2010
Rookie Year: 2011
Location: Grove City, PA
Posts: 213
Domenic Rodriguez has a spectacular aura aboutDomenic Rodriguez has a spectacular aura aboutDomenic Rodriguez has a spectacular aura about
Re: how to program an xbox controller to drive a robot

If working in Java or C++, it can be helpful to write a utility class for the Xbox controller so you don't have to remember what button/axis number maps to each physical one. Here's what my team uses. Then you can just use it like any other joystick but with additional functionality.
__________________

LuNaTeCs - Learning Under Nurturing Adults Teaching Engineering Concepts and Skills - Small and Mighty!

FRC 316 LuNaTeCs - Student (2011-2014), Lead Programmer (2011-2014), Team Captain (2013-2014), Operator (2013), Drive Coach (2014), Mentor (2015-????)
'11 Philly Regional Finalists, '13 Chestnut Hill Finalists, '13 Lenape Champions, '13 Archimedes Division, '14 Chestnut Hill Champions, '14 Lenape Champions
FTC 7071 EngiNerds - Founding Advisor (2013-2014) | FRC 5420 Velocity - Founding Advisor (2015)
Grove City College Class of '18, Electrical/Computer Engineering (B.S.E.E)

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:36.

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