# An Algorithm for Painting Large Objects Based on a Nine-Axis UR5 Robotic Manipulator
## 1 Introduction  
In recent years, UR5 robots have been widely popularized in industrial production fields such as painting, assembly, and micromanipulation [1]. In the above-mentioned fields, the painting process is the integral manufacturing procedure for automatically coating large objects, and it is one of the essential technologies for improving the surface quality of painted objects, which can then offer better performances under different working conditions [2, 3, 4]. Painting feasibility and trajectory planning are critical in the painting field.  
To paint large objects, some engineers tried to mount UR5 robots on a mobile platform to enlarge the workspace of the UR5 robots [5, 6], while other engineers tried to widenthe workspace by changing the structure of the UR5 robots [7]. However, the method of changing the structure of the UR5 robots entails enormous cost, and the UR5 robot with changed structure offers low adaptability. Thus, this paper proposes a UR5 robot which is mounted on an _zyz_ three-axis motion platform to achieve the painting of large objects.  
A well-designed trajectory can improve painting efficiency. [PERSON], [PERSON] et al. employed the MRPEIL-DE algorithm to optimize the trajectory of a six degree-of-freedom (DOF) UR5 robot [8]. [PERSON], [PERSON] et al. utilized mechanical learning methods to devise an energy-saving trajectory for industrial UR5 robots [9]. [PERSON], [PERSON] et al. proposed employing a non-based trajectory planning method for time-energy optimization of a completely wheeled mobile UR5 robot [10]. [PERSON], [PERSON] et al. compared improving the artificial potential field (APF) by the traditional particle swarm optimization (PSO) algorithm and the serendipity-based PSO (SBPSO) algorithm to control the path of a universal robot UR5 with collision avoidance [11]. [PERSON], [PERSON] et al. utilized differential evolution (DE) optimization with the MATLAB toolbox, which has an applied robot operating system (ROS), to quantify the contour tracking performance of a collaborative universal manipulator robot (UR5) [12]. [PERSON], [PERSON] et al. proposed a novel reliable framework for deep ConvNet combined with visual servoing using a single RGB camera [13]. [PERSON], [PERSON] et al. proposed a novel calibration framework based on a single camera and computer vision techniques using ArUco markers [14]. [PERSON], [PERSON] et al. designed the implementation of the control of a real UR5 robot from Matlab/Simulink using ROS [15]. [PERSON], [PERSON] et al. proposed a 6D pose estimation method for an object from a single RGB image for a robotic grasping task [16].  
Nonetheless, most of the above-mentioned algorithms neither consider the singularities of the kinematics of the UR5 robot's joints nor meet the requirements of the painting process. Therefore, this paper proposes a painting algorithm which can generate a painting trajectory satisfying the painting of large objects. The painting algorithm employs the standard triangle language (STL) file, algorithm of principal component analyses (PCA), and k-dimensional tree (k-d tree) to create a digital model of the object to be painted. The digital model is converted into multiple traveling salesman problem (TSP) models, and each TSP model is created with a genetic algorithm (GA). The painting trajectory offers high precision and efficiency.