An AddOn for AirSim that includes all the tools to integrate a cinema oriented camera
- Follow the instructions of https://microsoft.github.io/AirSim/build_linux/: 1.1. Download Unreal Engine and build it 1.2. Download AirSim to the lastest version and wait to build it
- Copy/Replace the AirSim folder of this repo with the AirSim folder of the root repository to the and replace all files that are asked to be replaced
- Build AirSim once the CinemAirSim files have been copied as stated in https://microsoft.github.io/AirSim/build_linux/ (setup.sh, build.sh)
- Once it is compiled, follow instructions of https://microsoft.github.io/AirSim/unreal_custenv/#note-for-linux-users to integrate AirSim in your existing project or just open the project "Blocks" from the folder /AirSim/Unreal/Environments/Blocks to start enjoying the Cinematographic plugin of AirSim.
These two videos show different examples where the possibilities of CinemAirSim are shown off.
In this video, we have reproduced some scenes of films that were awarded with the Academy's Oscar for Best Photography to demonstrate the potential of the simulator and to highlight new avenues of research where it can be used.
The example shows a simple program that executes a user prompt that allows to choose among different options to interact with Unreal and the drones of AirSim while some cinematographic aspects are read/written in real time. The c++ code is available in https://github.com/ppueyor/CinemAirSim/tree/master/Demo .
Additionally to the available API functionalities from AirSim, that can be found in these links: https://microsoft.github.io/AirSim/apis/ https://microsoft.github.io/AirSim/apis_cpp/
This plugin adds the next options to the base API (the vehicle_name param indicates the name of drone the user wants to work with, specified in the file settings.md from AirSim - https://github.com/microsoft/AirSim/blob/master/docs/settings.md):
- Returns the list of preset lens with its attributes that available for the camera
- Sets one of the preset lens to the camera. (Extracted from the list got from the previous function)
- Returns the list of preset filmback with its attributes that available for the camera
- Sets one of the preset filmback settings to the camera. (Extracted from the list got from the previous function)
- Gets the current filmback settings. (Normally used when using a custom filmback settings)
- Sets custom filmback settings specifying the width and the heigth of the filmback.
- Gets the current Focal Length of the camera.
- Sets the Focal Length of the camera
- Enable or disable the Manual Focus, linked to the Focus Distance and Focus Aperture.
- Gets the current Focus Distance of the camera in cms.
- Sets the current Focus Distance of the camera in cms.
- Gets the Focus Aperture. Ex: 2.2 would be equivalent to f/2.2
- Sets the Focus Aperture. Ex: 2.2 would be equivalent to f/2.2
- Enable a visible plane that indicates where the part of the plane that is in focus. (Linked to the the Focus Distance)
- Gets the current Field Of View
All technical details are described in the corresponding paper: CinemAirSim: A Camera-Realistic Robotics Simulator for Cinematographic Purposes
This work can be cited as:
@article{pueyo2020cinemairsim,
title={CinemAirSim: A Camera-Realistic Robotics Simulator for Cinematographic Purposes},
author={Pueyo, Pablo and Cristofalo, Eric and Montijano, Eduardo and Schwager, Mac},
journal={2020 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)},
pages={1186--1191},
year={2020}
}
from the IROS 2020 conference paper.
A demo shell is provided to test the new functionalities of CinemAirSim. The required files are placed in the "Demo" folder.
- Open a terminal and check if a minimum version 3.10.0 of CMake is installed:
cmake -version
0.1 Otherwise, follow this tutorial to update/install it: https://cgold.readthedocs.io/en/latest/first-step/installation.html
To test the demo, follow the next steps:
- Download the Demo folder and place somewhere in your computer.
- Uncomment the 5th line of the file CMakeLists.txt file and replace the AirSim root folder path by yout local AirSim installation folder.
- Open the terminal, navigate to the Demo folder on your computer and run the following commands:
mkdir build cd build cmake .. cmake --build ..
Now, the program is compiled.
- Open Unreal Editor and run the project in which CinemAirSim is installed
- Inside the build folder of step 3, run this command to start the shell and start the demo:
./cinemairsim_demo
The maps and meshes of the experiments are too heavy (around 2Gb each) to be uploaded to the repo. If you need them, please contact ppueyor@unizar.es and we will kindly share them with you.
In my particular case, the build.sh from the native installation for Linux did not work. To make it work:
- Replace the build.sh file for the build.sh from the installation folder of this repo
- Add the folder llvm-build folder from the folder "installation" of this repo to the root of AirSim
- Try again ./build.sh