-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SimGetImages() is extremely slow at sending even very small images #111
Comments
It is indeed true that AirSim/Unreal are slow at image capture, but I am surprised by the very minimal gain in performance between 320x240 and 16x12. What is the configuration of your laptop - and what is your GPU usage like as you're running this? I have a feeling you're being massively bottlenecked somewhere. If you get a chance, could you perhaps try a couple of things:
https://docs.unrealengine.com/en-US/Engine/Performance/GPU/index.html |
Hello @saihv , to open the unreal console, do you mean press ~ when the mouse is captured in the airsim window? Because nothing happens when I do this. (I have a azerty keyboard but even when I switch to qwerty and press ` , or shift + ` , which is supposed to give ~, nothing happens) |
Interesting - yes, all you would have to do is focus on the window and then press Just FYI, the console is super tiny, and usually shows up as a little textbox on the bottom of the screen. |
Sorry my bad, I was messing up with the french keyboard. The screenshots for unitgraph are: EDIT: the screenshots are not representative, I'll make them again. |
Okay, upon first looks, I think there's something wrong here. Your game frame rate is still decently high, and what I find curious is that your draw thread is taking almost as long as the GPU (rendering) itself (IIRC, Draw is the time it takes to prepare the draw calls on the CPU, GPU is how long it actually takes to render them) which makes me think the GPU is being left waiting for something. For instance, this is a screenshot from my PC while capturing images from one drone. Could you please try the 24x32 image size with our native benchmarking script - with @ironclownfish Any thoughts? |
@yannbouteiller t.maxFPS is supposed to lock the main game framerate to a certain number, which it is doing as you can see by the 'Frame' time on the right. I was mainly curious about whether the image capture FPS is increasing for you when you lock the FPS of the full game. |
It possibly improves the general frame rate a tiny bit but setting it to 15 I am still around 7 FPS for both 240 * 320 and 24 * 32 images (retrieved on both drones), all the time being spent waiting in tornado's IOLoop. I will try your benchmarking script. |
Using the native benchmarking script I get similar results: for 1 drone, about ~20 FPS for 240 * 320 images and ~ 23 FPS for 24 * 32 images. |
@yannbouteiller, can you try the following:
|
Then the image FPS becomes much better, however there is still not a huge gain in performance from 240 * 320 to 24 * 32 : 240 * 320: 24 * 32: Is there a way to enforce these unreal options without using the unreal console through the visualization window ? This sounds pretty much exactly like what I want to do for tier 3 in my computing cluster in the other issue (#112) |
Even though I have been able to find ways to do this, I am not really able to do this :\ . See below This can be done via ini files. In
in it. Instead of ConsoleVariables.ini, I have tried adding it to Engine.ini and GameUserSettings.ini to no avail. Next in line are the unreal binary command line options. "Rendering" section is relevant. https://docs.unrealengine.com/en-US/Programming/Basics/CommandLineArguments/index.html @saihv @ironclownfish if you have any insight, please comment |
@yannbouteiller I just gave the
I am not quite sure how it will affect everything else After some testing, everything seems to be working well. This is what you need, indeed. |
…, update readme wrt issue microsoft#111
…, update readme wrt issue microsoft#111
…, update readme wrt issue microsoft#111
…, update readme wrt issue microsoft#111
I know this problem is already well known, but obviously this is very painful for Reinforcement Learning approaches because we need to sample a huge amount of observations to make our algorithms learn anything.
On the laptop I use for testing, using SimGetImages() on one single drone with 240*320 images I get images at ~17 FPS. If I use it on both drones I drop to ~ 6 FPS (times 2 images = ~ 12 FPS).
I was hoping that using much lower resolutions would greatly improve this, but it does not. With 12*16 images for instance I get ~ 20 FPS instead of 17 with one drone, and ~ 7 FPS instead of 6 with two drones.
According to pyinstrument which I use for profiling, all this time is spent in the IOLoop of tornado:
But I suppose this just means that AirSim is super slow at computing even very small camera images.
The text was updated successfully, but these errors were encountered: