Skip to content

Latest commit

 

History

History
74 lines (59 loc) · 2.98 KB

File metadata and controls

74 lines (59 loc) · 2.98 KB

Intro

Hackflight is a minimalist software toolkit for building multirotor flight controllers and simulators. It is geared toward people like me who want to tinker with flight-control firmware, and use it to teach students about ideas like state estimation and PID control. If you are in the 99% percent of users who just want to get your vehicle flying without getting into firmware hacking, I recommend Betaflight (great for getting started when you're on a budget) the Ardupilot system (for sophisticated mission planning with waypoint navigation and the like), or the Crazyflie platform, for a safe, inexpensive introduction to quadcopters as a research platform. In addition to big user communities and loads of great features, these platforms have safety mechanisms that Hackflight lacks, which will help avoid injury to you and damage to your vehicle.

Design principles

Hackflight attempts to maintain a simple relationship between the code and the elements of the flight-control dataflow diagram shown below. Boxes represent data, ovals represent functions, and feedback arrows represent the need for functions that have state; for example, the maintenance of an error integral in a PID controller:

By using header-only C++ classes whenever possible, avoiding C-style macros, null pointers, inheritance, and mutation in favor of functional style, and relying on existing Arduino libraries for sensors and actuators, Hackflight supports a composable approach to taming the complexity of flight control. The Hackflight codebase is under 3,000 lines of code.

Hardware

Simulator

For flight simulation, Hackflight uses Webots, a free, open-source robotics simulator. Click here to get started.

Citing Hackflight

Please cite Hackflight as:

@ARTICLE{10.3389/fnbot.2020.00016,
AUTHOR={Levy, Simon D.},   
TITLE={Robustness Through Simplicity: A Minimalist Gateway to Neurorobotic Flight},      
JOURNAL={Frontiers in Neurorobotics},      
VOLUME={14},           
YEAR={2020},      
URL={https://www.frontiersin.org/articles/10.3389/fnbot.2020.00016},       
DOI={10.3389/fnbot.2020.00016},      
ISSN={1662-5218}
}