Quote:
Originally Posted by JamesTerm
I am not sure of yash101's setup, but if UDP is used from robot to driver-station beware. It costs more bandwidth by nature... which shouldn't matter if it is a direct connection, but if the robot is receiving packets it will need a dedicate thread to listen to packets on startup, due to the VxWorks issue. This thread elaborates on that and also talks about a bug fix with the Network Tables.
|
I don't see how this can be true.
Assuming the data to send is the same size (which depends on implementation), UDP would in the real world send less data, as it never resends packets that failed. You are also sending images on the same ethernet link, so a few extra bytes or packets here or there really makes no difference.
In either case, you need a listener somewhere to read all of the packets from the buffer. Network Tables already created a thread to do this, with UDP you are doing it on your own.
In many ways, I prefer UDP sockets as it is very simple to implement (there are thousands of tutorials on the internet describing basic sockets), you can use a simple struct to organize the data, and a checksum to discard packets that are garbled in transit. No library required. In LV, you can do it super easily by flattening a cluster to a string and then unflattering it on the other side.