Loading ...
Sorry, an error occurred while loading the content.

UDP vision code

Expand Messages
  • Bryan Johnson
    Hello - Here is a code set that will allow you to stream video from the AIBO using the UDP communication protocol. This is something Ethan requested a while
    Message 1 of 1 , Sep 4, 2004
    • 0 Attachment
      Hello -
       
      Here is a code set that will allow you to stream video from the AIBO using the UDP communication protocol.  This is something Ethan requested a while back, and it turns out that it's something I needed  for our research, so here you have it.  I have updated the wireless class so that UDP communications can be used to transmit or receive data just as easily as TCP is - just change the socket type from SOCK_STREAM to SOCK_DGRAM in your server's DoStart() routine(RawCamBehavior.cc provides an example).  Included is a MATLAB script for monitoring this video stream.  Thanks to Erik Berglund, whose UDP code example posted to the group helped immensely.
       
      I have also created a behavior that listens for and executes individual joint commands from MATLAB.  The reason I had to implement UDP communications in the first place is that TCP controls would inexorably "buffer up" and result in jerky, inaccurate motions.  With UDP this isn't an issue, although I'm still battling the occasional missed frame.  If anyone else is interested in this code, I will post it here when finished.  I have also migrated all sensor broadcasts to UDP.  This is a great tool for remote processing, or even remote sensor data logging.
       
      One question I have is if anyone knows how to kill orphaned java threads in MATLAB.  If a script errors out before closing a Java communications object, it appears as though that object stays open, blocking its comm port.  The only way I've found to resolve this issue is to completely exit and restart MATLAB - a less than satisfying solution.  Any ideas here??
      thanks,
      Bryan
    Your message has been successfully submitted and would be delivered to recipients shortly.