|
Re: Image processing on the driver station laptop
The classic illustration if that UDP is like sending a letter. You write it, put it in an envelope and send it to the destination. It probably gets there, especially if the destination is local. BUT there is no way to be sure unless you build an acknowledgement into your application protocol.
TCP is more like a phone call. There is a distinct connection phase followed by the exchange of information (acknowledged by each party) and a disconnect phase.
UDP is faster - on highly reliable links. TCP is made to work between any two endpoints no matter the delay and reliability of the link. TCP will keep counts of packets going back and forth, ack them all and automagically retry if something is dropped. UDP just sends and forgets.
In this case I would try UDP and enumerate the packets. If you are missing a packet and/or one is out of order just throw that image away and wait for the next. Like Alan said, it should not happen very often.
And the socket address is a combination of the IP address AND the port number. So the ports to and from your robot to the driver station should always be available to you. Their availability have little to do with other robots on the field.
HTH
__________________
Fast, cheap or working - pick any two!
Last edited by wireties : 08-02-2012 at 23:38.
|