Go to Post We have seen the difference in people's lives on our team as they went through the program. There are all sorts of examples, and I am sure you (and everybody other team) have similar stories. At the end of the day, that is really all that matters; changing lives in a positive manner. - tim-tim [more]
Home
Go Back   Chief Delphi > Technical > Control System > FRC Control System
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 17-03-2012, 21:57
ctccromer's Avatar
ctccromer ctccromer is offline
Animus
AKA: Tucker Campbell
FRC #3753 (Bulah Bots)
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Baton Rouge, Louisiana
Posts: 190
ctccromer is a name known to allctccromer is a name known to allctccromer is a name known to allctccromer is a name known to allctccromer is a name known to allctccromer is a name known to all
driving with an xbox360 controller

Hello there! My team, 3753, just got back from our regionals, so naturally some of us have lots of thoughts and questions about plans for next year! Our current programmer is a senior and I'm going to be replacing him next year as (probably) our team's only programmer (it's a pretty small team -- about 12 people total).
This was my first competition so I went around asking all the questions I could think of, and one thing I was told was that in order to use an xbox 360 controller, you have to install a separate driver. What exactly is the driver, where can I get it, does it cost anything, what would I need to do to set it up, etc? Is it a file I just download and put somewhere and we're good, or does it make things entirely different from joysticks and the ps2-like controllers? Can you use a regular wired x360 controller (and a wireless with the wired attachment thing) or do you have to buy a special one?

P.S. If anyone has any advice on different types of controls (joysticks vs ps2-like controllers vs x360 vs who knows what else), that would also be greatly appreciated. Thanks!
__________________
Team 3753 BulahBots
Reply With Quote
  #2   Spotlight this post!  
Unread 18-03-2012, 12:11
amoose136's Avatar
amoose136 amoose136 is offline
Registered User
FRC #3140 (The Flagship)
Team Role: Leadership
 
Join Date: Jan 2011
Rookie Year: 2004
Location: Tennessee
Posts: 12
amoose136 is an unknown quantity at this point
Re: driving with an xbox360 controller

In labview controllers are treated just like joysticks and windows seems to auto install all the drivers you need when you plug in the controller. Just be aware that wireless controllers are not legal.
Reply With Quote
  #3   Spotlight this post!  
Unread 18-03-2012, 12:42
ctccromer's Avatar
ctccromer ctccromer is offline
Animus
AKA: Tucker Campbell
FRC #3753 (Bulah Bots)
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Baton Rouge, Louisiana
Posts: 190
ctccromer is a name known to allctccromer is a name known to allctccromer is a name known to allctccromer is a name known to allctccromer is a name known to allctccromer is a name known to all
Re: driving with an xbox360 controller

So I won't need to do anything? That's awesome What if I program the robot in c++ instead of labview? Is the connection window I saw everyone using labview no matter what the robot's programmed in?

I know wireless controllers are illegal, but is it legal to use a wireless controller attached wired with this? It treats it just like a wired controller and I could just use one of mine from home, but since we've never used controllers, we're unfamiliar with the rules.
__________________
Team 3753 BulahBots
Reply With Quote
  #4   Spotlight this post!  
Unread 18-03-2012, 13:48
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: 944
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: driving with an xbox360 controller

1675 started using Xbox controller this year. I just put an inital commit of our code on Github last night (WARNING: SUPER GROSS, NEEDS CLEANING AND REORGANIZING). Here's a link to our wrapper class for the controller. We use Java but it is essentially the same for C++.

https://github.com/pordonj/frc1675-2...ontroller.java

Caveats:
  • The trigger buttons are their own axis. It stays at 0.0, one trigger makes it go up, one makes it go down. So you can't really tell whether a number is a mix of the 2 triggers or not. We don't use them on the robot right now but this code treats a push of the trigger as a boolean button based on whether the axis went up or down. If you use this the triggers will have to be pushed mutually exclusively for intended functionality. (If both are pushed the same amount, neither will evaluate to true).
  • The D-pad has left and right as an axis, and we couldn't seem to access the up/down D-pad buttons. Our code uses them like buttons because pressing the D-pad buttons makes the axis go to 1.0 / -1.0
  • We found it more intuitive to make up on the Y axis be positive, so all Y axes are flipped in this class.
  • We have an implicit 10% deadzone on all analog stick axes.
  • The "bumpers" are the shoulder buttons.
  • We didn't program in the Start/Back/Center(XBox Logo) buttons, I just realized.

Last edited by BigJ : 18-03-2012 at 14:05. Reason: cleaned up code a bit and realzied additional caveat
Reply With Quote
  #5   Spotlight this post!  
Unread 19-03-2012, 15:57
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: driving with an xbox360 controller

Quote:
Originally Posted by amoose136 View Post
In labview controllers are treated just like joysticks and windows seems to auto install all the drivers you need when you plug in the controller. Just be aware that wireless controllers are not legal.
Except it does not when you don't have the drivers. You need the standard xbox 360 driver from microsoft's website: http://www.microsoft.com/hardware/en...indows#support
__________________
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
Reply With Quote
  #6   Spotlight this post!  
Unread 19-03-2012, 23:01
gixxy's Avatar
gixxy gixxy is offline
Programming and Arduino Mentor
AKA: Gustave Michel III
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Ruston, LA
Posts: 207
gixxy is on a distinguished road
Re: driving with an xbox360 controller

I do not know anything about the xbox drivers. I believe that the logitech game pad on the andymark site will work fine.

And as far as coding. I believe LabVIEW and C++ treat it just like a Joystick and KNOW Java does, have worked with other Joysticks from many brands on it. (occasional glitch with some types, but overall great performance)
__________________
Programmer - A creature known for converting Caffeine into Code.
Studying Computer Science @ Louisiana Tech University
Associate Consultant @ Fenway Group

2012-13: 3946 - Head of Programming, Electrical and Web
2014 - 3468 - Programming Mentor
2015 - Present - Lurker
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 19:15.

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