# Laser Ablation Manipulator Coverage Path Planning Method Based on an Improved Ant Colony Algorithm
## 3 Optimisation Objective  
The trajectory optimisation information is considered to obtain a more practical path for optimisation objectives because trajectory planning is often required after path planning in engineering practice. Most methods currently consider path planning and trajectory planning separately, which may cause the following problems. One is that the path may have to be adjusted to avoid the singular position after the path is generated in some cases, and this significantly reduces the effect of path planning. Another is that the optimal trajectory may not be generated by the shortest path because the optimisation objectives of path planning and trajectory planning are not the same. Therefore, it is necessary to consider path-planning and trajectory-planning information comprehensively. The optimisation objectives of optimal trajectory planning can be roughly classified into four categories: time optimal [37], energy optimal [38], jerk optimal [39], and hybrid optimisation. There are many different criteria of hybrid optimisation, such as smooth and time optimal [40], time-jerk optimal [41], and time acceleration jerk hybrid optimal [42]. Figure 4: The Inverse kinematics iterative algorithm flowchart. In general, a process that consumes as little time and energy as possible and prevents the robot from making a sudden stop or a large turn is desired. The ideal solution is to generate a path, use that path for global trajectory planning, and evaluate the path by combining path information and trajectory information. However, this requires considerable computing resources and time, which is unacceptable. Therefore, an alternative solution of introducing time, energy, and acceleration factors into path planning in a relatively simple way is adopted. In this method, the computational complexity is reduced, and the optimal or better trajectory can be obtained based on prior information. In the actual control of the manipulator, in addition to providing an exact path, it is also necessary to provide the time or speed information between every two consecutive path points. As the motion of all joints of the manipulator is considered, the inverse kinematics must be performed first to determine the rotation angle of each joint at each path point. Moreover, some restrictions must be considered when planning the path for the manipulator, including the maximum joint speed and maximum joint driving force or torque for each joint. The difference method is used to calculate the joint displacement, velocity, acceleration, and jerk. The relationship between the angular velocity of the \(i\)-th joint and running time is given in Equation (8). \[\omega_{k_{i}}=\frac{\left(P_{k+1_{i}}-P_{k_{i}}\right)}{T_{k_{i}}},k=1,\ldots,n-1 \tag{8}\]  
where \(n\) is the number of path points, \(P\) is the joint rotation angle, and \(T\) is the running time between two points. The angular acceleration of the \(i\)-th joint is  
\[\alpha_{k_{i}}=\frac{\left(\omega_{k_{i}}-\omega_{k-1_{i}}\right)}{T_{k_{i}}},k=1,\ldots,n-1,\omega_{0_{i}}=0 \tag{9}\]  
The angular jerk of the \(i\)-th joint is  
\[\gamma_{k_{i}}=\frac{\left(\alpha_{k_{i}}-\alpha_{k-1_{i}}\right)}{T_{k_{i}}},k=1,\ldots,n-1,\alpha_{0_{i}}=0 \tag{10}\]  
The energy consumption of the \(i\)-th joint is as follows:  
\[E_{k_{i}}=\frac{1}{2}\cdot I_{i}\cdot\alpha_{k_{i}^{\prime}}^{2}k=1,\ldots,n-1 \tag{11}\]  
where \(I\) is the moment of inertia. To avoid the influence of the positive and negative of the acceleration and jerk, the squaring formula in Equation (9) is used, along with Equation (10), to obtain the expression of the optimisation objective. \[ \begin{array}{c}min\ F=\frac{w_{1}c_{1}}{\xi}_{1}+\frac{w_{2}c_{2}}{\xi}_{2 }+\frac{w_{3}c_{3}}{\xi}+\frac{w_{4}c_{4}}{\xi}_{4},\\ w_{1}+w_{2}+w_{3}+w_{4}=1,\\ \left|\omega_{k_{i}}\right|\leq\tau_{1}W_{i},\quad i=1,\ldots,6\ k=1,\ldots,n- 1,\\ \left|J_{I}\alpha_{k_{i}}\right|\leq\tau_{2}F_{i},\quad i=1,\ldots,6\ k=1, \ldots,n-1.\end{array}