# TalkRoBots: A Middleware for Robotic Systems in Industry 4.0 +
## 4 Supervision and Monitoring Cloud Application  
The integration of robotic systems in real world applications generally needs interaction with operators that program and supervise the evolution of the tasks and the possible faults. TalkRoBots proposes a Cloud application implementing several functionalities including monitoring and controlling. In addition to this functionality available in other Robotic Cloud applications [31], TalkRoBots can schedule and affect tasks and offers a resilience mechanism to keep performing operations without interruption when a robot is failing. The most significant implemented functionalities are described below:  
Figure 6: Exchange between two embedded computers. * **Monitoring**: This functionality permits the operator to monitor the status of each robot and to obtain information about its embedded sensors and/or other data shared with its environment. * **Controlling**: Users can also control their robot, for example, moving them, through the Cloud interface, by only using a keyboard or a mouse. * **Tasks scheduling**: One of the most valuable functionality is the task scheduler. The latter is based on the association of capacities (e.g., mobile, fly and grab) and skills (moving forward, take off and grab left) to each robot. By skills, we mean basics or complex actions already individually implemented on the robot. Furthermore, once a sensor is plugged into the embedded PC's middleware, the robot connected to this middleware will acquire a new capacity that is offered by this sensor. For example, if we connect a temperature sensor, the robot will acquire the capacity of measuring the temperature. By performing this, this robot or another, could request the former and use this new available information to modify its behavior. In our experimental scenario, we pick up a box with an UR3 robot on the right or on the left side depending on the temperature's value. Using the task scheduler, we can define a scenario and organize these skills in whatever order we want. Once a scenario is defined, it will be sent to the first robot(s), which will participate in the scenario; then, it will be completely and autonomously shared between the different actors at each step. * **Resilience**: Another valuable functionality is the capability of handling a failure that occurs on one or several robots during a scenario. In fact, when a failure is detected, a faulty message is automatically sent from the embedded computer to the Cloud in order to alert the operator. Once this message is received, an algorithm is executed in order to compute the best alternative solution, guaranteeing the execution of the scenario. In the Industry 4.0 context, it is important that everything is under the operator's control; thus, the calculated solution can be set so that it either requires its validation or is executed automatically. This algorithm is executed in different steps. Firstly, it requests the database to identify potential candidates. For this, we select the robots that have the same ability or abilities needed to perform the task that cannot be performed by the broken robot. Once the potential candidates are obtained, a ranking algorithm is executed according to several criteria that can be defined by the operator in order to choose the optimal alternative, as depicted in Figure 7. For this purpose, an Artificial Intelligence (AI) algorithm, denoted Analytic Hierarchy Process (AHP) [6], was adapted and implemented in order to suit our needs. The AHP algorithm can be summarized in the following steps:
* Model the problem as a hierarchy containing the decision goal, the alternatives for reaching it and the criteria for evaluating the alternatives;
* Establish priorities among the elements of the hierarchy by making a series of judgments based on pairwise comparisons of the elements;
* Synthesize these judgments to yield a set of overall priorities for the hierarchy;
* Check the consistency of the judgments;
* Come to a final decision based on the results of the previous steps.