# Towards Autonomous Bridge Inspection: Sensor Mounting Using Aerial Manipulators
## 3 Mathematical Model
### Kinematics  
The inertial frame is defined as \(L_{\mathrm{W}}\). The body-fixed frame \(L_{\mathrm{B}}\) is attached to the center of gravity of the UAV. The position of the UAV in the world frame is given with \(\mathbf{p}_{\mathrm{W}}^{\mathrm{B}}= \begin{bmatrix}x&y&z\end{bmatrix} ^{T}\in\), and the attitude vector is \(\mathbf{\Theta}= \begin{bmatrix}\phi&\theta&\psi\end{bmatrix} ^{T}\). Combining the position and attitude vectors defined the generalized coordinates of the UAV as \(\mathbf{q}_{\mathrm{B}}= \begin{bmatrix}(\mathbf{p}_{\mathrm{W}}^{\mathrm{B}}) ^{T}&\mathbf{\Theta}^{T}\end{bmatrix} ^{T}\in\mathbb{R}^{6}\). Written in a matrix form \(T_{\mathrm{W}}^{\mathrm{B}}\), the transformation contains both the position and orientation of the UAV obtained through an on-board sensor fusion or through an external positioning system (i.e., GPS). The notation \(T_{a}^{b}\in\mathbb{R}^{4\times 4}\) was used to denote a homogeneous transformation matrix between frames \(a\) and \(b\). A rigid attachment between the body of the UAV and the base of the manipulator \(L_{0}\) was considered, denoted with the transformation matrix \(T_{\mathrm{B}}^{0}\). The manipulator used in this work was a \(M=3\) degree-of-freedom (DoF) serial chain manipulator with the end-effector attached to the last joint. The DH parameters of the arm are given in Table 1. Using this notation, one can write a transformation matrix \(T_{0}^{ee}\) between the manipulator base and its end-effector as a function of joint variables \(q_{1},q_{2}\) and \(q_{3}\). For brevity, the expression for the entire matrix \(T_{0}^{ee}\) is left out and only the end-effector position and its approach vector equations are written using the well-known abbreviation \(\cos(q_{1}+q_{2}):=C_{12}\):  
\[\mathbf{p}_{0}^{ee}= \begin{bmatrix}a_{1}(C_{1}+C_{12})+d_{3}C_{123}\\ a_{1}(S_{1}+S_{12})+d_{3}S_{123}\\ 0\end{bmatrix} ,\mathbf{z}_{0}^{ee}= \begin{bmatrix}C_{123}\\ S_{123}\\ 0\end{bmatrix}  \tag{1}\] \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Joint** & \(\mathbf{\theta}\) & \(\mathbf{\mathit{d}}\) & \(\mathbf{\mathit{\alpha}}\) & \(\mathbf{\mathit{\alpha}}\) \\ \hline \(q_{1}\) & 0 & 0 & 0 & \(a_{1}\) \\ \(q_{2}\) & 0 & 0 & 0 & \(a_{1}\) \\ \(q_{3}\) & \(\frac{\pi}{2}\) & 0 & \(\frac{\pi}{2}\) & 0 \\ \(q_{4}^{*}\) & 0 & \(d_{3}\) & 0 & 0 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: DH parameters of the 3-DoF manipulator attached to the UAV. A virtual joint \(q_{4}^{*}\) is added to fully comply with the DH convention. Link sizes \(a_{1}\) and \(d_{3}\) are omitted for clarity. Putting it all together, the full kinematic chain of the aerial manipulator can be constructed as  
\[T_{\rm W}^{ee}=T_{\rm W}^{\rm B}\cdot T_{\rm B}^{0}\cdot T_{0}^{ee}, \tag{2}\]  
combining the fixed transformation \(T_{\rm B}^{0}\) with \(T_{\rm W}^{\rm B}\) and \(T_{0}^{ee}\) depend on UAV and manipulator motion. Since there is obvious coupling between the motion of the body and the manipulator arm, a \(\beta\in[0,1]\) parameter is introduced to distribute the end-effector motion commands either to the UAV global position control or manipulator joint position control. To this end, the following distribution relationship is used:  
\[\Delta\mathbf{P}_{\rm UAV} =\beta\cdot\Delta\mathbf{P}\] \[\Delta\mathbf{P}_{arm} =(1-\beta)\cdot\Delta\mathbf{P}, \tag{3}\]  
where \(\Delta\mathbf{P}\) is used to denote the desired aerial manipulator displacement expressed as the following combination body and arm motion:  
\[\Delta\mathbf{P} =\Delta\mathbf{P}_{\rm UAV}+\Delta\mathbf{P}_{arm}\] \[=\beta\cdot\Delta\mathbf{P}+(1-\beta)\cdot\Delta\mathbf{P}. \tag{4}\]  
The manipulator displacement is denoted by \(\Delta\mathbf{P}_{arm}\) and the UAV displacement by \(\Delta\mathbf{P}_{\rm UAV}\), where both \(\Delta\mathbf{P}_{arm}\) and \(\Delta\mathbf{P}_{\rm UAV}\) are expressed in the coordinate system \(L_{0}\). With \(\beta=1\), the UAV motion is used to control the position of the end-effector.