The project simulates a quadcopter in 3D environment. It contains a basic quadcopter dynamics model, hover controller, trajectory generator, visualisation toolkit and a top level scheduler which runs each module at a specific rate.
Rotor drag is modeled as in reference [1] for rigid propellers. Adding this important effect results in a more realistic simulation of the drone dynamics. Also, the performance of control algorithms considering aerodynamic effects can be assesed.
I have been playing and studying quadcopter in my spare time since 2014 when I first bought a crazyflie. There are many interesting projects around already, like vision-based SLAM, hover control and advance manoeuvre, etc. However, there are very few open source quadcopter simulator which helps a beginner to overcome the mental barrier of understanding the underlying physics. There are a lot of research papers on the topic of quadcopter control and autonomous application, but none of those can be made possible without a decent simulation tool. This project aims to address that. Thanks to Coursera's online course Aerial Robotics by Professor Vijay Kumar, which presents quadcopter's motion equations in detail, I was then inspired and finally able to write this from scratch.
The simulator uses numpy, matplotlib, control, slycot and scipy.
- Install git.
- In the location you prefer, open a terminal and:
git clone https://github.com/juanmed/quadcopter-simulation
python -m pip2 install -r requirements.txt
python runsim.py
- add sensor noise model, wind.
- add sensor fusion.i.e EKF,UKF
- reinforment learning.
Any contribution are welcome if you are interested in the project, but please let me know.
[1] Kai, J. M., Allibert, G., Hua, M. D., & Hamel, T. (2017). Nonlinear feedback control of Quadrotors exploiting First-Order Drag Effects. IFAC-PapersOnLine, 50(1), 8189-8195. https://doi.org/10.1016/j.ifacol.2017.08.1267 [2] Faessler, M., Franchi, A., & Scaramuzza, D. (2017). Differential Flatness of Quadrotor Dynamics Subject to Rotor Drag for Accurate Tracking of High-Speed Trajectories. https://doi.org/10.1109/LRA.2017.2776353
Peter Huang
Email: hbd730@gmail.com