A method of generating a grinding program
By generating a grinding program and utilizing second-order Bézier curves and helical equations, the problems of complex and costly robot grinding operations in existing technologies are solved, achieving machine adaptability and simplified operation.
Patent Information
- Application Number
- CN202310257057.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-16
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2043-03-16
AI Technical Summary
Existing industrial robot grinding technology relies on high-precision model building and CAM software, which makes changing the arm time-consuming, labor-intensive, complex, and costly.
By calculating smooth routes and discrete paths and generating spirals, and combining second-order Bézier curves and spiral equations, a grinding trajectory program is generated, omitting the establishment of mathematical models and CAM planning.
It enables robots that are widely applicable to different models, reducing operational difficulty, simplifying programming speed, and improving efficiency.
Smart Images

Figure CN116276655B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of robots, in particular to a method for generating polishing programs. BACKGROUND
[0002] The technology of polishing using robots is widely used in the fields of bathroom, hardware, and polishing of red copper, and is the future development trend of the polishing industry.
[0003] At present, the industrial robots on the market are generally four-axis or six-axis robots, and the end coordinates thereof only use X, Y, Z, and C, and there is no perfect polishing trajectory generation function. Usually, the polishing trajectory is generated by relying on CAM software modeling, that is, a mathematical model of the robot is established, coordinate conversion is performed, and the generated program is imported into the robot controller again. This method not only has high cost, but also needs to establish a model with high precision. Moreover, since the models and rod length data of different robots are not the same, a model needs to be re-established after the arm is replaced, which is not only time-consuming and laborious, but also requires a relatively high requirement for the operator. SUMMARY
[0004] To solve the above problems, the present application provides a method for generating polishing programs.
[0005] According to one aspect of the present application, a method for generating polishing programs is provided, comprising the following steps:
[0006] 1) calculating a smoothed route;
[0007] 2) discretizing the path and generating a spiral line;
[0008] 3) generating a polishing trajectory program;
[0009] In step 1), the following steps are included:
[0010] A) extracting point data;
[0011] B) smoothing the path using a second-order Bezier curve;
[0012] Step 2) includes the following steps:
[0013] a) discretizing the path according to the input precision;
[0014] b) using a spiral line equation and generating a spiral line trajectory by coordinating the coordinate change;
[0015] c) saving the trajectory points and drawing an image.
[0016] In some embodiments, in step A), the point data in the straight line instruction is extracted using a regular expression. It is beneficial in that a method for extracting point data in a straight line instruction in step A) is described.
[0017] In some embodiments, in step B), the formula of the second-order Bezier curve is:
[0018] B(t) = (1-t) 2 P0+2t(1-t)P1+t 2 P2,t∈[0,1].
[0019] It is beneficial in that a specific formula of the second-order Bezier curve is described.
[0020] In some embodiments, in step a), the discretization of the straight line part of the path is achieved by simulating the linspace function. It is beneficial in that a method for discretizing the straight line part of the path in step a) is described.
[0021] In some embodiments, in step a), the discretization of the curve part of the path is achieved by calculating the Bezier curve. It is beneficial in that a method for discretizing the curve part of the path in step a) is described.
[0022] In some embodiments, in step b), the helix equation is:
[0023] y = mA*Math.Sin(mB*Lx)
[0024] x = -mC*Math.Cos(mB*Lx).
[0025] It is beneficial in that a helix equation is described.
[0026] In some embodiments, in step b), the resulting point data is multiplied by a rotation matrix at the curve position to achieve coordinate conversion. It is beneficial in that a method for achieving coordinate conversion at the curve position is described.
[0027] In some embodiments, the rotation matrix is:
[0028]
[0029] It is beneficial in that the structure of the rotation matrix is described.
[0030] The method for generating a polishing program in the present application mainly has the following advantages:
[0031] 1. Widely applicable to various different models of robots, including four-joint robots and six-joint robots, etc.
[0032] 2. Realize trajectory parameter adjustment and visualization operation, save time and effort, reduce the difficulty of worker operation;
[0033] 3. Without establishing mathematical model, CAM planning is not needed, greatly simplify the operation and programming speed of end customer. BRIEF DESCRIPTION OF DRAWINGS
[0034] Figure 1 A schematic diagram for smoothing path using second order Bezier curve for a method of generating polishing program according to an embodiment of the present application;
[0035] Figure 2 A schematic diagram for point position discretization of path for a method of generating polishing program according to an embodiment of the present application; Figure 1
[0036] Figure 3 A schematic diagram of image drawn by a method of generating polishing program according to an embodiment of the present application. Figure 1 DETAILED DESCRIPTION
[0037] The present application will be further described in detail below with reference to the accompanying drawings.
[0038] The method of generating polishing program according to the present application needs to use the controller specially produced by Xin Dai Company, and the generated program is used to control the robot to perform polishing work.
[0039] The method mainly includes several steps, which are described as follows.
[0040] First step, calculate the smoothed route.
[0041] In this step, first, the point position data needs to be extracted using appropriate method. For example, the point position data in straight line instruction can be extracted using regular expression, and the relevant part of program statement is as follows:
[0042] @"G01.102\s*X([-]?[0-9]*[.]?[0-9]*)\s*Y([-]?[0-9]*[.]?[0-9]*)\...
[0043] s*Z([-]?[0-9]*[.]?[0-9]*)\s*A.*C([-]?[0-9]*[.]?[0-9]*)"。
[0044] Then, the path is smoothed, generally second order Bezier curve is needed. As shown in the figure, the formula of second order Bezier curve is Figure 1
[0045] B(t)=(1-t) 2 P0+2t(1-t)P1+t 2 P2
[0046] In the formula, P0, P1 and P2 three points define the curve in the graph, B(t) is the coordinate of the point at t time, t is a parameter and has t∈[0, 1].
[0047] Second, discrete path, and generate helix.
[0048] In this step, first need to path point discrete, generally is according to the input precision to realize the point discrete path. As shown in Figure 2 The discrete of the straight line part of the path is realized by simulating linspace function, while the curve part of the path has certain difficulty, and the discrete thereof can be realized by calculating the Bezier curve.
[0049] Then, using the helix equation, and coordinate change to generate helix trajectory. In which, the formula of helix equation is
[0050] y=mA*Math.Sin(mB*Lx)
[0051] x=-mC*Math.Cos(mB*Lx)
[0052] In the equation, x, y are the horizontal and vertical coordinates of the trajectory respectively, Lx is the total distance of the curve from the starting point to the current point, mA, mB and mC are the long axis, step and short axis parameters of the helix.
[0053] It can be seen that the above formula is only applicable to the helix of straight line, and at the curve position, the obtained point is converted to polar coordinates, which can be realized by multiplying the obtained point data P and rotation matrix R.
[0054] In which, the rotation matrix R is
[0055]
[0056] And θ is the angle of polar coordinate system.
[0057] Finally, save the trajectory points and draw the image. As shown in Figure 3 The drawn image will be displayed on the interface of the controller, and other related parameters such as the long axis, short axis, step, angle and precision of the helix curve are also displayed on the interface.
[0058] Third, according to the trajectory points calculated in the above steps, generate the G program of polishing trajectory, that is, input the controller, and use it to control the robot to polish.
[0059] The above merely describes some embodiments of the present application. For those skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which are within the protection scope of the present application.
Claims
1. A method of generating a grinding program, characterized by: The method comprises the following steps 1) calculating a smoothed route; 2) discretizing the path and generating a spiral curve; 3) generating a polishing trajectory program; wherein step 1) comprises the following steps A) extracting point data; B) smoothing the path using a second-order Bezier curve; step 2) comprises the following steps a) discretizing the path according to the input accuracy, wherein the discretization of the straight line part of the path is achieved by simulating the linspace function, and the discretization of the curved part of the path is achieved by calculating the Bezier curve; b) generating a spiral curve trajectory using a spiral curve equation and coordinate transformation, wherein at the curved position, the obtained point data is multiplied by a rotation matrix to achieve coordinate transformation, and the spiral curve equation is y = mA * Math.Sin(mB * Lx) x = -mC * Math.Cos(mB * Lx), wherein x and y are the horizontal and vertical coordinates of the trajectory respectively, Lx is the total distance of the curve from the starting point to the current point, mA, mB and mC are the long axis, step and short axis parameters of the spiral curve respectively; c) saving the trajectory points and drawing an image to display the long axis, short axis, step, angle and accuracy of the spiral curve.
2. The method of generating a polishing program of claim 1, wherein: In step A), regular expressions are used to extract point data in straight line instructions.
3. The method of generating a polishing program of claim 1, wherein: In step B), the formula of the second-order Bezier curve is B(t) = (1 - t) 2 P0+ 2t(1 - t)P1+ t 2 P2, t e [0, 1], wherein P0, P1 and P2 define the curve, B(t) is the coordinates of the point at time t, and t is a parameter and has t ∈ [0, 1].
4. The method of generating a polishing program of claim 1, wherein: The rotation matrix is wherein θ is the angle of the polar coordinate system.
Citation Information
Patent Citations
Robot plane spiral line grinding track planning method
CN111015671A
Smooth curve path route point generation method and system considering vehicle shape constraint
CN114063618A