Closed JamesKCS closed 4 years ago
I'm having the same issue, I need to use synchronous mode to ensure consistent results but the significant slowdown is quite an annoyance. This other issue seems to be about the same problem: https://github.com/carla-simulator/carla/issues/1771#issue-457886448.
Yeah, I think the issue you linked is simply asking why synchronous mode is slower. It's unfortunate, but I think the answer to that issue is that synchronous mode will always be significantly slower because of how CARLA is put together. However, based on the docs (and the answers in the issue you linked), I'd still expect a significant speed-up for turning off rendering.
The fact that it always gives about 20-25 fps, and that turning rendering off results in no speedup (according to the docs, rendering is a big part of why synchronous mode is so much slower), makes me think that either 1) I'm making some sort of trivial error and rendering is still occurring or 2) synchronous mode is being artificially slowed-down somehow. Whichever thing is occurring, hopefully some sort of solution can be suggested by the CARLA team. There is no way the physics of 4 cars driving around, with no rendering, should be limiting it to 20-25 fps on a high-end machine, even in synchronous mode...
I've been having the same problem. I'm getting 23 FPS with rendering disabled and only one vehicle.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
The question was never answered and this is still an issue in the latest version 0.9.15.
Thank you for the outstanding work on this simulator; it is very useful for my research needs!
I understand synchronous mode will be slower than async mode. As the docs say,
However, I am hoping to be able to use synchronous mode for consistency for a reinforcement learning problem. Based on the above quote, I expected synchronous performance to increase drastically when I turned rendering off. I was getting about .04 seconds per
world.tick()
call before turning graphics off. To my surprise, turning graphics off (settings.no_rendering_mode = True
and/or launching with opengl) had no significant effect on this interval: it still takes about .04 seconds perworld.tick()
call. Is this expected and is there any way around this? Or am I perhaps making a trivial error?More details: Running CARLA 0.9.6 The relevant code looks something like this:
Function definitions:
Thank you in advance!