Closed cmpute closed 4 months ago
Hey, when you refer to
This PR adds a history buffer that allows getting older data.
do you mean that you get data from older frames? Because that is precisely what the queue is there to prevent
It can get data from older frames, but it's still ensured to get data with matched frame id. During my test, sometimes the get_data() method tries to get data older in the queue, while the previous data was already popped. Not sure why though.
During my test, sometimes the get_data() method tries to get data older in the queue, while the previous data was already popped.
I haven't seen this issue, do you have any reliable way to reproduce it?
In any case, the solution wouldn't be to get data from an older frames, because it goes against the objective of the queue, which is to ensure that the agents always receive the sensors data for that frame.
It's hard to reproduce this, it only happens with Carla and client running on two specific computers during my tests.
Okay, we'll keep that in mind, but I'm closing this PR as mentioned before, it goes against the idea of the sensor barrier.
Two improvements are added:
queue.get()
toqueue.get_nowait()
to prevent it blocking other threads.This change is