Open MoBaT opened 3 years ago
Hi @MoBaT! Thanks for your report. First of all, I would like to know how you are using the latest commit of AirSim with UE 4.22. You are not getting any error? I thought we are only supporting >= 4.25
Hi @MoBaT! Thanks for your report. First of all, I would like to know how you are using the latest commit of AirSim with UE 4.22. You are not getting any error? I thought we are only supporting >= 4.25
I'm so sorry! It was actually 4.25.
Has anybody has this issue as well or found a way to get around it and get an fps similar to python?
Hey @MoBaT, try settings ViewMode: NoDisplay
in your settings.json. That increases the FPS rather significantly but you will lose the visualization in Unreal Engine. We have achieved above 30 FPS with this.
Bug report
What's the issue you encountered?
Whenever I try to run the example C++ code using AirLib compiled with either GCC or clang, I get an FPS of around 5-8. When I run the python equivalent using
pip install airsim
or running thesetup.py build && setup.py install
, I get a FPS of 25+. I have tried compiling the C++ for AirLib + RpcLib in GCC/Clang Release (static and shared) and applied compiler optimizations but it stays the same.Settings
How can the issue be reproduced?
double clockToMilliseconds(clock_t ticks){ // units/(units/time) => time (seconds) 1000 = milliseconds return (ticks/(double)CLOCKS_PER_SEC)1000.0; } //...
clock_t deltaTime = 0; unsigned int frames = 0; double frameRate = 30; double averageFrameTimeMilliseconds = 33.333;
int main() { using namespace msr::airlib;
}
import setup_path import airsim import time
connect to the AirSim simulator
client = airsim.MultirotorClient() client.confirmConnection() client.enableApiControl(True) client.armDisarm(True)
while True: start_time = time.time() # start time of the loop
get camera images from the car