
Chapter 4. Implementation 47
4.2. Software Basics
The next sections cover the implementation of the three ROS Nodes: gateway driver, device
manager and visualization. In order to improve the general understanding, this section provides a
short introduction of the used software and the Qt signal/slot mechanism.
All nodes are implemented in C++ using the following external software:
QT framework: Qt is a multi lingual, cross-platform application and UI framework. It covers
that many fields of application that except the software listed below, no other third-party
programs had to be used. Of particular interest is the signal and slot concept, which allows
thread-safe data exchange within the different objects of the software. Used version: 4.81
QextSerialPort: A multi-platform library for serial port communication. Since it is based on the
Qt framework, it can be easily integrated using its signals and slots. Used version: 1.2 beta1
QtCreator: An IDE from the QT SDK, which is specially designed for use with the QT framework.
It was chosen to speed up the development and for convenience, as it offers functions such
as debugging, auto completion, graphic designer tools and many more. Used version: 2.5
ROS Fuerte: The latest ROS release. For more information, go to section 2.4.2 on page 23.
The signal/slot mechanism is a central feature of Qt. It is used for communication between objects
and consists of signals and slots. Similar to ROS topics, it provides a type safe, decoupled and
many-to-many data exchange method, but only within a single program. A signal is emitted when
a particular event occurs and if it is connected to a slot, the slot will be called and executed.
Qt widgets offers many predefined signals and slots, such as the close()-signal, when a window
is closed, or the click()-signal, when a button is pressed. However, they are usually sub-classed
to add custom slots that allow handling signals the user is interested in. Slots are normal C++
functions which can be called normally; their special feature is that signals can connect to them.
Data can be exchanged by passing parameters or accessing a predefined common storage.
Please note, the different .msg and .srv files of each node are listed in appendix A on 71.
4.3. Gateway driver
The gateway driver is the first abstraction level in our abstraction model (figure 3.3 on page 29).
It aims to provide a unified interface between ROS and the gateways WifiCtrl and MiniCtrl, so that
other nodes can communicate with HA hardware through ROS topics. The gateway is hidden by
the gateway driver, consequently no knowledge about its exact communication process is required.
That allows connecting multiple gateways over ROS as well as linking different gateway types.
Comentarios a estos manuales