Skip to content

Basic Usage with Python

Yunlong edited this page Oct 5, 2020 · 4 revisions

Install the Flightmare library flightlib

To run the reinforcement learning example, you have to first install flightmare library please follow the guide of Install with pip.

Install the Flightmare RL baselines flightrl

conda activate ENVNAME
cd /path/to/flightmare/flightrl
pip install .

Train neural network controller using PPO

cd examples
python3 run_drone_control.py --train 1

Test a pre-trained neural network controller

cd examples
python3 run_drone_control.py --train 0

With Unity Rendering

To use unity rendering, you need first download the binary from Releases and extract it into the flightrender folder. To enable unity for visualization, double click the extracted executable file RPG_Flightmare.x84-64 and then test a pre-trained controller

cd examples
python3 run_drone_control.py --train 0 --render 1