Go to Post words of advice: never tease your dad about his receding hair line. it will come back to haunt you. trust me. - Brandon Martus [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-01-2012, 16:21
rebug rebug is offline
Registered User
FRC #1884
 
Join Date: Jan 2012
Location: London
Posts: 9
rebug is an unknown quantity at this point
Anyone know how to offload code to driver station? [xPost]

http://www.reddit.com/r/chiefdelphi/...river_station/
  #2   Spotlight this post!  
Unread 10-01-2012, 03:10
sjspry sjspry is offline
Registered User
FRC #1984
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Kansas
Posts: 125
sjspry has a spectacular aura aboutsjspry has a spectacular aura aboutsjspry has a spectacular aura about
Re: Anyone know how to offload code to driver station? [xPost]

Yes, our team did it last year. It is possible to transmit data over TCP/UDP to the robot and back through some open, but normally unused, ports allowed for the competition (they are found in the manual -- others might be open in practice, but only a few are guaranteed). I don't know the numbers specifically, but there is one port open for TCP for the camera, and one without an assigned purpose. Seeing as our team wrote its own dashboard, we had those and the one reserved for the dash.

So it basically turns into writing your processing program on the driver station, and then talking to the robot via TCP. I have some Java code, but the only important part is the usage of the networking library.
  #3   Spotlight this post!  
Unread 10-01-2012, 09:12
Sunstroke Sunstroke is offline
Programmer
AKA: Joe Grinstead
FRC #3504 (Girls of Steel)
Team Role: Mentor
 
Join Date: Apr 2009
Rookie Year: 2009
Location: New England
Posts: 49
Sunstroke is an unknown quantity at this point
Re: Anyone know how to offload code to driver station? [xPost]

Quote:
Originally Posted by sjspry View Post
Yes, our team did it last year. It is possible to transmit data over TCP/UDP to the robot and back through some open, but normally unused, ports allowed for the competition (they are found in the manual -- others might be open in practice, but only a few are guaranteed). I don't know the numbers specifically, but there is one port open for TCP for the camera, and one without an assigned purpose. Seeing as our team wrote its own dashboard, we had those and the one reserved for the dash.

So it basically turns into writing your processing program on the driver station, and then talking to the robot via TCP. I have some Java code, but the only important part is the usage of the networking library.
Might I suggest using the new NetworkTable classes found in the robot to do your communication?

I've attached the .jar (well, a .zip containing the .jar) that you need to use a NetworkTable on any computer.

The cool thing about NetworkTable is that there is only one line of setup (NetworkTable.setTeam(...)) and then you just specify a table (like NetworkTable.getTable("random name I came up with")) and that table will exist on both the robot and the computer, and any change you make to it will reflect across both.

Even more crazy, if you use NetworkTable.getTable("SmartDashboard") and you install the SmartDashboard on your classmate, then you will be able to see what values are there on the SmartDashboard.
Attached Files
File Type: zip NetworkTable_Client.jar.zip (25.6 KB, 63 views)
Closed Thread


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:04.

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