Meccanica dei robot Real-time systems A really short introduction Advanced automation digital control of motors Reliable control a computer must periodically give a setpoint to motors Control period can have high frequency (short control frame) ex: 0.1kHz - 1kHz in robot controllers Are we sure that the timing of a control loop is precise up to microseconds on a generic operating system? while () { } do_something(...) pause(...) 1
Conventional Operating Systems (OS) Non-multitasking (example: MS-DOS) Multitasking (example: Windows 7, Linux, etc.) Single CPU time sharing: prelative / cooperative /... Switching between tasks computation is automatic The moment of switching is not predictable! One task might eat too many CPU resources and slow others! (ex: antivirus, Windows automatic update, etc.) Consequences: PAUSE TIMING CANNOT BE PRECISE PERIODIC CONTROL FRAMES CANNOT BE PRECISE «not deterministic» Real-Time Operating Systems Hard-Real-Time (ex: Linux RTAI, Integrity,..) Precisely respect timing constraints Periodic switching between tasks computation is precise Deterministic operation If timing constraints cannot be satisfied it simply stops. Soft-Real-Time (ex: DirectX subsystem of Windows, for videogames) Tries to satisfy timing constraints statistically Errors in timing are tolerated, simply degradation of performance HARD REAL TIME IS NEEDED FOR SAFE CONTROL OF AUTOMATION 2
Windows CE + programming API very similar to Windows + graphical user interface (GUI) supported by default + GUI looks and feel is the same of Windows + examples, support - license cost - not widespread in very critical applications Ticket selling kiosks CNC controllers Linux RTAI + it is a patch of standard Linux + RT and non-rt tasks can co-exist + graphical user interface (GUI) in a normal (non-rt) task of Linux + free + up to very high control frequency! - difficult to learn? - support? forums, users, etc. Robot controllers Automation systems 3
Linux RT, Xenomai, etc. + it is a patch of standard Linux + RT and non-rt tasks can co-exist + graphical user interface (GUI) in a normal (non-rt) task of Linux + free + large user base + maybe simplier than RTAI? - support? (forums, users, etc.) Robot controllers Automation systems Hobby projects LynxOS (LynuxWorks) + based on Linux + user support from the LynuxWorks company + large set of tested HW drivers, examples, etc. - not free Aerospace Robots 4
WxWorks Pharlap Integrity QNX - Neutrino + custom RT operating systems + graphical user interface (GUI) as additional features/modules + good support (examples, etc.) + used in critical applications ex. airplanes - license price? - smaller user groups? Airplanes (Airbus, Boeing) Aerospace (Sojourner, Mars orbiter, etc.) Robots (ABB, Staubli, Kuka)... Footprint and embedding Memory footprint can be tailored down to few kb for extreme embedding system on board / system on chip, ex. ARM cpu. If internet services (http, ftp) and GUI are needed, memory footprint grows to many MB more powerful HW, ex. industrial PC. Note: embedded OS not necessarily RT, and viceversa Most RT OS available for different processor architectures Intel x86, ARM, MIPS, etc. Pay attention to: drivers for supported hw, and developing tools (IDE, compilers, examples) before choosing. 5