# On the Improvement of ROS-Based Control for Teleoperated Yaskawa Robots
## 5 Improved ROS-Based Control for Teleoperated Yaskawa Robots  
As one can see, the standard Motoman node architecture is not suitable for teleoperation. To obtain an adequate operating mode, it is necessary to make modifications on the control method. This work is concerned with a method that can improve the performance of ROS-based robot control system. This method consists of the replacement of position control by velocity control. Therefore, the Motoman ROS node will be based on the kinematic model presented by Equation (6). Here, the motion direction and velocity are first determined and then converted into articular velocities. The improved system architecture becomes as mentioned in Figure 6.  
Here, the generated EE setpoint \(\mathbf{d}_{EE}\) becomes a velocity setpoint and is expressed as follows: It becomes:  
\[\mathbf{d}_{EE}=k_{a}\ \delta\mathbf{c}_{joy}^{\ \ a}+k_{c}\ \mathbf{J}^{-1} \delta\mathbf{c}_{joy}^{\ \ c}. \tag{8}\]  
The unit vector of \(\mathbf{d}_{EE}\) presents the motion direction on the different robot axis. Its norm corresponds to the velocity amplitude. It should be noted that Gazebo display is disabled in order to enhance simulation latency. In this case, Gazebo functionalities and trajectory stop conditions stay active. Performance tests, while applying the proposed modification, are performed by making three backward and forward articular motions of only the first axis of a GP8 Yaskawa robot teleoperated by a 3 DConnexion Space-Mouse Pro device, described in Section 4. The resulting first axis articular displacement is presented in Figure 7. The average value of measured latencies while using improved control architecture are expressed in Table 2.  
Figure 6: Improved system architecture. Figure 7: (**a**) First axis displacement while using the improved Motoman ROS node for teleoperation (**b**) Zoom on phase 2 (**c**) Zoom on phase 3. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Measured Delay** & **Simulation Latency** & **Motoman Latency** & **Total Latency** \\
**(s)** & \(\mathbf{c_{jay}}\)**vs. \(\mathbf{q_{goal}}\) & \(\mathbf{q_{goal}}\)**vs. \(\mathbf{q_{m}}\)** & \(\mathbf{c_{jay}}\)**vs. \(\mathbf{q_{m}}\)** \\ \hline Phase 1 & 0. 106 & 0.305 & 0.411 \\ \hline Phase 2 & 0.118 & 0.289 & 0.407 \\ \hline Phase 3 & 0.180 & 0.343 & 0.523 \\ \hline Phase 4 & 0.130 & 0.290 & 0.420 \\ \hline Phase 5 & 0.131 & 0.320 & 0.451 \\ \hline Phase 6 & 0.150 & 0.310 & 0.460 \\ \hline Average & 0.136 & 0.309 & 0.445 \\ \hline Relative improvement (\%) & 41.37\% & 43.61\% & 42.94\% \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Average measured latency while using improved control architecture. The modification of the Motoman ROS node, by adding a new velocity control mode, results in the improvement of the robot motion response. First, Stopping phases in the robot motion are eliminated. The resulting motion of the robot is then continuous and follows the desired velocity setpoint. Figure 7 and Table 2 show an improvement of overall latency. The latter average is equal to 0.445 s, which corresponds to a relative improvement of 42.94% with respect to the standard control. Such latency is acceptable (Between 0.4 s and 0.5 s) for precise teleoperation tasks [18]. The latency average of the updated simulation part is equal to 0.136 s, which corresponds to a relative improvement of 41.37% with respect to the standard control. Additionally, the modified Motoman node leads to a latency of 0.309 s, which represents a relative improvement of 43.61% with respect to the standard control. As seen in Figure 8, the proposed control architecture, based on velocity control, improves the real-time robot response in terms of latency reduction. Investigations of the proposed improved ROS-based control confirm the improvement of the response time and tracking delay of Yaskawa robots, which can achieve 43% with respect to standard control.