microsoft / AirSim

Open source simulator for autonomous vehicles built on Unreal Engine / Unity, from Microsoft AI & Research
https://microsoft.github.io/AirSim/
Other
16.26k stars 4.52k forks source link

Low FPS capturing while not using resources #4973

Open reza-shahriari opened 1 month ago

reza-shahriari commented 1 month ago

Bug report

What's the issue you encountered?

Settings

setting Gist

How can the issue be reproduced?

Hi i am using Airsim to simulate drones(actually tow drones in an env) everything works well but the problem is when i capture images from the camera. i have a simple environment and a strong computer but arisim capturing about 5 images per second while i need at least 30! not many resources are in use while running the project and capturing data: 2024-07-20_17-12-51

i dont know how i can improve the performance of the airsim! i used NoDisplay, changed SubWindows, and turned them off I also tested Python API but all are slow. i know i can add some sleep to my code then i can get the fps i wanted but for capturing a 10min video i should spend 60min then!

i have tested some other way to capture images from unreal. i mean just screenshotting or using a custom camera and rendering its view. both worked real time for me! and both were using more resources. i was trying to change this code to a faster way or at least make it just screenshotting to see if it works but did not work at all:(

do you have this problem too? Has anyone solved it? thank,

UnrealOrReal-Jack commented 1 month ago

What a nice work you are doing. i have the same problem here! would you try this and tell me if it works? it seems you can use opencv to render images and its working realtime in the video. i am not experimented enough to do it but it would be nice if you do and tell me if its working :) hope that helps -Jack