Go to Post Every team should have a rule about not shouting "ROBOT!" when transporting a robot around the pits/arena. - frasnow [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
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 24-03-2011, 19:26
wiiking123 wiiking123 is offline
Registered User
FRC #3855
 
Join Date: Feb 2011
Location: Washington
Posts: 20
wiiking123 is an unknown quantity at this point
Using a Logitech Game Controller

Recently, I tried to set up our robot to use a normal USB Logitech game controller using the .VI for an xbox 360 controller I found @ http://decibel.ni.com/content/docs/DOC-6036 . When I tried just running the .VI all by itself, the .VI was able to register all of the buttons, joysticks, ETC. I tried incorporating the .VI into the TELEOP.VI in the robot code, but all of the sub.VIs were considered invalid for the cRIO. When I tried incorporating the xbox vi into the teleop vi, I essentially copied and pasted the whole code into the teleop.vi. How should I go about integrating the xbox 360 controller VI into my robot code, and how do others go about using a normal USB controller for their robot?
Reply With Quote
  #2   Spotlight this post!  
Unread 24-03-2011, 19:32
theprgramerdude theprgramerdude is offline
WPI Freshman
AKA: Alex
FRC #2503 (Warrior Robotics)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Brainerd, Minnesota
Posts: 347
theprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud of
Re: Using a Logitech Game Controller

I'm no expert on Labview, but for C++, we can use the regular joystick object with everything the controller does. There's no need to use a separate, special purpose object like the 360 one. Have you tried using only the Joystick Vi instead, and telling it that the controller IS the joystick?
__________________
Attending: MN Duluth Regional

Last edited by theprgramerdude : 24-03-2011 at 19:51.
Reply With Quote
  #3   Spotlight this post!  
Unread 24-03-2011, 19:40
Ian McShane Ian McShane is offline
Registered User
FRC #3585 (Rogue Robots)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: NH
Posts: 141
Ian McShane will become famous soon enoughIan McShane will become famous soon enough
Re: Using a Logitech Game Controller

I have not tried to use an xbox 360 controller, but I would recomend trying to use the controller with incorporating the 360 vi and use the joystick vi. if that does not work then i am not sure how to help you. because i think you can use the 360 like any other joystick(button1,2,3,4,5,x and y axis, etc.) give that a shot and see what happens.
__________________
in FIRST, it's process over product, and team over robot.
http://www.roguerobotsof4h.com/
Team 3585 Rogue Robots of 4-H
Reply With Quote
  #4   Spotlight this post!  
Unread 24-03-2011, 21:30
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Using a Logitech Game Controller

While it is possible to make this work for offseason events, the competition FRC robot must be driven using the Driver Station application connected to the field. The Driver Station cannot be modified and will work with any HID joystick devices, including gamepads, that has Windows HID drivers. You cannot make it work by changing out VIs.

Greg McKaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 24-03-2011, 21:33
WizenedEE's Avatar
WizenedEE WizenedEE is offline
Registered User
AKA: Adam
FRC #3238 (Cyborg Ferrets)
Team Role: Leadership
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Anacortes, WA
Posts: 395
WizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to all
Re: Using a Logitech Game Controller

The driver station software will recognize up to four USB devices that call themselves "joysticks" and send them to the "joystick get" functions in the WPI lib. You have to use that. The get input device function only works with a normal computer, not a real time device like the C RIO, and definitely not when it's connected offboard.

So basically, just replace all of your uses of get input device with WPI Lib Joystick Get. (Make sure you open the joystick and set the reference and everything!)

Another thing to note is that you can't really test programs meant to run on the C RIO on a laptop or anything, unless it doesn't have any IO other than the front panel; they are completely different beasts. (Testing a math script is fine, if you just put values into the front panel and see the outputs there as well.)
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 20:41.

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