1. Introduction
Additive manufacturing (AM), also known as 3D printing, is a kind of rapid prototyping technology. Because of its advantages of fast forming speed, high processing precision, and high material utilization rate, it has broad application prospects [
1]. It has been applied in industrial production [
2,
3], biomedical [
4], aerospace [
5], emerging education [
6], emerging consumption, and so on.
Commonly used path planning algorithms mainly include the parallel scanning filling method, contour offset filling method, and spatial curve filling method. As an important part of AM research, path planning has been studied by many scholars. In the aspect of traditional AM path planning, Jin et al. [
7] proposed a parallel scanning path planning optimization algorithm for fused deposition modeling. By selecting the optimal scanning line angle and studying the relationship between the scanning line angle and the printing efficiency and surface quality, an adaptive region merging algorithm is developed. Yang et al. [
8] proposed a contour offset path generation algorithm, which provides an efficient solution for path planning. However, because of the large curvature of the contour offset path, the frequent bending path makes the motor accelerate and decelerate frequently, so the printing efficiency is low. Aiming at the problem that the spiral offset path planning algorithm has difficulty dealing with the continuous filling path of different sub-regions, Yu et al. [
9] proposed a global continuous Fermat spiral path planning algorithm for carbon fiber 3D printing, but the algorithm has poor filling effect in the case of sharp corners in the filling path. Yang and Mohan et al. [
10,
11] proposed a path filling method of the Hilbert space curve, which can improve the printing efficiency of the model. However, because of the existence of multiple right-angle corners in the Hilbert curve, the motor starts and stops more frequently.
In multi-DOF AM path planning, Zhao et al. [
12] proposed a hybrid path planning method based on skeleton contour division, which reduces the sharp corners in the contour and the impact on the forming quality. Dong et al. [
13] proposed a contour path planning algorithm for optimizing deposition additive manufacturing. The Hopfield neural network and the improved whale optimization algorithm are used to sort the printing order of each contour and optimize the network parameters. Diourté et al. [
14] proposed a five-DOF continuous path planning algorithm, which can realize continuous printing paths for closed-loop spiral parts. Isa [
15] proposed a five-axis path planning method for FDM. The algorithm can effectively eliminate the staircase effect. Guacheta-Alba J C et al. [
16] proposed a six-DOF path planning algorithm based on contour parallel mode, which can generate continuous printing paths. Nguyen et al. [
17] proposed an automatic tool path planning method based on offset contour. The generated toolpath is a globally continuous, layer-wise setting, making it suitable for robotic cold spray additive manufacturing.
At present, the research on AM path planning mainly focuses on traditional three-axis AM path planning and five-DOF AM path planning. There are relatively few studies on six-DOF AM path planning, but it is very important to realize efficient printing of parts. In most traditional AM path planning algorithms, the printing path is discontinuous and there is long straight-line printing in a certain direction. For traditional AM devices, a discontinuous printing path represents an increase in the number of motors starts and stops, resulting in a longer printing time. For multi-DOF AM, a discontinuous printing path will lead to an increase in the number of start–stop times of the motor of the consumables conveying mechanism, and it is impossible to maintain a stable wire-feeding state. The main reason for warpage deformation is the thermal expansion and contraction of the material and the residual stress caused by the temperature change. This phenomenon is particularly serious when there is long straight-line printing in a certain direction.
In view of the above problems, in this paper, a six-DOF manipulator is taken as the research object, an AM platform is built, and related experiments are carried out. The path planning algorithm combining the contour offset filling method and Hilbert curve filling is optimized by using a cubic uniform B-spline, and an AM path planning algorithm suitable for a six-DOF manipulator is obtained.
(1) Based on the homogeneous transformation matrix and the modified D-H method, the mechanism of path planning of the six-DOF manipulator is studied, including kinematics modeling, forward and inverse kinematics analysis of the manipulator, and the simulation of motion space and printing path.
(2) The models are printed on the traditional three-axis AM device and the six-DOF AM platform by using parallel scanning filling methods. By comparing the printing time, it is verified that the six-DOF AM platform has higher printing efficiency.
(3) The parallel scanning filling method, the path planning algorithm combining contour offset and Hilbert curve, and the method proposed in this paper are used to print the model, and the warping deformation of the model is compared to prove the effectiveness and practicability of the proposed method.
2. Kinematics Analysis Based on the Homogeneous Transformation Matrix and Modified D-H Method
2.1. Motion Principle of Mechanical Arm
The six-DOF manipulator used in this paper is the Yaskawa GP8 manipulator, and its six kinematic pairs are all rotating joints. The first three joints of the GP8 manipulator determine the position of the wrist reference point, and the last three joints determine the direction of the wrist, which belongs to the 6R manipulator. The body structure and joint coordinate system are shown in
Figure 1.
Commonly used manipulator motion modeling methods mainly include the standard D-H method and the modified D-H method [
18]. According to the joint coordinates of the manipulator, the modified DH method is used to model the motion of the manipulator. The D-H parameters are shown in
Table 1:
The offset term in the above table is the angle between the drive shaft and the transmission shaft when the robot is at zero, where D1 = 330, L2 = 40, L3 = 345, L4 = 40, and D4 = 340.
2.2. Forward Kinematics Analysis and Inverse Kinematics Analysis of the Manipulator
The forward kinematics of the manipulator describes that the joint angle
of each joint in the joint space of the manipulator is known, and the pose of the end effector of the manipulator in the Cartesian coordinate system is obtained. According to the law of translation and rotation [
18], the following conversion relationship between the two adjacent coordinate systems can be obtained.
where
and
. According to the established D-H parameter table, the homogeneous transformation matrix
of each joint coordinate system can be obtained. Substituting the parameters of the manipulator in
Table 1 into Formula (1), the homogeneous transformation matrix of each joint can be obtained.
The expression of the homogeneous transformation matrix
of the end effector relative to the base coordinate system is as follows:
An expansion of Formula (8) can be obtained.
The meaning of each element in the matrix is as follows, where
and
.
The inverse kinematics of the manipulator describes the joint angle
of each joint in the manipulator when the parameters of each joint and connecting rod of the manipulator and the relative pose relationship between the end effector and the base coordinate system are determined. At present, the methods for solving inverse kinematics mainly include the analytical method and the numerical method [
18].
2.3. Mechanical Arm Motion Space Solution and Print Trajectory Simulation
According to the DH parameters of the manipulator shown in
Table 1, the motion modeling of the manipulator is carried out, and the modeling results are shown in
Figure 2, the unit here is mm.
The Monte Carlo method is used to solve the motion space of the manipulator. The basic idea of the algorithm is that each joint of the manipulator is randomly traversed within the motion limit range, and the space is discretized by its forward kinematics mapping. The set of all random values of the end effector in the space constitutes the workspace of the manipulator.
The specific steps are as follows:
Step1: Within the limit of the motion range of each joint of the manipulator, the random number rand (
N, 1) in the interval of [0, 1] is generated by a random function, and the random value of each joint is calculated:
In formula (10), N is the number of random numbers and is the i-th joint angle, .
Step2: The pseudo-random value
solved in Step1 is substituted into the obtained forward kinematics equation of the manipulator to obtain the position point of the end effector of the manipulator in space. The set of end effectors corresponding to the random values of all joints in space points can be obtained by reciprocating circulation, and the workspace of the corresponding manipulator can be obtained. The motion space of the GP8 manipulator is shown in
Figure 3.
Figure 4a is the xoy section projection of the manipulator motion space,
Figure 4b is the xoz section projection of the manipulator motion space, and
Figure 4c is the yoz section projection of the manipulator motion space.
,
, and
.
The GP8 manipulator follows the Pieper criterion, that is, the last three axes of the manipulator intersect at one point. The inverse kinematics can be solved by using this criterion to obtain the optimal solution of six joints. According to the position of the wrist of the manipulator, the angle of six joints is solved by the analytical method, and then all eight groups of solutions of the manipulator are obtained. Finally, according to the constraints of each joint, the solutions that are not within the joint range of the manipulator are deleted, and the optimal solution that meets the conditions is obtained.
Based on the above solution method, the inverse kinematics of the printing path is solved, and the printing path simulation is performed.
Figure 5 is the printing path simulation.
4. Experiment and Discussion
In order to verify that the six-DOF AM platform is more efficient than the traditional AM device in model printing, the models are printed on the traditional three-axis AD device and the six-DOF AM platform by using the parallel scanning filling method. The printing time is compared.
In order to verify the effectiveness and practicability of the proposed method, experiments are carried out. Firstly, the model is sliced hierarchically to obtain contour data. Secondly, the parallel scanning filling method, the path planning algorithm combining contour offset and Hilbert curve, and the method proposed in this paper are used for path planning. Then, simulation software is used to improve printing path programs and convert print programs. Finally, the six-DOF AM platform is used to complete the printing of multiple models, and the three-coordinate measuring instrument is used to detect the degree of warpage deformation of the models filled by the three methods.
4.1. Printing Path Program Improvement and Program Conversion
Simulation software is used to build the simulation environment, and the improvement in the printing path program and the program conversion are completed in the simulation environment. Through the algorithm steps described in
Section 3.3, the printing path program can be obtained. Using the simulation environment to improve the printing path program, it is necessary to control the consumables conveying mechanism to obtain the printing program. Because the manipulator of this printing platform is limited by the program format, it is necessary to convert the associated mode program into the standard mode program.
4.1.1. Improving the Printing Path Program
For the motor control of the consumables conveying mechanism, the I/O signal is used to start and stop the control. OT# (2) is the start signal and OT# (3) is the end signal. The start signal is added before the start of model printing, and the end signal is added after the end of model printing.
In order to ensure the uniformity of the printing sprinkler head during printing, it is necessary to add free distance outside the printing model range before the printing program starts to avoid the lack of consumables supply during the printing process.
The single program of the GP8 manipulator can accommodate up to 9998 interpolation points. Because of the large number of printing path points generated by the method in this paper, the program needs to be split when generating the program, and each program is connected in series by CALL statement.
4.1.2. Standard Mode Program Generation
The GP8 manipulator program can be divided into two categories as follows: the associated mode program and the standard mode program. The point data format in the associated mode program is the coordinates and angles relative to the base coordinate system, and the point data format in the standard mode program is the pulse value of each joint.
The converted standard pattern program is shown in
Figure 15, where 0418A011 is the printing path program.
4.2. Model Printing and Result Analysis
Two additive manufacturing devices are shown in
Figure 16. The main specifications of the six-DOF AM platform are shown in
Table 2.
The molding temperature is 25 °C, the temperature of the printing sprinkler head is 200 °C, the printing platform temperature is 60 °C, the layer thickness is 0.2 mm, and the filling density is 100%. With PLA as the printing material, the cube model with a size of 63 × 63 × 4 (mm) and the cylinder model with a radius of 30 (mm) and a height of 4 (mm) are filled by the parallel scanning filling method. The traditional three-axis additive manufacturing device and the six-DOF AM platform are used to print the two kinds of models each. In order to ensure the fairness of the experiment, the moving speed of the printing sprinkler head and the diameter of the printing sprinkler head are consistent. The model printing time (excluding the pre-planning algorithm time) is shown in
Table 3.
The traditional three-axis AM device prints two kinds of models, and the average time is 1.785 h and 1.265 h, respectively. The six-DOF AM platform prints two kinds of models, and the average time is 1.005 h and 0.785 h, respectively. Compared with the traditional three-axis AM device, the printing time of the six-DOF AM platform is shortened by 43.70% and 37.94%, respectively. The main reason for the difference between the two devices is that the response speed of the motor is different. When the corner is encountered, the motor response speed of the six-DOF AM device is faster, so the overall printing time is shorter, and the printing efficiency is higher.
Under the above experimental conditions, the parallel scanning filling method, the path planning algorithm combining the contour offset filling method and the Hilbert curve, and the method proposed in this paper are used to fill the cube model with a part size of 63 × 63 × 4 (mm), and the six-DOF AM platform is used for printing. Three models are printed for each method. The printing process is shown in
Figure 17. Comparing the printing effect, the model printing effect of the three methods is shown in
Figure 18.
Based on the Z coordinate of the midpoint at the bottom of the model, the Z coordinate values of the four corners at the bottom of the model are measured by the three-coordinate measuring instrument. Nine points are taken from each corner, and the average value is taken as the warpage deformation of the corner. The three-coordinate measuring instrument is shown in
Figure 19. The experimental results are shown in
Table 4,
Table 5 and
Table 6, where angle 1, angle 2, angle 3, and angle 4 are the measurement angle numbers.
Table 7 is the average warpage deformation of the model filled by the three different methods.
Figure 20 is the average warpage deformation change diagram of the four corners of the three filling methods. It can be seen in
Figure 20 that the model filled by the method proposed in this paper is superior to the model filled by the other two filling methods as a whole.
It can be seen from the data in
Table 7 that the average warpage deformation of the filling model of the parallel scanning filling method is 0.108712 mm, the average warpage deformation of the filling model of the path planning algorithm combining the contour offset filling method and the Hilbert curve is 0.078429 mm, and the average warpage deformation of the filling model of the proposed method is 0.067613 mm. Compared with the other two methods, the warpage deformation of the model filled with the proposed method is reduced by 37.81% and 13.79%, respectively. The degree of warpage deformation is affected by the cooling rate of the model, the thickness of the model, and the force of the model when the model is taken out. The slower the cooling rate of the model, the smaller the warpage deformation; the larger the thickness of the model, the smaller the warpage deformation; when the model is taken out, the more uniform the external force on the model is, the smaller the warpage deformation is.
5. Conclusions
In this paper, the six-DOF manipulator is taken as the object to study the path planning mechanism of six-DOF AM. The path planning method combining the contour offset filling method and Hilbert curve filling is optimized by using a cubic uniform B-spline curve, and a six-DOF path planning algorithm combining the contour offset filling method and improved Hilbert curve filling is obtained. The six-DOF AM platform is built and related experiments are carried out. The experimental results show that:
Compared with the traditional three-axis AM device, when the six-DOF AM platform is used for model printing, the printing time is reduced by 43.70% and 37.94%, respectively, and the molding efficiency is significantly improved.
Compared with the parallel scanning filling method and the path planning algorithm combining contour offset and the Hilbert curve, the average warpage deformation degree of the model filled by the method proposed in this paper is reduced by 37.81% and 13.79% respectively. Model printing by the method proposed in this paper improves the molding quality of the model to a certain extent.
In the future, the six-DOF AM platform will be further optimized to give full play to the flexibility of the six-DOF manipulator. For models with complex surfaces, the related hierarchical algorithms will be studied in the future, and the path planning algorithm will be further optimized to improve printing efficiency and realize unsupported printing. Some new methods will be used to solve the existing problems, such as multilayer neurocentral of high-order uncertain nonlinear systems with active disturbance rejection, asymptotic tracking with novel integral robust schemes for mismatched uncertain nonlinear systems, and so on.