Go to Post This is the best experience you will ever get. - Arefin Bari [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 12-10-2011, 12:16
baronep's Avatar
baronep baronep is offline
Student President
FRC #2848 (Jesuit All-Sparks)
Team Role: Leadership
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Dallas TX
Posts: 167
baronep is on a distinguished road
Extended Joystick Functionality

We have some joysticks that we would like to use next year but the controller uses more than 6 axis and 12 buttons (its really 2 controllers interfaced to 1 usb). I found a way to use all these buttons using labview's native joystick input functions. Is there any reason that shouldn't read these values on the driverstation and then send them via the permitted UDP port to the robot?

Patrick
Reply With Quote
  #2   Spotlight this post!  
Unread 12-10-2011, 14:36
flameout flameout is offline
AKA Ryan Van Why
FRC #0957 (SWARM)
Team Role: Alumni
 
Join Date: Sep 2009
Rookie Year: 2009
Location: Oregon
Posts: 168
flameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to all
Re: Extended Joystick Functionality

I'm not aware of whether or not WPILib can deal with those axis and button counts, but I believe that you are correct in believing that FIRST's protocol doesn't transmit that extra data.

Reading the values on the dashboard and sending them over via UDP sounds like a fine solution. Off the top of my head, I can think of two possible issues:

1. Two programs accessing 1 joystick might be a problem (I don't think it'll be an issue, but _maybe_... all I can suggest is to try).

2. Delay in transmissions. I've done custom (not for FIRST robots, though) communication between a DS and a mobile robot, and if the packets get delayed or queued up, it's possible for a large delay in control response to form. I suggest taking 2 precautions: code a watchdog for your UDP transmissions (in case of loss of your custom UDP communications without a corresponding loss in "main" communications), and timestamp the packets.

By timestamping, I mean that it should have a way to detect if the packet is too "old." I'm not sure if the dashboard protocol includes match time, but if so, that could be used.

Alternatively, the robot could transmit time (in milliseconds since boot) to the dashboard, which timestamps the packets it sends back to the robot (this would be more work, but might be more reliable (not having to deal with teleop/autonomous/disabled modes)).

I hope this helps, and good luck (I've seen teams using the Saitek X52 system, which sounds like what you're referring to. I'm not sure if they used buttons and axes not transmitted by WPILib, though).

Last edited by flameout : 12-10-2011 at 15:05. Reason: clarifications
Reply With Quote
  #3   Spotlight this post!  
Unread 12-10-2011, 17:54
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,748
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: Extended Joystick Functionality

Since two programs will be trying to open the joysticks, that may cause issues. Of course if you run the dashboard on a second laptop, that would get around that issue.

Greg McKaskle
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 08: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