Abstract
We present in detail some of the challenges in developing reusable robotic software. We base that on our experience in developing the CLARAty robotics software, which is a generic object-oriented framework used for the integration of new algorithms in the areas of motion control, vision, manipulation, locomotion, navigation, localization, planning and execution. CLARAty was adapted to a number of heterogeneous robots with different mechanisms and hardware control architectures. In this paper, we also describe how we addressed some of these challenges in the development of the CLARAty software.
Keywords
Introduction
Within the NASA robotics community, and possibly within the research community, the majority of robotic software is designed and built from scratch for each new robot. To date, it may have been easier and more cost effective to do so. However, as robotic software gets more complicated and the time and effort to build reliable software increases, it becomes more important to develop reusable robotic software.
Over the past decade, NASA, through its Mars Technology Program, developed a series of rovers to mature new algorithms for planetary surface exploration. The Jet Propulsion Laboratory (JPL) developed the Rocky series, where its fourth generation culminated in the successful Sojourner rover that landed on Mars in 1997. Following that, JPL developed the FIDO series that was the precursor to the Mars Exploration Rovers (MER), Spirit and Opportunity, which landed in 2004.
NASA is interested in a reusable robotic framework to reduce the cost of integrating and testing of new capabilities that are developed at various institutions. JPL started the research and development of reusable robotic software back in 1996 with the development of the Rocky 7 rover. The first generation reusable software was developed using a component architecture based on ControlShell (Volpe, 1997). The Rocky 8 software was, then, adapted to this architecture. Due to limitations for supporting additional platforms and to find commonality in the development of robotic software among other centers, we developed the
Given the heterogeneity of the NASA research rovers, it was incumbent upon us to provide a framework that did not require the redesign of existing hardware. Additionally it was necessary to support legacy algorithms with significant investments.
While much of the context of this work focuses on robotic capabilities for planetary exploration, many of the challenges and approaches are more generally applicable.
Related Work
The development of general software architectures remains an active area of research in robotics (Coste-Maniere, 2000). Much of the effort focuses on hierarchical or layered architectures although there is disagreement over how to decompose the hierarchy. In the past, research focused on spatial or temporal hierarchies (Albus, 1991) and behavioral hierarchies (Brooks, 1986). More recently, the focus has been on functional decomposition into different layers implemented with data structures and algorithms specialized for particular classes of functionality (Coste-Maniere, 2000). The most popular of such approaches is the three-tiered architecture (Bonasso, 1997) that features a declarative planning layer, a procedural real-time behavioral layer, and an intermediate executive layer that mediates between the two. CLARAty decomposes robotic software into two layers: a decision layer and a functional layer. This approach is similar to the three-tiered architecture except that the planning and execution layers are combined in order to provide much tighter coordination between generation and execution of plans. A second difference between CLARAty and the three-tiered architecture is that CLARAty's robotic functionality can be accessed at different levels of abstraction. A somewhat different two-layered approach is CIRCA (Musliner, 1993) in which a planner/scheduler periodically creates and downloads policies to be executed in hard real-time by a reactive control system. Unlike the hierarchy used in CLARAty's Functional Layer, the reactive layer in CIRCA has no internal structure, which makes it difficult to implement complex behaviors.
Other efforts in the robotics community aim at standardizing interfaces to robot hardware and among control processes. Probably the most visible effort is the Joint Architecture for Unmanned Systems (JAUS, 2005), which aims at providing standardized message passing interfaces for all of the military's unmanned vehicles. JAUS was initially developed by the Department of Defense to ensure interoperability among a family of Unmanned Ground Vehicles. Similar to CLARAty, JAUS defines interfaces that are independent of the integrated technology or the specific hardware platforms. While the goals of JAUS are similar to those of CLARAty, the approaches have significant differences. The JAUS architecture uses a single-level message-set, while CLARAty uses a multi-level abstraction model.
Another effort that provides abstractions for robotic devices is Player/Stage (Gerkey, 2003). Player/Stage is a device server that provides a flexible interface to a variety of sensors and actuators. It is based on a client/server model that uses socket-based communications. As a result, information exchange between components requires a serialization scheme, which can incur a significant cost for resource-constrained robots. Additionally, the current Player abstractions only address a limited set of capabilities primarily geared towards controlling commercial-off-the-shelf robots with simple mobility mechanisms.
The Foundation for Intelligent Physical Agents (FIPA) is a similar effort in the world of multi-agent systems. Unlike CLARAty, both FIPA and Player/Stage focus on the form of the interfaces and less on their content. They are also aimed mainly at lower-level control, whereas CLARAty tries to address a more complex functional hierarchy.
More recently, there have been several other related efforts driven by similar needs. We will only list two: The OROCOS project (OROCOS, 2005), which provides both hard real-time services and class libraries for robotic applications; and the OSCAR project (OSCAR, 2005), which uses a similar object-oriented decomposition to that of CLARAty for analysis, control, and simulation of manipulators.
Challenges
Developing reusable robotic software is difficult primarily due to the variability in robotic platforms. Initially, one may assume that by concretely defining the content and rate of information flow among the various subsystems, one establishes a plug-and-play robotic architecture. While defining the information and its flow is necessary, it is not sufficient. Both the content and pathways of the information flow change with various device and system configurations, as well as with different application programs. Hence, the flow of information among sub-systems has to be both flexible and efficient. To reuse software components across a wide range of systems, it is also important that components of a robotic system make no assumptions about their operational platforms. Therefore, it is necessary to share configuration, kinematic, and dynamic information among components.
This section presents four major challenges that stem from trying to: (i) control heterogeneous robots, (ii) integrate and interoperate new capabilities, (iii) adjust access levels, and (iv) implement a generic framework. In the next section, we will present some of the approaches that we used in CLARAty to overcome these challenges. The list of challenges below is not intended to be exhaustive, but rather characteristic of the key challenges that we faced in standardizing the development of robotic software.
Control Heterogeneous Robots
Because there are no standard robotic platforms, any reusable framework must be sufficiently flexible to address the variations in robots. Robotic systems present challenges due to differences in their
The first challenge comes from

The CLARAty Architecture
Because of this physical variability, these robots possess different capabilities. Fully-steerable (omni-directional) rovers can move laterally (crab) while partially-steerable (car-like) rovers have to use parallel parking maneuvers to obtain the same result. For software to interoperate across such platforms, it has to provide a generic interface that handles these constraints.
When crafting a generalized interface, it is often the case that neither the union of all possible capabilities nor the intersection of such capabilities (least common denominator) is satisfactory. The solution often lies somewhere in between. In some cases, it is necessary to split the interface into two distinct units and lose the ability to interoperate between the two. This occurs when it is necessary to highlight the differences between platforms rather than their commonality. Trying to find the single unified interface can sometimes lead to undesirable over generalizations.
The second challenge comes from
The third challenge comes from
In addition to these challenges that are found in both custom designed robots as well as commercial-off-the-shelf robots, components that comprise a robotic system continue to change. Image acquisition subsystems changed from analog cameras with centralized framegrabbers to distributed digital cameras connected to FireWire or USB buses. Despite this, reusable robotic software must be sufficiently flexible to support such variations or rapidly adapt the software to handle them.
The integration of algorithms is perhaps one of the most challenging elements in developing reusable robotic software. The challenges stem from trying to integrate algorithms that use
The first challenge is in the
The second challenge stems from
Another issue is with limitations of architectural frameworks. Consider, for instance, a framework that does not time-stamp measurements collected from various devices. Now consider an algorithm that collects data asynchronously and requires time-stamped measurements. If the underlying framework does not support time-stamped measurements, we have an architectural mismatch. Similar situations occur when an algorithm requires high bandwidth information that may not be available for certain platforms. Diagnostic and health monitoring software often requires information about all aspects of the system at all times, which in many cases, may be limited or not possible.
The interoperation of algorithms necessitates components that produce a similar output even though they may use different underlying technologies. The challenge is to provide a framework in which a developer can work on an individual technology component and see how it interacts with a complete robotic system, without having to understand the entire system.
Adjust Access and Control Levels
In any complex system, it is important to be able to access and independently test each subsystem. Characterizing the performance of individual subsystems requires a modular architecture that provides access at various levels of the architecture. Also, interfacing with other systems requires adaptations at different levels of granularity. This section covers both
With respect to back-end access, consider the FIDO rover, which uses a central processor for the control and coordination of its motors. The software framework must provide functionality for the servo control and trajectory generation for all motors. In this case, the interface to hardware occurs at the low-level of digital and analog I/O. However, in systems such as Rocky 8 or Rocky 7, which use micro-controllers for servo control and trajectory generation, the interface to hardware occurs at a higher level through communication with motor controllers.
Providing multi-level access also benefits interfacing the control software with simulation. Some simulations may not have the level of fidelity to simulate real hardware. In such cases, a higher-level interface would be necessary and appropriate. There are other cases where a higher-level interface is desirable to explore a larger set of scenarios without having to go through smaller steps of motion simulation. For example, an interface between the control and simulation software at the locomotion level bypasses the lower level control and simulation of actual wheel motions.
With respect to front-end access, client applications may need to access the system at different levels at different times. For example, if the robotic arm has on-board autonomy for path planning, then one uses the high-level interface to define goal locations. However, in other situations where the arm has to be tele-operated, one needs to interface to lower-level motor velocities.
Implement a Generic Software Framework
Another major challenge stems from the inherent complexity and multi-disciplinary nature of the robotics domain. Developing robotic capabilities for real systems is quite hard, but doing so with an overarching objective of supporting new platforms and algorithms that are not known a priori is a real challenge. This process requires developers with both a depth of knowledge in robotics and breadth of experience and skills in the field.
Developing a cross-cutting generic framework requires continuous refactoring of common elements across multiple disciplines. There are shared capabilities among the vision, mobility, and manipulation domains. They all require coordinate transformations, math libraries, and information about the mechanisms they control. Similarly, the science analysis and vision domains share abundant image processing infrastructure.
To keep the complexity of systems manageable, and to simplify the testing and maintenance of the various packages, it is important to reduce code duplication as much as possible across domains. This raises the question of when it is appropriate to encapsulate an algorithm vs. to refactor it using a common software framework. The decision is often influenced by nontechnical factors involving the nature of the technology, the expertise necessary to re-implement the algorithm, the return of investment, and the long-term plan to support the algorithm as part of a common framework. Because any reusable robotic system is doomed to become enormous, it is strongly desirable to make the code repository complementary rather than duplicative.
To support the integration of multiple algorithms and to support the adaptations of the framework to various robot platforms, it is necessary to have development tools and processes that support modularity. Without the ability to check out and build parts of the generic robotic repository, it becomes too unwieldy to use. The repository tools will eventually need to be integrated with the build system in order to dynamically check-out and configure the system using different implementations of a given functionality. For instance, consider rover navigation that can use one of three algorithms for estimating the rover pose: a wheel odometry pose estimator, a visual odometry pose estimator, or multi-sensor pose estimator. Depending on the desired configuration, the software check-out and build will be different for each of the three configurations. Automated tools are necessary to manage this process.
In addition, there are many challenges in software engineering that any generic framework for robotics will have to address. No matter what the approach is used in the design, issues related to the flexibility, scalability of the approach, simplicity but not simplistic, extendibility, and long-term maintainability can only be judged over time. The challenge is to find the delicate balance among the above elements.
Address other Challenges
Numerous other challenges remain in the development of a unified and reusable robotic framework, but it will suffice, here, to point to a few more. Some of these challenges include: dealing with system states especially ones that reside in hardware controllers where there is a cost associated for retrieving state information; logging of information at all levels; dealing with measurement uncertainties; dealing with differences in data flow models among platforms; dealing with multiple clients; supporting real-time operations; addressing abstract time for real and simulated platforms; and addressing distributed computation. There are several additional social factors such as getting user buy-in, managing contributions from a distributed developer base, capturing feedback from the user community, and providing documentation, training and support.
CLARAty
CLARAty is a reusable robotic software framework to enable the integration of new capabilities onto various platforms. We designed CLARAty to address the above challenges in software interoperability for rovers and manipulation platforms. CLARAty defines standard interfaces at different levels of abstractions for various devices and robotic algorithms. It also provides candidate implementations for each algorithm as a starting point, though many algorithms were contributed through a competed program by robotic developers at universities and NASA centers. In addition to interfaces and algorithms, CLARAty also provides adaptations of its device abstractions to custom and standard hardware and robotic platforms. The CLARAty code base is designed with a modular structure to enable users to check out and work with only the parts of the software that meets their needs. The majority of the software is developed using object-oriented C++.
In the following subsections, we will address the aforementioned challenges in an order that facilitates the description of some elements of CLARAty.
Approach
Because it is not realistic to expect a standard robotic platform any time soon, it becomes necessary to develop a software framework that would deal with the variability outlined in the previous section. To do so, we analyzed in detail several existing robotic architectures and legacy implementations of several NASA robots, including Rocky 7, Rocky 8, FIDO, K9 and Dexter. We also investigated the interactions between declarative model-based reasoning and these architectures.
To meet the flexibility requirements for
We architected the functional layer to use a multi-level abstraction model with polymorphic interfaces to address the
To address challenges in
A Multi-level Abstraction Architecture
The system is designed with abstractions at various levels from the low-level device abstractions to high-level functional abstractions. At the lowest levels are device abstractions that get adapted to various platforms. These include analog and digital I/O, motor, IMU, camera, and spectrometer abstractions. At higher levels are abstractions that integrate various lower-level abstractions. Examples of these abstractions include locomotor, manipulator, pose estimator, navigator, and rover. Higher-level abstractions provide interfaces for different robotic algorithms. A more detailed description of the architecture and class abstractions can be found in Nesnas (Nesnas, 2003).
In addressing
To operate the software on real and simulated platforms and to support “what if” planning scenarios, we separate mechanism models from their controls. To address the
One of the main features of CLARAty is its ability to
Autonomous navigation, which provides obstacle avoidance capabilities for mobile robots, uses many of the lower level capabilities, such as vehicle locomotor, point cloud sources, local and global path planners, and pose estimators. First, a generic interface was designed that allows higher levels to invoke the navigation functionality in the same way, regardless of what algorithm is actually being used or which rover is being controlled. This “navigation” interface basically indicates goal points (or, more generally, goal regions) that the robot must reach. Navigation algorithms are then adapted to this framework to accept input from the CLARAty point cloud source and command the rover using the vehicle locomotor, a generic interface to a wide range of supported rovers. More fundamentally, however, navigation algorithms that were adapted to CLARAty all had to be extended to plan generically for different rovers. For instance, the algorithms all need to know the maximum steering angles to determine how tight turns can be made and the size of the rover to determine what distance between obstacles constitutes a safe passage. This was accomplished with the mechanism model described above. In addition, to support the Morphin algorithm (Urmson, 2003), the mechanism model class can perform a kinematic simulation of the rover. This enables the algorithm to integrate costs along the rover's path without having to know explicitly how the rover moves. In current work, Carnegie Mellon is developing navigation algorithms that take vehicle dynamics into account, and we expect to extend the mechanism model to support dynamical simulation, as well.
On the various
Empirical Results
We have developed autonomous end-to-end rover capabilities such as autonomously placing an instrument on a target selected from 10 meters away. Such capability integrates visual tracking of the designated target using multiple rover mounted cameras while navigating to the target location; assessing the safety of the target region; properly positioning the rover relative to the target for instrument deployment; deploying and placing the robotic arm that carries the science instrument on the target; acquiring the scientific data and simulating a downlink to Earth.
We have deployed and extensively tested CLARAty on half a dozen robotic platforms. Fig. 1 shows a subset of these platforms, which include the custom Rocky 8, FIDO, Rocky 7, and K9 rovers, as well as the ATRV Jr. commercial platform. These platforms have different mobility mechanisms and wheel configurations as well as different sensor suites, manipulators, end effectors, processors, motion control architectures and operating systems. In addition to these real-platform adaptations, we have also adapted CLARAty to operate with the high-fidelity ROAMS rover and terrain simulator (Jain, 2004).
A large number of complex algorithms have been integrated into CLARAty and deployed on the above platforms. For autonomous navigation, we have integrated the GESTALT algorithm that is driving the MER rovers today on the Martian surface, the Morphin algorithm that GESTALT was based on, and the Drivemaps algorithm. In each case, the original implementation had to be modified and generalized in relatively minor ways to fit the CLARAty framework. For rover pose estimation, we have adapted five algorithms including the Sojourner algorithm (Mishkin, 1998), the MER pose estimator algorithm, and an algorithm that integrates all sensing modalities (Roumeliotis, 2002). These algorithms all require data from different sensors, including wheel encoders, gyroscopes, IMUs, sun sensors and stereo cameras. We also integrated three stereo vision implementations and several algorithms for visual tracking, visual odometry, sensor-based manipulation, path planning, science analyses, activity planning, and scheduling. Many of these have been tested on multiple platforms and as part of end-to-end capabilities.
Conclusion
Developing reusable robotic software presents many challenges. These challenges stem from variability in robotic mechanisms, sensor configurations, and hardware control architectures. They also stem from integrating new capabilities that use different representations of information or that have architectural mismatches with the reusable framework. We found that multi-level abstraction models, object-oriented methodologies and design patterns go a long way to address the extensive variability that is encountered in today's robotic platforms. We have learned that over-generalizing interfaces makes them harder to understand and use. There is a delicate balance between flexibility and simplicity. Performance cannot be compromised for the sake of flexibility and the least common denominator solution is often unacceptable. It is necessary to have flexible development environments, tools, and regression tests. Reusable software products and processes have to be well documented. It would be highly desirable to standardize robotic hardware but that may not be feasible today.
Footnotes
6. Acknowledgments
We would thank NASA's Mars Technology Program for their vision and support. We would also like to acknowledge the contributions of former principal investigator Richard Volpe, former lead engineers Anne Wright and Max Bajracharya, and current and former developers: Wonsoo Kim, Hari Nayar, Stergios Roumeliotis, Babak Sapir, Chris Urmson, Richard Petras, Dan Clouse, Randy Sargent, Ron Garrett, Marsette Vona, Caroline Chouinard, and Darren Mutz. The work described in this paper was carried out at the Jet Propulsion Laboratory, California Institute of Technology, NASA Ames Research Center, and Carnegie Mellon under a contract to the National Aeronautics and Space Administration.
