# Collaborative Robotics: Enhance Maintenance Procedures on Primary Flight Control Servo-Actuators
## 3 Critical Aspects Related to the Automatic Adjustments Procedures
### Mechanical-Related Challenges
#### 3.1.3 EHSA Reference Frame Definition  
As in [15], to assure a fast and straightforward setup, in case of changes in the mounting configuration between the robot and the servo-actuator, a relative reference  
Figure 6: (a) Effect of the fastening of the two safety screws on the servo-actuator ram position; (b) Picture taken with the camera mounted on the UR10 tool flange of the hexagonal screw and the two safety screws connected to it. frame has been defined. All the waypoints on the servo-actuator have been saved, not according to the robot base reference frame, but to the one defined on the fixture itself. To reduce human error and to avoid the need for technicians with robot programming skills, an automatic definition of the EHSA reference frame, with respect to the robot base (\({}^{\text{B}}\mathbf{A}_{\text{EHSA}}\)), has been adopted using the camera as in Figure 7a. This information is the result of the multiplication of three 4 \(\times\) 4 roto-translation matrices: \({}^{\text{B}}\mathbf{A}_{\text{EHSA}}={}^{\text{B}}\mathbf{A}_{\text{TCP}}\), \({}^{\text{TCP}}\mathbf{A}_{\text{CAM}}\), \({}^{\text{CAM}}\), \({}^{\text{CAM}}\), \({}^{\text{CAM}}\), \({}^{\text{CAM}}\), which define, respectively, the relative position between the actual Tool Center Point (TCP) and the robot base (\({}^{\text{B}}\mathbf{A}_{\text{TCP}}\)), between the camera and the TCP (\({}^{\text{TCP}}\mathbf{A}_{\text{CAM}}\)) and the EHSA with respect to the camera (\({}^{\text{CAM}}\mathbf{A}_{\text{EHSA}}\)). Since Universal Robots uses the axis-angle convention [21] to describe the TCP pose (\(x\)\(y\)\(z\)\(r_{x}\)\(r_{y}\)\(r_{z}\)) with respect to the robot base frame, \({}^{\text{B}}\mathbf{A}_{\text{TCP}}\) is built as:  
\[{}^{\text{B}}\mathbf{A}_{\text{TCP}}=\left[ \begin{array}{ccc}h_{x}\cdot h _{x}\cdot(1-c_{\alpha})+c_{\alpha}&h_{x}\cdot h_{y}\cdot(1-c_{\alpha})-h_{z} \cdot s_{\alpha}&h_{x}\cdot h_{z}\cdot(1-c_{\alpha})+h_{y}\cdot s_{\alpha}&x\\ h_{x}\cdot h_{y}\cdot(1-c_{\alpha})+h_{z}\cdot s_{\alpha}&h_{y}\cdot h_{y} \cdot(1-c_{\alpha})+c_{\alpha}&h_{y}\cdot h_{z}\cdot(1-c_{\alpha})-h_{x}\cdot s _{\alpha}&y\\ h_{x}\cdot h_{z}\cdot(1-c_{\alpha})-h_{y}\cdot s_{\alpha}&h_{y}\cdot h_{z} \cdot(1-c_{\alpha})+h_{x}\cdot s_{\alpha}&h_{z}\cdot h_{z}\cdot(1-c_{\alpha}) +c_{\alpha}&z\\ 0&0&1\end{array} \right] \tag{1}\]  
\[\text{where }\alpha=\sqrt{r_{x}^{2}+r_{y}^{2}+r_{z}^{2}};h_{x}=\frac{r_{x}}{ \alpha};h_{y}=\frac{r_{y}}{\alpha};h_{z}=\frac{r_{z}}{\alpha};c_{\alpha}=\cos{ \alpha}\text{ and }s_{\alpha}=\sin{\alpha}.\]  
On the other hand, for both \({}^{\text{TCP}}\mathbf{A}_{\text{CAM}}\) and \({}^{\text{CAM}}\mathbf{A}_{\text{EHSA}}\) the Roll-Pitch-Yaw (RPY) convention has been adopted, leading to:  
\[{}^{\text{TCP}}\mathbf{A}_{\text{CAM}}=\left[ \begin{array}{ccc}c_{\varphi} \cdot c_{\theta}&c_{\theta}\cdot s_{\varphi}\cdot s_{\theta}-s_{\theta}\cdot c _{\varphi}&c_{\theta}\cdot s_{\varphi}\cdot s_{\theta}+s_{\theta}\cdot c_{ \varphi}&x_{\text{CAM}}^{\text{TCP}}\\ s_{\theta}\cdot c_{\varphi}&s_{\theta}\cdot s_{\varphi}\cdot s_{\varphi}+c_{ \theta}\cdot c_{\varphi}&s_{\theta}\cdot s_{\varphi}\cdot c_{\varphi}-c_{ \theta}\cdot s_{\varphi}&y_{\text{CAM}}^{\text{TCP}}\\ -s_{\varphi}&c_{\varphi}\cdot s_{\varphi}&c_{\varphi}\cdot c_{\varphi}&z_{ \text{CAM}}^{\text{TCP}}\\ 0&0&0&1\end{array} \right] \tag{2}\]  
where \(x_{\text{CAM}}^{\text{TCP}}\), \(y_{\text{CAM}}^{\text{TCP}}\), \(z_{\text{CAM}}^{\text{TCP}}\), \(\psi\), \(\varphi\), and \(\theta\) are, respectively, the translation and rotation coordinates of the camera reference frame according to the one of the TCP of the tool currently mounted on the robot arm, as reported in Figure 8. Ideally, according to the mounting configuration adopted, the rotations of the camera, with respect to the Tool Center Point, should be null.