In order to improve the work efficiency and enable the robot to complete specific tasks in the shortest possible time, there must be reasonable motion planning. Offline motion planning is divided into path planning and trajectory planning.
The goal of path planning is to make the distance between the path and the obstacle as far as possible and the length of the path as short as possible; The purpose of trajectory planning is to make the running time of the robot as short as possible or the energy as small as possible during the joint space movement of the robot. The trajectory planning adds time series information on the basis of path planning, and plans the speed and acceleration of the robot when performing tasks to meet the requirements of smoothness and speed controllability.

Teaching and playback is one of the methods to achieve path planning. Teaching and recording the teaching results through the operating space are repeated during the work process. The on-site teaching directly corresponds to the actions that the robot needs to complete, and the path is intuitive and clear. The disadvantage is that it requires experienced operators and consumes a lot of time. The path is not necessarily optimized. To solve the above problems, a virtual model of the robot can be established, and the path planning of the task can be completed through virtual visual operation.
Path planning can be carried out in joint space. The quintic B-spline can be used as the interpolation function of the joint trajectory, and the integral of the square of the acceleration relative to the motion time can be optimized as the objective function to ensure that the motion of each joint is smooth enough. Alternatively, the joint trajectory of the robot can be interpolated by using quintic B-spline, and the speed and acceleration endpoint values of each joint of the robot can be arbitrarily configured according to the smoothness requirements. In addition, the trajectory planning in the joint space can avoid the singularity of the operation space. A team has also designed a joint trajectory optimization algorithm to avoid singularity in joint space. Using the redundancy of a joint function of a 6-DOF arc welding robot in the task process, taking the robot singularity and joint constraints as constraints, TWA method is used for optimization calculation.
The joint space path planning has the following advantages compared with the operation space path planning:
1. The singularity problem of robot in the operating space is avoided;
2. Because the motion of the robot is controlled by the joint motor, a large number of forward kinematics and inverse kinematics calculations are avoided in the joint space;
3. The trajectory of each joint in joint space is convenient for control optimization.

