# A Method for Supervisory Control of Manipulator of Underwater Vehicle
## 4 Building of Motion Trajectories for a MM Working Tool in Case of Rough Bottom Topography
For a more precise description of the underwater objects' shape, and also for the subsequent control of the formation of MM motion trajectories, a graphical interface was created using the OpenGL Core libraries (see Figure 7), which displays the triangulation surface of the object being observed, the trajectory projected on this surface, and the video image coming from the camera in real-time mode. Using the resulting image, the operator can check the correct construction of the automatically generated trajectory before starting a manipulative operation. Since the method is based on spatial geometric transformations (finding intersections of the camera's optical axis with the triangulation surface and with the subsequent projection of the desired trajectories on this surface), its accuracy depends only on the accuracy of point clouds obtained from the TVS and on the features of the triangulation algorithms used for these points. Therefore, the method can easily be implemented both in systems for semi-natural modeling and testing [41] and for an actual UUV, regardless of the kinematic and dynamic features of these vehicles and their MM. The proposed method was tested by numerical simulation in the V-REP environment. A scenario of one of the manipulative operations for cleaning a continuous pipeline from fouling is shown in Figure 8a. A model of multibeam sonar with a resolution of 32 \(\times\) 32 dots and a unidirectional scanning pattern was used as the TVS. The sequence of points \(T_{j}\) and their respective vectors \(\overrightarrow{a}_{j}\) and \(\overrightarrow{n}_{j}\) of the MM working tool, formed by the program, was transferred to the Matlab/Simulink via the UDP protocol. In Matlab/Simulink, the resulting sequence was smoothed using a third-order parametric B-spline [42]. Program control signals for the electric drives of the respective degrees of MM mobility were generated using this sequence. During the simulation, we used a well-tested mathematical model of a UUV [43] with a mounted MM based on the PUMA kinematic model, which has the first five degrees of freedom (3 translatory and 2 orientation). The main parameters of the UUV and its MM are given in Table 1. All parameters of the kinematic and dynamic model of the UUV are provided in [44; 45]. The mathematical model of the underwater MM used and its parameters are described in detail in [46]. This model includes a recurrent  
Figure 7: Interface for controlling the formation of motion trajectories of the MM working tool. algorithm for solving the inverse dynamics problem, which takes into account not only the joint coupling between degrees of mobility of the MM, but also the effects of a viscous environment on its moving links, as well as the experimentally determined parameters of these effects [47]. To stabilize the UUV in the hovering mode, a combined system [21; 48] was used, which makes it possible to compensate for the impacts of marine currents and the dynamic impacts from moving the MM, calculated in real time, with the UUV thrusters. To visualize the MM motions over the surface of work objects, the data (generalized coordinates of MM, and linear and angular displacements of the UUV relative to the initial point of its stabilized positioning) obtained during the simulation of the complex dynamic model of the UUV with MM were sent from Matlab/Simulink back to V-REP by the UDP protocol. The results of the visualization of the actual technological manipulative operation performed are shown in Figure 8a,b. An assessment of the relative positions of the pipeline surface and the MM working tool was made using Figure 8b. On the basis of the analysis carried out, it became possible to automatically generate and then, using the proposed method, pass through the complex motion trajectories, thus, precisely performing quite complex manipulative operations with the working tool.