|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Networking on the Robot
Does this mean you are connecting and disconnecting a new socket every time you wish to transmit information, or are you doing it at the start and end of the match or in teleop/auto/robot init and disabled init for disconnect
|
|
#2
|
||||
|
||||
|
Re: Networking on the Robot
Quote:
No WiFi bandwidth is used as this stays local to the Robot's network. |
|
#3
|
||||
|
||||
|
Re: Networking on the Robot
That seems inefficient if you are accessing the data more than a few times every match.
|
|
#4
|
||||
|
||||
|
Re: Networking on the Robot
Quote:
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. Last edited by billbo911 : 22-02-2015 at 19:17. |
|
#5
|
||||
|
||||
|
Re: Networking on the Robot
You really don't want to run the risk of filling the network buffer on the cRIO. Ever. It's really bad.
|
|
#6
|
|||
|
|||
|
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 |
|
#7
|
|||
|
|||
|
Re: Networking on the Robot
Quote:
|
|
#8
|
||||
|
||||
|
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. |
|
#9
|
||||
|
||||
|
Re: Networking on the Robot
Thanks for all of the responses
Quote:
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? |
|
#10
|
||||
|
||||
|
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.
|
|
#11
|
||||
|
||||
|
Re: Networking on the Robot
NetworkTables is really good for key-value types of transfers of data, and it's very simple to use from robot code, and let's you ignore network-related complexity. You can expect up to 100ms of latency in Java/C++ as the sender (not sure about LabVIEW), and up to 50ms of latency when using python as the sender. But, for most control systems in FRC, this is good enough.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|