Real-time computing with Python
A talk for the SciPy 2006 Conference by Andrew Straw.
Abstract
Commodity computers continue to become ever faster, through increases in clock speed and now through addition of multiple processor cores. The ability to use these resources in a closed-loop scientific or engineering task enables new types of applications with greatly reduced needs on specialized software and hardware. However, pre-emptive multitasking operating systems, which are now nearly ubiquitous due to many practical benefits, present a serious challenge to those who would employ computers in realtime tasks. A program's control of the CPU is non-deterministic. Associated with this is a perhaps-unexpected benefit: high-level languages such as Python, which were previously not useful for use in realtime systems due to non-deterministic features such as automatic garbage collection, now present virtually no additional complication beyond that imposed by a modern operating system. Here I will discuss three examples of real-time computational tasks from my own research and that of colleagues in which we dealt with these issues at several timescales. First is a hard realtime motor control system which uses RTAI/Linux to acheive sub-millisecond precision for analog input and motor command output. Second is the Vision Egg, a software library for display of complex graphics in realtime for visual neuroscience applications. Finally, I present an experimental apparatus which tracks the position and orientation freely flying animals in realtime using multiple synchronized digital cameras. The issues of process scheduling, file IO, multi-threading, interfacing with hardware, presenting a user interface will be discussed in each of these examples.
You may download the slides from the talk.
Page last modified Sun Sep 28 19:11:40 2008.