Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   how to program an xbox controller to drive a robot (http://www.chiefdelphi.com/forums/showthread.php?t=120879)

jperl35 25-10-2013 19:04

how to program an xbox controller to drive a robot
 
can someone explain how to do this???

Mark McLeod 25-10-2013 19:16

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.


BBray_T1296 25-10-2013 21:12

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

RyanCahoon 25-10-2013 21:30

Re: how to program an xbox controller to drive a robot
 
Quote:

Originally Posted by jperl35 (Post 1298470)
can someone explain how to do this???

Quote:

Originally Posted by Mark McLeod (Post 1298473)
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.

Chadfrom308 25-10-2013 21:55

Re: how to program an xbox controller to drive a robot
 
What are you programming it in?

jperl35 27-10-2013 17:47

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

MichaelBick 28-10-2013 02:14

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.

SoftwareBug2.0 28-10-2013 03:13

Re: how to program an xbox controller to drive a robot
 
Quote:

Originally Posted by MichaelBick (Post 1298754)
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.

MichaelBick 28-10-2013 04:12

Re: how to program an xbox controller to drive a robot
 
Quote:

Originally Posted by SoftwareBug2.0 (Post 1298761)
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

BBray_T1296 28-10-2013 04:17

Re: how to program an xbox controller to drive a robot
 
Quote:

Originally Posted by MichaelBick (Post 1298770)
I should learn to not post from my phone. I corrected the original post

...Yeah. I was a bit confused :D

JamesTerm 28-10-2013 10:34

Re: how to program an xbox controller to drive a robot
 
Quote:

Originally Posted by jperl35 (Post 1298470)
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.

eli2410 28-10-2013 10:55

Re: how to program an xbox controller to drive a robot
 
Quote:

Originally Posted by MichaelBick (Post 1298754)
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.

MichaelBick 28-10-2013 12:56

Re: how to program an xbox controller to drive a robot
 
Quote:

Originally Posted by eli2410 (Post 1298822)
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.

Invictus3593 31-10-2013 11:16

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!

Domenic Rodriguez 31-10-2013 12:19

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.


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

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