A Brief History of Our Research in Task-Level Control Architectures
Reid Simmons, March 2001
Work on the Task Control Architecture (TCA) began in 1988, to support the Ambler six-legged walker (funded by NASA). TCA includes capabilities for both inter-process communications and task-level control. The inter-process communications features anonymous socket-based communication using TCP/IP that supports both publish/subscribe and client/server modes of message passing. TCA also supports automatic marshalling and unmarshalling of data based on a flexible format definition language. The language supports efficient transmission of all C primitive data types, as well as structures, pointers, and fixed and variable length arrays. All communications in TCA are routed through a central server, which can log all message traffic.
The task-level control portion of TCA includes capabilities for hierarchical task decomposition, task sequencing and synchronization, resource management, execution monitoring, and exception handling. TCA is based on a hierarchical representation of task execution called task trees. Task trees represent both the parent-child relationships between tasks, as well as temporal constraints between subtasks. TCA uses a library API to create task trees dynamically – TCA message handlers can send special "goal" and "command" messages that inform the central server to add new task tree nodes under the current node, and to add temporal constraints between nodes. The central server then dispatches tasks (i.e., sending out messages) when the temporal constraints are satisfied. User code can also terminate nodes, raise exceptions, and add new nodes dynamically. This provides a very flexible method for controlling the execution of tasks.
In 1990, Chris Fedor (who helped implement TCA) developed TCX, which is basically the communications infrastructure of TCA. TCX was used in a number of projects, most prominently Dante and the Beesoft mobile robot software (developed by Sebastian Thrun and colleagues at University of Bonn). TCX features peer-to-peer communications and a queue-based paradigm for messages. Jay Gowdy developed the IPT communications system for the UGV (Unmanned Ground Vehicle) program. IPT was implemented in C++ and had many of the same features of TCX. In the late 1990’s, Jorgen Pedersen developed the RTC (Real-Time Communications) package for robotic projects at the National Robotics Engineering Consortium (NREC). RTC featured very efficient message passing for real-time applications (including capabilities for shared memory communications). While it uses TCA-type format strings to describe data structures for automatic marshalling and unmarshalling, it does not allow passing of data structures with pointers or variable-length arrays.
In 1994, Reid Simmons developed the IPC (Inter-Process Communications) package for the NASA DS1 New Millennium mission. While, in the end, IPC was not actually used on DS1, it has since been used in numerous projects at CMU, NASA, DARPA, and elsewhere. As with TCA, IPC features efficient transmission of general C data types, anonymous publish/subscribe and client/server capabilities, and automatic marshalling and unmarshalling. IPC features both centrally routed messages (which can be logged and visualized using a graphical tool developed at CMU) and peer-to-peer communications. It has support for timers and much more flexibility for passing data messages, which trade off flexibility for efficiency. IPC runs under Linux, Windows, MacOS, SunOS, Solaris, IRIX, VxWorks, and several other operating systems. It also has a Lisp implementation, and a Java implementation is being contemplated. IPC is actively being supported and extended – a recent addition is a means of automatically generating format strings from XDR data structure definitions.
In 1997, under NASA funding, we began to develop TCM, a library of task-level control functions. TCM is a complete reimplementation, written in C++, of the TCA task-level control capabilities. Instead of having a central server that maintains the task tree representation and dispatches tasks (via message passing), TCM is a library that is linked into user code and maintains the task tree representation locally, dispatching tasks via callbacks. TCM also provides a much richer set of temporal constraints, including the ability to dispatch a task at a given time or at some period of time after another task completes. Currently, TCM is just single-threaded, but we have plans to implement true multi-tasking within the library.
In 1998, we began development of the Task Description Language (TDL), a superset of C++ that includes explicit syntax for task-level control capabilities. The objective was to facilitate writing task-level control programs by embedding such syntax in a language familiar to roboticists. One problem with TCA and TCM, which are both library-based, is that people typically need to be familiar with details of the API in order to use it, even for the simplest application. The design philosophy behind TDL was that simple things should be simple to encode, but that complex things should not be precluded. In particular, you can include as many, or as few, of the TDL capabilities in a program as needed. TDLC, a translator written in Java, transforms TDL code to pure C++, plus calls to a TDL and the TCM libraries. TCM and TDL have been used by a number of projects at CMU, NASA, and elsewhere. TCM and TDL were strongly influenced by other work in execution languages, including Erran Gat’s ESL (an extension to Lisp), James Firby’s RAPs, and Drew McDermott’s RPL.
Most recently (starting in 2000), we have been extending TCM to work in a distributed fashion. In particular, the idea is to distribute the task tree representation so that one process can add nodes to the task tree of another process, monitor the execution of tasks on other processes, handle exceptions raised by other processes, etc. The distributed version of TCM uses IPC to communicate between processes. We are currently extending the syntax of TDL to utilize these distributed capabilities (MTDL). The intention is to use MTDL for two CMU projects in heterogeneous, multi-robot coordination.