# 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
To build the desired trajectory of the working tool, the resulting set of points \(T_{ikc}\) with their respective vectors \(\overrightarrow{a}_{ik}\) are transformed into a sequence of points \(T_{j}\) with vectors \(\overrightarrow{a}_{j}\) located between the adjacent target points \(A_{i}\) and \(A_{i+1}\), where \(j\) is the sequential number of the point in the sequence of the working tool's motion. In this case, the vector \(\overrightarrow{n}_{j}\) of this tool is always parallel to the vector \(T_{j}\overrightarrow{T_{j+1}}\) connecting the passed, and the next, points of the set. As a result, the obtained sequence of points \(T_{j}\) and their respective vectors \(\overrightarrow{a}_{j}\) and \(\overrightarrow{n}_{j}\) form the motion trajectory of the working tool (see Figure 5). Figure 5: A triangulation model of a seabed surface and the formed motion trajectory of the MM working tool. Building of Complex Trajectories for MM Working Tools to Move Over the Surface of Underwater Objects  
To perform complex manipulative operations, including those with subsea valve systems, cleaning silt and fouling, measurements of pipeline wall thickness, etc., the working tool of MM should move along complex spatial trajectories. The shape of such work objects is usually well known. Therefore, the desired motion trajectories of the MM can be built in advance, taking into account the requirements of certain technological operations. In this case, the operator can visually estimate the area of the underwater object on which the specified trajectory is to be overlaid. Using a video camera, the operator indicates the start and end points, with the desired trajectory between them automatically projected from the computer memory on the specified surface of the work object, taking into account the spatial position of this object [39]. When the UUV hovers over an object located in the scanning field of the TVS, the desired trajectory of the working tool can be immediately set in the CS \(xyz\) of the UUV in the form of a sequence of points \(B_{j}\) or in an analytical form. If this trajectory is set in the plane \(Oxy\) as a function \(y=f(x)\), then it should be projected on the surface of the object in the direction of the unit vector \(\overrightarrow{o}\) that coincides with the negative direction of the \(z\) axis of the CS \(xyz\). The operator targets the camera optical axis, setting the start \(A_{1}\) and end \(A_{2}\) points belonging to the object and determining the beginning and end of the working tool's movement along the trajectory. The coordinates of these points are calculated using Equation (10). To project the trajectory on a sector of the object's triangulation surface confined between the points \(A_{1}\) and \(A_{2}\), this trajectory, set in analytical form, is first converted into a sequence of auxiliary points \(B_{j}\). For this, the coordinates of the points \(B_{j}\) are calculated as follows:  
\[ \begin{split} B_{jx}=B_{(j-1)x}+g\\ B_{jy}=f(B_{jx})\\ B_{jz}=0\end{split}  \tag{14}\]  
where \(f(B_{jx})\) is the confirmed value of the \(y\) coordinate from \(x\) obtained by the analytical expression \(y=f(x)\), \(B_{1x}=0\); \(g\) is the step along the \(x\) axis, which determines the number of auxiliary points \(B_{j}\) (determined by the parameters of this trajectory and the degree of detail of the scanned object). An increase in the number of points \(B_{j}\) enhances the accuracy of the trajectory formation but requires an increase in the number of calculations. To take into account the spatial position and orientation of certain areas of the work objects when projecting points \(B_{j}\), first, all the vectors connecting the origin \(O\) of the CS \(xyz\) with the points \(B_{j}\) should be rotated at an angle \(\alpha=\angle(x,A_{1}A_{2})\) around the \(z\) axis. Then the second rotation should be performed around the \(y\) axis of the CS \(xyz\) at an angle \(\varphi\) confined between the vector \(A_{1}A_{2}\) and the plane \(Oxy\).