# Improving the Manipulability of a Redundant Arm Using Decoupled Hybrid Visual Servoing
## 2 Methodology
### Robot Kinematics with Task Priority  
Joint velocities (\(\dot{\mathbf{q}}\)) are computed after the end-effector (EE) velocities calculated using the kinematics of robot:  
\[\dot{\mathbf{q}}=\mathbf{J}^{\dagger\lambda}\mathbf{g}_{c}^{e}\mathbf{v}_{cam} ^{c} \tag{15}\]  
The transformation matrix \(\mathbf{\xi}_{c}^{e}\) is used to map the velocities represented in the robot end-effector (EE) frame to the camera frame [31]:  
\[\mathbf{\xi}_{c}^{e}=\left[ \begin{array}{cc}\mathbf{R}_{c}^{e}&sk(\mathbf{ \xi}_{c}^{e})\mathbf{R}_{c}^{e}\\ 0&\mathbf{R}_{c}^{e}\end{array} \right] \tag{16}\]  
where \(\mathbf{\xi}_{c}^{e}\) is the translation vector between the EE frame and the camera frame. \(\mathbf{R}_{c}^{e}\) is the rotation matrix between the EE and the camera frame, and \(sk(\mathbf{\xi}_{c}^{e})\) is the skew-symmetric matrix of the translation vector. It is worth mentioning that \(\mathbf{\xi}_{c}^{e}\) is constant in such a scenario (Eye-in-Hand configuration). By using this approach the effect of robot singularity has been reduced, and discontinuities caused by decoupling process have been greatly smoothed, thanks to the DLS inverse [32]:  
\[\mathbf{J}^{\dagger\lambda}=\mathbf{J}^{T}\big{(}\mathbf{J}^{T}+\lambda^{2} \mathbf{I}\big{)}^{-1} \tag{17}\]  
where \(\lambda\) is a positive scalar known as damping factor. Using DLS inverse minimizes the term \(\|\mathbf{J}\mathbf{q}-\mathbf{\dot{\kappa}}\|^{2}+\lambda^{2}\|\dot{\mathbf{ q}}\|^{2}\). Choosing \(\lambda\) will ensure that the solution norm stays within an assigned range [33]. It is worth noting that regularisation techniques help with reducing the effect of singularity configurations. In addition they increase the convergence time [34]. In this study, the task priority for the given tasks (i.e., feature error convergence and robot manipulability) is calculated [32], and given by:  
\[\dot{\mathbf{q}}=\mathbf{J}^{\dagger\lambda}\mathbf{\xi}_{c}^{e}\mathbf{v}_{ cam}^{c}+(\mathbf{I}-\mathbf{J}^{\dagger\lambda}\mathbf{J})\mathbf{q}_{0} \tag{18}\]  
where \(\mathbf{I}-\mathbf{J}^{\dagger\lambda}\mathbf{J}\) is the Null space projection matrix. Therefore, the closest point in the Jacobian matrix null space will be identified, satisfying both tasks. \(\mathbf{q}_{0}\) is defined as follows [23]:  
\[\dot{\mathbf{q}}_{0}=k_{0}\bigg{(}\frac{\partial w(q)}{\partial q}\bigg{)}^{T} \tag{19}\]  
In (19), \(k_{0}\) is a positive gain and \(w\) is the cost function for another task. \(w\) should be maximized in order to consider the other objectives. As mentioned earlier, the manipulability of the robot has been considered as the second task. \[w(q)=\sqrt{\det(\mathbf{J}(q)\mathbf{J}^{T}(q))} \tag{20}\]Using the classical projection operator defined in [23], the secondary task will be computed and will be added to the joint velocity vector. The value of \(w(q)\) is called manipulability value and shows the functionality of the robot in each configuration. The more the amount of \(m\), the better adjustment in the workspace is possible (greater range of possible motions) [35]. The proposed visual servoing control DHVS schema is depicted in Figure 3. The red blocks represent the image-based control loop, the blue blocks represent the position-based control loop, and the grey blocks represent the task-space control loop. As shown in the control block diagram in Figure 3, the camera velocities have been decoupled; in 2D, two of them (translations in \(X\) and \(Y\)) were considered by using the features created from the image screen, as feedback.The remaining components were modelled in 3D (computed by partial 3D reconstruction of the environment attained by the extracted features). Following that, the computed velocities will be given to the robot. The controller will exchange the desired camera velocities with the desired joint velocities using the Jacobian of the robot. To minimise the effects of robot singularity, the DLS inverse method was used instead of the pseudo-inverse approach.