SlideShare a Scribd company logo
1 of 40
Download to read offline
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

What's hot

netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptables
Kernel TLV
 

What's hot (20)

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

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

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

Trash Robotic Router Platform - David Melendez - Codemotion Rome 2015
Trash Robotic Router Platform - David Melendez - Codemotion Rome 2015Trash Robotic Router Platform - David Melendez - Codemotion Rome 2015
Trash Robotic Router Platform - David Melendez - Codemotion Rome 2015
 
P4+ONOS SRv6 tutorial.pptx
P4+ONOS SRv6 tutorial.pptxP4+ONOS SRv6 tutorial.pptx
P4+ONOS SRv6 tutorial.pptx
 
SR-IOV ixgbe Driver Limitations and Improvement
SR-IOV ixgbe Driver Limitations and ImprovementSR-IOV ixgbe Driver Limitations and Improvement
SR-IOV ixgbe Driver Limitations and Improvement
 
Dronecode: software open source em drones
Dronecode: software open source em dronesDronecode: software open source em drones
Dronecode: software open source em drones
 
Elc Europe 2020 : u-boot- porting and maintaining a bootloader for a multimed...
Elc Europe 2020 : u-boot- porting and maintaining a bootloader for a multimed...Elc Europe 2020 : u-boot- porting and maintaining a bootloader for a multimed...
Elc Europe 2020 : u-boot- porting and maintaining a bootloader for a multimed...
 
Multipilot pres-ufficiale last 2
Multipilot pres-ufficiale last 2Multipilot pres-ufficiale last 2
Multipilot pres-ufficiale last 2
 
Python for IoT, A return of experience
Python for IoT, A return of experiencePython for IoT, A return of experience
Python for IoT, A return of experience
 
Using Python for IoT: a return of experience, Alexandre Abadie
Using Python for IoT: a return of experience, Alexandre AbadieUsing Python for IoT: a return of experience, Alexandre Abadie
Using Python for IoT: a return of experience, Alexandre Abadie
 
eBPF/XDP
eBPF/XDP eBPF/XDP
eBPF/XDP
 
SpeedIT FLOW
SpeedIT FLOWSpeedIT FLOW
SpeedIT FLOW
 
Tesla Hacking to FreedomEV
Tesla Hacking to FreedomEVTesla Hacking to FreedomEV
Tesla Hacking to FreedomEV
 
CNC 3-Axis Stepper Motor Shield
CNC 3-Axis Stepper Motor ShieldCNC 3-Axis Stepper Motor Shield
CNC 3-Axis Stepper Motor Shield
 
SR-IOV, KVM and Intel X520 10Gbps cards on Debian/Stable
SR-IOV, KVM and Intel X520 10Gbps cards on Debian/StableSR-IOV, KVM and Intel X520 10Gbps cards on Debian/Stable
SR-IOV, KVM and Intel X520 10Gbps cards on Debian/Stable
 
ARM Cortex-A53 Errata on Andoid
ARM Cortex-A53 Errata on AndoidARM Cortex-A53 Errata on Andoid
ARM Cortex-A53 Errata on Andoid
 
How to Use OpenMP on Native Activity
How to Use OpenMP on Native ActivityHow to Use OpenMP on Native Activity
How to Use OpenMP on Native Activity
 
KrankGeek November 2021 - Best practices in Electron-based desktop developmen...
KrankGeek November 2021 - Best practices in Electron-based desktop developmen...KrankGeek November 2021 - Best practices in Electron-based desktop developmen...
KrankGeek November 2021 - Best practices in Electron-based desktop developmen...
 
OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...
OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...
OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...
 
OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce
OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce
OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce
 
The Crucial Component of IoT Products by Aravinth Panchadcharam [ Senior Embe...
The Crucial Component of IoT Products by Aravinth Panchadcharam [ Senior Embe...The Crucial Component of IoT Products by Aravinth Panchadcharam [ Senior Embe...
The Crucial Component of IoT Products by Aravinth Panchadcharam [ Senior Embe...
 
Towards An Open Instrumentation Platform: Getting The Most From MAVLink, Ardu...
Towards An Open Instrumentation Platform: Getting The Most From MAVLink, Ardu...Towards An Open Instrumentation Platform: Getting The Most From MAVLink, Ardu...
Towards An Open Instrumentation Platform: Getting The Most From MAVLink, Ardu...
 

More from Anne Nicolas

Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataKernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Anne Nicolas
 

More from Anne Nicolas (20)

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

Recently uploaded

%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 

Recently uploaded (20)

%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 

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