74
Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31

Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Drones Still Going Open Source

Julien BERAUD

October 12th 2016 - Embedded Linux Conference Europe Berlin

Drones Still Going Open Source 1 / 31

Page 2: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Introduction

ArduPilot on Parrot Bebop 2

Parrot Disco and C.H.U.C.K

Software Architecture for Video

Video implementation with ArduPilot

Building code for Parrot Disco

What’s left to do ?

Parrot SLAM.dunk

Conclusion

Drones Still Going Open Source 2 / 31

Page 3: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Introduction

Introduction

Drones Still Going Open Source 3 / 31

Page 4: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Parrot Bebop 2

▶ 500g▶ Parrot P7 SoC (dual Cortex A9)▶ IMU, Barometer, Compass, Vertical Camera, Sonar, GPS▶ Linux kernel 3.4 (no mainline support)▶ Front camera with fish-eye lens

Drones Still Going Open Source 4 / 31

Page 5: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Parrot Bebop 2

▶ 500g▶ Parrot P7 SoC (dual Cortex A9)▶ IMU, Barometer, Compass, Vertical Camera, Sonar, GPS▶ Linux kernel 3.4 (no mainline support)▶ Front camera with fish-eye lens

Drones Still Going Open Source 4 / 31

Page 6: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Parrot Bebop 2

▶ 500g▶ Parrot P7 SoC (dual Cortex A9)▶ IMU, Barometer, Compass, Vertical Camera, Sonar, GPS▶ Linux kernel 3.4 (no mainline support)▶ Front camera with fish-eye lens

Drones Still Going Open Source 4 / 31

Page 7: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Parrot Bebop 2

▶ 500g▶ Parrot P7 SoC (dual Cortex A9)▶ IMU, Barometer, Compass, Vertical Camera, Sonar, GPS▶ Linux kernel 3.4 (no mainline support)▶ Front camera with fish-eye lens

Drones Still Going Open Source 4 / 31

Page 8: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Parrot Bebop 2

▶ 500g▶ Parrot P7 SoC (dual Cortex A9)▶ IMU, Barometer, Compass, Vertical Camera, Sonar, GPS▶ Linux kernel 3.4 (no mainline support)▶ Front camera with fish-eye lens

Drones Still Going Open Source 4 / 31

Page 9: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

ArduPilot on Parrot Bebop 2

ArduPilot on Parrot Bebop 2

Drones Still Going Open Source 5 / 31

Page 10: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Hardware architecture

Drones Still Going Open Source 6 / 31

Page 11: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Ardupilot

Ardupilot

Drones Still Going Open Source 7 / 31

Page 12: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Ardupilot (APM)

▶ Open Source - GPLv3▶ Originally developed to run on an Arduino▶ C++▶ Some linux boards already supported before Bebop

Drones Still Going Open Source 8 / 31

Page 13: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Ardupilot (APM)

▶ Open Source - GPLv3▶ Originally developed to run on an Arduino▶ C++▶ Some linux boards already supported before Bebop

Drones Still Going Open Source 8 / 31

Page 14: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Ardupilot (APM)

▶ Open Source - GPLv3▶ Originally developed to run on an Arduino▶ C++▶ Some linux boards already supported before Bebop

Drones Still Going Open Source 8 / 31

Page 15: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Ardupilot (APM)

▶ Open Source - GPLv3▶ Originally developed to run on an Arduino▶ C++▶ Some linux boards already supported before Bebop

Drones Still Going Open Source 8 / 31

Page 16: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Software architecture

▶ Vehicle specific flight code (ArduCopter, ArduPlane,ArduRover)

▶ Shared libraries that include sensor drivers▶ Hardware Abstraction Layer providing access to

platform-specific methods▶ AP_HAL_Linux giving access to spidev, i2c-dev, uart drivers,

etc...

Drones Still Going Open Source 9 / 31

Page 17: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Software architecture

▶ Vehicle specific flight code (ArduCopter, ArduPlane,ArduRover)

▶ Shared libraries that include sensor drivers▶ Hardware Abstraction Layer providing access to

platform-specific methods▶ AP_HAL_Linux giving access to spidev, i2c-dev, uart drivers,

etc...

Drones Still Going Open Source 9 / 31

Page 18: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Software architecture

▶ Vehicle specific flight code (ArduCopter, ArduPlane,ArduRover)

▶ Shared libraries that include sensor drivers▶ Hardware Abstraction Layer providing access to

platform-specific methods▶ AP_HAL_Linux giving access to spidev, i2c-dev, uart drivers,

etc...

Drones Still Going Open Source 9 / 31

Page 19: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Software architecture

▶ Vehicle specific flight code (ArduCopter, ArduPlane,ArduRover)

▶ Shared libraries that include sensor drivers▶ Hardware Abstraction Layer providing access to

platform-specific methods▶ AP_HAL_Linux giving access to spidev, i2c-dev, uart drivers,

etc...

Drones Still Going Open Source 9 / 31

Page 20: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Flying

https://www.youtube.com/watch?v=HJN_gT1eNDkhttps://www.youtube.com/watch?v=ZnEFcJx1qkoThanks to Randy Mackay (Copter Maintainer)

Drones Still Going Open Source 10 / 31

Page 21: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Parrot Disco and C.H.U.C.K

Parrot Disco and C.H.U.C.K

Drones Still Going Open Source 11 / 31

Page 22: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Parrot Disco

▶ Fixed Wing▶ Architecture close to the Bebop’s▶ Built so its main board (C.H.U.C.K) can be used on another

vehicle

Drones Still Going Open Source 12 / 31

Page 23: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Parrot Disco

▶ Fixed Wing▶ Architecture close to the Bebop’s▶ Built so its main board (C.H.U.C.K) can be used on another

vehicle

Drones Still Going Open Source 12 / 31

Page 24: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Parrot Disco

▶ Fixed Wing▶ Architecture close to the Bebop’s▶ Built so its main board (C.H.U.C.K) can be used on another

vehicle

Drones Still Going Open Source 12 / 31

Page 25: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

C.H.U.C.K

▶ Targetting hobbyists, Research and Education▶ ArduPlane seemed like a perfect candidate▶ Porting made easier by previous Bebop porting▶ Expert in that area in the person of Tridge

Drones Still Going Open Source 13 / 31

Page 26: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

C.H.U.C.K

▶ Targetting hobbyists, Research and Education▶ ArduPlane seemed like a perfect candidate▶ Porting made easier by previous Bebop porting▶ Expert in that area in the person of Tridge

Drones Still Going Open Source 13 / 31

Page 27: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

C.H.U.C.K

▶ Targetting hobbyists, Research and Education▶ ArduPlane seemed like a perfect candidate▶ Porting made easier by previous Bebop porting▶ Expert in that area in the person of Tridge

Drones Still Going Open Source 13 / 31

Page 28: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

C.H.U.C.K

▶ Targetting hobbyists, Research and Education▶ ArduPlane seemed like a perfect candidate▶ Porting made easier by previous Bebop porting▶ Expert in that area in the person of Tridge

Drones Still Going Open Source 13 / 31

Page 29: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Differences with Bebop 2

▶ MS415DO Airspeed sensor▶ RC input over UART▶ ESC differences▶ Compass calibration issues▶ Wiki for users

http://ardupilot.org/plane/docs/airframe-disco.html

Drones Still Going Open Source 14 / 31

Page 30: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Differences with Bebop 2

▶ MS415DO Airspeed sensor▶ RC input over UART▶ ESC differences▶ Compass calibration issues▶ Wiki for users

http://ardupilot.org/plane/docs/airframe-disco.html

Drones Still Going Open Source 14 / 31

Page 31: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Differences with Bebop 2

▶ MS415DO Airspeed sensor▶ RC input over UART▶ ESC differences▶ Compass calibration issues▶ Wiki for users

http://ardupilot.org/plane/docs/airframe-disco.html

Drones Still Going Open Source 14 / 31

Page 32: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Differences with Bebop 2

▶ MS415DO Airspeed sensor▶ RC input over UART▶ ESC differences▶ Compass calibration issues▶ Wiki for users

http://ardupilot.org/plane/docs/airframe-disco.html

Drones Still Going Open Source 14 / 31

Page 33: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Differences with Bebop 2

▶ MS415DO Airspeed sensor▶ RC input over UART▶ ESC differences▶ Compass calibration issues▶ Wiki for users

http://ardupilot.org/plane/docs/airframe-disco.html

Drones Still Going Open Source 14 / 31

Page 34: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Missing features

What’s missing ?Video

Drones Still Going Open Source 15 / 31

Page 35: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Missing features

What’s missing ?Video

Drones Still Going Open Source 15 / 31

Page 36: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Software Architecture for Video

Software Architecture for Video

Drones Still Going Open Source 16 / 31

Page 37: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

DragonProg

▶ We came from a world of RTOS▶ 1 big process▶ Lots of threads and priorities▶ Little reusability and high maintenance overhead▶ Switch to a new architecture based on several processes

Drones Still Going Open Source 17 / 31

Page 38: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

DragonProg

▶ We came from a world of RTOS▶ 1 big process▶ Lots of threads and priorities▶ Little reusability and high maintenance overhead▶ Switch to a new architecture based on several processes

Drones Still Going Open Source 17 / 31

Page 39: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

DragonProg

▶ We came from a world of RTOS▶ 1 big process▶ Lots of threads and priorities▶ Little reusability and high maintenance overhead▶ Switch to a new architecture based on several processes

Drones Still Going Open Source 17 / 31

Page 40: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

DragonProg

▶ We came from a world of RTOS▶ 1 big process▶ Lots of threads and priorities▶ Little reusability and high maintenance overhead▶ Switch to a new architecture based on several processes

Drones Still Going Open Source 17 / 31

Page 41: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

DragonProg

▶ We came from a world of RTOS▶ 1 big process▶ Lots of threads and priorities▶ Little reusability and high maintenance overhead▶ Switch to a new architecture based on several processes

Drones Still Going Open Source 17 / 31

Page 42: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Dragonfly

▶ Processes are now split▶ 3 main processes▶ IPC to exchange data at high rate▶ One process in charge of video : Parrot IMaging Process▶ Use of libshdata/libtelemetry to export/import data

Drones Still Going Open Source 18 / 31

Page 43: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Dragonfly

▶ Processes are now split▶ 3 main processes▶ IPC to exchange data at high rate▶ One process in charge of video : Parrot IMaging Process▶ Use of libshdata/libtelemetry to export/import data

Drones Still Going Open Source 18 / 31

Page 44: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Dragonfly

▶ Processes are now split▶ 3 main processes▶ IPC to exchange data at high rate▶ One process in charge of video : Parrot IMaging Process▶ Use of libshdata/libtelemetry to export/import data

Drones Still Going Open Source 18 / 31

Page 45: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Dragonfly

▶ Processes are now split▶ 3 main processes▶ IPC to exchange data at high rate▶ One process in charge of video : Parrot IMaging Process▶ Use of libshdata/libtelemetry to export/import data

Drones Still Going Open Source 18 / 31

Page 46: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Dragonfly

▶ Processes are now split▶ 3 main processes▶ IPC to exchange data at high rate▶ One process in charge of video : Parrot IMaging Process▶ Use of libshdata/libtelemetry to export/import data

Drones Still Going Open Source 18 / 31

Page 47: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Pimp

Drones Still Going Open Source 19 / 31

Page 48: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

libtelemetry

▶ Library to import/export data between processes▶ Built on top of libshdata▶ Non-blocking▶ Uses shm▶ Timestamped data▶ https://github.com/Parrot-Developers/libshdata▶ https://github.com/Parrot-Developers/telemetry

Drones Still Going Open Source 20 / 31

Page 49: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

libtelemetry

▶ Library to import/export data between processes▶ Built on top of libshdata▶ Non-blocking▶ Uses shm▶ Timestamped data▶ https://github.com/Parrot-Developers/libshdata▶ https://github.com/Parrot-Developers/telemetry

Drones Still Going Open Source 20 / 31

Page 50: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

libtelemetry

▶ Library to import/export data between processes▶ Built on top of libshdata▶ Non-blocking▶ Uses shm▶ Timestamped data▶ https://github.com/Parrot-Developers/libshdata▶ https://github.com/Parrot-Developers/telemetry

Drones Still Going Open Source 20 / 31

Page 51: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

libtelemetry

▶ Library to import/export data between processes▶ Built on top of libshdata▶ Non-blocking▶ Uses shm▶ Timestamped data▶ https://github.com/Parrot-Developers/libshdata▶ https://github.com/Parrot-Developers/telemetry

Drones Still Going Open Source 20 / 31

Page 52: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

libtelemetry

▶ Library to import/export data between processes▶ Built on top of libshdata▶ Non-blocking▶ Uses shm▶ Timestamped data▶ https://github.com/Parrot-Developers/libshdata▶ https://github.com/Parrot-Developers/telemetry

Drones Still Going Open Source 20 / 31

Page 53: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

libtelemetry

▶ Library to import/export data between processes▶ Built on top of libshdata▶ Non-blocking▶ Uses shm▶ Timestamped data▶ https://github.com/Parrot-Developers/libshdata▶ https://github.com/Parrot-Developers/telemetry

Drones Still Going Open Source 20 / 31

Page 54: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Video implementation with ArduPilot

Video implementation with ArduPilot

Drones Still Going Open Source 21 / 31

Page 55: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

AP_Module

▶ Dynamically linked plugin▶ Implements hooks called by different subsystems in ArduPilot▶ Needs a plugin implementation

Drones Still Going Open Source 22 / 31

Page 56: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

AP_Module

▶ Dynamically linked plugin▶ Implements hooks called by different subsystems in ArduPilot▶ Needs a plugin implementation

Drones Still Going Open Source 22 / 31

Page 57: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

AP_Module

▶ Dynamically linked plugin▶ Implements hooks called by different subsystems in ArduPilot▶ Needs a plugin implementation

Drones Still Going Open Source 22 / 31

Page 58: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

libapm-telemetry

ap_hook_AHRS_updatevoid ap_hook_AHRS_update(const struct AHRS_state *state){

struct timespec ts;int ret;uint64_t time_us;

/* check structure version */if (state->structure_version != AHRS_state_version) {

ULOGE("Wrong structure version");return;

}

/* copy AHRS data to local structures */memcpy(export.body_quaternion, state->quat,

sizeof(export.body_quaternion));

/* export the data in telemetry */time_us = state->time_us + export.time_offset;ret = time_us_to_timespec(&time_us, &ts);if (ret < 0) {

ULOGE("error converting timespec to us %s",strerror(-ret));

return;}tlm_producer_put_sample(export.ahrs_producer, &ts);

}

Drones Still Going Open Source 23 / 31

Page 59: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Video on Disco

pimp-ctlpimp-ctl stream-start 192.168.42.2 9999

gst-launch on remote sidegst-launch-1.0 udpsrc port=9999 ! ”application/x-rtp,payload=96” ! rtph264depay ! avdec_h264 ! autovideosink

Drones Still Going Open Source 24 / 31

Page 60: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Building code for Parrot Disco

Building code for Parrot Disco

Drones Still Going Open Source 25 / 31

Page 61: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Build ardupilot for Disco

Using Alchemyhttps://github.com/ncarrier/apm-disco-manifest

Using waf build systemgit clone https://github.com/ArduPilot/ardupilot cd ardupilot gitsubmodule init git submodule update ./modules/waf/waf-lightconfigure –board=disco ./modules/waf/waf-light build -j6

Drones Still Going Open Source 26 / 31

Page 62: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

What’s left to do ?

What’s left to do ?

Drones Still Going Open Source 27 / 31

Page 63: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Remaining tasks

▶ Image quality improvements▶ MAVLINK support to start streaming▶ Piloting from Skycontroller 2▶ Allow users to develop video plugins▶ Write a fully Open Source version of the video pipeline

Drones Still Going Open Source 28 / 31

Page 64: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Remaining tasks

▶ Image quality improvements▶ MAVLINK support to start streaming▶ Piloting from Skycontroller 2▶ Allow users to develop video plugins▶ Write a fully Open Source version of the video pipeline

Drones Still Going Open Source 28 / 31

Page 65: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Remaining tasks

▶ Image quality improvements▶ MAVLINK support to start streaming▶ Piloting from Skycontroller 2▶ Allow users to develop video plugins▶ Write a fully Open Source version of the video pipeline

Drones Still Going Open Source 28 / 31

Page 66: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Remaining tasks

▶ Image quality improvements▶ MAVLINK support to start streaming▶ Piloting from Skycontroller 2▶ Allow users to develop video plugins▶ Write a fully Open Source version of the video pipeline

Drones Still Going Open Source 28 / 31

Page 67: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Remaining tasks

▶ Image quality improvements▶ MAVLINK support to start streaming▶ Piloting from Skycontroller 2▶ Allow users to develop video plugins▶ Write a fully Open Source version of the video pipeline

Drones Still Going Open Source 28 / 31

Page 68: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Parrot SLAM.dunk

Parrot SLAM.dunk

Drones Still Going Open Source 29 / 31

Page 69: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Parrot SLAM.dunk▶ Development Kit for Autonomous Flight▶ Tegra K1▶ Stereo Cameras and sensors▶ Ubuntu Desktop▶ ROS support

Drones Still Going Open Source 30 / 31

Page 70: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Parrot SLAM.dunk▶ Development Kit for Autonomous Flight▶ Tegra K1▶ Stereo Cameras and sensors▶ Ubuntu Desktop▶ ROS support

Drones Still Going Open Source 30 / 31

Page 71: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Parrot SLAM.dunk▶ Development Kit for Autonomous Flight▶ Tegra K1▶ Stereo Cameras and sensors▶ Ubuntu Desktop▶ ROS support

Drones Still Going Open Source 30 / 31

Page 72: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Parrot SLAM.dunk▶ Development Kit for Autonomous Flight▶ Tegra K1▶ Stereo Cameras and sensors▶ Ubuntu Desktop▶ ROS support

Drones Still Going Open Source 30 / 31

Page 73: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Parrot SLAM.dunk▶ Development Kit for Autonomous Flight▶ Tegra K1▶ Stereo Cameras and sensors▶ Ubuntu Desktop▶ ROS support

Drones Still Going Open Source 30 / 31

Page 74: Drones Still Going Open Source...Drones Still Going Open Source Julien BERAUD October 12th 2016 - Embedded Linux Conference Europe Berlin Drones Still Going Open Source 1 / 31 Introduction

Conclusion

Questions ?

Drones Still Going Open Source 31 / 31