Collision-free planning algorithm of motion path for ... - SAGE Journals

8 downloads 0 Views 1MB Size Report
but it has higher requirements for computing resources. ...... mdU i. ∆· collision area collision area optimal curve. Figure 13. d0 iю1 is in the neighborhood Uрdi, ...
Research Article

Collision-free planning algorithm of motion path for the robot belt grinding system

International Journal of Advanced Robotic Systems July-August 2018: 1–13 ª The Author(s) 2018 DOI: 10.1177/1729881418793778 journals.sagepub.com/home/arx

Tie Zhang and Jiewen Su

Abstract Collision may occur during the grinding of a workpiece by a robot sand belt. To solve this problem, a collision-free planning algorithm for the robot motion path is developed based on the collision layer method. Collision-free planning of the robot motion path is studied, and a means to adjust the machining frame on the belt is determined (i.e. moving along the axis of the belt and rotating around the tangent line). The planning curve is rapidly found on the collision layer using neighborhood search and recursive methods, and the amount of collision detection is significantly reduced. The planning curve is transformed into the robot motion path. Simulation and experimentation show that the amount of collision detection required by the proposed algorithm is 3.86% less than that required by a method using a complete collision layer. Moreover, the robot grinds the workpiece without collision. The proposed method is simple, stable, and easy to implement and possesses a good engineering application value. Keywords Robot belt grinding, path collision-free planning, collision layer, neighborhood search method, recursive method Date received: 30 October 2017; accepted: 23 June 2018 Topic: Robot Manipulation and Control Topic Editor: Anis Koubaa Associate Editor: Olga Battaia

Introduction Robot belt grinding can overcome the shortcomings of manual belt grinding because of its high efficiency and precision. Therefore, it has been widely used in industrial production. With the shape of the workpiece becoming increasingly complex, the robot in the belt grinding process is prone to different types of collision, such as workpiece–tool and robot–tool collision. Therefore, studying the collision-free planning of the robot motion path is necessary. The collision-free path planning problem in robot belt grinding is similar to that in non-interference tool path planning in numerical controlled (NC) belt grinding. The NC system involves local and global interference.1 Local interference means that the tool interferes with the workpiece during machining. Local interference is divided into

local and rear gouging. Local gouging refers to the interference between the cutter and workpiece near the cutter contact, and rear gouging refers to the interference between the other parts of the tool and the workpiece. Global interference refers to the interference between the workpiece and machine or between the tool and machine during machining. Global interference is more harmful than local interference because it can damage machines. A common solution to the interference problem is to adjust the tool School of Mechanical and Automotive Engineering, South China University of Technology, Guangzhou, China Corresponding author: Tie Zhang, School of Mechanical and Automotive Engineering, South China University of Technology, Guangzhou 510641, China. Email: [email protected]

Creative Commons CC BY: This article is distributed under the terms of the Creative Commons Attribution 4.0 License (http://www.creativecommons.org/licenses/by/4.0/) which permits any use, reproduction and distribution of the work without further permission provided the original work is attributed as specified on the SAGE and Open Access pages (https://us.sagepub.com/en-us/nam/ open-access-at-sage).

2 orientation. Sturz method,2–6 visibility and accessibility method,7–9 principal-axis method (PAM),10,11 and Arcintersect method (AIM)12,13 are commonly adopted methods. Sturz method involves less calculation and is widely used in commercial software. But the tool path generated by this method is inefficient. Visibility and accessibility method generates the smooth and collision-free tool path, but it has higher requirements for computing resources. The tool path generated by PAM has wider tool path interval and uniform scallops. But the tool path becomes more complicated with the increase of the tool path interval. AIM is an area-based method that generates gouge-free tool positions without the use of iterative gouge-check and correction algorithms. Xu et al.14 presented a tool orientation smoothing method based on the non-uniform rational basis spline (NURBS) envelope. In this method, tool orientation is adjusted by evaluating the intersection of the NURBS envelope so that no collision occurs during machining. This method has been successfully applied to the formation of a collision-free tool path in blade processing. Li and Jerard15 proposed a tool path collision avoidance method based on angle adjustment. The method transforms a parametric surface into a mesh surface and then determines the corresponding cutter location for each triangular piece. Subsequently, the position and angle of the tool are adjusted through interference detection to generate a tool path without gouging. Wang et al.16 proposed a tool orientation collision-free planning method based on the graphics-assisted approach. In this method, the visibility and accessibility cones of the cutter contact (CC) points where collisions occur are calculated through graphicsassisted cubic mapping. Afterward, the tool orientation of a CC point is selected from its visibility and accessibility cones. Li and Feng17 developed a method to avoid rear and side gouging by adopting binary and bisection search methods. However, this method is only applicable to the processing of curved surfaces with small curvature. Robot Master,18 a plug-in of Master CAM, achieves collisionfree robot path planning through the collision layer. The adjustment of the robot end cutter is converted into a planning curve to avoid passing the collision area on the collision layer, and collision-free path planning for the robot is realized. However, this method is usually applied to the robot end clamping tool and is inapplicable to the robot end clamping workpiece. Furthermore, the method requires adjusting the planning curve manually, so its operation is highly complicated. After applying the collision layer method, the problem of three-dimensional (3-D) robot motion path planning is transformed into a 2-D path planning problem. This transformation simplifies the problem and is intuitively effective. This method has been widely used in actual collision-free robot motion path planning. Path planning methods in 2-D space include C space19–21 and artificial potential field.22–25 However, these methods need to generate a complete collision layer. That is, extensive collision

International Journal of Advanced Robotic Systems detection, which is time consuming, is needed. Searching for the optimal curve without a complete collision layer must therefore be studied, and a collision-free planning algorithm must be established for the robot motion path. To address the problem of collision-free planning of the robot motion path in robotic belt grinding systems, the principle of such planning is analyzed in this study in “Principle of collision-free planning of robot motion path” section. A method to adjust the machining frame on the belt is determined and a corresponding model is established in “Principle of machining frame translation along the axis” section. A collision-free path planning method based on the collision layer method is also developed in “Principle of machining frame rotation around the tangent” section. The optimal curve on the collision layer is determined with neighborhood search and recursive methods. As a result, the amount of collision detection is reduced. Subsequently, “Collision-free planning algorithm for robot motion path” section creates a program to achieve a collision-free robot path planning algorithm. Simulation of collision-free planning of robot motion path and robot grinding experiments verify the feasibility of the algorithm in “Simulation and grinding experiment on the collision-free planning algorithm for the robot motion path” section. The algorithm proposed in this article can automatically and quickly carry out collision free planning for the robot motion path. Compared to the generation of the complete collision layer, the algorithm can greatly reduce the number of collision detection and improve the planning speed of the algorithm.

Principle of collision-free planning of robot motion path Robot belt grinding is realized as follows: (1) the grinding path of the workpiece is generated according to the workpiece model through automatic path planning techniques, (2) the workpiece grinding path is transformed into the robot motion path, and (3) the robot grinds the workpiece according to the motion path. As shown in Figure 1, converting the grinding path of the workpiece into the robot motion path involves mapping the CC points on the grinding path to the corresponding path points on the robot motion path. A frame is added to each CC point on the workpiece grinding path with the _ same z axis as the unit outside normal vector on the surface of the workpiece. The workpiece frame is fOg, the frame of the ith CC point on the grinding path is fMi g, and the position and orientation of fMi g relative to fOg are denoted by MiO T . The robot is used to clamp the workpiece at the end, so the tool frame fT oolg at the end of the robot O coincides with the fOg of the workpiece; thus, Tool MT ¼ MT. 0 As shown in Figure 2, machining frame fM g is defined at a point on the belt, and its position and orientation are denoted by MB0 T . CC point frame fMg on the grinding path

Zhang and Su

3

robot motion path

Grinding path of workpiece

yˆ M ′

{Tool1} {Tool2 }

{Tool4 }

{M 4 }

{Tool3}

xˆ M ′

{M ′}

yˆ S

{M o′ }

{S}

xˆ S

xˆ M ′

(a)

{Tool6 }

(b)

Figure 3. Machining frame fM0 g and initial machining frame fM0o g on the sand belt.

{M 1}

{O} {B}

Figure 1. Workpiece grinding path transformed into the robot motion path.

workpiece

{M } {Tool}

robot

{M′} {B}

sand belt

Figure 2. Robot holds the workpiece for grinding.

coincides with fM 0 g, which means that the belt processes this CC point. After generating the workpiece grinding path and adding a frame to each CC point ðTool M T Þ, the position and orientation of all the CC points are determined. To determine the joint space position of each point in the robot motion path, the robot tool frame’s position and orientation relative to the base frame, ToolB T , must be determined. fMg ¼ fM 0 g, so B M T

¼ MB0 T

ð1Þ

Then B Tool T

zˆ S

zˆM ′

{M 3}

{M 2 }

zˆM ′

yˆ M ′

{M 5 }

M M ¼ MB T  Tool T ¼ MB0 T Tool T

ð2Þ

¼ MO T 1

ð3Þ

in which M Tool T

The Cartesian space position and orientation of each point in the robot motion path are obtained. According to the robot inverse kinematics solution algorithm in the literature26,27 and ToolB T , the joint space configure q ¼ ½ q 1 q2 q 3 q 4 q5 q 6  of each point in the robot motion path can be obtained.

The precondition of robot collision-free path planning is to ensure that the machining quality meets established requirements. According to equation (2), when the workpiece grinding path is generated, Tool M T is fixed for a certain CC point and will inevitably affect the processing quality if it is modified. MB0 T can be changed, which is equivalent to changing the position and orientation of machining frame fM 0 g on the belt. Machining the CC point with different parts of the belt does not significantly change the processing quality. Therefore, when collision occurs during robot processing, MB0 T should be adjusted and ToolB T must be changed to avoid the joint space configure that leads to collision and realize collision-free planning of robot motion path under the premise of ensuring processing quality. The adjustment of MB0 T involves adjusting the position and orientation of machining frame fM 0 g relative to robot base frame fBg. fM 0 g is located on the belt, as shown in Figure 3(a). Initially, fM 0 g is on the central belt, which is fMo0 g, as shown in Figure 3(b), where fSg is the belt machine frame. fM 0 g can be adjusted in two ways: via translation adjustment along the axis direction of the contact wheel and via rotation adjustment around the tangential direction.

Principle of machining frame translation along the axis As shown in Figure 4(a), the workpiece collides with the tool when the robot is grinding a CC point (yellow spot in Figure 4) on the workpiece. If machining frame fM 0 g translates along the axis of the contact wheel (direction of x^M 0 ) and subsequently grinds the CC point, the workpiece and tool will not collide, as shown in Figure 4(b). Figure 5 illustrates the principle which the machining frame translates along the axis of the contact wheel. The blue frame is the initial machining frame fMo0 g. A new machining frame is formed when fMo0 g translates along the axis. The positive and negative directions of frame movement are described by the blue arrow in Figure 5. In Figure 5, the parameter a is the distance of machining frame translation. When the radius of the contact wheel is R and the width of the belt is W, the range of a is ½W =2; W =2. The position and orientation of fMo0 g and fM 0 g relative to robot base frame fBg are MBo0 T and MB0 T , respectively. Thus

4

International Journal of Advanced Robotic Systems

sand belt axis of contact wheel

sand belt

zˆM ′

zˆM ′

a

collision

sand belt

axis of contact wheel

sand belt

zˆM ′

zˆM ′

collision

{M ′}

{M ′}

{M ′}

xˆ M ′

xˆ M ′

xˆ M ′

workpiece

avoid collision

workpiece

α

xˆ M ′

workpiece

avoid collision

(a)

workpiece

(a)

{M ′}

(b)

(b)

Figure 6. Collision between the workpiece and tool and fM0 g rotating around the tangent line.

Figure 4. Collision between the workpiece and tool and fM0 g translating along the axis.

- tangent

tangent

yˆ M ′

yˆ M ′ yˆ M ′ yˆ M o′

zˆM e′

{M ′}

xˆ M e′

xˆ M e′

{M o′ }

{M ′}

{M e′ }

zˆM ′

{M ′}

α

+

axis of contact wheel

zˆM ′

zˆM e′

{M e′ }

xˆ M ′ α

zˆM o′

yˆ M e′

yˆ M e′

zˆM ′

xˆ M o′

(a)

xˆ M ′

+

(b)

xˆ M ′

a

Figure 7. Machining frame rotates around the tangent line.

B B M 0 T ¼ Mo0 T

M0

 Mo0 T

ð4Þ

M0

where Mo0 T is the position and orientation of fM 0 g relative is shown below 3 0 0 a 1 0 0 7 7 7 0 1 0 5

-----------

M0

to fMo0 g. The value of Mo0 T 2 1 60 0 Mo 6 M0 T ¼ 6 40

ð5Þ

----------0

0

0

1

to the edge of the sand belt; otherwise, the workpiece will definitely collide with the tool. fMe0 g is formed when fM 0 g translates axially to belt edge, as shown by the blue dotted frame in Figure 7. The x^Me0 or y^Me0 of fMe0 g is collinear with the tangential line at Me0 point, and fM 0 g can be obtained after fMe0 g rotates at an angle of a around the tangent. fMe0 g on the left edge of the belt (Figure 7(a)) and on the right edge (Figure 7(b)) in the rotation direction are different. The direction of rotation is shown in Figure 7. In Figure 7, when the maximum angle of rotation of the coordinate system around the tangent is A, the minimum rotation angle is 0. shown below

Principle of machining frame rotation around the tangent line As shown in Figure 6(a), a CC point of the grinding path is machined when the machining frame translates axially to the edge of the sand belt. The workpiece collides with the tool because of the workpiece shape. When fM 0 g rotates at angle a around y^M 0 , the edge of the sand belt is used to process the CC point. As shown in Figure 6(b), the CC point can be machined without collision. Figure 7 shows a schematic of the rotation of machining frame fM 0 g around the tangent line, and the arrow on the tangent line represents the forward direction. This rotation adjustment is performed only when fM 0 g is axially shifted

Mo0 M0 T

2

can be calculated in two cases as

cosa 6 0 0 Mo 6 M0 T ¼ 6 4  sina

0 1

-----------

Figure 5. Diagram of machining frame axial translation.

sina 0

3 a 07 7 7 05

0 cosa -----------------0 0 0 1

ð6Þ

Integration of two adjustment methods for the machining frame To facilitate the calculation and realization of the two adjustment methods of the machining coordinate system, the two methods are integrated.

Zhang and Su

5

sand belt – A–

W 2

A+

W 2

A

rotate around tangent



W 2

– + M o′ 0

aˆ d

axial translation

W 2

rotate around tangent

Figure 8. Machining frame fM0 g on the coordinate axis a^ of the sand belt.

As shown in Figure 8, in establishing coordinate axis a^, the straight part of a^ represents the axial translation of fM 0 g, and the arc part of a^ represents the rotation around the tangent of fM 0 g. The straight part of a^ is parallel to the axis of the contact wheel, and its middle point is Mo0 . Machining frame fM 0 g adjusts from fMo0 g on a^, the adjustment distance is d. fM 0 g ¼ fMo0 g when d ¼ 0. fM 0 g translates axially when d 2 ½W =2; W =2. fM 0 g rotates around the tangent when d 2 ½ A  W =2; W =2Þ or d 2 ½W =2; A þ W =2Þ. The variable is t, and 8 d; d 2 ½W =2; W =2 > < ð7Þ t ¼ d þ W =2; d 2 ½ A  W =2; W =2Þ > : d  W =2; d 2 ½W =2; A þ W =2Þ M0

When d 2 ½W =2; W =2, a ¼ t is used to calculate Mo0 T M0

with formula (5); otherwise, Mo0 T is calculated with a ¼ t and a ¼ t=jtj  W =2 using formula (6).

Collision-free planning algorithm for robot motion path Collision-free planning for robot motion path is equivalent to specifying position d on coordinate axis a^ for machining frame fM 0 g corresponding to each CC point on the workpiece grinding path. The robot joint position corresponding to each CC point is thus generated so that the robot does not collide during the execution of the motion path. Based on the robot belt grinding simulation, the collision layer is established for the collision-free robot motion path planning, as shown in Figure 9(a). The abscissa is the index of CC points on the grinding path, and the ordinate is position d of the machining frame on coordinate axis a^. The coordinates of the points in the graph are ðn; dÞ, which represent the position d of fM 0 g on a^ corresponding to the nth CC point. The area between the two blue horizontal lines (d ¼ A þ W =2 and d ¼  A  W =2) in the figure is a feasible region and indicates the adjustment range of fM 0 g on a^. The blue area is the collision area. When the point ðn; dÞ falls in the area, the position of fM 0 g on a^ is d,

and the robot collides when the nth CC point is grinded. The remaining area in Figure 9(a) is a collision-free area. The robot collision-free path planning is transformed into a model like this: as shown in Figure 9(a), there are N CC points, finding a planning curve starting from n ¼ 1 and ending at n ¼ N in the feasible region in the collision layer. Using the optimized curve to calculate the position of each point on the robot’s motion path, collision-free planning of the robot motion path is realized, as shown in Figure 9(b). On the collision layer, the set CA represents the collision area, and collision detection can be used to determine whether ðn; dÞ 2 CA. Let the Pn be the nth CC point of grinding path and fMn0 g represents the machining frame of the Pn . For the collision detection process, first, the robot joint position qn corresponding to the nth CC point is calculated based on Pn and fMn0 g. Second, the robot is moved to position qn to detect whether collision occurs in the simulation scene. If collision occurs, ðn; dÞ 2 CA; otherwise, ðn; dÞ= 2 CA. If collision occurs when the robot grinds the ith CC point in the simulation, the optimal curve should be found on the collision layer. The most direct method is to generate the collision layer of the ith CC point and its neighboring layers completely and then find the optimal curve on the layer. However, this method is very time-consuming because the entire layer points run through, and collision detection is carried out when the collision layer is generated. Therefore, a planning algorithm is proposed. In the absence of a complete collision layer, the planning curve is quickly found through neighborhood search and recursive methods to realize collision-free planning of the motion path during robot grinding. The algorithm of collision-free planning of the robot motion path consists of three parts: determination of the midpoint of the collision range, one-way planning curve search algorithm based on the neighborhood search method, and bidirectional planning curve search algorithm based on the recursive method.

Determination of the midpoint of the collision-free range As shown in Figure 10, the initial curve is a straight line from point ð1; 0Þ to point ðN ; 0Þ, indicating that the position of fM 0 g corresponding to all the CC points is d ¼ 0 on a^. The robot initializes the grinding simulation from the first CC point. When the ith CC point Pi is grinded, collision between the workpiece (or robot) and the tool is detected, and the planning curve is required to realize collision avoidance. First, several collision-free intervals of fMi0 g in a^ should be obtained, such as intervals S1 and S2 in Figure 10. Second, the midpoint of each interval, such as points m1 and m2 in Figure 10, should be determined. To calculate the middle of the collision-free interval, we need

6

International Journal of Advanced Robotic Systems

d

3

2

1

A +W 2

optimal curve n=N

W 2

0

i

1 2 3

j

n

N

i

optimal path obstacle N

j

feasible area collision area

–W 2 – A–W 2

(a)

(b)

Path before optimization

Figure 9. Collision-free planning of robot motion path based on the collision layer.

d

d

A +W 2

A +W 2 S1

W 2

0

m1

……

i –1 i

N

m1

W 2

collision area (CA) 1 2 3

optimal curve

n

0

1 2

… initial curve

–W 2

initial curve S2

m2

– A–W 2

Figure 10. Midpoint of the collision-free interval of machining frame fM0 g.

fMi0 g from d ¼  A  W =2 to d ¼ A þ W =2. At certain steps, Dd goes through the entire coordinate axis a^ and carries on the collision detection to point ði; dÞ. Finally, the starting and ending points of each collision-free interval are determined and the midpoint of the interval is obtained. Assume that, i is the index of current CC point, d is the position of corresponding machining frame fMi0 g on the axis a^, and d 2 ½ A  W =2; A þ W =2, then Dd > 0 is the step of adjustment of fMi0 g. Step 1: fMi0 g goes through the axis a^ from d ¼  A  W =2 to d ¼ A þ W =2, and the collision detection for the corresponding point (i, d) is carried out. The variable result represents the detection result, result ¼ 0 if the collision occurs, otherwise result ¼ 1. Put the result into the list listresult in turn. Step 2: idx represents the index of listresult ’s element. listresult is gone through at the begin of idx ¼ 0 if current element is different from the previous element, which is listresult ½idx 6¼ listresult ½idx  1, the current index is put into the list listbegin end . Step 3: If the first element of listresult is 1, add the value 0 to the head of listbegin end .

i i +1 io

–W 2

n1 it n collision area (CA)

m2

– A–W 2

Figure 11. Searching for the one-way planning curve.

Step 4: If the last element of listresult is 1, add the value n to the tail of listbegin end , where n is the size of the listresult . Step 5: idx represents the index of listbegin end ’s element. At the beginning of idx ¼ 0, listbegin end is gone through by step 2 and the calculation for the midpoints of the collision-free interval mid pnt is given by the formula mid pnt ¼

listbegin

end ½idx

þ listbegin 2

end ½idx

þ 1  1

Dd 

W d 2

And put the mid pnt into listmid pnt in turn, where listmid pnt is the list of middle point of collision-free interval.

Searching algorithm of the one-way planning curve based on neighborhood search method As shown in Figure 11, when the midpoint of collision-free interval of the ith CC point is found, one of the midpoint m1 is selected as the starting point. An optimal curve (the red dotted curve) is searched from m1 point, in the range of n ¼ io ! it , avoids the collision area and connects the initial curve (the red solid line) after the ith CC point. The intersection point’s abscissa is n ¼ n1 . In the range of

Zhang and Su

7

optimal curve

d initial curve

di + ∆d



di + m ·∆d

pi

di

di – ∆d



pi



di

pi′+1



d

d i′+1

optimal curve

di – m ·∆d

di + ∆d di – ∆d

initial curve

di – m · ∆d

pi′+1

d i′+1

n

i i +1

di + m ·∆d

n

i i +1 (b)

(a) Figure 12. Searching planning curve based on neighborhood search method.

n ¼ io ! it , the initial curve is replaced by the optimal curve that prevents the robot from colliding when machining these CC points. In the search for optimal curve, the distance between two machining frames’ corresponding adjacent CC points can’t be too large, because once the distance is too large, the magnitude of robot movement will increase suddenly when robot machines these CC point, so that the quality of grinding is affected. So the neighborhood search method is used to make the optimal curve more flat. As shown in Figure 12, the optimal curve reaches the ith point pi ¼ ði; di Þ. When the i þ 1th point piþ1 is obtained, the ordinate value of the i þ 1th point should be di 0 s m  Dd neighborhood: U ðdi ; m  DdÞ ¼ fdi  m  Dd;    ; di ; di þ Dd;    di þ m  DdgðDd > 0Þ

ð8Þ So that the distance between fM 0 g corresponding to the two adjacent CC points on a^ is limited to +m  Dd. In order to improve the efficiency of the search, the value of U ðdi ; m  DdÞ is put into a list list ¼ fdi  m  D;    ; di ; di þ D;    di þ m  Dg in the order of size, which is  0 Dd; di  diþ1 D¼ ð9Þ 0 Dd; di > diþ1 0 is the ordinate of the i þ 1th point p0iþ1 in the where diþ1 0 , the values in list are initial curve. When di  diþ1 arranged from large to small, as shown in Figure 12(a), and vice versa, as shown in Figure 12(b). From start to finish, the value d of list is gone throughout and collision detection for point ði þ 1; dÞ is carried out. If ði þ 1; dÞ= 2 CA, the point piþ1 of the optimal curve is equal to ði þ 1; dÞ. If ði þ 1; dÞ 2 CA for 8d 2 list, then it fails to search optimal curve. This search method ensures that the optimal curve approaches the initial curve until it intersects. 0 As shown in Figure 13, p0iþ1 ¼ ði þ 1; diþ1 Þ is a point of initial curve. Initial curve is in the range of optimal curve’s

0 2 U ðdi ; m  DdÞ, so that collision neighborhood when diþ1 0 detection for ði þ 1; diþ1 Þ is carried out firstly. If 0 Þ= 2 CA, as shown in Figure 13(a), then the point ði þ 1; diþ1 0 Þ and the piþ1 of the optimal curve is equal to ði þ 1; diþ1 optimal curve connects to initial curve, which means that the search of optimal curve is successful. Otherwise going throughout list, as shown in Figure 13(b). The method of searching the one-way planning curve based on neighborhood search method is as follows.

Step 1: input the midpoint of collision-free interval mid as the beginning of optimal curve, the search range n ¼ io ! it , integer m, the initial joint space position list of robot J oints, CC points list points, the points list of initial curve curve, the ith element of list curve½i represent the position of fMi0 g on a^, where fMi0 g is the ith CC point’s machining frame; Step 2: Di is the step of the CC point list’s index. Di is calculated by formula: Di ¼ ðit  io Þ=jit  io j. Let curve½io  Di ¼ mid, i ¼ io , d ¼ mid; Step 3: if i 6¼ it þ Di, then calculate the neighborhood U ðd; m  DdÞ and obtain list list based on formula (9), otherwise return ilast ¼ it , which represent search of optimal curve is successful, then end algorithm; Step4: if curve½i= 2U ðd; m  DdÞ, then jump to step 5; otherwise the collision detection for ði; curve½iÞ in collision layer is carried out. If ði; curve½iÞ= 2 CA, search of optimal curve is successful, then return ilast ¼ it and end algorithm, where ilast is the CC point index when the algorithm is over. If ði; curve½iÞ 2 CA, then jump to step 5; Step 5: when list is gone throughout from beginning to end and collision detection is carried out, determine whether 9d 0 2 list and ði; d 0 Þ= 2 CA and calculate the robot joint position q. If 9d 0 2 list and ði; d 0 Þ= 2 CA, let curve½i ¼ d ¼ d 0 , J oints½i ¼ q, i ¼ i þ Di and jump to step 3, otherwise the search of optimal curve fails, return ilast ¼ i and end algorithm.

8

International Journal of Advanced Robotic Systems

d

d

optimal curve

collision area

n

i i +1

U (di , m ·∆d )

pi



optimal curve



di

U (di , m ·∆d )

pi

initial curve

pi′+1

d i′+1



di

pi′+1



d i′+1

collision area

initial curve

n

i i +1 (b)

(a) Figure 13. d0iþ1 is in the neighborhood Uðdi ; m  DdÞ. d

search ing backwards

A +W 2

d

searching forwards

searching backwards

A +W 2

m1

W 2

searching forwards m1

m′1

m1′′

W 2

c 0

1 2



n

i –1 i

0

collison area

–W 2

1 2…

i –1 i

ilast

m2′′ m2

– A–W 2

Figure 14. Search for bidirectional optimal curves.

As shown in Figure 11, the algorithm looks forward the optimal curve for the CC points with the index greater than i. Let io > it only, if the algorithm search the optimal curve for the CC points with the index less than i.

Bidirectional planning curve searching algorithm based on the recursive method As shown in Figure 14, when the workpiece or robot collides with the tool when machining to the ith CC point, it is necessary to start from the midpoint of a collision-free zone at n ¼ i, as shown in m1 in Figure 14, respectively, forward and backward to find the planning curves which connect to initial curve, so that the whole curve to avoid the collision area, to achieve the motion path without collision. The process of basic algorithm of searching a bidirectional optimal curve is calculating the list listmid of collision-free interval midpoints and then traverse the point m in listmid . At the beginning of m, respectively, the algorithm finds the planning curve forward and backward. If both curves are successfully found, the algorithm is ended, and if one of the curves fails, the algorithm continues to traverse the listmid until all element of listmid are traversed. As shown in Figure 15, in the bidirectional planning curve finding algorithm, if the collision area is encountered

–W 2

m2

n

m′2 collision area 1

– A–W 2

Figure 15. Bidirectional optimal curve search algorithm to avoid the collision area.

when the planning curve is searched from the point m1. For example, the curve c in Figure 15 enters the collision area 1 at n ¼ ilast . In order to allow the planning curve to avoid the collision area, a recursive method can be used. At the CC point number n ¼ ilast , a bidirectional planning curve search algorithm is called recursively. Starting at the midpoint m01 of the collision-free interval, and then searching the optimal curve connecting the curve c, and looking for the planning curve connecting the initial curve. Starting at point m1, the same method is used when the collision region is found in the backward looking planning curve. The bidirectional optimal curve search algorithm based on recursive method is as follows. Step 1: input the index iF of CC point where collision occurs and calculate the list list of collision-free interval midpoint of the iFth CC point; Step 2: if list is null, return ir ¼ 1; the search of bidirectional optimal curves fails and algorithm is ended. Otherwise, the first element of list is assigned to mid and is deleted, where mid is the current collision-free interval midpoint. Then let io ¼ iF  1 and it ¼ 0. The algorithm starts at mid, in the order of n ¼ io ! it and follows the

Zhang and Su algorithm in “Searching algorithm of the one-way planning curve based on neighborhood search method” section, looks backward for the planning curve, and returns planning result and ilast ; Step 3: the algorithm jumps to step 4 if search of optimal curve is successful. Otherwise let the index n of CC point where collision occur is equal to ilast , recursive call bidirectional optimal curve search algorithm and return ir. If ir 6¼ 1, the algorithm jumps to step 4, otherwise jumps to step 2; Step 4: let io ¼ iF þ 1, it ¼ i max , where i max is max index of CC point. Starting with mid, look for the planning curve forward in the order of n ¼ io ! it and return the result of planning and ilast ; Step 5: if planning is successful, the algorithm jumps to step 6, otherwise lets n ¼ ilast , recursive call bidirectional optimal curve search algorithm and return ir. If ir 6¼ 1, jump to step 6, otherwise jump to step 2; Step 6: return ir ¼ ilast and end algorithm.

Collision-free planning algorithm for robot motion path Integrating the three algorithms discussed above, the robot collision-free path planning algorithm is obtained and it is as follows. Step 1: input the initial machining frame fMO0 g and the list points of CC points of the grinding path; Step 2: calculate all the joint space positions of robot based on fMO0 g and points; and put the joint position into the list Joints in order; Step 3: curve is the list of points of initial curve. Every point of curve represents the position of corresponding machining frame fM 0 g on the axis a^. The initial values of all of curve’s element are equal to 0. Let i ¼ 1. Step 4: if i  J oint:size, where J oint:size is the size of list J oints, robot is moved to the joint position joint½i in simulation scene and the collision detection is carried out. Otherwise the planning is successful and algorithm ends; Step 5: if there is no collision, let i ¼ i þ 1 and the algorithm jumps to step 4; otherwise call the bidirectional planning curve search algorithm and return ir; Step 6: if ir 6¼ 1, then i ¼ ir , i ¼ i þ 1 and the algorithm jumps to step 4; otherwise planning fails and the algorithm ends. The list J oints of optimal joint space positions is generated if the collision-free planning of robot motion path is successful. Robot grinds workpiece without collision only if robot carries out those joint positions in J oints in order.

9

grind path

Surface to be machined area where collision may occur

Figure 16. Workpiece in the simulation. Table 1. Parameter setting of the collision-free path planning algorithm in the simulation.

Axial translation range (mm) Tangential rotation range ( )

Upper limit

Lower limit

Incremental step

25 0

25 30

1 1

Simulation and grinding experiment on the collision-free planning algorithm for the robot motion path Simulation of the collision-free planning algorithm Collision-free planning for the robot motion path is achieved with the V-Rep platform. The simulation scene is shown in Figure 2. The workpiece model is added for grinding in the scene, as shown in Figure 16. Collision detection is performed between the workpiece and other objects in the scene. The parameter settings of the algorithm are shown in Table 1. In the simulation of experimental conditions, as shown in Figure 17, the position and orientation of machining frame fM 0 g are relative to robot base frame fBg. 2 3 0 0 1 1198:7 6 1 0 0 466:18 7 6 7 B 7 M0 T ¼ 6 4 0 1 0 344036 5 0

0

0

1

The axis of the sand belt contact wheel is parallel to y^B , and the position of the contact wheel relative to fBg is B P ¼ ½ 1347:7 466:18 344 :36 T , where R ¼ 149 mm; its width is w ¼ 50 mm. The collision layer generated by the algorithm during the simulation process is shown in Figure 18. In the figure, the blue and green regions are the collision area, and the red curve is the planning curve found by the algorithm in “Collision-free planning algorithm for robot motion path” section. The blue area is the collision area obtained by collision detection in the process of finding the optimal curve. The blue area is 4.73% of the collision area. This result proves that the robot motion path collision-free

10

International Journal of Advanced Robotic Systems Table 2. Comparison of the amount of collision detection instances. Method Generate a complete collision layer Method in “Collision-free planning algorithm for robot motion path” section

Number of collision detection instances 50,505 1950

Figure 17. Machining frame fM0 g in the simulation.

Figure 19. Analysis of the distance between points and the contact wheel axis. Figure 18. Collision layer during the robot machining the workpiece in the simulation.

planning algorithm finds the optimal curve on the collision layer through neighborhood search and recursive methods with only a small amount of collision detection and without knowing the complete collision layer. It realizes robot motion path collision-free planning. Table 2 lists the number of collision detection times for generating a complete collision layer and the number of collision detection times required to find the planning curve with the algorithm in “Collision-free planning algorithm for robot motion path” section. According to data in the table, the latter’s number of collision detection is 3.86% of the former’s, which proves that the algorithm in greatly reduces the number of collision detection compared to the method of generating the entire collision layer. The point of the workpiece surface is sampled to form a point cloud of the workpiece. In Figure 19, distance d from all points in the point cloud to the contact wheel axis is calculated and plotted, and abscissa y is the y-coordinate of the point in fBg. The simulation experimental conditions show that the two sides of the contact wheel are P1 : y ¼ 441:18 and P2 : y ¼ 491:18, and the distance between the point cloud and the contact wheel axis between planes P1 and P2 is greater than or equal to 149 mm. Moreover, the sweep space does not intersect the contact wheel. The workpiece in the grinding process does not collide with the tool.

Figure 20. Process of the robot grinding the workpiece.

Grinding experiment on the collision-free planning algorithm for robot motion path The workpiece is grinded in the robot grinding platform. The material of the workpiece is 45# steel. The type of the sand belt is Little Sun TJ538. The particle size of the sand belt is 100, its width is 50 mm, its perimeter is 2100 mm, and its material is zircon corundum. The robot is Yaskawa MH-24 Robot. When the workpiece is machined, the line speed of the belt is 8 m/s, the robot’s speed of MovL (robot linear movement) is 25 mm/s, and the speed of MovJ (robot joint movement) is 70%. The setting of those speeds is based on the processing requirement, which includes the processing materials and technology. The process of machining is shown in Figure 20. No collision occurs

Zhang and Su

11

Figure 21. Comparison of the workpiece before and after grinding. (a) Workpiece before machining; (b) machined workpiece. Table 3. Surface roughness of the workpiece after robot grinding.

V1 V2 V3 Average Standard deviation

U1

U2

U3

U4

U5

U6

Average

Standard deviation

1.278 1.052 1.370 1.233 0.134

1.416 0.852 1.099 1.122 0.231

1.031 1.035 0.967 1.011 0.312

1.576 0.925 1.124 1.208 0.272

1.258 1.134 1.147 1.180 0.056

1.558 1.214 1.361 1.378 0.141

1.353 1.035 1.178 1.189

0.189 0.121 0.144

(U1,V1)

(U2,V1)

(U3,V1) (U4,V1) (U5,V1) (U6,V1)

(U1,V2)

(U2,V2)

(U3,V2) (U4,V2) (U5,V2) (U6,V2)

(U1,V3)

(U2,V3)

(U3,V3) (U4,V3) (U5,V3) (U6,V3)

0.201

Figure 22. Roughness of the machined workpiece.

between the workpiece and tool during workpiece machining. The grinded workpiece is shown in Figure 21. Surface roughness is measured after workpiece processing. The measurement equipment is Time Group’s TR200 hand-held roughness meter, and the measurement results are shown in Table 3 according to the division of the area in Figure 22. The average roughness is Ra 1:189mm, and the variance is 0.201mm. According to the look-up table, the roughness of the surface should be less than Ra 1:300 mm when sanding with a 100-purpose abrasive belt. Obviously, the experimental roughness satisfies the requirement of processing accuracy Ra 1:600 mm in most cases. The result of the experiment is consistent with the result of this look-up table. The surface quality of the robot belt grinding meets the requirements. The surface of workpiece after grinding is measured with the trilinear coordinates measuring instrument. The error profile is shown in Figure 23. The error interval of all data points is 0.209 mm to 0.244 mm, the range length is 0.453 mm, the mean error value is 0.057 mm, and the standard deviation is 0.112 mm. Data analysis indicates that, the size accuracy of the workpiece after robot sand

Figure 23. Shape error distribution of the machined workpiece.

belt machining would meet the requirements if the robot motion path has been collision-free optimized.

Conclusion A collision-free algorithm for robot motion path based on the collision layer method is proposed to solve the problem of collision occurring in the process of grinding a workpiece. According to the characteristics of belt grinding, a method to adjust the machining frame on the belt is proposed; axial translation along the belt and tangent rotation are implemented. A method based on neighborhood search and recursive methods is also proposed. Based on the local search method, without searching through every point in the collision layer, a planning curve can be quickly searched in the collision layer, which determines the corresponding joint poses of robot, achieving collision-free planning of the robot’s motion path finally.

12

International Journal of Advanced Robotic Systems

The simulation results show that the proposed algorithm can generate a collision-free robot motion path, and collision detection is greatly reduced to 3.86% of the method of generating a complete collision layer. The robot belt grinding experiment shows that the robot grinds the workpiece without collision based on the motion path generated by the algorithm. The quality of the machined workpiece meets the requirements. Declaration of conflicting interests The authors declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

Funding The authors disclosed receipt of following financial support for the research, authorship, and/or publication of this article: This project is sponsored by the National Science and Technology Major Project of China (No. 20152X04005006), Science and Technology Planning Project of Guangdong Province, China (Nos. 2014B090921004, 2014B090920002, and 2015B010918002), and Science and Technology Major Project of Zhongshan, China (No. 2016F2FC0006).

ORCID iD Jiewen Su

http://orcid.org/0000-0002-7558-6072

References 1. Tang TD. Algorithms for collision detection and avoidance for five-axis NC machining: a state of the art review. Comput Aided Des 2014; 51: 1–17. 2. Rufeng XU. Tool orientation optimization method based on kinematics constraints of the machine tool in multi-axis machining with a ball-end cutter. J Mech Eng 2015; 51(23): 160. 3. Chen Z, Yue Y, and Xu R. A middle-point-error-control method in strip-width maximization-machining. Jixie Gongcheng Xuebao(Chin J Mech Eng) 2011; 47(1): 117–123. 4. He Y and Chen Z. Optimising tool positioning for achieving multi-point contact based on symmetrical error distribution curve in sculptured surface machining. Int J Adv Manuf Technol 2014; 73(5–8): 707–714. 5. Zhu Y, Chen ZT, Ning T, et al. Tool orientation optimization for 3 þ 2-axis CNC machining of sculptured surface. Comput Aided Des 2016; 77: 60–72. 6. Plakhotnik D and Lauwers B. Adaptive ortho-planar toolpath planning for five-axis milling considering tool swept volumes. In: International conference on virtual machining process technology, Montreal, Canada, 2012. 7. Bi Q, Wang Y, Zhu L, et al. Wholly smoothing cutter orientations for five-axis NC machining based on cutter contact point mesh. Sci China Technol Sci 2010; 53(5): 1294–1303. 8. Li LL, Zhang YF, Li HY, et al. Generating tool-path with smooth posture change for five-axis sculptured surface machining based on cutter’s accessibility map. Int J Adv Manuf Technol 2011; 53(5): 699–709.

9. Yeh Z and Khoshnevis B. Geometric conformity analysis for automated fabrication processes generating ruled surfaces: demonstration for contour crafting. Rapid Prototyp J 2009; 15(5): 361–369. 10. Li Z and Chen W. The analysis of correlative error in principal axis method for five-axis machining of sculptured surfaces. Int J Mach Tools Manuf 2005; 45(9): 1031–1036. 11. Farouki RT and Li S. Optimal tool orientation control for 5-axis CNC milling with ball-end cutters. Comput Aided Geometr Design 2013; 30(2): 226–239. 12. Gray PJ, Ismail F, and Bedi S. Arc-intersect method for 3 1 2 1 2 -axis tool paths on a 5-axis machine. Int J Mach Tools Manuf 2007; 47(1): 182–190. 13. Gray PJ, Bedi S, and Ismail F. Arc-intersect method for 5-axis tool positioning. Comput Aided Design 2005; 37(7): 663–674. 14. Xu JH, Zhang SY, Tan JR, et al. Collisionless tool orientation smoothing above blade stream surface using NURBS envelope. J Zhejiang Univ Sci A 2013; 14(3): 187–197. 15. Li SX and Jerard RB. 5-axis machining of sculptured surfaces with a flat-end cutter. Computer-Aided Design 1994; 26(3): 165–178. 16. Wang QH, Li JR, and Zhou RR. Graphics-assisted approach to rapid collision detection for multi-axis machining. Int J Adv Manuf Technol 2006; 30(9): 853–863. 17. Li H and Feng HY. Efficient five-axis machining of free-form surfaces with constant scallop height tool paths. Int J Prod Res 2004; 42(12): 2403–2417. 18. CNC Software Inc. Robotmaster Tutorial Series[EB/OL]. http://www.robotmaster.com (2013) 19. Lin Z, Fu J, Shen H, et al. Non-singular tool path planning by translating tool orientations in C-space. Int J Adv Manuf Technol 2014; 71(9–12): 1835–1848. 20. Zhou F and Zhang Z. Path planning for a manipulator based on the decomposition of C space and the roadmap method. J Harbin Eng University 2009; 30: 531–535. 21. Makhanov SS. Adaptable geometric patterns for five-axis machining: a survey. Int J Adv Manuf Technol 2010; 47(9– 12): 1167–1208. 22. Weijun S, Rui M, and Chongchong Y. A study on soccer robot path planning with fuzzy artificial potential field. In: 2010 international conference on computing, control and industrial engineering (CCIE), Vol. 1, 5–6 June 2010, Wuhan, China, pp. 386–390. Institute of Electrical and Electronics Engineers, Inc. 23. Zhang B, Chen W, and Fei M. An optimized method for path planning based on artificial potential field. In: ISDA’06. sixth international conference on Intelligent systems design and applications, Vol. 3, 16–18 October 2006, Jinan, China, pp. 35–39. Institute of Electrical and Electronics Engineers, Inc. 24. Mohamed EF, El-Metwally K, and Hanafy AR. An improved Tangent Bug method integrated with artificial potential field for multi-robot path planning. In: 2011 international symposium on innovations in intelligent systems and applications (INISTA), Istanbul, Turkey, 15–18 June

Zhang and Su 2011, pp. 555–559. Institute of Electrical and Electronics Engineers, Inc. 25. Zhou L and Li W. Adaptive artificial potential field approach for obstacle avoidance path planning. In: 2014 seventh international symposium on Computational intelligence and design (ISCID), Vol. 2, Hangzhou, China, 13–14 December 2014, pp. 429–432. Institute of Electrical and Electronics Engineers, Inc.

13 26. Clark S and Lin YJ. CAD tools integration for robot kinematics design assurance with case studies on PUMA robots. Ind Robot Int J 2007; 34(3): 240–248. 27. Kung YS, Wu MK, Thi BLH, et al. FPGA-based hardware implementation of arctangent and arccosine functions for the inverse kinematics of robot manipulator. Eng Comput 2014; 31(8): 1679–1690.