Device Abstraction Layer
An important part of any robot with meaningful purpose is its suite of sensors. Apart from sensors that are required for navigation, most robots also contain other sensors that serve the robot’s main purpose, be it surveillance, monitoring of industrial processes, or other responsibilities. Accessing all these sensors in a robust way is a tedious process that requires many man-hours of programming work. Furthermore, because even very similar sensors from different vendors typically have differing programming interfaces, using multiple sensors in one robotic vehicle often is cumbersome work that lacks elegance and simplicity.
Abstracting from the low-level details and peculiarities of each individual device, the Device Abstraction Layer library provides unified access to sensors and actuators of the vehicle, independent of their individual transfer protocols. It defines a sensor hierarchy where the top-level classes are all pure interfaces, which allows for flexible and generic access to sensor features.

Fig. 1: Object-oriented class hierarchy of some device classes
Generic buffering of sensors’ data and flexible means of accessing buffered data greatly reduces requirements on system performance and latency. Most sensors have more-or-less fixed intervals in which they provide new data; however, different sensors typically have differing time intervals, and trying to combine values from multiple different sensors, so that they can be treated as one data set, can be a tedious and error-prone process. In the Device Abstraction Layer library, sensor values are stored together with timestamps of their acquisition; the timestamps then allow for time-based retrieval of sensor values.

Fig. 2: Sensor data from different sensors arrives in different intervals
The buffering is implemented as a conceptual ring buffer with additions for overflow and underflow detection, sequential as well as random access, and interpolation of values. Interpolation uses a flexible and extensible template-based approach; custom interpolation policies can be combined with custom search policies, in order to retrieve the value from the buffer that best matches the timing requirements as well as the individual sensor’s properties. This makes synchronization of multiple sensors manageable even on non-realtime systems.
Additionally, a set of C++ classes for different coordinate systems (such as World Coordinates, Robot Coordinates, Sensor Coordinates and Map Coordinates) as well as transformations between them is supplied, making the handling of coordinate systems not only manageable, but also type-safe.

Fig. 3: Different coordinate systems used for robotic applications
The library is continuously extended with new sensor implementations. Close cooperation with the individual sensors’ vendors makes sure that the device query is as robust and efficient as possible. Naturally, it is possible to create own implementations for other sensors not yet in the library, building upon the generic features described above.




