We provide EagleSim simulator and Eagle source codes. The requirements.txt contains the different libraries required.
There are two different ways to use EagleSim.
-
Using pre-compiled binaries: This is an easy way to set up the PTZ camera abstractions and get going. We provide pre-compiled binaries for vehicle tracking and human tracking scenarios. The pre-compiled binaries are tested on Ubuntu 18 and Ubuntu 20. If this doesn't work for you, we recommend compiling the binaries using source code for your desired operating system configuration.
-
Compiling the source code. We provide the source code of the virtual world built over Unreal engine that creates vehicle tracking and human tracking scenarios. This source code can be used to compile the desired binaries.
The binaries are available at the following link.
- Vehicle_Tracking_Binary: This is used to create vehicle tracking scenarios (Sc-1 to Sc-5) with different tracking complexity.
- Human_Tracking_Binary: This is used to create human tracking scenarios. We use it to enable dynamic tasking of Eagle policies.
- Vehicle_Tracking_Binary_More_Vehicles: This provides a large set of vehicles which can be used to create more tracking scenarios.
Download the binary locally. Put the settings_sample.json to the appropriate folder used locally for settings of the AirSim simulator. The folder location is generally /HomeFolder/Documents/AirSim in Linux machines. Rename the file to settings.json, which the EagleSim will read. The settings.json is an extension of the AirSim settings file with more options to enable different training scenarios. The scenes can be started on different ports by modifying the "ApiServerPort" in settings.json, and the binaries are started from different terminals to start parallel scenes. The code uses the ports [41451, 41452, 41453, 41454, 41455, 41456] to run.
Go to the local directory:
cd PATH_TO_BINARY/LinuxNoEditor/
Start the binary using the following command:
./Blank_car.sh -WINDOWED -opengl4
Scene complexity is controlled by enabling different components in the settings_sample.json as shown below. These scenes are enabled in the custom written Unreal engine source code provided for the virtual worlds.
"EnableBoundary": "yes",
"EnableMaterials":"yes",
"EnableOutsideTrees":"yes",
"EnableInsideTrees":"yes",
"EnableHumans": "yes",
EnableBoundary when selected to "yes", randomly selects a boundary out of 25 different materials, and also modifies boundary over-time. EnableMaterialls when selected to "yes", randomly selects a floor material out of 25 different materials, and also modifies floor material over-time. EnableOutsideTrees and EnableInsideTrees when selected to "yes" randomly place different trees in the scene, which are also modified with time. EnableHumans places different human characters in the scenes. For vehicle tracking binaries, multiple human characters are present which are moving on random paths, and also change their mesh characters. In the case of human tracking binary, only one human is present in the scene, and does animated walking on random paths. Human character will also change its mesh apperance to 4 different characters in the human tracking binary.
The vehicles are spawned by extending the AirSim setting.json file. More details are here. We provide the sample settings_sample.json, and include settings used for different scenes in Eagle scenarios in their respective folders. Vehicle_Tracking_Binary and Vehicle_Tracking_Binary_More_Vehicles support a large collection of vehicles as shown in the included settings_sample.json file.
The vehicles in the scenes are controlled using AirSim API. The code to control the vehicle on random paths is present in file ControlCar.py.
The code to control humans is custom written and is provided in the source codes for the virtual worlds. The humans are enabled to move on random paths within the virtual worlds limits.
We use the camera of the Car0 as the PTZ camera. The location of the vehicle and its camera is controllable in the settings_sample.json file.
The PTZ camera view can be visualized using:
python ViewCamera.py
The abstractions are exposed via Python wrappers. The camera controller supports real-time change of PTZ parameters. Object trackers tracks the object of interest and provides its bounding-boxes. Overall the scene control of PTZ is enabled using the Open-AI Gym abstractions. A sample scene control in Open-AI GYM format is available in the file PTZ_Abstractions.py Eagle codes extends this file to train policies for different scenarios. The Eagle codes are available in the folder Eagle_Codes.
Running the PTZ_Abstractions.py randomly modifies the Pan-Tilt-Zoom parameters of the camera along with capture the image from PTZ camera for 100 steps.
python PTZ_Abstractions.py
We provide the source code to train and evaluate Eagle policies in the folder Eagle_Codes. The sub-folders contains instructions to run the codes.
- The source code of EagleSim is available in the file Cars_Trees_humans_Unreal_Source_Code.zip
- The compilation of the source code is done by following the steps listed here.
- The virtual world included is custom created with several actors, pawns, and blueprints.
- To avoid compilation, use the provided binaries.
- AirSim code is included as a plugin and is modified to enable human tracking.