hexagon mineprotect personal alerthexagon mineprotect personal alert: how nuttx can save lives nuttx...

15
Hexagon MineProtect Personal Alert: How NuttX can save lives NuttX 2019 International Workshop - July 17, 2019 Markus Bernet & Johnny Billquist

Upload: others

Post on 19-Mar-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Hexagon MineProtect Personal AlertHexagon MineProtect Personal Alert: How NuttX can save lives NuttX 2019 International Workshop - July 17, 2019 Markus Bernet & Johnny Billquist 3

Hexagon MineProtect

Personal Alert:

How NuttX can save lives

NuttX 2019 International Workshop - July 17, 2019

Markus Bernet & Johnny Billquist

Page 2: Hexagon MineProtect Personal AlertHexagon MineProtect Personal Alert: How NuttX can save lives NuttX 2019 International Workshop - July 17, 2019 Markus Bernet & Johnny Billquist 3

Confidential2

Page 3: Hexagon MineProtect Personal AlertHexagon MineProtect Personal Alert: How NuttX can save lives NuttX 2019 International Workshop - July 17, 2019 Markus Bernet & Johnny Billquist 3

Confidential3

• What is Personal Alert?

• Why is NuttX used for this project?

• Leveraging POSIX compliance

• Software architecture

• Simulation framework

• Conclusions

Outline

Page 4: Hexagon MineProtect Personal AlertHexagon MineProtect Personal Alert: How NuttX can save lives NuttX 2019 International Workshop - July 17, 2019 Markus Bernet & Johnny Billquist 3

Confidential4

Page 5: Hexagon MineProtect Personal AlertHexagon MineProtect Personal Alert: How NuttX can save lives NuttX 2019 International Workshop - July 17, 2019 Markus Bernet & Johnny Billquist 3

Confidential5

Safety Technology Portfolio

Monitoring and Analytics

Wi-Fi

LTE

PersonalAlert

Fatigue

Vision

Page 6: Hexagon MineProtect Personal AlertHexagon MineProtect Personal Alert: How NuttX can save lives NuttX 2019 International Workshop - July 17, 2019 Markus Bernet & Johnny Billquist 3

Confidential6

HxGN MineProtect Personal AlertTag

• Wearable battery-powered device

• Ultra-Wideband (UWB) time-of-flight (ToF)

measurements & comms with anchors

• Wearer alerted through LEDs, vibration and

buzzer

Anchor

• Permanently mounted to a vehicle

• Communicating via UWB link with tags

• Communicating via CAN bus with main unit

Main unit

• Processing of ToF measurement data

• Alerting of vehicle operator

• Back-to-base communications for

reporting/analysis

Tag

Anchor

Page 7: Hexagon MineProtect Personal AlertHexagon MineProtect Personal Alert: How NuttX can save lives NuttX 2019 International Workshop - July 17, 2019 Markus Bernet & Johnny Billquist 3

Confidential7

How does HxGN Personal Alert work?

▪ Uses Time-of-Flight (ToF) UWB technology

on a two-way ranging

▪ Precise distance measurement between

vehicles and pedestrians

▪ Configurable zones provide awareness and

protection in case of imminent danger

▪ Faced with imminent danger, pedestrians

are now empowered to act, regardless of the

machinery operator

Blind spots around a typical Haul Truck

Page 8: Hexagon MineProtect Personal AlertHexagon MineProtect Personal Alert: How NuttX can save lives NuttX 2019 International Workshop - July 17, 2019 Markus Bernet & Johnny Billquist 3

Confidential8

Highly Configurable Protection Zones

Distance Far Visual

Distance Near

Distance Close

Vibration

Audible

Visual

Visual

Visual

Visual

Visual

Audible

Cabin Detection Zone

▪ Highly configurable to prevent nuisance alarms, and meet safety requirements

User Interfaces

Page 9: Hexagon MineProtect Personal AlertHexagon MineProtect Personal Alert: How NuttX can save lives NuttX 2019 International Workshop - July 17, 2019 Markus Bernet & Johnny Billquist 3

Confidential9

Hardware architecture

Tag Anchor

uP

STM32F303

UWB radio

DecaWave

DW1000

Inputs

(UI,

Sensors)

Outputs

(Alerting,

Status)

Battery +

Charging +

Power Mgmt

uP

STM32F405

UWB radio

DecaWave

DW1000

CAN

Power Mgmt

Page 10: Hexagon MineProtect Personal AlertHexagon MineProtect Personal Alert: How NuttX can save lives NuttX 2019 International Workshop - July 17, 2019 Markus Bernet & Johnny Billquist 3

Confidential10

Software architecture

• Simple, clean interfaces between

modules

• Each module has its own internal

pthreads

• Usage of POSIX standard features

for synchronization and data

exchange:

• message queues

• semaphores

• signals

Page 11: Hexagon MineProtect Personal AlertHexagon MineProtect Personal Alert: How NuttX can save lives NuttX 2019 International Workshop - July 17, 2019 Markus Bernet & Johnny Billquist 3

Confidential11

Why NuttX for this project?

• Personal Alert is time-critical, e.g. UWB ranging has hard real-time requirements

→ RTOS to the rescue!

• Multiple RTOSes have been evaluated

• And the winner was… NuttX!

• The most comprehensive RTOS among our candidates

• Many features not used here, but highly interesting for follow-up projects:

e.g. network stack, wear-leveling file system

• The only RTOS offering POSIX compliance

• Small footprint

• Open-source, BSD license

• Simple build process

Page 12: Hexagon MineProtect Personal AlertHexagon MineProtect Personal Alert: How NuttX can save lives NuttX 2019 International Workshop - July 17, 2019 Markus Bernet & Johnny Billquist 3

Confidential12

Leveraging POSIX compliance

• Application can be run under NuttX on embedded target and under Linux

• Implementing, debugging and testing application code under Linux

→ huge development speed-up

• Plenty of documentation for POSIX APIs available online

• Unit testing under Linux is straightforward

• Application code can be integrated in a Linux-based simulation framework

Page 13: Hexagon MineProtect Personal AlertHexagon MineProtect Personal Alert: How NuttX can save lives NuttX 2019 International Workshop - July 17, 2019 Markus Bernet & Johnny Billquist 3

Confidential13

• Run multiple instances of our application under Linux

• Hardware-related functionality is mocked• e.g. UWB communication is replaced by a

message broker based on POSIX message queues

• C code is integrated in a Python simulation framework• Allows easy scripting of scenarios in

Python

• Multiple application instances (“devices”) are wrapped as Python objects

• Used CFFI (C Foreign Function Interface) for C/Python interface

Simulation framework

Page 14: Hexagon MineProtect Personal AlertHexagon MineProtect Personal Alert: How NuttX can save lives NuttX 2019 International Workshop - July 17, 2019 Markus Bernet & Johnny Billquist 3

Confidential14

Conclusions

• NuttX was a very good choice for this project

• Leveraging NuttX functionality greatly reduced implementation effort compared to

previous bare-metal projects

• Product has been successfully launched with multiple customers

• NuttX also selected for our follow-up project which is much more involved than

Personal Alert

• Currently 6 developers working on NuttX-based application development

• Started porting our changes to the NuttX master branch

Page 15: Hexagon MineProtect Personal AlertHexagon MineProtect Personal Alert: How NuttX can save lives NuttX 2019 International Workshop - July 17, 2019 Markus Bernet & Johnny Billquist 3