linux - the future for drones
TRANSCRIPT
![Page 1: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/1.jpg)
Linux - the future for dronesLucas De Marchi, IntelELCE 2015
![Page 2: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/2.jpg)
▪ Software developer
▪ Contributed to several open source projects
throughout the Linux stack
▪ Recently joined projects under the Dronecode
▪ Linux maintainer for Ardupilot
Who am I
![Page 3: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/3.jpg)
▪ Dronecode
▪ Hardware evolution
▪ Software evolution
▪ Handling the complexity and scaling
▪ Future
Agenda
![Page 4: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/4.jpg)
Dronecode
![Page 5: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/5.jpg)
“If you want to go quickly go alone,
if you want to go far go together”
![Page 6: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/6.jpg)
▪ 40+ members
▪ Composed of several projects, including
2 flight stacks
▪ Contributions to each of them increasing
Dronecode
![Page 7: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/7.jpg)
Ardupilot
Dronecode
![Page 8: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/8.jpg)
Hardware evolution
![Page 9: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/9.jpg)
Ardupilot
Hardware evolution
Pixhawk22015
![Page 10: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/10.jpg)
Hardware evolutionArdupilot - Linux Boards
It all started with a single board,
with a specific set of sensors in a daughter board:
BeagleBone Black + PXF cape
![Page 11: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/11.jpg)
▪ PXF 2014
▪ ErleBoard 2014
▪ BBBMini 2015
Hardware evolutionArdupilot - Linux Boards
▪ Navio/Navio+ 2014
▪ Raspilot 2015
▪ ErleBrain2* 2015
▪ VR Brain 5 LX* 2015
Expansion boards for BeagleBone Black
Expansion boards forRaspberry Pi
* Not merged yet
![Page 12: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/12.jpg)
Hardware evolutionArdupilot - Linux Boards
▪ Bebop
▪ Own HW and Linux stack
▪ MinnowBoard Max*
▪ Drone Lure with sensors
* Not merged yet
![Page 14: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/14.jpg)
Overview how a drone works
![Page 15: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/15.jpg)
Hardware/software evolution101 - How a drone actually works (simplified)
Flight stack
Accelerometer
Gyroscope
Barometer
Magnetometer
GPS
...
RC GCS APP Motor
Motor
Motor
Motor
...
ESC
I2C
/ SPI
UAR
T
UART / TCP / UDP
PWM
/ I2
C /
CAN
UAR
T / .
. .
![Page 16: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/16.jpg)
Hardware/software evolution101 - How a drone actually works (simplified)
Flight stack
Accelerometer
Gyroscope
Barometer
Magnetometer
GPS
...
RC GCS APP Motor
Motor
Motor
Motor
...
ESC
I2C
/ SPI
UAR
T
UART / TCP / UDP
Input Output
PWM
/ I2
C /
CAN
UAR
T / .
. .
![Page 17: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/17.jpg)
Hardware/software evolution101 - How a drone actually works (simplified)
Flight stack
Accelerometer
Gyroscope
Barometer
Magnetometer
GPS
...
RC GCS APP Motor
Motor
Motor
Motor
...
ESC
I2C
/ SPI
UAR
T
UART / TCP / UDP
PWM
/ I2
C /
CAN
Input Output
Filter EFK PID
Controllers ...
![Page 18: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/18.jpg)
Software evolution
![Page 19: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/19.jpg)
Software evolutionSensors
▪ From few samples per second to thousands
▪ Redundancy
▪ More complex sensors▪ Lidar
▪ Optical Flow
▪ Depth cameras
▪ Computer vision
![Page 20: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/20.jpg)
Software evolution“Low-level” flight stack
▪ Increasing accuracy (hence complexity) of
control algorithms▪ E.g. the move to EKF for AHRS
![Page 21: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/21.jpg)
▪ Photography
▪ Agriculture
▪ Survey / Mapping
▪ Inspection
▪ Deliveries
▪ Search and rescue
Software evolutionUsages - pushing the complexity
![Page 22: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/22.jpg)
Software evolutionOutcome
▪ Drones becoming smarter
▪ Intelligence inside vs outside
▪ Increased CPU and memory requirements
▪ Need to scale for more hardware platforms
![Page 23: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/23.jpg)
Handling the complexity and scaling
![Page 24: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/24.jpg)
Handling the complexity and scalingBoards in Ardupilot
▪ APM1 and APM2 are deprecated▪ Not enough RAM, flash and CPU anymore
![Page 25: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/25.jpg)
Handling the complexity and scalingSensors in Ardupilot
▪ Support for more sensors, different
manufacturers
▪ Linux boards becoming first class citizens▪ PX4-only features moving to common code
▪ Linux-only features starting to appear (existing
infrastructure in Linux)
![Page 26: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/26.jpg)
Handling the complexity and scalingWhen microcontrollers are not enough anymore
▪ Companion computer▪ Move complex tasks to a separate Linux board
▪ Move flight stack to a separate microcontroller
▪ Single board Linux solution▪ Both flight stack and other tasks on same board
![Page 27: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/27.jpg)
Handling the complexity and scalingWhen microcontrollers are not enough anymore
▪ Companion computer▪ Move complex tasks to a separate Linux board
▪ Move flight stack to a separate microcontroller
▪ Single board Linux solution▪ Both flight stack and other tasks on same board
This is the solution taken for the Linux boards currently supported in Ardupilot
![Page 28: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/28.jpg)
Handling the complexity and scalingSingle board Linux solution
▪ Realtime
▪ Offload specific part(s) of the stack▪ To separate microcontroller (even inside the SoC)
▪ To dedicated off-the-shelf hardware
![Page 29: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/29.jpg)
Handling the complexity and scalingSingle board Linux solution
1. Move single-digit µs precision off the CPU: PWM
output, RC decoding (PPM, SBUS, DSMX), tone
generator, etc.
2. Follow guidelines for RT tasks in Linux
3. Have the necessary buses exposed
4. Cheers your new Linux-based flight stack
![Page 30: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/30.jpg)
Future
![Page 31: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/31.jpg)
FutureScaling for new boards
▪ Support for new boards (LIVE “DEMO”)
▪ Make adding new boards easier and scalable▪ Runtime detection / configuration
▪ Different platforms
▪ Increased complexity
![Page 32: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/32.jpg)
FutureScaling for new sensors
Flight stack
Accelerometer
Gyroscope
Barometer
Magnetometer
GPS
...
RC GCS APP
I2C
/ SPI
UAR
T
UART / TCP / UDP
Input
Filter EFK PID
Controllers ...
![Page 33: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/33.jpg)
FutureScaling for new sensors
Flight stack (Ardupilot)
AccelerometerGyroscopeBarometerMagnetometerGPS
FiltersEKFPIDControllers
![Page 34: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/34.jpg)
FutureScaling for new sensors
AccelerometerGyroscopeBarometerMagnetometerGPS
Flight stack (Ardupilot)
FiltersEKFPIDControllers
I2C_CHARDEV SPIDEV TTYBus abstraction
Hardware
Sensor drivers
Linu
x ke
rnel
Use
rspa
ce
![Page 35: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/35.jpg)
FutureScaling for new sensors
AccelerometerGyroscopeBarometerMagnetometerGPS
Flight stack (Ardupilot)
FiltersEKFPIDControllers
IIOTTYSensor
abstraction
Hardware
Sensor HAL
Linu
x ke
rnel
Use
rspa
ce
Sensor drivers
Sensor drivers
![Page 36: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/36.jpg)
FutureScaling for new sensors
Pros:
▪ Several drivers already available
▪ Share testing with other platforms
(Linux desktop, Android)
▪ Reduce complexity on the flight stack
▪ Reduce overhead to communicate with
sensor: flight stack access data stream
Use kernel drivers (IIO subsystem)
Cons:
▪ Can't share driver with other platforms
(PX4 middleware / Nuttx)
▪ Harder to prototype new drivers
▪ Currently used sensors don't have
kernel drivers or don't have the right
interfaces
Middle ground: support both for separate buses
![Page 37: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/37.jpg)
▪ Linux boards to foster use of new algorithms
▪ New sensors
▪ Smarter autonomous drones
Futureaka dreams
![Page 38: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/38.jpg)
▪ Drones growing in application and capabilities
▪ Linux provides scaling at HW and SW levels
▪ Sharing parts with other projects improves code
quality and testability
Wrap-up
![Page 39: Linux - the future for drones](https://reader033.vdocuments.us/reader033/viewer/2022051717/58a2ebc41a28aba27f8b9301/html5/thumbnails/39.jpg)
Q&ALinks:Dronecode: http://www.dronecode.orgArdupilot: http://ardupilot.com/Contact: [email protected] Slides: conference site
drones-discuss mailing listhttp://diydrones.com Gitter SkypeIRC Mumble