The repository for the UT Dallas Drone Calibration Lab.
The DCL is built on top of the PyBullet engine, and serves as a testing environment for cheaply and quickly prototyping combat strategies for drone-on-drone warfare. The DCL also offers benchmarks for AI drone controllers in various tasks.
- We recommend the MiniForge CLI for virtual environment and package management. MiniForge is a much more efficient version of Anaconda, and dramatically improves speed and overall performance. MiniForge is also pre-configured to work with the popular conda-forge channel. You can download the Miniforge installer for your device here. Scroll down to the "Download" section, and choose a version that's right for you.
- If you still wish to use anaconda, simply replace the "mamba" command with the "conda" command and everything should still work the same, only slower.
 - If you use anaconda, you might need to specify for conda to use the conda-forge channel for some of our required libraries. This can be done by adding the text 
-c conda-forgeonto the end of your installation command. 
 - Git and your IDE of choice is recommended for cloning/modifying the project onto your local computer. You can download Git here.
 - IMPORTANT NOTE: The AI model trained by the simulator requires an NVIDIA GPU for use.
 
- Open MiniForge Prompt and create your virtual environment. Our code was built using Python 3.8, so we recommend this version.
mamba create --name dcl "python=3.8" mamba activate dcl 
- 
Library Command Stable Version python 3.8.18 mamba* Comes pre-installed in MiniForge 22.3.1 pytorch mamba install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia2.2.1 opencv mamba install opencv4.0.1 matplotlib mamba install matplotlib3.7.2 pybullet mamba install pybullet3.25 pynput mamba install pynput1.7.6 einops mamba install einops0.7.0 gstreamer mamba install gstreamer1.18.5  
- Edit your desired changes to CONFIG.py in VSCode/IDE of  choice.
- There, you can change episode and hitpoly parameters, as well as any other configurations.
 
 - Run Main.py with your desired specifications and appropriate action flag.
python Main.py --action generate_data 
python Main.py --action [OPTIONS]
python Main.py -a [OPTIONS]
- help Output a usage message and exit.
 - build_video
 Creates an 
.mp4video visualizing the change in hitpoly for the drone based on its position and direction after completion of data generation and training. 
- generate_data
 Generates initial data for training. Attributes such as 
episode_countandepisode_lengthmay be modified. - stitch_data
 Stitches together tensors generated from 
generate_data. 
- train_hitpoly
 Trains the hitpoly model in batches. Hitpoly parameters such as 
epochs,learning rate, andbatch sizemay be modified. - query_hitpoly Loads the model output from raw pixel array values to be rendered as color images.
 - render_hitpoly
 Generates the hitpoly simulator starting from episode 1. Hold the 
enterkey to progress each frame. 
No. If you were to attempt to run the simulator anyway, you would receive a runtime error. A dedicated GPU is necessary for the high loads of data and processing.
If this is your first time installing Mamba, you may choose to not use it and instead stick with conda instead. This will be considerably slower, however, as conda is quite old and has not aged well.
You may have a CPU-only Pytorch version previously installed. Try installing pytorch in a clean MiniForge environment via mamba, and see if that resolves the issue.
This is an old anaconda error which can be fixed by deleting the libiomp5md.dll file located in anaconda3/envs/dcl/Library/bin/, as is described in this stack overflow post.