# Measuring Quality of Service in a Robotized Comprehensive Geriatric Assessment Scenario
## 4 Implementation
### Software Architecture
#### 4.2.2 Software Agents in CLARC  
The PELEA agent is an instantiation of the Planning, Learning and Execution Architecture (PELEA) [18], which is in charge of providing the deliberative skills to the architecture. The Recorder agent manages an IP camera, which provides a stream of video for online supervision and also records the session for offline visualization.  
The different channels for patient-robot interaction are provided by the Speech, Panel and Remote Control agents. The Speech agent is in charge of generating the voice of CLARC from text using the Text-To-Speech (TTS) software provided by Microsoft Speech Platform SDK. This software is also used to recognize the answers of the patient with the help of specific grammars that are loaded for each question, in order to maximize recognition rates. The robot is currently able to interact with patients in French, English or Spanish. The verbal channel is enhanced by using a touchscreen on the torso of the robot [19]. The Panel agent manages the tactile interaction and the information shown in this touchscreen, which has been carefully designed for dealing with elderly people [20; 21]. The intense use of this quasi-vertical touchscreen forces the patient to adopt an uncomfortable position, not only because of keeping the arm extended, but also because the robot cannot be so close to the patient to avoid that s/he is continually approaching/moving away from the screen to touch it. Therefore, and in order to avoid this problem, we added a third element to the interface: an external device with large buttons (see Figure 3b) for answering the typical questions in a Barthel test, which is managed by the Remote Control agent.  
Figure 6: Unified representation of the Deep State Representation (DSR) as a multi-labeled directed graph. For instance, edges labeled as is_with or is_not denote logic predicates between nodes. On the other hand, edges starting at **world** and ending at **person** and **robot** are geometric and they encodes a rigid transformation (\(RT^{\prime}\) and \(RT\) respectively) between them. Geometric transformations can be chained or inverted to compute changes in coordinate systems (see text).  
All navigation and localisation are provided by the CogniDrive software running over the MIRA middleware ([[http://www.mira-project.org/joomla-mira/](http://www.mira-project.org/joomla-mira/)]([http://www.mira-project.org/joomla-mira/](http://www.mira-project.org/joomla-mira/))). The CogniDrive agent implements a bridge for connecting these software modules to our cognitive architecture.  
The Person agent is in charge of detecting and tracking the people in the environment of the robot. But this information is not sufficient for the Get Up & Go test. In this test, we need to capture and process the motion of the full body joints of the patient. The HMC agent implements a framework able to describe and evaluate human motion. The framework is based on parametric segmentation and evaluation of action primitives, requiring the complete gait to be perceived before evaluating it. Once the gait is captured the analytic nature of the algorithm allows producing fast responses. It has been successfully used for the autonomous evaluation of human gait in the Get Up & Go test (see [7] for further details). The Person and the HMC agents are connected to the WinKinectComp module. This module is in charge of capturing the preprocessed data provided by a Kinect sensor v2 (i.e., joints and face of the person).  
Details about the QoS Metrics Provider agent are given in the next subsection.