# On the Improvement of ROS-Based Control for Teleoperated Yaskawa Robots
## 3 ROS-Based Robot Control for Teleoperated Task  
The studied system is mainly composed by a \(m\)-DoFs Yaskawa robot teleoperated by a joystic. To manipulate this system, a ROS-based control scheme is used for teleoperation tasks. This control method is described in Figure 1. It consists of:  
* The \"Joystick node\" allows reading the peripheral components as well as the buttons state. This node corresponds to the \"joystick_drivers\" metapackage of ROS, which is used for interfacing common joysticks and human input devices with ROS. It provides \"joy\", \"Spacenav_node\", \"ps3 joy\" and \"wiimote\" packages, which are compatible with generic Linux joystick, 3 Dconnexion SpaceNavigator 6-DOF joystick, Playstation 3 SIXAXIS or DUAL SHOCK 3 joystick and Nintendo Wiimote, respectively. The piloting mode is supposed to be a mixture between the articular and the Cartesian modes, so that both modes are enabled simultaneously. This mixture is defined by the joystick instruction vector \(\mathbf{c}_{joy}\in\mathbb{R}^{m}\). \(m\) is the degree of freedom of the joystick. \(\mathbf{c}_{joy}=[\mathbf{c}_{joy}\,^{a};\,\mathbf{c}_{joy}\,^{c}]^{T}\), where \(\mathbf{c}_{joy}\,^{a}\in\mathbb{R}^{k}\) is the articular displacement instruction, \(\mathbf{c}_{joy}\,^{c}\in\mathbb{R}^{l}\) is the Cartesian displacement instruction and \(j+k=m\). In other words, \(k\) axis of the joystick are set to give Cartesian instructions and \(j\) axis of the joystick are set to give articular instructions. Please note that the Cartesian instruction \(\mathbf{c}_{joy}\,^{c}\) can correspond either to a conventional Cartesian motion \(\mathbf{x}=[x,\,y,\,z,\,r_{x},\,r_{y},\,r_{z}]^{T}\) or to a complex user-defined motion. * The \"Robot controller node\" contains the teleoperation piloting modes programmed in the simulator. This node is used to transform the mouse articular or/and Cartesian motion instructions into the EE setpoint \(\mathbf{d}_{EE}\in\mathbb{R}^{n}\). When the robot is supposed to perform only articular and conventional Cartesian task, \(\mathbf{d}_{EE}\) is expressed as: \[\delta\mathbf{d}_{EE}=k_{a}\,\delta\mathbf{c}_{joy}\,^{a}+k_{c}\,\mathbf{J}^{- 1}\delta\mathbf{c}_{joy}\,^{c}.\] (7) where \(k_{a}\) and \(k_{c}\) are constant sensitivity parameters, which are set with respect to the operator expertise and manipulation. * The \"Trajectory generation node\"/\"Gazebo node\" is the simulation part of the robot under ROS. It is responsible for generating the trajectory according to the behavior criteria of the robot (maximum speeds and accelerations, joint limits, etc.). It will generate a succession of joint positions \(\mathbf{q}_{goal}\in\mathbb{R}^{n}\) of the robot over time calculated by the Robot Controller node. When the simulator depicts a prohibited motion, no joint goal displacement is sent to \"Motoman ROS node\". * The \"Motoman ROS node\" is the interface between simulation and reality. It is responsible for communicating motion tasks \(\mathbf{q}_{goal}\) to the robot and retrieving information on its current positions \(\mathbf{q}\in\mathbb{R}^{n}\). This feedback is then transmitted, as \(\mathbf{q}_{m}\in\mathbb{R}^{n}\), to the Gazebo node to perform the servo-control. The ROS and ROS-Industrial Motoman community provides a set of nodes and mechanisms to facilitate the communication with the robot, namely the ROS Motoman driver [27]. The Motoman driver controller interface was created with the cooperation of Yaskawa Motoman, to provide a more high-performance interface for controlling Motoman robots. The software works on all FS100, DX100, DX200, YRC1000 and YRC1000 micro robot controllers. For each communication between the different nodes, we consider that there is an information transmission delay. This latter has to be measured in order to have an idea of the system performance. It should be noted that this performance depends on numerous factors such as the simulation computer configuration and processor. A possible source of these delays variation can be the transmission network, which itself can vary.