microsoft / AirSim

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

Control Speed in Computer Vision mode #3783

Open h-gokul opened 3 years ago

h-gokul commented 3 years ago

Control Speed in Computer Vision mode

Is it possible to control the speed of the player camera in Computer Vision mode ?

Context:

I am using AirSim using Unreal Engine to collect egomotion data in indoor environments like RealisticRendering. Indoor environments are small in space and the default set speed of the Computer Vision mode is too high for me to obtain reasonable data. I am not running any python/C++ scripts (like hello_car.py or cv_mode.py) to collect data but by editing the settings.json file and recording using the GUI in Unreal Editor. Is there any way to control speed of player using Unreal Editor or by modifying the settings.json file ? Any help regarding this would be appreciable.

I have no prior experience with Unreal Engine or AirSim.

I am using Windows 10 with Unreal 4.25

h-gokul commented 3 years ago

UPDATE:

In Plugins/AirSim/Source/ManualController.h the speed_scalar is set to 1000 by default and reducing it reduces the speed of the pawn. Or by pressing LCtrl to slow down / LShift to speed up.

However, the speed of roll, pitch and yaw motion is still high which I need to reduce and the manual speed changing buttons do not seem to work for rotational motion. In addition, this does not work in the pre-built environments like Building99

jonyMarino commented 3 years ago

Hi @h-gokul! Current pre-built environments (v1.5.0) are prior to the addition of that feature (LCtrl to slow down / LShift to speed up.).

h-gokul commented 3 years ago

Thanks for your response. I was not able to use the pre-built environments for my problem, especially the Building_99 in which "ComputerVision" mode is much more sutiable than the vehicles.

Nevertheless, inability to control the angular speed (roll, pitch and yaw) was a the biggest concern to record data from the indoor environments.

jonyMarino commented 3 years ago

I can help you to submit a PR with what you need, Gokul! you can follow this PR: #3221 and extend it for rotation. Compare flow for deltaposition vs. deltarotation in https://github.com/microsoft/AirSim/blob/master/Unreal/Plugins/AirSim/Source/ManualPoseController.cpp

rajrana22 commented 3 years ago

What exactly is the "speed_scaler" value measured in? I know that AirSim uses SI units and Unreal Engine uses cm, but neither of those would make sense as values (too large). Is it meters per second? Is it cm per second? Or is it not a speed but an absolute distance moved with each press of the forward button?

jonyMarino commented 3 years ago

it is a scaler for incrementing the camera velocity that is in cm/s