# A Practical and Effective Layout for a Safe Human-Robot Collaborative Assembly Task
## 3 Robot Control Strategy  
The robot tool center point (TCP) motion is planned by combining planar trajectories that trigger and terminate at strategical nodes. When the robot moves above the stations of the components from the pick zone to the collaborative zone, the TCP planned trajectory is planar at \(z=0.3\) m, where \(z\) is measured from the robot mounting table. To grasp or release the cubes, the robot follows a vertical path. The strategical nodes are defined as the intersection points between the plane \(z=0.3\) m and the vertical paths. For example, in Figure 5 the main directions of the robot planned trajectory in the collaborative zone are shown, together with the \(x\) and \(y\) axis of the robot base. Regardless of the cube to be placed, the robot approaches the collaborative zone always from point \(\mathbf{p}_{C}\), then it  
Figure 4: Experimental layout of the collaborative assembly cell. Figure 3: Task phases. navigates towards the station to be refilled. Once the component has been replaced, the robot drives backwards through the same path, returns in \(\mathbf{p}_{c}\), and leaves the collaborative zone. However, due to the human presence, the planned trajectory may deviate from the rectilinear paths. In fact, if the operator takes a component and gets close to the robot, which is going to replace another one, the risk of a collision occurs. Then, the robot planned trajectory is modified through the collision avoidance algorithm, which is discussed below. Each Kinect gives as output the position of 25 points on the human body. These points will be indicated hereafter as skeleton [30; 31]. The multiple sensors layout allows overcoming the problems related to occlusions of a single camera [10]. However, the use of multiple sensors shifts the attention into the data fusion problem. One of the common techniques developed to merge the raw data obtained from the sensors consists of using a predefined skeleton fitted model [32], while other techniques synthetize the skeletons generated by a couple of Kinects to better estimate the human joints position [33]. In the system proposed here, an optimization problem is solved to properly combine the two skeletons. Further information related to the skeletons merging process and to the spatial matching are reported in [19; 33]. The two PCs connected to the Kinect sensors work in a master-slave architecture. The PC-Master is responsible for the data acquisition synchronization of the sensors, sending a trigger signal to the PC-Slave. The skeleton obtained by the PC-Slave is then sent to the PC-Master, that manages the combination of the skeletons acquired by the two Kinects. The optimized skeleton is calculated with a frequency of 30 Hz. The optimized skeleton is one of the inputs of the collision avoidance algorithm. The control algorithm runs in the third PC, hereafter called PC-UR. This PC receives the skeleton from the PC-Master and feedback data of the robot from the controller of the UR3. The feedback data related to the robot are described in [34]. The collision avoidance algorithm is based on the artificial potential fields approach [12; 35; 36; 37] and permits avoiding collisions between the upper part of the human body and all the moving links of the robot. Repulsive velocities are associated to the operator and attractive velocities to the desired task. The repulsive and attractive velocities  
Figure 5: Planned trajectory in the collaborative zone. are then added up to obtain a resultant velocity, which is the output of the collision avoidance algorithm. In this way, the implemented control algorithm can modify the planned trajectory to move the robot away from the human operator, but the task is preserved and accomplished when human-robot collisions are no longer possible. Both the repulsive velocities and the attractive ones are calculated in the operative space.