|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
||||
|
||||
|
how to program an xbox controller to drive a robot
can someone explain how to do this???
|
|
#2
|
|||||
|
|||||
|
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. ![]() |
|
#3
|
||||
|
||||
|
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 |
|
#4
|
||||
|
||||
|
Re: how to program an xbox controller to drive a robot
Quote:
|
|
#5
|
||||
|
||||
|
Re: how to program an xbox controller to drive a robot
What are you programming it in?
|
|
#6
|
||||
|
||||
|
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
|
||||
|
||||
|
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.
Last edited by MichaelBick : 28-10-2013 at 04:12. |
|
#8
|
||||
|
||||
|
Re: how to program an xbox controller to drive a robot
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
|
||||
|
||||
|
Re: how to program an xbox controller to drive a robot
I should learn to not post from my phone. I corrected the original post
|
|
#10
|
||||
|
||||
|
Re: how to program an xbox controller to drive a robot
Quote:
![]() |
|
#11
|
||||
|
||||
|
Re: how to program an xbox controller to drive a robot
Quote:
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. |
|
#12
|
||||
|
||||
|
Re: how to program an xbox controller to drive a robot
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.
|
|
#13
|
||||
|
||||
|
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!
|
|
#14
|
||||
|
||||
|
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.
|
|
#15
|
||||
|
||||
|
Re: how to program an xbox controller to drive a robot
You can program them the same way you program any joystick, the buttons/axis will just not match up by default, you can do some experimenting to figure that out.
If you are using Java, I wrote a class for the Xbox Controller last year that is a drop in replacement for the standard joystick class when it comes to the CommandBased scheduling. XboxController.java Last edited by gixxy : 29-11-2013 at 21:36. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|