TN1ck / robocup-ss13

Building the most awesome robot-soccer-team in existence.
2 stars 0 forks source link

Check results of concurrent receive() calls of our sockets #41

Closed NiklasGebauer closed 11 years ago

NiklasGebauer commented 11 years ago

Compare the timestamps of the data that we receive if we first call monitor-socket.receive() and then agent-socket.receive() and vice versa.

NiklasGebauer commented 11 years ago

We will have a problem here if we try to receive with our monitor socket every cycle since it just send every 40 ms. The best solution would probably be using two threads or c-style FD-Sets (if there is something similar and easy to use for python).

artifactz commented 11 years ago

40 ms?! are you shure? is there anything like a reason for this?

NiklasGebauer commented 11 years ago

As we already talked about this in our meeting I didn't answer, but yes, I'm sure. Seems to be because the monitor just needs to have 25fps to run fine (thus it just gets updates every 40ms). I implemented a second thread that is started in our agent and passes the received and then passed data to our agent without blocking it.