Abstract

The angular variation of the joints may be large, and collision between workpieces and tools may occur in robotic grinding. Therefore, this paper proposes an optimal robotic grinding path search algorithm based on the recursive method. The algorithm is optimized by changing the position of the tool coordinate system on the belt wheel; thus, the pose of the robot during grinding is adjusted. First, the position adjustment formula of the tool coordinate system is proposed, and a coordinate plane is established to describe the grinding path of the robot based on the position adjustment formula. Second, the ordinate value of this coordinate plane is dispersed to obtain the search field of the optimal robotic grinding path search algorithm. Third, an optimal robotic grinding path search algorithm is proposed based on the recursive method and single-step search process. Finally, the algorithm is implemented on the V-REP platform. Robotic grinding paths for V-shaped workpieces and S-shaped workpieces are generated using this algorithm, and a grinding experiment is performed. The experimental results show that the robotic grinding paths generated by this algorithm can smoothly complete grinding operations and feature a smaller angular variation of the joint than other methods and no collision.

1. Introduction

Currently, industrial robots are widely used for curved belt grinding. Generally, the robotic grinding path is generated by offline programming. When the generated robotic grinding path is executed to grind a curved surface, the angular variation of the joint may sometimes be large, and therefore, the robot joint angle may exceed the limit. Collision may occur in robotic grinding, such as collision between workpieces and tools and collision between robots and tools. To avoid exceeding the limiting joint angle and collision in robotic grinding, the robotic grinding path generation algorithm should be optimized to make the generated robotic curved surface grinding path feature smaller angular variation of the joint and no collision.

Many scholars have made in-depth research on the path planning of robot belts grinding. For example, Tsai et al. studied the robot path planning problem of the automatic mold polishing system and concentrated the solution into a core system to generate a trajectory that meets the requirements [1]. Basañez and Rosell have proposed a graphical task-level robot programming tool that allows users to set parameters and select polishing curves according to their need [2]. Zhao et al. proposed a robot blade grinding system controlled by a PC and a robot controller [3]. Wei Wang proposed a new algorithm based on the optimization curve interval by considering the curvature constraint of grinding the workpiece surface, integrating the precision and efficiency of the robot belt grinding [4]. Kharidege et al. proposed an automatic planning and programming system that can accommodate workpiece surfaces of different shapes [5]. Liu et al. divided the surface of complex parts into several simple surfaces when planning the path, which improved the efficiency of path planning [6]. Considering the collision problem of grinding the surface of complex parts, many scholars have studied the collision-free path planning of robots and proposed many classical algorithms, such as the C-space method [7, 8] and artificial potential field method [912]. Scholars such as Kuffner and Lavalle proposed the RRT algorithm, which can solve the robotic collision-free path planning issue in high-dimensional C space [13]. Scholars such as Shibata and Murakami proposed a quick robotic collision-free path planning algorithm, which can transform C space to deformed C space by using the artificial attraction potential energy method. Deformed C space does not include a restricted area, thus greatly simplifying robotic collision-free path planning in C space. This algorithm approximates restricted areas and potential energy functions to reduce calculation effort and realize quick planning [14]. Scholars such as Li et al. improved the artificial potential field method based on the regression search method. The algorithm plans a collision-free track by using the new potential field function to make the algorithm avoid local optimal solutions and unreachable areas [15].

The artificial potential field method is simple and highly efficient; thus, the approach is widely applied in the track planning of manipulators. Tsuji et al. noted that track planning based on the artificial potential field method can be divided into force control methods and motion speed control methods [16]. Ge and Cui proposed a new repulsive potential field function based on the artificial potential field and further studied the goals nonreachable with obstacles nearby (GNRON) issue associated with the artificial potential field method [17]. Masoud et al. added a component tangent to the repulsion field, which can assist robots in bypassing obstacles [18, 19]. Bosscher and Hedman combined the potential field method with machine vision and applied their repulsion speed approach to a real-time collision avoidance algorithm for robotic manipulators [20]. Bayro-Corrochano et al. transformed the potential field to the position correction of a robot to drive a 5-degree-of-freedom robot to avoid obstacles [21]. Wu et al. obtained the minimal distance between a robot and obstacles using a camera and moved the robotic manipulator to avoid obstacles by altering the driving speed [22].

In recent years, intelligent methods, such as artificial neural network algorithms, genetic algorithms, and fuzzy algorithms, have been applied in robotic collision-free path planning. Scholars such as Gómez-Bravo combined the genetic algorithm with the RRT algorithm to avoid collision in the hybrid environment of CaPaMan robots and SCARA robots [23]. Scholars such as Pires proposed a robotic collision-free avoidance method based on a multitarget genetic algorithm [24]. Lee et al. used recurrent neural network and reinforcement learning combined with V-REP simulation platform to design the shortest path planning of mobile robots considering the shortest time [25].

Research on collision-free optimization and joint angle optimization in robotic belt grinding is very limited. Therefore, this paper studies joint angle optimization and collision-free optimization methods for the development of robotic belt grinding path generation algorithms. First, the position adjustment formula of the tool coordinate system is proposed, and a coordinate plane is established to describe the robotic grinding path based on the position adjustment formula. Second, the ordinate value of this coordinate plane is discretized to obtain the search field of the optimal robotic grinding path search algorithm. Finally, the optimal robotic grinding path search algorithm is proposed based on the recursive method and single-step search process. The practicability of this algorithm is verified by simulation and grinding experiments. Meanwhile, the author’s previously published article [26] failed to consider the problem of excessive joint angle increment in the collision avoidance and planning process, which is unfavorable to robot motion control. Thus, based on the modeling method of [26], this paper improves the trajectory retrieval algorithm. Not only collision avoidance but also the total change of joint angle in the process of robot motion is considered, so that the algorithm can obtain a robot trajectory with a small total joint change in the situation of ensuring that the motion trajectory does not collide. Moreover, this paper validates this conclusion by using V-shaped parts experiments.

2. Generation of Robotic Belt Grinding Path

2.1. Principle of Robotic Belt Grinding Path Generation

In order to generate the robot trajectory, it is necessary to generate cutter points on the grinding surface of the workpiece and establish the coordinate system {Mi} on each cutter point. The method of generating cutter points is as follows. First, the machined surface of the workpiece is extracted and converted into NURBS surface [27]. Then, the processing path of NURBS curve format is generated by using the equal section method. Then, according to the set bow height error, the curvature estimation method is used to generate cutter points. Due to the limitation of space, this paper simply introduces the method of generating cutter points, which can be referred to the article [26] published by the author before. The cutter point coordinate system is shown in Figure 1, where {T} represents the inherent coordinate system of the workpiece and i is the sequence number of the cutter point. The direction of the Z axis of {Mi} is normal to the curved surface pointing to the exterior. The direction of the X-axis of {Mi} is the tangent of the grinding cutter path at the cutter point. The direction of the Y-axis of {Mi} can be determined by the right-hand rule.

The coordinate position of the cutter points, the normal to the grinded surface, and the tangent of the grinding cutter path are described by the workpiece inherent coordinate system {T}. According to the definition of the pose matrix, the pose matrix of the coordinate system {Mi} to the workpiece inherent coordinate system {T} can be obtained.

Figure 2 shows the robotic grinding platform. The robot body is the MOTOMAN-MH24 robot produced by YASKAWA, and its model is YR-MH00024-A00. {B} is the base coordinate system of the robot. {6} is the coordinate system of the robot end joint. {G} is the tool coordinate system of the belt wheel. {Mi} is the coordinate system of the ith cutter point on the ground curved surface. {T} is the inherent coordinate system of the workpiece. The pose matrix of the coordinate system {T} to the coordinate system {6} depends on the structure of the workpiece fixture. The pose matrix of the tool coordinate system {G} to the base coordinate system {B} can be obtained by calibration.

The grinding process essentially allows the cutter points to contact the belt wheel in sequence. When the ith cutter point is ground, the coordinate system {Mi} coincides with the tool coordinate system {G}, and we can obtain the following:where can be expanded as follows:

By combining equation (1) with equation (2), we can obtain the following:

By inputting the pose matrix obtained from formula (3) into the reverse kinematics solution algorithm, we can obtain the joint space pose θ = [θ1∼θ6] of the robot when the ith cutter point is ground.

By substituting the pose matrix , , and into formula (3) in sequence, we can obtain the corresponding of the ith cutter point. According to the reverse kinematics solution algorithm and the corresponding of each cutter point, we can obtain the robot path for grinding this curved surface.

2.2. Large Angular Variation and Collision Occur in Robotic Grinding

The tool coordinate system {G} is fixed in the generation of the robotic grinding path, namely, does not vary. For example, the tool coordinate system {G} is fixed at the middle position of the front end of the belt, as shown in Figure 3.

For some workpieces, the joint angle of the generated robotic grinding path will vary greatly. The joint angle may exceed the limit in robotic grinding. For example, Figure 4 shows a V-shaped workpiece. The row pitch of the cutter path is set to 5 mm on the V-shaped curve, and the bow height error between the adjacent cutter points is set to 0.05 mm. The coordinate system {M} is established at each cutter point, as shown in Figure 5.

The pose matrix of the tool coordinate system {G} to the robot base coordinate system {B} is set as follows:

The pose matrix of the workpiece coordinate system {T} to the coordinate system {6} is set as follows:

By substituting the pose matrix , , and every into formula (3), we can obtain the robot path for grinding the V-shaped workpiece. The robot path for grinding the V-shaped workpiece is shown in Figure 6. As indicated, the angular variation of the 4th joint is large.

Collision may occur when the generated robotic grinding path is executed. As shown in Figure 7, when the robot is machining part A of the S-shaped workpiece, part B of the S-shaped workpiece collides with the belt wheel and the surface shape of the workpiece is damaged.

Given the disadvantages of the robotic grinding path generation algorithm outlined above, it is necessary to optimize the robotic grinding path generation process to make the generated robotic grinding path feature smaller angular variation of the joint and no collision.

3. Optimization Method in Robotic Grinding

3.1. Optimization Principle

The pose matrix in formula (3) can be adjusted to optimize the robotic grinding path. As shown in Figure 8(a), the {G} coordinate system can be moved by a certain distance along the negative direction of the X-axis to prevent collision between the belt wheel and part B area of the S-shaped workpiece. As shown in Figure 8(b), the {G} coordinate system can be rotated by a certain angle at the edge of the belt wheel to adjust the robot pose during robotic grinding.

A proper position of {G} is searched for each cutter point in the generation of the robotic grinding path. The contact position between the workpiece and the belt wheel during grinding can be varied over different positions of {G}. Then, the robot pose during robotic grinding can be adjusted by changing the position of {G} to obtain a robotic grinding path with a smaller joint change and no collision.

The initial position of the tool coordinate system {G} is set at the midpoint of the belt wheel width (as shown in Figure 3). The initial tool coordinate system is marked {G0}. The Z-axis of {G0} is vertical to the axis of the belt wheel and parallel to the horizontal plane. The X-axis of the {G0} is parallel to the axis of the belt wheel and points to the left. The pose matrix of {G0} to the robot base coordinate system {B} can be obtained by calibration. {G0} enables translational adjustment within the width range of the belt wheel, as shown in Figure 9.

Given that the width of the belt wheel is , {G0} is the origin of translational adjustment. Rightward movement of the {G0} coordinate system is the forward direction of translational adjustment. Leftward movement is the negative direction of translational adjustment. Variable a is the distance of translational adjustment, and the range of a is . {G} is the coordinate system after translational adjustment for {G0}. The pose matrix of {G} to the robot base coordinate system {B} is ; thus, we obtain the following:

In this formula, is the pose matrix of {G} to {G0}. The corresponding calculation formula is expressed as follows:

The tool coordinate system is indicated as {L} or {R} when {G0} lies on the left or right edge of the belt wheel, respectively. {L} can rotate clockwise around the Y-axis, and {R} can rotate anticlockwise around the Y-axis, as shown in Figure 10.

Given that {L} rotates around the Y-axis clockwise by d degrees, the tool coordinate system is indicated as {G} after rotational adjustment. The pose matrix of {G} to the robot base coordinate system {B} is as follows:

To simplify formula (8), we can obtain the following:

Similarly, after {R} rotates about the Y-axis anticlockwise by d degrees, the tool coordinate system {G} is obtained. The pose matrix of {G} to the robot base coordinate system {B} is

3.2. Consolidation of Tool Coordinate System Adjustment Formula

The grinding area of the belt wheel can be divided into three areas (shown as Figure 11): a left rotational adjustment area, a right rotational adjustment area, and a translational adjustment area. The tool coordinate system can make corresponding adjustments in these areas. Because the left rotational adjustment area, the right rotational adjustment area, and the translational adjustment area do not overlap, the calculation formula for the tool coordinate system after adjustment can be merged and described by one variable t.

Given that the variable t is 0 at {G0}, the width of the belt wheel is and D is a constant representing the range of angles at which the workpiece can rotate at the edge of the abrasive pulley; thus, we can obtain the following:(1)For t, the tool coordinate system {G} is in the left rotational adjustment area. The clockwise rotation angle around the Y-axis is . After d is substituted into formula (9), the corresponding of the variable t can be obtained:(2)For t, the tool coordinate system {G} is in the translational adjustment area. After t is substituted into formulas (6) and (7), the corresponding of the variable t can be obtained:(3)For t, the tool coordinate system {G} is in the right rotational adjustment area. The anticlockwise rotation angle around the Y-axis is . After d is substituted into formula (10), the corresponding of the variable t can be obtained:

As long as the specific value of t is given, the pose matrix can be obtained by equations (11) to (13); that is, each value of t corresponds to a specific position of {G}. A proper t value shall be specified for each cutter point. The of each cutter point and are substituted into formula (3) to obtain a robotic grinding path with smaller joint angular variation and no collision.

3.3. Coordinate Plane Description of Robotic Grinding Path

To describe the process of generating the optimal robotic grinding path, the coordinate plane in Figure 12 is established. The ordinate value of the coordinate plane is the sequence number of cutter points. The abscissa value is the variable t. Every point (i,t) in the coordinate plane is a node marked Node(i,t). The notation Node(i,t) indicates that the robotic grinding pose of the ith cutter point is generated by using the pose matrix .

Each cutter point must be ground only once; therefore, each cutter point corresponds to a single node. The nodes can be sorted according to the sequence number of the corresponding cutter point. The sorted nodes compose the robotic grinding path.

The shaded region is the collision area. The nodes of the robotic grinding path shall not fall into the shaded region.

4. Optimal Search Algorithm for Robot Grinding Path

4.1. Generation of Search Field

The coordinate plane in Figure 12 indicates that the robotic grinding path is a list composed of a series of nodes. The optimal search algorithm searches the optimal robotic grinding path in the collection that contains all nodes.

t is a continuous variable such that each column of the coordinate plane includes limitless nodes. The positive integer M can be set, and t can be uniformly dispersed over M values, where M is the input of the method and a constant value; then, we can obtain a node matrix with M rows and N columns, where N is the total number of cutter points, as shown in Figure 13.

A structure can be established to save the information of a node. The members of the node structure are described as follows:(1)The variable t is used to save the corresponding ordinate value of the node(2)The variable i is used to save the corresponding cutter point sequence number of the node(3)The array RobotPose[6] with a length of 6 is used to save the robot posture of the node(4)The array Origin[3] with a length of 3 is used to save the origin position of {Mi}(5)The array AxisZ[3] with a length of 3 is used to save the direction vector of the Z-axis of {Mi}(6)The array AxisX[3] with a length of 3 is used to save the direction vector of the X axis of {Mi}

The node structure is established for each node of the matrix in Figure 13. Then, we can obtain the node structure matrix NodeMatrix with M rows and N columns, as shown in Figure 14. The NodeMatrix is used as the search field of the optimal search algorithm. The optimal search algorithm searches the elements in the NodeMatrix; if the search is successful, we can obtain a robotic grinding path with smaller joint angular variation and no collision.

4.2. Single-Step Search

After NodeMatrix is obtained, the optimal search algorithm is designed. Based on the above description and actual grinding conditions, the optimal robotic grinding path should satisfy the following three requirements: the variation of the robot joint angles is small; the parts are continuously cut; and there is no collision between the workpieces and the belt wheel.

To better describe the algorithm, this section first describes the single-step search process of the algorithm. The optimal search algorithm is designed based on the single-step search process and the recursive method. The robotic grinding path generated by the algorithm should satisfy the three abovementioned requirements.

In each single-step search, the algorithm selects only one node from a column of NodeMatrix and stores the selected nodes into the track list RobotTrackList. The nodes in the ith column of NodeMatrix are the searchable nodes of the ith cutter point.

Provided that the algorithm searches the ith column of NodeMatrix, the last node of the track list RobotTrackList corresponds to the (i − 1)th cutter point, which is marked Nodei−1. The nodes of the ith column are searched as follows:Step 1: traverse all nodes of the ith column of NodeMatrix and determine the max joint angle Max θi and the minimal joint angle Min θi (i = 1∼6) of the entire track when these nodes act as Nodei of RobotTrackList. Iteratively, calculate the total joint change ∆θ usingStep 2: sort the nodes of the ith column of NodeMatrix in the ascending order of ∆θ. After sorting, the first node of the ith column of NodeMatrix indicates the node that guarantees minimal joint angular variation. Then, the first node is inserted into the end of RobotTrackList and acts as Nodei, which corresponds to the ith cutter point, as shown in Figure 15.Step 3: calculate the difference Δt between Nodei−1 and Nodei of RobotTrackList. If the value of Δt is large, the distance on the belt wheel between Nodei−1 and Nodei is wide, as shown in Figure 16.To ensure that the workpiece is continuously cut during grinding, the intermediate nodes should be inserted between Nodei−1 and Nodei.For example, when the track is executed to Nodei−1, the part is located on the left edge of the belt wheel; when the track is executed to Nodei, the part is located on the right edge of the belt wheel, as shown in Figure 17. To ensure continuous grinding of the part, the additional intermediate nodes should be inserted between two adjacent nodes. The inserted intermediate nodes are equivalent to additional postures inserted between two machining postures.Provided that the difference Δt between two adjacent nodes does not exceed ΔT, define middleNum as the number of intermediate nodes between Nodei−1 and Nodei. The value of middleNum can be calculated by the following equation:where is an integer function and ΔT is a constant, which is the maximum limit to the change of adjacent t values.Through linear interpolation of Nodei−1 and Nodei, the members in the structures of the intermediate nodes can be calculated as follows:j = (1∼middleNum). After tj, Originj, AsixZj, and AxisXj are calculated, the coordinate system {Mj} of the intermediate nodes can be established and can be obtained. can be obtained by equations (11) and (13) according to tj. Then, and are substituted into equation (3), and the robot grinding posture of Nodej can be obtained by the inverse kinematics algorithm.After all intermediate nodes are obtained, these nodes are inserted between Nodei−1 and Nodei, as shown in Figure 18. Step 4: Because Nodei and the intermediate nodes may fall into the collision area, collision detection shall be performed for Nodei and the intermediate nodes.(1)If Nodei and the intermediate nodes do not fall into the collision area, let Nodei be the starting point, and conduct the next search round of search.(2)If Nodei or one of the intermediate nodes is within the collision area, collision will occur during grinding; thus, the current Nodei and the intermediate nodes shall be abandoned; then, the search starting point shall return to Nodei−1, and the next node of the ith column of NodeMatrix is searched.

As shown in Figure 19, the first node of the ith column of NodeMatrix is searched and Track1 is obtained. Because collision is detected in the partial nodes of Track1, Track1 shall be abandoned and the search starting point returns to Nodei−1. The second node of the ith column of NodeMatrix is searched, and Track2 is obtained. The algorithm detects whether collision occurs in the Nodei and the intermediate nodes of Track2. If collision still occurs, the Track2 shall be abandoned and the third node of the ith column of NodeMatrix shall be searched; if no collision occurs, the nodes on Track2 shall be placed into the RobotTrackList, and the next round of search is conducted.

4.3. Optimal Robotic Grinding Path Search Algorithm Based on Recursive Method

The optimal robotic grinding path search algorithm is proposed based on the single-step search method. Provided that the ith cutter point has been searched, Nodei of RobotTrackList is the node of the ith column of NodeMatrix. The nodes of the (i + 1)th column of NodeMatrix are searched. All situations in searching can be summarized by the following three situations:Situation 1: when the node of the (i + 1)th column of NodeMatrix is searched, this node is used as Nodei +1 and the intermediate nodes are generated. Then, collision detection is conducted for Nodei+1 and the intermediate nodes. If no collision is detected, the search function is recursively called to search the nodes of the (i + 2)th column of NodeMatrix. Because the ith layer of the search function is called when Nodei+1 is searched, this is the (i + 1)th layer recursive call of the search function, as shown in Figure 20.Situation 2: when the node of the (i + 1)th column of NodeMatrix is searched, this node is used as Nodei+1, and the intermediate nodes are generated. Then, collision detection is conducted for Nodei+1 and the intermediate nodes. If collision is detected and ki+1 is not equal to M, Nodei+1 and the intermediate nodes are abandoned. Then, the ith layer of the search function continues, and the (ki+1 + 1)th node of the (i + 1)th column of NodeMatrix is searched, as shown in Figure 21.Situation 3: when the ki+1th node of the (i + 1)th column of NodeMatrix is searched, this node is used as Nodei+1, and the intermediate nodes are generated. Then, collision detection is conducted for Nodei+1 and the intermediate nodes. If collision is detected and ki+1 is equal to M, the algorithm cannot search the node without collision from the (i + 1)th column of NodeMatrix. Nodei, Nodei+1 and the corresponding intermediate nodes of two nodes in the RobotTrackList would be abandoned. Then, the ith layer of the search function is terminated and returns to the (i − 1)th layer of the search function. The (i − 1)th layer of the search function continues, and the (ki+1)th node of the ith column of NodeMatrix is searched, as shown in Figure 22.

By combining the three situations and based on the recursive method, the implementation steps of the optimal robotic grinding path search algorithm can be established. Provided that the NodeMatrix has been obtained, the numbers of rows and columns of NodeMatrix are M and N. The first-column node of NodeMatrix closest to the initial robot posture is denoted Node1. Node1 is inserted into the RobotTrackList.

Algorithm 1 shows the pseudocode of the recurse search method.

Extract the last node structure in the RobotTrackList, and get the variable i of this structure.
IF (i = N)
  The track search is complete. The search function is terminated and returns to the function call point.
ELSE
  Traverse all nodes of the (i + 1)th column of the NodeMatrix. The total joint variation θ of the robot grinding path is calculated when these nodes act as Nodei+1. The nodes of the (i + 1)th column of NodeMatrix are sorted in ascending order of θ.
  A variable k is created, and k = 1.
  Fork = 1 to M
    The kth node of the (i + 1)th column of NodeMatrix is searched. Make this node Nodei+1, and the intermediate nodes are   generated. Then, collision is detected for Nodei+1 and the intermediate nodes.
    IF (no collision occurs)
     The search function for this round is complete. Insert the Nodei+1 into the RobotTrackList at the end. Exit this function     and call for the next round of search.
    ELSE
     IF (k < M)
       Nodei+1 and the intermediate nodes in the RobotTrackList are abandoned.
    ELSE
       The algorithm cannot search the proper node from the (i + 1)th column of NodeMatrix. Nodei, Nodei+1, and the     corresponding intermediate nodes of two nodes in the RobotTrackList are abandoned. The ith layer of the search function is     terminated and returns to the (i − 1)th layer of the search function.
    End
   End
  End
End

5. Simulation and Experiment

Through the analysis of the above sections, in theory, the proposed algorithm can optimize the grinding path of the robot and can generate a path with small angle change and no collision. However, in order to better verify the feasibility of the algorithm, simulation and grinding experiments of V-shaped workpiece are needed to verify the advantage that the algorithm can generate processing path with small angle change. Furthermore, the collision avoidance performance of grinding path can be verified by simulation and experiment of S-shaped workpiece.

5.1. Algorithm Implementation
5.1.1. Algorithm Implementation Platform

The optimal robotic grinding path search algorithm is implemented on the V-REP platform. V-REP is an open-source robot simulation and integration development platform. The platform can accurately simulate the entire robot system. In addition, V-REP provides a rich and powerful application program interface (API), so users can quickly validate the algorithm. The scenario simulation, collision detection, and motion simulation functions in V-REP are mainly used in implementing the algorithm.

Visual Studio2013 and Qt are used to program a secondary development program for V-REP. The secondary development program includes the optimal robotic grinding path search algorithm, the robot forward kinematics algorithm, and the robot inverse kinematics algorithm. The V-REP software runs the scenario simulation, collision detection, and motion simulation functions. The secondary development program can transfer the robot posture to the V-REP for simulation. V-REP can transfer the simulation results and collision detection results to the secondary development program to provide the necessary information for the optimal robotic grinding path search algorithm.

5.1.2. General Flow of the Optimal Robotic Grinding Path Search Algorithm

Table 1 shows the input parameters of the optimal robotic grinding path search algorithm.

The general flow of the algorithm is described as follows:Input: the workpiece cutter points, the parameters in Table 1, the empty track list RobotTrackList, and the empty matrix NodeMatrix(1)According to the cutter points of the workpiece, the parameters in Table 1, and the tool coordinate system position adjustment formula, the coordinate plane in Figure 12 can be established. Then, the positive integer M can be set, and the ordinate value of the coordinate plane is dispersed to obtain the NodeMatrix. The NodeMatrix has M rows and N columns, where N is the total number of cutter points.(2)Make the node in the first column of NodeMatrix closest to the initial robot posture Node1. Then, insert Node1 into RobotTrackList.(3)The recursive search function RecurseSearch() is called to search the nodes in NodeMatrix. When the function RecurseSearch() is terminated and the algorithm returns to this position, step (4) is performed.(4)Extract the last node structure in RobotTrackList. Determine whether the variable i of the structure is equal to N.If i = N, the “optimization success” and the track list RobotTrackList are outputted.If i ≠ N, RecurseSearch() does not successfully complete a search. “Optimization failure” is outputted, and the track list RobotTrackList is cleared.

5.2. Simulation Analysis and Grinding Experiment of V-Shaped Workpiece
5.2.1. Simulation Analysis of V-Shaped Workpiece

The optimal robotic grinding path search algorithm is used to generate the robotic grinding path of the V-shaped workpiece shown in Figure 4. The cutter points in Figure 5 are imported into the algorithm. is set to 50 mm, D is set to 45 degrees, M is set to 140, and ΔT is set to 1. is set as the matrix in equation (4). is set as the matrix in equation (5). The robot track for grinding this V-shaped workpiece is obtained using the proposed algorithm and is shown in Figure 23.

The joint variation of the track in Figure 6 and that of the track in Figure 23 are indicated in Table 2. Comparing these two tracks shows that the maximal joint variation of the track obtained by the optimal algorithm decreases from 2.8134 rad to 1.067 rad.

The coordinate plane of this optimized track is illustrated in Figure 24. Figure 24 shows that no collision occurs in the track. The collision area can be obtained by traversing every structure in NodeMatrix and using the collision detection function of the V-REP. Because collision must be detected for every structure in NodeMatrix, the process is time-consuming in the generation of the collision area. The algorithm spends 3528 s generating the collision area in Figure 24. When the optimal robotic grinding path search algorithm is used to generate the robotic grinding path, there is no need for the collision area. Collision can only be detected for the searched node and the intermediate nodes in Step (3) of the RecurseSearch() function, as detailed in Section 4.3. The algorithm takes only 38.91 s to generate the robotic grinding path of the V-shaped workpiece.

5.2.2. Grinding Experiment of V-Shaped Workpiece

A V-shaped workpiece is ground by the optimal grinding path generated in Section 5.2.1. The effect after grinding is shown in Figure 25.

A three-coordinate measurement instrument is used to sample the surface profile of Figure 25(b), as shown in Figure 26. The precision of the instrument is 2 μm, and the instrument uses its probe for sampling. The probe of the instrument carries out 5 parallel scans in the thickness direction of the workpiece. The sampling points are plotted in the 3D coordinate system, as shown in Figure 27.

Given that the ith sampling point is Pi. Then, the distance between Pi and the ideal profile curved surface is . is defined as the shape error at each sampling point. Taking the ordinal number of the sampling points as the X-axis and the shape error of each sampling point as the Y-axis, the error distribution map of the sampling points can be obtained as shown in Figure 28. The maximum, mean, and standard deviation of the errors are shown in Table 3.

The bow error is set to 0.05 mm, but the mean error and the maximum error actual measured are 0.094 mm and 0.236 mm. The measured value and the set value vary for the following reasons: First, the belt wheel is nonrigid, as it is made of rubber. When the belt wheel contacts the workpiece, slight deformation occurs. Second, the open chain structure of the robot is not very rigid and deforms during grinding. Third, the tool coordinate system features a calibration error.

The curved surface is divided into several areas, as shown in Figure 29. The roughness instrument measures each area and records the measured results. The measuring range of the instrument is Ra0.025 to Ra16.

The measured results are shown in Table 4. The mean roughness of the surface is 1.151 μm, and the standard deviation is 0.110 μm. The roughness mean values in the X and Y directions are approximate, and the maximum standard deviation is only 0.141 μm. This finding indicates that the processing quality of the surface is consistent.

The experimental results show that the robot grinding path generated by the algorithm can ensure surface quality.

5.3. Simulation Analysis and Grinding Experiment of S-Shaped Workpiece
5.3.1. Simulation Analysis of S-Shaped Workpiece

The collision avoidance capability of the algorithm can be validated using an S-shaped workpiece. The dimensions of the S-shaped workpiece are shown in Figure 30. The spacing of the cutter path is set to 5 mm. The bow height error between the adjacent two cutter points is set to 0.05 mm. The cutter points of this S-shaped workpiece are generated as shown in Figure 31, and the coordinate system {M} is established on every cutter point.

The cutter points in Figure 31 are imported into the optimal robotic grinding path search algorithm. is set to 50 mm, D is set to 45 degrees, M is set to 140, and ΔT is set to 1. is set as the matrix in equation (4). is set as the following matrix:

The algorithm takes 36.07 s to generate the robotic grinding path of the S-shaped workpiece. The robotic grinding path of the S-shaped workpiece is shown in Figure 32. The joint changes of the grinding path are shown in Table 5.

The coordinate plane of the track is illustrated in Figure 33. The algorithm spends 3036 s generating the collision area. Figure 33 shows no collision in the track.

5.3.2. Grinding Experiment of S-Shaped Workpiece

An S-shaped workpiece is ground by the optimal grinding path generated in Section 5.3.1. The effect after grinding is shown in Figure 34.

A three-coordinate measurement instrument is used to sample the surface profile of Figure 34(b). The sampling points are plotted in the 3D coordinate system, as shown in Figure 35.

The error distribution map of the sampling points is shown in Figure 36. The maximum, mean, and standard deviation of the errors are shown in Table 6.

The mean error and the maximum error actual measured are 0.081 mm and 0.202 mm, which are equivalent to the shape error of the V-shaped workpiece.

The curved surface is divided into several areas, as shown in Figure 37. The roughness instrument measures each area and records the measured results. The measured results are shown in Table 7.

The mean roughness of the surface is 1.215 μm, and the standard deviation is 0.152 μm. The roughness mean values in the X and Y directions are approximate, and the maximum standard deviation is 0.221 μm. This finding indicates that the processing quality of the surface is consistent.

The experimental results show that the robot grinding path generated by the algorithm can ensure surface quality.

6. Discussion and Conclusions

To obtain a robotic grinding path with a small joint angular variation and no collision, the robot optimal grinding path search algorithm is proposed. The algorithm optimizes the grinding pose of the robot by adjusting the position of the tool coordinate system on the grinding wheel. First, the coordinate plane is established to describe the grinding path. Second, the ordinate value of the coordinate plane is dispersed to obtain the search field of the algorithm. Third, the single-step search process of the algorithm is proposed. Finally, based on the single-step search process and the recursive method, the optimal robotic grinding path search algorithm is obtained.

The optimal robotic grinding path search algorithm is implemented on the V-REP platform. The algorithm is used to generate the grinding path of a V-shaped workpiece and an S-shaped workpiece. Then, the generated grinding path is used to carry out simulations and grinding experiments of the two parts. The simulation and experimental results demonstrate the feasibility of the algorithm.

Referring to the modeling method in the author’s previous paper [26], this paper improves the algorithm of robot grinding trajectory calculation in [26], which not only meets the requirements of collision but also achieves the grinding trajectory with small total variation of joint angle, thereby improving the smoothness of the robot movement process, improving the grinding efficiency, and reducing the cost.

However, the proposed algorithm still has some limitations. Because the algorithm is conditioned by the minimum angle change when selecting the value of the variable “t,” the final robot path is the local optimal solution with the minimum angle change. As for the search method of global optimal solution, further research is needed. In addition, the surface roughness of the workpiece is related to the force in the process of robot grinding. In this paper, the measurement of surface quality is mainly to show that the robot path obtained by this method can ensure that there is no collision, the angle change is small, and the quality will not deteriorate. As for how to improve the grinding quality, we will do further research about force control method in the future.

Data Availability

No data were used to support this study.

Conflicts of Interest

The authors declare that there are no conflicts of interest.

Acknowledgments

This work was supported by the National Science and Technology Major Project of China (grant number 20152X04005006); Science and Technology Planning Project of Guangdong Province, China (grant numbers 2014B090921004, 2014B090920002, and 2015B010918002); and Science and Technology Major Project of Zhongshan, China (grant number 2016F2FC0006).