Technology for a better society 1 Hard real‐time sensor platform for: MSPIL (Mobile Sensor Platform Innovation Lab) AMOS (Autonomous Marine Operations and Systems) AUV (Autonomous Underwater Vehicle) UAV (Unmanned Aerial Vehicle) Linux Xenomai UAV Sensor platform. IDI 2015‐05‐19 Terje Frøysa Strategic Institute Projects (SIP)
15
Embed
Linux Xenomai UAV platform. · How can tasks migrate between the Linux and Xenomai domains? • Derives real‐time threads from regular Linux tasks through standard POSIX API. •
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Obtaining real‐time by introducing• A micro kernel module.• An interrupt pipeline.• A real‐time device driver standard (RTDM).
Technology for a better society 5
Xenomai evolutionIDI 2015‐05‐19
Xenomai 2 dual‐core
Xenomai 3 Cobalt dual‐core
Xenomai 3 Mercury single‐core
RTAI
Preemptive Linux
2001
Technology for a better society 6
Xenomai system callsIDI 2015‐05‐19
VxWorks applicationlibvxworks glibc
VxWorks skin
VxWorks syscalls Xenomainucleus
Regular LinuxSub‐system(I/O,VM..etc)
Linux syscalls
I‐pipeinterposition
: User space: Kernel space
• Xenomai offers API skins to allow porting applications from other RTOS without rewriting.
• Xenomai libraries are equivalent to glibc but the calls are routed to the proper skin emulator.
• Xenomai intercepts the regular Linux system call dispatcher by means of the I‐pipe.
Technology for a better society 7
Xenomai and ADEOSADEOS (Adaptive Domain Environment for Operating System) / I‐pipe• A Linux kernel patch• A resource virtualization layer.• Allows Xenomai and Linux to run on the same hardware platform.• Introduces the event pipeline, a chain of domains (OS'es) of decreasing priority.
IDI 2015‐05‐19
Interrupts& Traps (kernel events)
Xenomaidomain
Lowest priority
Linux (root)domain
Domain events
Event flow pipeline
InterruptShield
Virtual irq mask
Technology for a better society 8
Software for sensor data delivery• GPS: 1Hz GPIO interrupts relates delivered data (UART) to time‐line.
Sensordvr
dvr
irq SensorTask
ConsumerTask
DynamicsModel(Kalman‐Filter)
Sensordvr
dvr
irq SensorTask
Sensordvr
dvr
irq SensorTask
Buf1
Buf2
Buf3Buffer Adm
inistratorBuf1
Buf2
Buf3Buf1
Buf2
Buf3
dvr
dvr
dvr
Actuators
IDI 2015‐05‐19
• IMU: ≤450Hz GPIO interrupts relates delivered data (SPI) to time‐line.
• Gyro‐meter: ≤ 8Hz GPIO interrupt relates data (I2C) to time‐line.• Magnetometer: ≤ 8Hz • Barometer/Altimeter: ≤ 200Hz GPIO interrupts relates data (I2C) to time‐line.• Swarm Radio: TBD…10Hz ?
dvr Swarm Radio
Technology for a better society 9
Sensor interfacing at test
• RTDM drivers for sensor GPIO interrupts for precise registration of irq timing.• Standard Linux UART driver• Standard Linux I2C driver• Modified Linux SPI driver (sub‐optimal and requires kernel queues for array transfer)
IDI 2015‐05‐19
Sensor Frq. Interface Speed Payload
GPS 1 Hz UART 115 Kb/s 678 bytes
Gyro Ca. 4 Hz I2C 400 Kb/s 14 bytes
Magnetometer Ca. 4 Hz I2C 400 Kb/s 6 bytes
Barometer Ca. 1 Hz I2C 400 Kb/s 5 bytes
IMU 200 Hz SPI 746 Kb/s 78 bytes
No RTDM drivers found for BeagleBone Black interfaces.Have to use standard Linux drivers (for now).
CPU PID CLASS PRI TIMEOUT TIMEBASE STAT NAME0 0 idle -1 - master R ROOT/00 3069 rt 60 - master W baro_task0 3070 rt 50 - master W gyro_task0 3071 rt 50 - master W gps_task0 3072 rt 70 - master W imu_task0 3073 rt 40 20ms368us master D consume_task
The standard Linux SPI driver does not meet the requirements of the IMU sensor.
Technology for a better society 15
IDI 2015‐05‐19
Thank you!
Does the sensor platform provide hard real‐time?Linux Xenomai will most probably provide sufficient hard real‐time for an UAV sensor platform.With proper RTDM drivers it would perform even better.