The sphinx simulator project



Similar documents
Using Chroot to Bring Linux Applications to Android

Do Containers fully 'contain' security issues? A closer look at Docker and Warden. By Farshad Abasi,

Track One Building a connected home automation device with the Digi ConnectCore Wi-i.MX51 using LinuxLink

How do Users and Processes interact with the Operating System? Services for Processes. OS Structure with Services. Services for the OS Itself

Example of Standard API

Firebird on Linux. Author: Philippe Makowski IBPhoenix Licence: Public Documentation License Date:

Virtual Machines.

Architecture (SOSP 2011) 11/11/2011 Minsung Jang

Reminders. Lab opens from today. Many students want to use the extra I/O pins on

A Transport Protocol for Multimedia Wireless Sensor Networks

An Introduction to Android

Overview of CS 282 & Android

Parrot Bebop Drone FAQ s

Wave Relay System and General Project Details

Lecture 1 Introduction to Android

Linux Kernel Namespaces (an intro to soft-virtualization) kargig [at] GPG: 79B B8F6 803B EC C E02C

Android Basics. Xin Yang

BUSINESS PROTECTION. PERSONAL PRIVACY. ONE DEVICE.

Lightweight Virtualization. LXC containers & AUFS

Chapter 14 Virtual Machines

Crosswalk: build world class hybrid mobile apps

Building Embedded Systems

Fast remote data access for control of TCP/IP network using android Mobile device

VMware Server 2.0 Essentials. Virtualization Deployment and Management

Embedded Linux development training 4 days session

IOTIVITY AND EMBEDDED LINUX SUPPORT. Kishen Maloor Intel Open Source Technology Center

Module I-7410 Advanced Linux FS-11 Part1: Virtualization with KVM

Review from last time. CS 537 Lecture 3 OS Structure. OS structure. What you should learn from this lecture

ELCE Secure Embedded Linux Product (A Success Story)

Safety measures in Linux

ANDROID LEVERED DATA MONITORING ROBOT

Embedded Linux development with Buildroot training 3-day session

CS 528 Mobile and Ubiquitous Computing Lecture 2: Android Introduction and Setup. Emmanuel Agu

Objectives. Chapter 2: Operating-System Structures. Operating System Services (Cont.) Operating System Services. Operating System Services (Cont.

New Technology Introduction: Android Studio with PushBot

Features. The Samhain HIDS. Overview of available features. Rainer Wichmann

Stacey D. Son Consultant/SRI International. BSDCan Developer s Summit 15-May-2013

Android Development. Lecture AD 0 Android SDK & Development Environment. Università degli Studi di Parma. Mobile Application Development

EXPLORING LINUX KERNEL: THE EASY WAY!

Some Experiences With Python For Android (Py4A) Nik Klever University of Applied Sciences Augsburg

Overview. The Android operating system is like a cake consisting of various layers.

ZooKeeper. Table of contents

Devops n the Operating System! John Willis Director of Ecosystem Development! Docker, Inc.

Android Architecture For Beginners

Android Virtualization from Sierraware. Simply Secure

System Software Integration: An Expansive View. Overview

Compilers and Tools for Software Stack Optimisation

Embedded Linux Platform Developer

Chapter 2 System Structures

An Introduction to Android. Huang Xuguang Database Lab. Inha University

Course Project Documentation

Extending Tizen Native Framework with Node.js

A Look through the Android Stack

CSE 237A Final Project Final Report

Running a Program on an AVD

Mobile Phones Operating Systems

Introduction to Android

HotZone. Theory of Operations Configuration Management

The Case for Device Namespaces

ReactOS is (not) Windows. Windows internals and why ReactOS couldn t just use a Linux kernel

Open Source Encrypted Filesystems for Free Unix Systems

file://d:\webs\touch-base.com\htdocs\documentation\androidplatformnotes52.htm

APPLICATION VIRTUALIZATION TECHNOLOGIES WHITEPAPER

CELLS A Virtual Mobile Smartphone Architecture

Docker : devops, shared registries, HPC and emerging use cases. François Moreews & Olivier Sallou

City of Dublin Education & Training Board. Programme Module for. Mobile Technologies. leading to. Level 6 FETAC. Mobile Technologies 6N0734

Developing And Marketing Mobile Applications. Presented by: Leesha Roberts, Senior Instructor, Center for Education Programmes, UTT

Business Protection. Personal Privacy. One Device. Enhanced Security for Your Network and Business Intelligence.

Analysis of advanced issues in mobile security in android operating system

What is SDN (Software Defined Networking) and Openflow? SDN/OF Part of Kernel / SoC to provide security, steering & monitoring

CARRIOTS TECHNICAL PRESENTATION

DEVELOPING MOBILE APPLICATIONS USING ANDROID

Linux Kernel Architecture

Kerrighed / XtreemOS cluster flavour

The Case for SE Android. Stephen Smalley Trust Mechanisms (R2X) National Security Agency

Università Degli Studi di Parma. Distributed Systems Group. Android Development. Lecture 1 Android SDK & Development Environment. Marco Picone

Deep Inside Android. OpenExpo Zurich September 25 th, Gilles Printemps - Senior Architect. Copyright 2007 Esmertec AG.

Multi-Operating Environment System

WIND RIVER SECURE ANDROID CAPABILITY

Mellanox Academy Online Training (E-learning)

Best Practices on monitoring Solaris Global/Local Zones using IBM Tivoli Monitoring

Unit 1: INTRODUCTION TO ADVANCED ROBOTIC DESIGN & ENGINEERING

SAMSUNG SMARTTV: HOW-TO TO CREATING INSECURE DEVICE IN TODAY S WORLD. Sergey Belov

A Network in a Laptop: Rapid Prototyping for So7ware- Defined Networks

Research and Design of Universal and Open Software Development Platform for Digital Home

Intro to Docker and Containers

kvm: Kernel-based Virtual Machine for Linux

Software development. Development requirements. Java. Android SDK. Eclipse IDE (optional)

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

System Structures. Services Interface Structure

RhoMobile Suite. Develop applications for the next generation of business mobility

About This Document 3. Integration and Automation Capabilities 4. Command-Line Interface (CLI) 8. API RPC Protocol 9.

Professional Xen Visualization

An Introduction to OSVR

Operating System Structures

Lightweight Virtualization with Linux Containers (LXC)

Технологии Java. Android: Введение. Кузнецов Андрей Николаевич. Санкт-Петербургский Государственный Политехнический Университет

REDEFINING THE ENTERPRISE OS RED HAT ENTERPRISE LINUX 7

Tizen Web Runtime Update. Ming Jin Samsung Electronics

Transcription:

The sphinx simulator project Nicolas CARRIER April, 6, 2016 The sphinx simulator project 1 / 32

Presentation The problem Overview Features Limitations Architecture Firmwared The firmwares Gazebo Conclusion The sphinx simulator project 2 / 32

The problem Parrot: Builds wireless devices since 1994, bluetooth, WiFi... First commercial drone, the AR.Drone in 2010 Linux based drones, custom distribution Located in the center of Paris Problem: No accessible zone to fly drones How to develop something like flight plans? How to test big drones? Flying wings? The sphinx simulator project 3 / 32

Overview Sphinx: French word for the death head hawk moth It s the one which flies, not the one which asks questions Means Simulator Project Hopefully Implemented for Next Xmas Originally an internal tool for development / automatic testing Team created in february 2015, first usable release in fall The sphinx simulator project 4 / 32

Features 1/3 Based on gazebo Mostly open-source (more on that later) Allows to test nearly original Parrot drone firmwares There ll always be a Next Xmas -> no deadline missed, never The sphinx simulator project 5 / 32

Features 2/3 Support for Bebop, Bebop 2, Rolling Spider, Disco Partial support for our top secret future drones Integration of WiFi, Bluetooth Uses exprtk, for easier models tweaking Support for multiple drones in the same simulation Seamless use for any controller above the SDK Even for autonomous tests in Jenkins CI servers The sphinx simulator project 6 / 32

Features 3/3 Used for: Development of new features (flightplan), debug Fine-tune our drone control algorithms Autonomous regression tests Manual validation tests Discussions ongoing for a public release for app developers One day for the training of our FPV racing team? Who knows... The sphinx simulator project 7 / 32

Limitations Runs on Linux only Firmware adaptations are not trivial but things are getting simpler as we support more and more drones Not strictly the original firmware Not fully deterministic The sphinx simulator project 8 / 32

Architecture 3 main parts Gazebo + some custom plug-ins A firmware, adapted and recompiled for x86 / amd64 Firmwared (https://github.com/ncarrier/firmwared-manifest) The sphinx simulator project 9 / 32

Architecture The sphinx simulator project 10 / 32

Presentation Firmwared Presentation Control OverlayFS Namespaces AppArmor The firmwares Gazebo Conclusion The sphinx simulator project 11 / 32

Presentation System daemon responsible of spawning instances of drones firmwares. Firmware s programs run as if they were on a target root privileges... Implements containers by hand for a basic isolation Chroot on overlayfs Namespaces Apparmor Firmwares ext2 filesystem images or a final directories (more on that later) Multiple instances can be spawned from a single firmware Open-source (see Parrot-Developer s github) The sphinx simulator project 12 / 32

Control Driven by a named unix socket Uses libpomp (https://github.com/parrot-developers/libpomp) Marshalling API with an a-la-printf protocol Two clients: shell: fdc based on pomp-cli, complete C++ gazebo plug-in: fwman The sphinx simulator project 13 / 32

Example $ fdc prepare firmwares /.../final... the firmware garrulous_bellatrix has been created $ fdc prepare instances garrulous_bellatrix... the instance tremulous_nevena has been created $ fdc start tremulous_nevena... The sphinx simulator project 14 / 32

OverlayFS An RW layer on top of an RO one (the rootfs) The RO layer is preserved and can be the rootfs produced by the compilation (final dir) an ext2 image, produced from the final by Alchemy the RW layer contains the diff on the file system, due to the execution: can be used for postmortem analysis The sphinx simulator project 15 / 32

OverlayFS The sphinx simulator project 16 / 32

Namespaces Unshare some global resources to protect their access from inside an instance Network namespace No impact on the host s networking An interface can be stolen for the instance (WiFi AP) Pid namespace Renumbering of processes, starting from 1 in the namespace Our init process (fork of Android s) runs as if on target Mount namespace No access from the host to the instance s mount points No access from the instance to the host s mount points All mounts are automatically unmounted when the namespace is destroyed (read: when the instance s pid 1 dies) The sphinx simulator project 17 / 32

AppArmor Some other global resources are still shared AppArmor allows to restrict their access, for example: Capabilities (sys_time, hahem...) Filesystem entities (/dev/mem, /proc/sysrq-trigger, hahem...) Uses a shell-like glob syntax => we managed to use it! The sphinx simulator project 18 / 32

Presentation Firmwared The firmwares Content Gazebo Conclusion The sphinx simulator project 19 / 32

Content 1/2 Our build system is Alchemy Produces a full root fs: the staging (with symbols, headers...) Produces a stripped down rootfs for use on target: the final From this final, firmware images are produced, in plf, ext2, tar.gz... Firmwared can use directly a final directory or an ext2 image The sphinx simulator project 20 / 32

Content 2/2 The firmware s variant used in the simulator has: Different hardware access code (IPC with gazebo) Different startup / initialization sequence (not the same hardware ) All the rest of the code is (or can be...) the same Pros: No kernel level development Negligible impact on performances Cons: Not the exact same code and code path as a real firmware Maintenance burden (2 variants of one firmware) The sphinx simulator project 21 / 32

Other methods Full virtualization High impact on performances Drivers using IPCs with gazebo would be needed Qemu transparent emulation: incomplete (netlink) Pseudo-hardware in the loop Soft runs on hardware with IPCs via IP No recompilation, same code with runtime adaptations, but lot of work and not the same code paths anyway Latency and throughput problems (e.g. video) gzserver needs to run on target Hardware in the loop It s the holy grail: test the real firmware on a desktop Forces to develop an hardware device per sensor / actuator Not so hard for a gpio, but for a camera sensor? High cost for first version My bet (and hope) is: we will come to it The sphinx simulator project 22 / 32

Presentation Firmwared The firmwares Gazebo Overview Plug-ins Simulation description Conclusion The sphinx simulator project 23 / 32

Overview Gzserver simulates a world, including models with physical interactions Plug-ins system world, model and gui Gzclient optional client for real-time opengl visualization Open-source, C++ XML description (sdf) of simulation and models We use a modified gazebo 7 with some added features, given back to the project The sphinx simulator project 24 / 32

Plug-ins Model plug-ins: One per sensor / actuator IPC with gazebo: named socket no IP overhead abstract sockets blocked by netns for now all of them use iio / libiio World plug-ins: fwman: client controlling firmwared aerodynamic wind Gui plug-in: shake: gui plugin for Disco s take off sequence The sphinx simulator project 25 / 32

World files Normal sdf files References the fwman plugin Include no drone models, but reference to the firmwares used The sphinx simulator project 26 / 32

Drone model files Sdf files + xinclude for factoring e.g. same body, different hulls Embedded inside the firmware this way, firmware and model are kept in sync References the actuators and sensors plug-ins The sphinx simulator project 27 / 32

Simulation description Analysis of a world Analysis of a model The sphinx simulator project 28 / 32

Presentation Firmwared The firmwares Gazebo Conclusion The sphinx simulator project 29 / 32

Demonstration The sphinx simulator project 30 / 32

Ongoing and potential work Ongoing: Video support Advanced vision features, follow me... RC support Potential: Visual feedback for leds HIL? (finger crossed!) The sphinx simulator project 31 / 32

Thank you for your attention The sphinx simulator project 32 / 32