SlideShare a Scribd company logo
The DroneCode Project - A Step in Open
Source Drones
Julien BERAUD
October 5, 2015
The DroneCode Project - A Step in Open Source Drones 1 / 21
The DroneCode Project
”An open source, collaborative project that
brings together existing and future open
source drone projects under a nonprofit
structure governed by The Linux Foundation.
The result will be a common, shared open
source platform for Unmanned Aerial
Vehicles (UAVs).”
The DroneCode Project - A Step in Open Source Drones 2 / 21
DroneCode Software
The DroneCode Project - A Step in Open Source Drones 3 / 21
Parrot Drones 1/3
▶ Parrot AR Drone
▶ Parrot 6 SoC - ARM926EJS
▶ Linux Kernel
▶ Busybox
The DroneCode Project - A Step in Open Source Drones 4 / 21
Parrot Drones 2/3
▶ Parrot AR Drone 2.0
▶ TI OMAP3630 - ARM Cortex-A8
▶ Linux Kernel
▶ Busybox
The DroneCode Project - A Step in Open Source Drones 5 / 21
Parrot Drones 3/3
▶ Parrot Bebop
▶ Parrot 7 SoC - Dual Cortex-A9
▶ Linux Kernel
▶ Busybox
The DroneCode Project - A Step in Open Source Drones 6 / 21
Drone Software
▶ Drone Software
▶ Drone OnBoard Software
▶ Computer/Smartphone/Tablet Software
▶ Cloud Software
▶ Protocols to bind them together
▶ Parrot Drones OnBoard Software
▶ Custom Proprietary Flight Stack
▶ Running entirely on Linux
▶ No PREEMPT_RT Patch
▶ Quite different from other existing drones
The DroneCode Project - A Step in Open Source Drones 7 / 21
Drone Software
▶ Drone Software
▶ Drone OnBoard Software
▶ Computer/Smartphone/Tablet Software
▶ Cloud Software
▶ Protocols to bind them together
▶ Parrot Drones OnBoard Software
▶ Custom Proprietary Flight Stack
▶ Running entirely on Linux
▶ No PREEMPT_RT Patch
▶ Quite different from other existing drones
The DroneCode Project - A Step in Open Source Drones 7 / 21
DroneCode OnBoard Software
▶ OnBoard Software
▶ The Flight Stack
▶ Specific to Drones
▶ 2 Flight Stacks are part of the DroneCode Project
The DroneCode Project - A Step in Open Source Drones 8 / 21
DroneCode OnBoard Software
▶ OnBoard Software
▶ The Flight Stack
▶ Specific to Drones
▶ 2 Flight Stacks are part of the DroneCode Project
The DroneCode Project - A Step in Open Source Drones 8 / 21
Dronecode Flight Stacks
▶ APM or Ardupilot - http://dev.ardupilot.com/
▶ GPLv3 License
▶ First developed to run on an Arduino
▶ PX4 - https://pixhawk.org/dev/start
▶ BSD License
▶ First developed to run on an STM32 microcontroller
▶ Originally developed to run on top of NuttX RTOS
The DroneCode Project - A Step in Open Source Drones 9 / 21
Dronecode Flight Stacks
▶ APM or Ardupilot - http://dev.ardupilot.com/
▶ GPLv3 License
▶ First developed to run on an Arduino
▶ PX4 - https://pixhawk.org/dev/start
▶ BSD License
▶ First developed to run on an STM32 microcontroller
▶ Originally developed to run on top of NuttX RTOS
The DroneCode Project - A Step in Open Source Drones 9 / 21
OpenSource Linux drones appearing
▶ January 2015 - Andrew Tridgell at LCA
▶ Article on LWN - https://lwn.net/Articles/630018/
▶ Drone running Linux with the APM flight stack
▶ BeagleBone Black with Pixhawk Fire Cape
▶ Several Linux boards supported natively in APM
▶ BeagleBone with Pixhawk Fire Cape
▶ Erle Brain
▶ NavIO
▶ Qualcomm starting to work on PX4 port on Linux
The DroneCode Project - A Step in Open Source Drones 10 / 21
Drone Architecture
▶ QuadCopter
▶ Impossible to fly entirely manually - Autopilot
▶ Sensors, user commands
▶ Motor speeds
▶ Ardupilot
▶ Reads from sensors
▶ Enhanced Kalmann Filter(EKF)
▶ Estimate the state of the Drone
▶ Sensors
▶ Inertial Measurement Unit (IMU)
▶ Barometer
▶ Compass
▶ GPS, Optical Flow Sensor, Sonar, ...
▶ External microcontroller for motor control
The DroneCode Project - A Step in Open Source Drones 11 / 21
Drone Architecture
▶ QuadCopter
▶ Impossible to fly entirely manually - Autopilot
▶ Sensors, user commands
▶ Motor speeds
▶ Ardupilot
▶ Reads from sensors
▶ Enhanced Kalmann Filter(EKF)
▶ Estimate the state of the Drone
▶ Sensors
▶ Inertial Measurement Unit (IMU)
▶ Barometer
▶ Compass
▶ GPS, Optical Flow Sensor, Sonar, ...
▶ External microcontroller for motor control
The DroneCode Project - A Step in Open Source Drones 11 / 21
Drone Architecture
▶ QuadCopter
▶ Impossible to fly entirely manually - Autopilot
▶ Sensors, user commands
▶ Motor speeds
▶ Ardupilot
▶ Reads from sensors
▶ Enhanced Kalmann Filter(EKF)
▶ Estimate the state of the Drone
▶ Sensors
▶ Inertial Measurement Unit (IMU)
▶ Barometer
▶ Compass
▶ GPS, Optical Flow Sensor, Sonar, ...
▶ External microcontroller for motor control
The DroneCode Project - A Step in Open Source Drones 11 / 21
Drone Architecture
▶ QuadCopter
▶ Impossible to fly entirely manually - Autopilot
▶ Sensors, user commands
▶ Motor speeds
▶ Ardupilot
▶ Reads from sensors
▶ Enhanced Kalmann Filter(EKF)
▶ Estimate the state of the Drone
▶ Sensors
▶ Inertial Measurement Unit (IMU)
▶ Barometer
▶ Compass
▶ GPS, Optical Flow Sensor, Sonar, ...
▶ External microcontroller for motor control
The DroneCode Project - A Step in Open Source Drones 11 / 21
Parrot Bebop Architecture
The DroneCode Project - A Step in Open Source Drones 12 / 21
APM - https://github.com/diydrones/ardupilot
AP_HAL class
class AP_HAL::HAL {
...
AP_HAL::UARTDriver* uartA;
AP_HAL::UARTDriver* uartB;
AP_HAL::UARTDriver* uartC;
AP_HAL::UARTDriver* uartD;
AP_HAL::UARTDriver* uartE;
AP_HAL::I2CDriver* i2c;
AP_HAL::I2CDriver* i2c1;
AP_HAL::I2CDriver* i2c2;
AP_HAL::SPIDeviceManager* spi;
...
};
Userland drivers
hal.i2c1->write(BEBOP_BLDC_I2C_ADDR , 1, &data);
The DroneCode Project - A Step in Open Source Drones 13 / 21
Drivers modifications
▶ Baro - MS5607
▶ Existing driver for MS5611
▶ Scaling factor
▶ Compass - AK8963
▶ Existing driver for AL8963
▶ Only as a slave device for an IMU
▶ Implement the use of a direct connection on i2c
▶ IMU
▶ MPU6050 in i2c instead of spi
▶ No PREEMPT_RT patch
▶ Jitter issues
▶ Implement the use of the MPU6050 FIFO
▶ Motor Controller
▶ New driver to write
▶ Added in AP_HAL_Linux
▶ Implements the RCOutput class
▶ GPS almost supported
▶ Add frames / Fixes
The DroneCode Project - A Step in Open Source Drones 14 / 21
Drivers modifications
▶ Baro - MS5607
▶ Existing driver for MS5611
▶ Scaling factor
▶ Compass - AK8963
▶ Existing driver for AL8963
▶ Only as a slave device for an IMU
▶ Implement the use of a direct connection on i2c
▶ IMU
▶ MPU6050 in i2c instead of spi
▶ No PREEMPT_RT patch
▶ Jitter issues
▶ Implement the use of the MPU6050 FIFO
▶ Motor Controller
▶ New driver to write
▶ Added in AP_HAL_Linux
▶ Implements the RCOutput class
▶ GPS almost supported
▶ Add frames / Fixes
The DroneCode Project - A Step in Open Source Drones 14 / 21
Drivers modifications
▶ Baro - MS5607
▶ Existing driver for MS5611
▶ Scaling factor
▶ Compass - AK8963
▶ Existing driver for AL8963
▶ Only as a slave device for an IMU
▶ Implement the use of a direct connection on i2c
▶ IMU
▶ MPU6050 in i2c instead of spi
▶ No PREEMPT_RT patch
▶ Jitter issues
▶ Implement the use of the MPU6050 FIFO
▶ Motor Controller
▶ New driver to write
▶ Added in AP_HAL_Linux
▶ Implements the RCOutput class
▶ GPS almost supported
▶ Add frames / Fixes
The DroneCode Project - A Step in Open Source Drones 14 / 21
Drivers modifications
▶ Baro - MS5607
▶ Existing driver for MS5611
▶ Scaling factor
▶ Compass - AK8963
▶ Existing driver for AL8963
▶ Only as a slave device for an IMU
▶ Implement the use of a direct connection on i2c
▶ IMU
▶ MPU6050 in i2c instead of spi
▶ No PREEMPT_RT patch
▶ Jitter issues
▶ Implement the use of the MPU6050 FIFO
▶ Motor Controller
▶ New driver to write
▶ Added in AP_HAL_Linux
▶ Implements the RCOutput class
▶ GPS almost supported
▶ Add frames / Fixes
The DroneCode Project - A Step in Open Source Drones 14 / 21
Drivers modifications
▶ Baro - MS5607
▶ Existing driver for MS5611
▶ Scaling factor
▶ Compass - AK8963
▶ Existing driver for AL8963
▶ Only as a slave device for an IMU
▶ Implement the use of a direct connection on i2c
▶ IMU
▶ MPU6050 in i2c instead of spi
▶ No PREEMPT_RT patch
▶ Jitter issues
▶ Implement the use of the MPU6050 FIFO
▶ Motor Controller
▶ New driver to write
▶ Added in AP_HAL_Linux
▶ Implements the RCOutput class
▶ GPS almost supported
▶ Add frames / Fixes
The DroneCode Project - A Step in Open Source Drones 14 / 21
Motor Controller
RCOutput_Bebop
class Linux::LinuxRCOutput_Bebop : public AP_HAL::RCOutput {
public:
LinuxRCOutput_Bebop();
void init(void* dummy);
void set_freq(uint32_t chmask, uint16_t freq_hz);
uint16_t get_freq(uint8_t ch);
void enable_ch(uint8_t ch);
void disable_ch(uint8_t ch);
void write(uint8_t ch, uint16_t period_us);
void write(uint8_t ch, uint16_t* period_us, uint8_t len);
uint16_t read(uint8_t ch);
void read(uint16_t* period_us, uint8_t len);
void set_esc_scaling(uint16_t min_pwm, uint16_t max_pwm);
int read_obs_data(BebopBLDC_ObsData &data);
...
The DroneCode Project - A Step in Open Source Drones 15 / 21
Motor Controller 2/2
set_ref_speed
void LinuxRCOutput_Bebop::_set_ref_speed(
uint16_t rpm[BEBOP_BLDC_MOTORS_NUM])
{
struct bldc_ref_speed_data data;
int i;
data.cmd = BEBOP_BLDC_SETREFSPEED;
for (i=0; i<BEBOP_BLDC_MOTORS_NUM; i++)
data.rpm[i] = htobe16(rpm[i]);
data.enable_security = 0;
data.checksum = _checksum((uint8_t *) &data, sizeof(data) - 1);
if (!_i2c_sem->take(0))
return;
hal.i2c1->write(BEBOP_BLDC_I2C_ADDR ,
sizeof(data),
(uint8_t *)&data);
_i2c_sem->give();
}
The DroneCode Project - A Step in Open Source Drones 16 / 21
RCInput over Wi-Fi
Protocol
#define RCINPUT_UDP_NUM_CHANNELS 8
#define RCINPUT_UDP_VERSION 2
struct __attribute__((packed)) rc_udp_packet {
uint32_t version;
uint64_t timestamp_us;
uint16_t sequence;
uint16_t pwms[RCINPUT_UDP_NUM_CHANNELS];
};
▶ Basic linux utility written
▶ joystick_remote
https://github.com/jberaud/joystick_remote
▶ Using linux joystick input driver
▶ Already ported on Parrot SkyController
The DroneCode Project - A Step in Open Source Drones 17 / 21
RCInput over Wi-Fi
Protocol
#define RCINPUT_UDP_NUM_CHANNELS 8
#define RCINPUT_UDP_VERSION 2
struct __attribute__((packed)) rc_udp_packet {
uint32_t version;
uint64_t timestamp_us;
uint16_t sequence;
uint16_t pwms[RCINPUT_UDP_NUM_CHANNELS];
};
▶ Basic linux utility written
▶ joystick_remote
https://github.com/jberaud/joystick_remote
▶ Using linux joystick input driver
▶ Already ported on Parrot SkyController
The DroneCode Project - A Step in Open Source Drones 17 / 21
Trying to fly
▶ First flight = crash
▶ Logging system used to understand the reason of the crash.
▶ Log files sent to one of the maintainers
▶ Log Analysis
▶ All sensor datas
▶ All interesting values
▶ Possibility to find the cause of a problem
▶ Solution found
▶ The order of the motors wasn’t right
The DroneCode Project - A Step in Open Source Drones 18 / 21
Trying to fly
▶ First flight = crash
▶ Logging system used to understand the reason of the crash.
▶ Log files sent to one of the maintainers
▶ Log Analysis
▶ All sensor datas
▶ All interesting values
▶ Possibility to find the cause of a problem
▶ Solution found
▶ The order of the motors wasn’t right
The DroneCode Project - A Step in Open Source Drones 18 / 21
Trying to fly
▶ First flight = crash
▶ Logging system used to understand the reason of the crash.
▶ Log files sent to one of the maintainers
▶ Log Analysis
▶ All sensor datas
▶ All interesting values
▶ Possibility to find the cause of a problem
▶ Solution found
▶ The order of the motors wasn’t right
The DroneCode Project - A Step in Open Source Drones 18 / 21
Trying to fly
▶ First flight = crash
▶ Logging system used to understand the reason of the crash.
▶ Log files sent to one of the maintainers
▶ Log Analysis
▶ All sensor datas
▶ All interesting values
▶ Possibility to find the cause of a problem
▶ Solution found
▶ The order of the motors wasn’t right
The DroneCode Project - A Step in Open Source Drones 18 / 21
Log Analysis
▶ Motors order
▶ Cause of the crash
The DroneCode Project - A Step in Open Source Drones 19 / 21
Submitting patches to master
▶ Discussions with Tridge
▶ A bit of reworking
▶ Patches got accepted
▶ 1 month of work
▶ 17 patches submitted for the basic support
▶ Coming up next
▶ Wiki page for users to hack their bebop
▶ Currently missing sensor support
▶ Integration as an alternative to our flight stack
▶ Benefits
▶ Performance comparison
▶ Access to the dronecode ecosystem
▶ New piloting modes
The DroneCode Project - A Step in Open Source Drones 20 / 21
Submitting patches to master
▶ Discussions with Tridge
▶ A bit of reworking
▶ Patches got accepted
▶ 1 month of work
▶ 17 patches submitted for the basic support
▶ Coming up next
▶ Wiki page for users to hack their bebop
▶ Currently missing sensor support
▶ Integration as an alternative to our flight stack
▶ Benefits
▶ Performance comparison
▶ Access to the dronecode ecosystem
▶ New piloting modes
The DroneCode Project - A Step in Open Source Drones 20 / 21
Submitting patches to master
▶ Discussions with Tridge
▶ A bit of reworking
▶ Patches got accepted
▶ 1 month of work
▶ 17 patches submitted for the basic support
▶ Coming up next
▶ Wiki page for users to hack their bebop
▶ Currently missing sensor support
▶ Integration as an alternative to our flight stack
▶ Benefits
▶ Performance comparison
▶ Access to the dronecode ecosystem
▶ New piloting modes
The DroneCode Project - A Step in Open Source Drones 20 / 21
Submitting patches to master
▶ Discussions with Tridge
▶ A bit of reworking
▶ Patches got accepted
▶ 1 month of work
▶ 17 patches submitted for the basic support
▶ Coming up next
▶ Wiki page for users to hack their bebop
▶ Currently missing sensor support
▶ Integration as an alternative to our flight stack
▶ Benefits
▶ Performance comparison
▶ Access to the dronecode ecosystem
▶ New piloting modes
The DroneCode Project - A Step in Open Source Drones 20 / 21
Conclusion
▶ Useful links
▶ http://dev.ardupilot.com/
▶ https://github.com/diydrones
▶ https://github.com/jberaud
▶ https://pixhawk.org
▶ Parrot is recruiting
▶ Linux userland and kernel developers
▶ Android Java developers
▶ iOS developers
▶ Questions ?
The DroneCode Project - A Step in Open Source Drones 21 / 21
Conclusion
▶ Useful links
▶ http://dev.ardupilot.com/
▶ https://github.com/diydrones
▶ https://github.com/jberaud
▶ https://pixhawk.org
▶ Parrot is recruiting
▶ Linux userland and kernel developers
▶ Android Java developers
▶ iOS developers
▶ Questions ?
The DroneCode Project - A Step in Open Source Drones 21 / 21
Conclusion
▶ Useful links
▶ http://dev.ardupilot.com/
▶ https://github.com/diydrones
▶ https://github.com/jberaud
▶ https://pixhawk.org
▶ Parrot is recruiting
▶ Linux userland and kernel developers
▶ Android Java developers
▶ iOS developers
▶ Questions ?
The DroneCode Project - A Step in Open Source Drones 21 / 21

More Related Content

PDF
Kernel Recipes 2015: Speed up your kernel development cycle with QEMU
PDF
Kernel Recipes 2015 - Kernel dump analysis
PDF
Kernel Recipes 2015: Kernel packet capture technologies
PDF
Kernel Recipes 2015: Greybus
PDF
LAS16-403: GDB Linux Kernel Awareness
PDF
Kernel Recipes 2015 - Hardened kernels for everyone
PDF
Kernel Recipes 2015 - Porting Linux to a new processor architecture
PDF
Kernel Recipes 2015 - So you want to write a Linux driver framework
Kernel Recipes 2015: Speed up your kernel development cycle with QEMU
Kernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015: Kernel packet capture technologies
Kernel Recipes 2015: Greybus
LAS16-403: GDB Linux Kernel Awareness
Kernel Recipes 2015 - Hardened kernels for everyone
Kernel Recipes 2015 - Porting Linux to a new processor architecture
Kernel Recipes 2015 - So you want to write a Linux driver framework

What's hot (20)

PDF
Andrea Righi - Spying on the Linux kernel for fun and profit
PDF
Kernel Recipes 2015: Anatomy of an atomic KMS driver
PDF
netfilter and iptables
PPT
Libpcap
PPT
Linux Kernel Debugging
PDF
How Linux Processes Your Network Packet - Elazar Leibovich
PDF
Mirko Damiani - An Embedded soft real time distributed system in Go
PDF
Intel DPDK Step by Step instructions
PPTX
Linux Network Stack
PDF
OpenWrt From Top to Bottom
PDF
The Linux Block Layer - Built for Fast Storage
PDF
FreeBSD and Drivers
PPTX
U-boot and Android Verified Boot 2.0
PPTX
The n00bs guide to ovs dpdk
PDF
ARM Architecture and Meltdown/Spectre
PDF
BKK16-410 SoC Idling & CPU Cluster PM
PDF
Linux kernel debugging
PDF
Davide Berardi - Linux hardening and security measures against Memory corruption
PDF
Kdump and the kernel crash dump analysis
PDF
OpenSSL + Intel (r) Quick Assist Technology Engine Setup Instructions
Andrea Righi - Spying on the Linux kernel for fun and profit
Kernel Recipes 2015: Anatomy of an atomic KMS driver
netfilter and iptables
Libpcap
Linux Kernel Debugging
How Linux Processes Your Network Packet - Elazar Leibovich
Mirko Damiani - An Embedded soft real time distributed system in Go
Intel DPDK Step by Step instructions
Linux Network Stack
OpenWrt From Top to Bottom
The Linux Block Layer - Built for Fast Storage
FreeBSD and Drivers
U-boot and Android Verified Boot 2.0
The n00bs guide to ovs dpdk
ARM Architecture and Meltdown/Spectre
BKK16-410 SoC Idling & CPU Cluster PM
Linux kernel debugging
Davide Berardi - Linux hardening and security measures against Memory corruption
Kdump and the kernel crash dump analysis
OpenSSL + Intel (r) Quick Assist Technology Engine Setup Instructions
Ad

Similar to Kernel Recipes 2015 - The Dronecode Project – A step in open source drones (20)

PDF
Dronecode: software open source em drones
PDF
Towards An Open Instrumentation Platform: Getting The Most From MAVLink, Ardu...
PDF
Open_IoT_Summit-Europe-2016-Building_a_Drone_from_scratch
PDF
PX4 Setup Workshop
PPTX
An introduction to drones: hardware, protocols and auto-pilot systems
PDF
cju-development-of-drone-flight-control-software-using-matlab-and-px4.pdf
PDF
Raspberry Pi - best friend for all your GPIO needs
ODP
Multipilot pres-ufficiale alpago 2011
PPTX
Open Source Robotics as Booster to Creativity
PDF
PX4 Seminar 02
PDF
PX4 Seminar 02
PDF
SUAS & Arduino Presentation - Staples - 20140403 - CLEARED
KEY
Scottish Ruby Conference 2010 Arduino, Ruby RAD
PPTX
Autonomous drone project part 1
PDF
490B report
PDF
DIY Gesture Control ESP32 LiteWing Drone using Python
PPTX
Drone project 2020 GROUP PPT
PDF
Advanced view arduino projects list use arduino for projects
PDF
SSCCIP Final Presentation (The Spartans)
PPT
The Kodel, an RC airplane autopilot for aerial photography
Dronecode: software open source em drones
Towards An Open Instrumentation Platform: Getting The Most From MAVLink, Ardu...
Open_IoT_Summit-Europe-2016-Building_a_Drone_from_scratch
PX4 Setup Workshop
An introduction to drones: hardware, protocols and auto-pilot systems
cju-development-of-drone-flight-control-software-using-matlab-and-px4.pdf
Raspberry Pi - best friend for all your GPIO needs
Multipilot pres-ufficiale alpago 2011
Open Source Robotics as Booster to Creativity
PX4 Seminar 02
PX4 Seminar 02
SUAS & Arduino Presentation - Staples - 20140403 - CLEARED
Scottish Ruby Conference 2010 Arduino, Ruby RAD
Autonomous drone project part 1
490B report
DIY Gesture Control ESP32 LiteWing Drone using Python
Drone project 2020 GROUP PPT
Advanced view arduino projects list use arduino for projects
SSCCIP Final Presentation (The Spartans)
The Kodel, an RC airplane autopilot for aerial photography
Ad

More from Anne Nicolas (20)

PDF
Kernel Recipes 2019 - Driving the industry toward upstream first
PDF
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
PDF
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
PDF
Kernel Recipes 2019 - Metrics are money
PDF
Kernel Recipes 2019 - Kernel documentation: past, present, and future
PDF
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
PDF
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
PDF
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
PDF
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
PDF
Embedded Recipes 2019 - Making embedded graphics less special
PDF
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
PDF
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
PDF
Embedded Recipes 2019 - Testing firmware the devops way
PDF
Embedded Recipes 2019 - Herd your socs become a matchmaker
PDF
Embedded Recipes 2019 - LLVM / Clang integration
PDF
Embedded Recipes 2019 - Introduction to JTAG debugging
PDF
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
PDF
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
PDF
Kernel Recipes 2019 - Suricata and XDP
PDF
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Kernel documentation: past, present, and future
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)

Recently uploaded (20)

PDF
Nekopoi APK 2025 free lastest update
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PPTX
Online Work Permit System for Fast Permit Processing
PDF
medical staffing services at VALiNTRY
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
System and Network Administraation Chapter 3
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PPTX
Odoo POS Development Services by CandidRoot Solutions
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
Transform Your Business with a Software ERP System
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
top salesforce developer skills in 2025.pdf
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Nekopoi APK 2025 free lastest update
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Softaken Excel to vCard Converter Software.pdf
VVF-Customer-Presentation2025-Ver1.9.pptx
Online Work Permit System for Fast Permit Processing
medical staffing services at VALiNTRY
2025 Textile ERP Trends: SAP, Odoo & Oracle
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
System and Network Administraation Chapter 3
How to Choose the Right IT Partner for Your Business in Malaysia
Internet Downloader Manager (IDM) Crack 6.42 Build 41
ManageIQ - Sprint 268 Review - Slide Deck
Odoo POS Development Services by CandidRoot Solutions
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Transform Your Business with a Software ERP System
Wondershare Filmora 15 Crack With Activation Key [2025
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
top salesforce developer skills in 2025.pdf
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...

Kernel Recipes 2015 - The Dronecode Project – A step in open source drones

  • 1. The DroneCode Project - A Step in Open Source Drones Julien BERAUD October 5, 2015 The DroneCode Project - A Step in Open Source Drones 1 / 21
  • 2. The DroneCode Project ”An open source, collaborative project that brings together existing and future open source drone projects under a nonprofit structure governed by The Linux Foundation. The result will be a common, shared open source platform for Unmanned Aerial Vehicles (UAVs).” The DroneCode Project - A Step in Open Source Drones 2 / 21
  • 3. DroneCode Software The DroneCode Project - A Step in Open Source Drones 3 / 21
  • 4. Parrot Drones 1/3 ▶ Parrot AR Drone ▶ Parrot 6 SoC - ARM926EJS ▶ Linux Kernel ▶ Busybox The DroneCode Project - A Step in Open Source Drones 4 / 21
  • 5. Parrot Drones 2/3 ▶ Parrot AR Drone 2.0 ▶ TI OMAP3630 - ARM Cortex-A8 ▶ Linux Kernel ▶ Busybox The DroneCode Project - A Step in Open Source Drones 5 / 21
  • 6. Parrot Drones 3/3 ▶ Parrot Bebop ▶ Parrot 7 SoC - Dual Cortex-A9 ▶ Linux Kernel ▶ Busybox The DroneCode Project - A Step in Open Source Drones 6 / 21
  • 7. Drone Software ▶ Drone Software ▶ Drone OnBoard Software ▶ Computer/Smartphone/Tablet Software ▶ Cloud Software ▶ Protocols to bind them together ▶ Parrot Drones OnBoard Software ▶ Custom Proprietary Flight Stack ▶ Running entirely on Linux ▶ No PREEMPT_RT Patch ▶ Quite different from other existing drones The DroneCode Project - A Step in Open Source Drones 7 / 21
  • 8. Drone Software ▶ Drone Software ▶ Drone OnBoard Software ▶ Computer/Smartphone/Tablet Software ▶ Cloud Software ▶ Protocols to bind them together ▶ Parrot Drones OnBoard Software ▶ Custom Proprietary Flight Stack ▶ Running entirely on Linux ▶ No PREEMPT_RT Patch ▶ Quite different from other existing drones The DroneCode Project - A Step in Open Source Drones 7 / 21
  • 9. DroneCode OnBoard Software ▶ OnBoard Software ▶ The Flight Stack ▶ Specific to Drones ▶ 2 Flight Stacks are part of the DroneCode Project The DroneCode Project - A Step in Open Source Drones 8 / 21
  • 10. DroneCode OnBoard Software ▶ OnBoard Software ▶ The Flight Stack ▶ Specific to Drones ▶ 2 Flight Stacks are part of the DroneCode Project The DroneCode Project - A Step in Open Source Drones 8 / 21
  • 11. Dronecode Flight Stacks ▶ APM or Ardupilot - http://dev.ardupilot.com/ ▶ GPLv3 License ▶ First developed to run on an Arduino ▶ PX4 - https://pixhawk.org/dev/start ▶ BSD License ▶ First developed to run on an STM32 microcontroller ▶ Originally developed to run on top of NuttX RTOS The DroneCode Project - A Step in Open Source Drones 9 / 21
  • 12. Dronecode Flight Stacks ▶ APM or Ardupilot - http://dev.ardupilot.com/ ▶ GPLv3 License ▶ First developed to run on an Arduino ▶ PX4 - https://pixhawk.org/dev/start ▶ BSD License ▶ First developed to run on an STM32 microcontroller ▶ Originally developed to run on top of NuttX RTOS The DroneCode Project - A Step in Open Source Drones 9 / 21
  • 13. OpenSource Linux drones appearing ▶ January 2015 - Andrew Tridgell at LCA ▶ Article on LWN - https://lwn.net/Articles/630018/ ▶ Drone running Linux with the APM flight stack ▶ BeagleBone Black with Pixhawk Fire Cape ▶ Several Linux boards supported natively in APM ▶ BeagleBone with Pixhawk Fire Cape ▶ Erle Brain ▶ NavIO ▶ Qualcomm starting to work on PX4 port on Linux The DroneCode Project - A Step in Open Source Drones 10 / 21
  • 14. Drone Architecture ▶ QuadCopter ▶ Impossible to fly entirely manually - Autopilot ▶ Sensors, user commands ▶ Motor speeds ▶ Ardupilot ▶ Reads from sensors ▶ Enhanced Kalmann Filter(EKF) ▶ Estimate the state of the Drone ▶ Sensors ▶ Inertial Measurement Unit (IMU) ▶ Barometer ▶ Compass ▶ GPS, Optical Flow Sensor, Sonar, ... ▶ External microcontroller for motor control The DroneCode Project - A Step in Open Source Drones 11 / 21
  • 15. Drone Architecture ▶ QuadCopter ▶ Impossible to fly entirely manually - Autopilot ▶ Sensors, user commands ▶ Motor speeds ▶ Ardupilot ▶ Reads from sensors ▶ Enhanced Kalmann Filter(EKF) ▶ Estimate the state of the Drone ▶ Sensors ▶ Inertial Measurement Unit (IMU) ▶ Barometer ▶ Compass ▶ GPS, Optical Flow Sensor, Sonar, ... ▶ External microcontroller for motor control The DroneCode Project - A Step in Open Source Drones 11 / 21
  • 16. Drone Architecture ▶ QuadCopter ▶ Impossible to fly entirely manually - Autopilot ▶ Sensors, user commands ▶ Motor speeds ▶ Ardupilot ▶ Reads from sensors ▶ Enhanced Kalmann Filter(EKF) ▶ Estimate the state of the Drone ▶ Sensors ▶ Inertial Measurement Unit (IMU) ▶ Barometer ▶ Compass ▶ GPS, Optical Flow Sensor, Sonar, ... ▶ External microcontroller for motor control The DroneCode Project - A Step in Open Source Drones 11 / 21
  • 17. Drone Architecture ▶ QuadCopter ▶ Impossible to fly entirely manually - Autopilot ▶ Sensors, user commands ▶ Motor speeds ▶ Ardupilot ▶ Reads from sensors ▶ Enhanced Kalmann Filter(EKF) ▶ Estimate the state of the Drone ▶ Sensors ▶ Inertial Measurement Unit (IMU) ▶ Barometer ▶ Compass ▶ GPS, Optical Flow Sensor, Sonar, ... ▶ External microcontroller for motor control The DroneCode Project - A Step in Open Source Drones 11 / 21
  • 18. Parrot Bebop Architecture The DroneCode Project - A Step in Open Source Drones 12 / 21
  • 19. APM - https://github.com/diydrones/ardupilot AP_HAL class class AP_HAL::HAL { ... AP_HAL::UARTDriver* uartA; AP_HAL::UARTDriver* uartB; AP_HAL::UARTDriver* uartC; AP_HAL::UARTDriver* uartD; AP_HAL::UARTDriver* uartE; AP_HAL::I2CDriver* i2c; AP_HAL::I2CDriver* i2c1; AP_HAL::I2CDriver* i2c2; AP_HAL::SPIDeviceManager* spi; ... }; Userland drivers hal.i2c1->write(BEBOP_BLDC_I2C_ADDR , 1, &data); The DroneCode Project - A Step in Open Source Drones 13 / 21
  • 20. Drivers modifications ▶ Baro - MS5607 ▶ Existing driver for MS5611 ▶ Scaling factor ▶ Compass - AK8963 ▶ Existing driver for AL8963 ▶ Only as a slave device for an IMU ▶ Implement the use of a direct connection on i2c ▶ IMU ▶ MPU6050 in i2c instead of spi ▶ No PREEMPT_RT patch ▶ Jitter issues ▶ Implement the use of the MPU6050 FIFO ▶ Motor Controller ▶ New driver to write ▶ Added in AP_HAL_Linux ▶ Implements the RCOutput class ▶ GPS almost supported ▶ Add frames / Fixes The DroneCode Project - A Step in Open Source Drones 14 / 21
  • 21. Drivers modifications ▶ Baro - MS5607 ▶ Existing driver for MS5611 ▶ Scaling factor ▶ Compass - AK8963 ▶ Existing driver for AL8963 ▶ Only as a slave device for an IMU ▶ Implement the use of a direct connection on i2c ▶ IMU ▶ MPU6050 in i2c instead of spi ▶ No PREEMPT_RT patch ▶ Jitter issues ▶ Implement the use of the MPU6050 FIFO ▶ Motor Controller ▶ New driver to write ▶ Added in AP_HAL_Linux ▶ Implements the RCOutput class ▶ GPS almost supported ▶ Add frames / Fixes The DroneCode Project - A Step in Open Source Drones 14 / 21
  • 22. Drivers modifications ▶ Baro - MS5607 ▶ Existing driver for MS5611 ▶ Scaling factor ▶ Compass - AK8963 ▶ Existing driver for AL8963 ▶ Only as a slave device for an IMU ▶ Implement the use of a direct connection on i2c ▶ IMU ▶ MPU6050 in i2c instead of spi ▶ No PREEMPT_RT patch ▶ Jitter issues ▶ Implement the use of the MPU6050 FIFO ▶ Motor Controller ▶ New driver to write ▶ Added in AP_HAL_Linux ▶ Implements the RCOutput class ▶ GPS almost supported ▶ Add frames / Fixes The DroneCode Project - A Step in Open Source Drones 14 / 21
  • 23. Drivers modifications ▶ Baro - MS5607 ▶ Existing driver for MS5611 ▶ Scaling factor ▶ Compass - AK8963 ▶ Existing driver for AL8963 ▶ Only as a slave device for an IMU ▶ Implement the use of a direct connection on i2c ▶ IMU ▶ MPU6050 in i2c instead of spi ▶ No PREEMPT_RT patch ▶ Jitter issues ▶ Implement the use of the MPU6050 FIFO ▶ Motor Controller ▶ New driver to write ▶ Added in AP_HAL_Linux ▶ Implements the RCOutput class ▶ GPS almost supported ▶ Add frames / Fixes The DroneCode Project - A Step in Open Source Drones 14 / 21
  • 24. Drivers modifications ▶ Baro - MS5607 ▶ Existing driver for MS5611 ▶ Scaling factor ▶ Compass - AK8963 ▶ Existing driver for AL8963 ▶ Only as a slave device for an IMU ▶ Implement the use of a direct connection on i2c ▶ IMU ▶ MPU6050 in i2c instead of spi ▶ No PREEMPT_RT patch ▶ Jitter issues ▶ Implement the use of the MPU6050 FIFO ▶ Motor Controller ▶ New driver to write ▶ Added in AP_HAL_Linux ▶ Implements the RCOutput class ▶ GPS almost supported ▶ Add frames / Fixes The DroneCode Project - A Step in Open Source Drones 14 / 21
  • 25. Motor Controller RCOutput_Bebop class Linux::LinuxRCOutput_Bebop : public AP_HAL::RCOutput { public: LinuxRCOutput_Bebop(); void init(void* dummy); void set_freq(uint32_t chmask, uint16_t freq_hz); uint16_t get_freq(uint8_t ch); void enable_ch(uint8_t ch); void disable_ch(uint8_t ch); void write(uint8_t ch, uint16_t period_us); void write(uint8_t ch, uint16_t* period_us, uint8_t len); uint16_t read(uint8_t ch); void read(uint16_t* period_us, uint8_t len); void set_esc_scaling(uint16_t min_pwm, uint16_t max_pwm); int read_obs_data(BebopBLDC_ObsData &data); ... The DroneCode Project - A Step in Open Source Drones 15 / 21
  • 26. Motor Controller 2/2 set_ref_speed void LinuxRCOutput_Bebop::_set_ref_speed( uint16_t rpm[BEBOP_BLDC_MOTORS_NUM]) { struct bldc_ref_speed_data data; int i; data.cmd = BEBOP_BLDC_SETREFSPEED; for (i=0; i<BEBOP_BLDC_MOTORS_NUM; i++) data.rpm[i] = htobe16(rpm[i]); data.enable_security = 0; data.checksum = _checksum((uint8_t *) &data, sizeof(data) - 1); if (!_i2c_sem->take(0)) return; hal.i2c1->write(BEBOP_BLDC_I2C_ADDR , sizeof(data), (uint8_t *)&data); _i2c_sem->give(); } The DroneCode Project - A Step in Open Source Drones 16 / 21
  • 27. RCInput over Wi-Fi Protocol #define RCINPUT_UDP_NUM_CHANNELS 8 #define RCINPUT_UDP_VERSION 2 struct __attribute__((packed)) rc_udp_packet { uint32_t version; uint64_t timestamp_us; uint16_t sequence; uint16_t pwms[RCINPUT_UDP_NUM_CHANNELS]; }; ▶ Basic linux utility written ▶ joystick_remote https://github.com/jberaud/joystick_remote ▶ Using linux joystick input driver ▶ Already ported on Parrot SkyController The DroneCode Project - A Step in Open Source Drones 17 / 21
  • 28. RCInput over Wi-Fi Protocol #define RCINPUT_UDP_NUM_CHANNELS 8 #define RCINPUT_UDP_VERSION 2 struct __attribute__((packed)) rc_udp_packet { uint32_t version; uint64_t timestamp_us; uint16_t sequence; uint16_t pwms[RCINPUT_UDP_NUM_CHANNELS]; }; ▶ Basic linux utility written ▶ joystick_remote https://github.com/jberaud/joystick_remote ▶ Using linux joystick input driver ▶ Already ported on Parrot SkyController The DroneCode Project - A Step in Open Source Drones 17 / 21
  • 29. Trying to fly ▶ First flight = crash ▶ Logging system used to understand the reason of the crash. ▶ Log files sent to one of the maintainers ▶ Log Analysis ▶ All sensor datas ▶ All interesting values ▶ Possibility to find the cause of a problem ▶ Solution found ▶ The order of the motors wasn’t right The DroneCode Project - A Step in Open Source Drones 18 / 21
  • 30. Trying to fly ▶ First flight = crash ▶ Logging system used to understand the reason of the crash. ▶ Log files sent to one of the maintainers ▶ Log Analysis ▶ All sensor datas ▶ All interesting values ▶ Possibility to find the cause of a problem ▶ Solution found ▶ The order of the motors wasn’t right The DroneCode Project - A Step in Open Source Drones 18 / 21
  • 31. Trying to fly ▶ First flight = crash ▶ Logging system used to understand the reason of the crash. ▶ Log files sent to one of the maintainers ▶ Log Analysis ▶ All sensor datas ▶ All interesting values ▶ Possibility to find the cause of a problem ▶ Solution found ▶ The order of the motors wasn’t right The DroneCode Project - A Step in Open Source Drones 18 / 21
  • 32. Trying to fly ▶ First flight = crash ▶ Logging system used to understand the reason of the crash. ▶ Log files sent to one of the maintainers ▶ Log Analysis ▶ All sensor datas ▶ All interesting values ▶ Possibility to find the cause of a problem ▶ Solution found ▶ The order of the motors wasn’t right The DroneCode Project - A Step in Open Source Drones 18 / 21
  • 33. Log Analysis ▶ Motors order ▶ Cause of the crash The DroneCode Project - A Step in Open Source Drones 19 / 21
  • 34. Submitting patches to master ▶ Discussions with Tridge ▶ A bit of reworking ▶ Patches got accepted ▶ 1 month of work ▶ 17 patches submitted for the basic support ▶ Coming up next ▶ Wiki page for users to hack their bebop ▶ Currently missing sensor support ▶ Integration as an alternative to our flight stack ▶ Benefits ▶ Performance comparison ▶ Access to the dronecode ecosystem ▶ New piloting modes The DroneCode Project - A Step in Open Source Drones 20 / 21
  • 35. Submitting patches to master ▶ Discussions with Tridge ▶ A bit of reworking ▶ Patches got accepted ▶ 1 month of work ▶ 17 patches submitted for the basic support ▶ Coming up next ▶ Wiki page for users to hack their bebop ▶ Currently missing sensor support ▶ Integration as an alternative to our flight stack ▶ Benefits ▶ Performance comparison ▶ Access to the dronecode ecosystem ▶ New piloting modes The DroneCode Project - A Step in Open Source Drones 20 / 21
  • 36. Submitting patches to master ▶ Discussions with Tridge ▶ A bit of reworking ▶ Patches got accepted ▶ 1 month of work ▶ 17 patches submitted for the basic support ▶ Coming up next ▶ Wiki page for users to hack their bebop ▶ Currently missing sensor support ▶ Integration as an alternative to our flight stack ▶ Benefits ▶ Performance comparison ▶ Access to the dronecode ecosystem ▶ New piloting modes The DroneCode Project - A Step in Open Source Drones 20 / 21
  • 37. Submitting patches to master ▶ Discussions with Tridge ▶ A bit of reworking ▶ Patches got accepted ▶ 1 month of work ▶ 17 patches submitted for the basic support ▶ Coming up next ▶ Wiki page for users to hack their bebop ▶ Currently missing sensor support ▶ Integration as an alternative to our flight stack ▶ Benefits ▶ Performance comparison ▶ Access to the dronecode ecosystem ▶ New piloting modes The DroneCode Project - A Step in Open Source Drones 20 / 21
  • 38. Conclusion ▶ Useful links ▶ http://dev.ardupilot.com/ ▶ https://github.com/diydrones ▶ https://github.com/jberaud ▶ https://pixhawk.org ▶ Parrot is recruiting ▶ Linux userland and kernel developers ▶ Android Java developers ▶ iOS developers ▶ Questions ? The DroneCode Project - A Step in Open Source Drones 21 / 21
  • 39. Conclusion ▶ Useful links ▶ http://dev.ardupilot.com/ ▶ https://github.com/diydrones ▶ https://github.com/jberaud ▶ https://pixhawk.org ▶ Parrot is recruiting ▶ Linux userland and kernel developers ▶ Android Java developers ▶ iOS developers ▶ Questions ? The DroneCode Project - A Step in Open Source Drones 21 / 21
  • 40. Conclusion ▶ Useful links ▶ http://dev.ardupilot.com/ ▶ https://github.com/diydrones ▶ https://github.com/jberaud ▶ https://pixhawk.org ▶ Parrot is recruiting ▶ Linux userland and kernel developers ▶ Android Java developers ▶ iOS developers ▶ Questions ? The DroneCode Project - A Step in Open Source Drones 21 / 21