When Hard Realtime Matters: Software for Complex Mechatronic Systems Berthold Bäuml and Gerd Hirzinger Institute of Robotics and Mechatronics DLR – German Aerospace Center berthold.baeuml@dlr.de Dokumentname > 23.11.2004
Mechatronic Systems “Mechanics in the loop” o demands hard realtime o (= short latencies and determinism) to prevent injury and damage ! o Dokumentname > 23.11.2004
New Level of Complexity complex single robotic component o (DLR-Hand-II: 13DOF, 100 sensors) compound systems with tightly interacting parts o (Justin: 43 DOF, 250 sensors) rates of up to 3kHz over all DOF o (up to 10kHz in next generation) sophisticated control algorithms o (e.g. gravity compensation, impedance) tight coupling to non-realtime modules for o user interaction, perception and planning Heterogenous team of experts developing software (~ 10 members) o Iterative, flexible and adaptive development flow (esp. for research prototypes) o Challenges: “modern” software paradigms for complex systems: o modularity (“component based software engineering”) o concurrent execution (“services”) o distributed execution (“multi core, multi CPU, networked clusters”) o but under hard realtime constraints. o Dokumentname > 23.11.2004
“Decentral net of functional blocks and communication links” Software concept has to provide Software concept has to provide an abstract, functional view an abstract, functional view and the mapping to a concrete hardware setup. Edit input camera dev vision GUI dev Compile device Debug Linux/ world model … 3D path planning EC Windows viewer Linux Monitoring Linux Configuration Linux Linux QNX JC (3x) TC PC ipol invkin torso dev 0.3ms 1ms 1ms 3ms 6ms JC (7x) AC arm dev collision cartesian 0.3ms 1ms avoidance impedance state 3ms VxWorks 1ms machine CPU 1 CPU 2 JC (3x4x) FC (4x) hand hand dev dev 1ms 1ms ipol invkin 1ms 1ms VxWorks REALTIME Dokumentname > 23.11.2004
Robot Middleware ORCA (Brooks et al. 2005) used in mobile robotics MARIE (Cote et.al. 2004) soft realtime in the 100Hz range MIRO (Utz et al. 2002) Player (Vaughan et al. 2003) MS Robotics Studio WindowsXP -> non realtime, WindowsCE ? (msdn.microsoft.com/robotics OROCOS hard realtime, >500Hz for two 6DOF arms (www.orocos.org) more complex systems, distributed computation ? OpenHRP RT-Middleware, based on CORBA (Kanehiro et al. 2004) in applications hard realtime part in monolithic modules with proprietary communication MCA used in humanoid robots ARMAR (www.mca2.org) hard realtime on one node, but TCP/IP YARP used in complex robots like “Domo”, but there the hard realtime parts (Metta et al. 2006) run on DSP boards supports QNX and based on ACE -> distributed hard realtime execution possible ? MIRPA hard realtime, distributed execution performance when many DOF ? Dokumentname > 23.11.2004
Pragmatic Approach None of the existing middleware concepts seemed to fit our main needs: o hard realtime, scalable computing resources, easy to use. How far can we go, when doing it as simple as possible ? o Hardware constraints ? o No ! D/A- and A/D-conversion in the robots o fast buses up to 1GBit/s to the robots o CPU clocks > 3GHz, Multi-Core and Multi-CPU o (e.g. Quad-DualCore Opteron >50GFLOPS) fast communication with low delay (1GBit: 1.5KByte in 15us) o configurable infrastructure: eg. switched Ethernet or P2P links o Dokumentname > 23.11.2004
Pragmatic considerations What is essential ? deterministic, concurrent execution o fast, deterministic communication o standarized interfaces for communication o mechanisms for system configuration, startup and shutdown o and what is not ? dynamic reconfiguration at runtime o higher levels of abstractions (e.g abstract “range sensor”) o What can we get from a realtime OS ? Processes o Shm on one PC o Fast, deterministic drivers to (multiple) network cards o What has to be done ourselves ? standardized interfaces o abstraction of distributed communication o system handling o Dokumentname > 23.11.2004
Implementation of aRD-concept (“agile Robot Development”) aRDnet-suite: lightweight (~3000 lines) 1. aRDnet-library (C/C++): implementation of block’s ports o ardnet block: bridge between blocks on different PCs o Dokumentname > 23.11.2004
input Edit camera dev vision GUI dev device Compile Debug world model Linux/ … 3D path planning EC Windows viewer Linux Monitoring Linux Configuration Linux Linux QNX JC (3x) TC PC ipol invkin torso dev 0.3ms 1ms 1ms 3ms 6ms JC (7x) AC arm dev collision 0.3ms 1ms cartesian avoidance impedance state 3ms VxWorks 1ms machine CPU 1 CPU 2 JC (3x4x) FC (4x) hand hand dev dev 1ms 1ms ipol invkin 1ms 1ms VxWorks REALTIME Dokumentname > 23.11.2004
input Edit camera dev vision GUI dev device Compile Debug world model Linux/ … 3D path planning EC Windows viewer Linux Monitoring Linux Configuration Linux Linux QNX JC (3x) TC PC ipol invkin torso dev 0.3ms 1ms 1ms 3ms 6ms JC (7x) AC arm dev collision 0.3ms 1ms cartesian avoidance impedance state 3ms VxWorks 1ms machine CPU 1 CPU 2 JC (3x4x) FC (4x) hand hand dev dev 1ms 1ms ipol invkin 1ms 1ms VxWorks REALTIME Dokumentname > 23.11.2004
Implementation of aRD-concept aRDnet-suite: lightweight (~3000 lines) 1. aRDnet-library (C/C++): implementation of block’s ports o ardnet block: (UDP)-bridge between blocks on different PCs o Unix-like hierarchical startup and shutdown of distributed system, o with detailed configuration of QoS for communication Matlab/Simulink-toolchain 2. standard tool for control design o Automatic code generation with RTW o Parallelizing with RTLab from OpalRT (www.opal-rt.com) o stubs for interfacing aRDnet-blocks o Dokumentname > 23.11.2004
input Edit camera dev vision GUI dev device Compile Debug world model Linux/ … 3D path planning EC Windows viewer Linux Monitoring Linux Configuration Linux Linux QNX JC (3x) TC PC ipol invkin torso dev 0.3ms 1ms 1ms 3ms 6ms JC (7x) AC arm dev collision 0.3ms 1ms cartesian avoidance impedance state 3ms VxWorks 1ms machine CPU 1 CPU 2 JC (3x4x) FC (4x) hand hand dev dev 1ms 1ms ipol invkin 1ms 1ms VxWorks REALTIME Dokumentname > 23.11.2004
input Edit camera dev vision GUI dev device Compile Debug world model Linux/ … 3D path planning EC Windows viewer Linux Monitoring Linux Configuration Linux Linux QNX torso dev arm dev state VxWorks machine CPU 1 CPU 2 hand dev VxWorks REALTIME Dokumentname > 23.11.2004
Implementation of aRD-concept aRDnet-suite: lightweight (~3000 lines) 1. aRDnet-library (C/C++): implementation of block’s ports o ardnet block: (UDP)-bridge between blocks on different PCs o Unix-like hierarchical startup and shutdown of distributed system, o with detailed configuration of QoS of communication links Matlab/Simulink-toolchain 2. standard tool for control design o Automatic code generation with RTW o stubs for interfacing aRDnet-blocks o Key decision: QNX for realtime and Linux for non-realtime (limited support for VxWorks and Windows) Dokumentname > 23.11.2004
Performance: aRDnet performance QNX-PC with Core2Duo, 2.8GHz roundtrip of packet of 1kByte size between two standalone blocks on one QNX-PC: 20us in worst case o on two QNX-PCs with ardnet-bridge (UDP) over P2P 1GB-Ethernet link: o 200us in worst case (160us on average) e e 1. send 1. send 2. rec 1GBit / UDP I I t t 4. rec 4. rec 3. send P P h h QNX QNX QNX Dokumentname > 23.11.2004
Performance: High Rate Simulink-HIL-setup: reading analog values and writing them to harddisk Rates > 50 KHz without drop-outs possible o At 30 KHz system overhead is less than 10 % cpu-time o world HD AD QNX Dokumentname > 23.11.2004
Dokumentname > 23.11.2004 Preliminary study for Two-Hand-Arm-System Applications: (July 2005)
e I 1kHz e e t I e P arm dev t t I h P t I h h P h e P t h Windows VxWorks/PPC Debug 1kHz e e I arm dev t t e Monitor P I I h h t Profile P e P h t h control Linux 1ms VxWorks/PPC 1kHz e e I hand dev t t P I h h e P t e h I t P h VxWorks/PPC 1kHz e e I hand dev t t P I h h switch e P t h (from VxWorks) QNX VxWorks/Intel Dokumentname > 23.11.2004
Dokumentname > 23.11.2004 Two-Hand-Arm-Torso Justin Applications: (May 2006)
input camera dev vision GUI dev device world model Linux/ 3D path planning EC Windows viewer Linux Linux Linux arm dev torso dev arm dev state machine CPU 1 CPU 2 hand dev hand dev QNX REALTIME Dokumentname > 23.11.2004
input camera dev vision GUI dev device world model Linux/ 3D path planning EC Windows viewer Linux Linux Linux arm dev torso dev arm dev state VxWorks machine Linux hand dev hand dev VxWorks QNX REALTIME Dokumentname > 23.11.2004
Dokumentname > 23.11.2004 Two-Hand-Arm-Torso Justin
Recommend
More recommend