Raspberry Pi based drone flight controller and remote control
Open-source Linux-based Raspberry drone and ground controller.
https://www.youtube.com/@drichfpv/videos
Pre-built 32-bits binaries for Raspberry Pi 4 can be found here : https://ci.drich.fr/
These images are generated using the tools/image-builder/generate-flight-image.sh script. The root filesystem is set to read-only on boot to prevent data corruption, this can be changed by running rw
command in terminal.
Root SSH is enabled by default with password bcflight
. The flight
binary sits in the /var/flight folder.
The flight service is disabled by default, this helps to easily setup the flight controler. Once correctly working, this can be set to automatically start on boot by running rw && systemctl enable flight
File | Based on | DShot support | Analog video output |
---|---|---|---|
2023-07-18-raspbian-bcflight.img | 2023-05-03-raspios-bullseye-armhf-lite | ❌¹ |
❌¹ |
¹ DShot and composite output can be enabled by changing /boot/config.txt and /var/flight/config.lua settings.
Any form-factors of Raspberry Pi can be used, connecting sensors and peripherals using GPIO header and other dedicated connectors. For smaller size and weight it's recommended to use a Compute Module 4 with a custom carrier board like this one (can be found in ./electronics) :
View this project on CADLAB.io
This carrier board has the following features :
controller_pc
For cmake to run properly, the below dependecies should be installed first. Below commands are working for: Distro: Ubuntu 22.04.2 LTS (Jammy Jellyfish), Kernel: 5.15.0-69-lowlatency x86_64, bits: 64, Desktop: Xfce 4.16.0
Qt:
sudo apt-get install qtmultimedia5-dev qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libnl-3-dev libnl-genl-3-dev libnl-route-3-dev libiw-dev libfftw3-de
nasm:
sudo apt install nasm
QScintilla:
sudo apt install libqscintilla2-qt5-dev
tar -xzf QScintilla_src-2.13.4.tar.gz
cd QScintilla_src-2.13.4/src
qmake
make
make install
MP4V2: repo located HERE
git clone https://github.com/enzo1982/mp4v2.git
cd mp4v2
cmake . && make
make install
shine: repo located HERE
git clone https://github.com/toots/shine
cd shine
autoreconf --install --force
automake
./configure
make
make install
PF_RING: Download latest release HERE
tar -xzf PF_RING-8.4.0.tar.gz
cd PF_RING-8.4.0/
make
make install
git clone https://github.com/dridri/bcflight.git
cd bcflight/controller_pc
cmake -DCMAKE_BUILD_TYPE=Release -S . -B build
cd build
make -j$(nproc)
./controller_pc
🎉
flight
Currently only Raspberry Pi boards are supported, the 4'th variants are the recommended ones. Below commands are working for: Distro: Raspbian GNU/Linux 11 (bullseye), Kernel: 6.1.21-v7l+ armv7l, bits: 32
sudo apt update
sudo apt install git pkg-config cmake make g++ libc6-dev libraspberrypi-dev libiw-dev libdrm-dev libgbm-dev libcamera-dev libgles2-mesa-dev libgps-dev libasound2-dev libcrypt-dev zlib1g-dev libpng-dev libshine-dev libavformat-dev libavutil-dev libavcodec-dev libpigpio-dev lua5.3 libfftw3-dev
git clone https://github.com/dridri/bcflight
cd bcflight/flight
cmake -Dboard=rpi -Ddebug=1 -S . -B build
cd build
make -j$(nproc)
This will produce two files : flight_unstripped
which contains all debugging symbols, and flight
which is a lightweight regular executable.
flight_unstripped
can be run via gdb, or Valgrind using flight/valgrind.sh
flight
is intended to be used on final product