Go to Post OK, I have officially been dragged into the 21st century (screaming and kicking the whole way). - KenWittlief [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 22-02-2015, 18:09
magnets's Avatar
magnets magnets is offline
Registered User
no team
 
Join Date: Jun 2013
Rookie Year: 2012
Location: United States
Posts: 748
magnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond repute
Re: Networking on the Robot

Quote:
Originally Posted by nickbrickmaster View Post
That seems inefficient if you are accessing the data more than a few times every match.
You really don't want to run the risk of filling the network buffer on the cRIO. Ever. It's really bad.
  #2   Spotlight this post!  
Unread 22-02-2015, 19:20
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,751
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: Networking on the Robot

The LabVIEW network tables defaults to an update rate of 100ms as well, but there is a parameter, Update Time, that lets you determine how often each client and server will transmit modified values. There is also a flush so that you can keep the rate as is, but you can send important value updates immediately. Additionally, value writes with the same value do not cause updates.

For the various infrastructure protocols that run on the cRIO and roboRIO, we use a combination of TCP and UDP. You will not run into the buffer full issues on the roboRIO, and on the cRIO, they occur only when the incoming data isn't being read.

So the use of sockets opens you up to additional power and additional consequences if you do it incorrectly. For most teams, I'd think that Network Tables is sufficient for set points and status, and a TCP stream is appropriate for a camera.

Greg McKaskle
  #3   Spotlight this post!  
Unread 22-02-2015, 21:15
codes02 codes02 is offline
Randolph aka Roxbury aka R_______
AKA: Cody Schafer
no team (Formerly: Team 11, MORT)
 
Join Date: Oct 2007
Rookie Year: 2008
Location: MA, USA
Posts: 57
codes02 is on a distinguished road
Re: Networking on the Robot

Quote:
Originally Posted by billbo911 View Post
Are you saying it is more efficient to continuously stream data to the robot controller that is not needed? Prior to this year, that was a really good way to lock up the cRio.

We have chosen to only evaluate target data when it is needed. Otherwise, the transfer of data is wasted CPU cycles. Call it inefficient if you will, but it's still way more efficient to transfer 24 bytes of data only two to three times in autonomous, then it is to continuously use processor cycles to process a stream.
Quote:
Originally Posted by magnets View Post
You really don't want to run the risk of filling the network buffer on the cRIO. Ever. It's really bad.
You can keep an established TCP connection open without sending data, and only send data on request. This allows one to avoid the overhead of establishing and tearing down a TCP connection for every request, and is a common optimization in network protocol design.
  #4   Spotlight this post!  
Unread 22-02-2015, 23:19
chsahit's Avatar
chsahit chsahit is offline
Lead Developer
AKA: Sahit C
FRC #0011 (MORT)
Team Role: Programmer
 
Join Date: Jul 2014
Rookie Year: 2013
Location: Mount Olive
Posts: 7
chsahit will become famous soon enoughchsahit will become famous soon enough
Re: Networking on the Robot

Take a look at this little thing I cooked up:
https://github.com/chsahit/UDPTable

It uses UDP instead of TCP for less networking sadness/latency. I designed it to be a simple alternative to Network tables.
  #5   Spotlight this post!  
Unread 23-02-2015, 08:09
JML's Avatar
JML JML is offline
Jlyon
AKA: Jlyon
FRC #3044 (0xBe4)
Team Role: Programmer
 
Join Date: Oct 2012
Rookie Year: 2012
Location: 3044
Posts: 17
JML is an unknown quantity at this point
Re: Networking on the Robot

Thanks for all of the responses
Quote:
Originally Posted by chsahit View Post
Take a look at this little thing I cooked up:
https://github.com/chsahit/UDPTable

It uses UDP instead of TCP for less networking sadness/latency. I designed it to be a simple alternative to Network tables.
Thanks! I will be sure to check this out.

From my understanding, UDP has no packet delivery confirmation unless you implement it yourself, I haven't had a chance to look at this project yet, but would that be an issue for robot applications, have you tested this on a robot application.

For custom driver station outputs, I could see this being an option, but what about for sending processed image data back to the robo-RIO?
  #6   Spotlight this post!  
Unread 24-02-2015, 21:01
chsahit's Avatar
chsahit chsahit is offline
Lead Developer
AKA: Sahit C
FRC #0011 (MORT)
Team Role: Programmer
 
Join Date: Jul 2014
Rookie Year: 2013
Location: Mount Olive
Posts: 7
chsahit will become famous soon enoughchsahit will become famous soon enough
Re: Networking on the Robot

I did not implement any checking to see if the packets got across. This is best used for when you are streaming data. If you are sending a continous stream of data over to the roboRIO or are constantly polling that network device than a few lost packets isn't a problem. In your instance, you might want to do some testing to see if this is right for you.
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 01:52.

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