# Human-Robot Collaboration: An Augmented Reality Toolkit for Bi-Directional Interaction
## 1 Introduction  
The base concept of the Industry 4.0 paradigm is the development of autonomous technologies involving robots working in close collaboration with human operators [1, 2]. [PERSON] proposes a classification of the autonomy level of robots by assigning value 1 to the case of _computer offers no assistance_ and value 10 to the totally autonomous case of _computer decides everything and acts autonomously, ignoring the human_[3]. At the intermediate levels, Human-Robot Collaboration (HRC) is involved, requiring the adoption of collaborative robots, called cobots [4]. A key point of collaborative robotics is the information exchange, which can be uni-directional if the cobot communicates with the human or vice versa, or bi-directional if a two-way stream is established. More in detail, the human shall be able to know the status of the cobot and predict in real time its intentions and, on the other side, she/he shall give instructions and commands to the cobot to proactively change and adapt the execution of its tasks. Effective bi-directional HRC can be developed by introducing interfaces on Virtual Reality (VR) or Augmented Reality (AR) environments, which can allow human operators, without particular experience or knowledge in robotics, to easily interact with cobots. As reported in [PERSON] et al. [5], several studies have shown that the use of AR improves the task efficiency and the HRC [6]. This work proposes an AR application, designed for HoloLens 2 [7], which can be used in various research areas--industrial research in particular. This project is built on that proposed in [8], but, whilst in [8] the architecture provides only one-way communication between the robot Franka Emika Panda [9] and the human operator, here it has been extended by allowing the human operator to actively interact with the cobot, giving it inputs and commands. The development software for HoloLens 2 is Unity [10], while the data from the cobot and the command to it are managed by ROS (Robot Operating System) [11]. The communication between HoloLens 2 and ROS is achieved through the ROSsharp library [12]. The platform guarantees the exchange of data related to the status and the intention of the cobot in real time during the task execution within the Head-Mounted Display (HMD). Moreover, it is possible to assign a trajectory to the robot end-effector by grabbing and moving its hologram towards the final position in the AR environment. The user can show the robot workspace in the AR and verify that both the final position and the trajectory way-points are the expected ones. The cobot workspace can be also visualized giving feedback to the operator in terms of robot end-effector reachability. The hologram of the cobot workspace is displayed in red color if the operator places the end-effector hologram outside of the reachable area: a visible warning asks the user to move the end-effector to a reachable position. Conversely, the workspace hologram is colored green if the position of the end-effector hologram is inside the reachable area. Once the end-effector hologram is released in a feasible position, the desired trajectory is computed and then visualized in AR for the operator validation: she/he can further modify it dragging the displayed way-points in a different position, e.g., to avoid obstacle collisions. Hence, a ROS node interpolates the new way-points by using a spline and the computed trajectory is shown. Finally, the operator can command the cobot to track the desired trajectory. The adoption of AR has many benefits for effective human-robot interaction. Following the taxonomy in [13], the purposes of the proposed application can be categorized as:  
1. Facilitate Programming;
2. Improve Safety;
3. Communicate Intent. In fact, the whole platform is designed for a human operator in strict contact with a cobot and represents a tool for tackling industrially relevant robotic tasks that require human-robot interaction.