## 5 Robot Decision-Making and Task Planning
### Task Planner  
By carefully observing Figure 12, an insight regarding the flow of robotic actions required for the scenario is obtained. Specifically, the \(A_{Act}\) set involves all the robotic actions required to fulfil the robot's engagement to resolve a specific robotic task e.g., navigation, manipulation, grasp, release, etc. The \(A_{Com}\) set of actions is less invasive than the \(A_{Act}\) set and comprises the bidirectional communication planning required for the communication with the user supporting modalities such as dialogues, user interface displays, gestures and even notification with augmented reality. A detailed description of the communication planner of RAMCIP robot is thoroughly discussed in [41]. It is worth mentioning that the communication planner has been developed in a handheld device that comprised the human-machine interaction interface of the robot and the communication with the task planner performed through ROS bridge messages, thus passing the respective observations to the decision maker. The \(A_{Perc}\) set of actions corresponds to the monitoring components of the robot which trigger functionalities suitable for assessment of the current status of the human and the environment, such as human detection and tracking, actions interpretation and objects detection and recognition. It is revealed that this set of actions is passive, since the robot monitors the human and the environment, while the observations acquired from these actions are expected to alter the state of the domain.  
To this end, the task planner that has been developed is responsible for interacting with the decision-making component and executing the inferred actions. In more detail, the task planner continuously \"listens\" to the inferred actions \(A_{i}\) from the POMDP graph policy and plans the respective task \(T_{i}\) as a sequence of robotic skills, \(Skill=\{skill_{1},skill_{2},...,skill_{n}\}\) required for the execution of the selected robotic action. Upon the completion of the respective task, the task planner passes the observation \(\omega_{i}\) to the belief propagation policy in the decision maker and the system propagates to the next state. Particularly, for the communication between the decision maker and the task planner, depending on the current state, the POMDP sends action messages to the task planner, and the latter returns the outcome of the executed task in a form of observations required from the POMDP policy graph, thus updating, respectively, the belief state in Equation (10) in order to select the next best action. Each task \(T_{i}\) is organized in a dedicated set of perception and action skills _Skill_ required for each completion. Each \(skill_{i}\) is realized as an ROS action, the initialization and termination of which is triggered through the standard ROS architecture. Each one of the ROS functionalities implements a specific robot \(Skill_{i}\) (Figure 13). The outcome of each skill execution is coded and returned as observation \(\omega_{i}\) to the policy graph of the POMDP. Typically, low level observation outputs such as object pose detection, human's pose in the environment, robot localization etc, are handled internally for each ROS component and translated into higher level pass/fail observations to propagate the decision-making policy. Fail safe mechanisms are foreseen within the proposed cognitive architecture where each ROS node is accompanied with specific diagnostics and state reporting. However, the hardware components are not accompanied with the respective diagnostics functionalities and, thus, in case of a failure of a hardware component, the system does not enter from the monitoring into any other state. This is mainly due to the fact that the RAMCIP robot constitutes a prototype and in the future releases such issues once the hardware that will be stabilized will be resolved.