An 2D environment for training control policies for a quadrotor drone (technically a planar birotor). Right now, only Soft-Actor-Critic (SAC) is implemented but I may revisit later (there are some failed PID and TD3 attempts :)).
- Create a virtual environment (I recommend
venv
). - Run
.\venv\Scripts\activate
to enter the virtual environment - Install the dependencies with
pip install -r requirements.txt
- To train a new SAC policy from scratch, edit
src/main.py
so thateval=False, load=False, render=False
. Training rewards will be logged and checkpoints will be saved periodically. Training can be further configured inAgents/sac/run.py
. - To load a model, place the 3 checkpoints in the
Agents/sac/load
directory and specifyload=True
inrun.py
. - I've supplied my best weights (trained on cpu...) in releases.
The drone environment runs on Pygame and can be found in drone/DroneEnv.py
. I tried my best to make it Gym compliant, but there are likely things I've missed.
- PID
- LQR
- MPC
- TD3
- Prioritized Replay
- LA3P
- Obstacles and LiDaR simulation for POMDP (using an LSTM based network)
- State estimation
- 3D env rendered in 3JS.