Closed tarikisildar closed 1 year ago
Are you facing this in a windows OS?
Are you facing this in a windows OS?
Yes
Hi. If you need, this is the Project. PLS try it on Unity 2021.3.21f1 / 2021.3.25f1 Unity
I found the issue. On ServerInputProvider.cs Start calls -> InvokeRepeating("CaptureAndSendImage", 0.0f, 0.05f) which making computation and sends image unrelated from the current frame. 0.05 second makes 30 captures per second. And simulation runs around 15 fps, So in every frame, two images are sent.
Removing that line and adding this
private void Update()
{
CaptureAndSendImage();
}
solved it for me.
This line is to limit the frequency of image transmission and prevent the emulator from freezing. In my opinion we should find the best balance
Well, it's not a limiting factor in this context. I have a pretty high-end device and the simulator is still on 15-20 ish fps. This line is making it send an image
My drive.py script is receiving at most 17-18 images per second. Without even running the model, it lags behind the actual simulator as in the image I added.
I can't really make sure about the reason without checking out the code. Can we add the unity project under this repository so we can point out potential performance improvements or bug fixes more easily?