A workpiece trajectory planning method, device and storage medium

Through the application of spline interpolation and Frenet coordinate system, traditional measurement technology has solved the problems of low efficiency and difficult trajectory planning when measuring complex surface workpieces, and achieved efficient calculation, smooth control and high-precision measurement, improving measurement efficiency and accuracy.

CN119292190BActive Publication Date: 2025-06-06TZTEK TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411410859.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-06-06
Estimated Expiration
2044-10-10

AI Technical Summary

Technical Problem

Traditional measurement technology is inefficient and difficult to plan trajectory when measuring complex surface workpieces, making it difficult to achieve efficient calculation, smooth control and high-precision measurement.

Method used

The discrete point sequence is converted into trajectory parameter equations by spline interpolation method, a Frenet coordinate system is established, the tangential velocity, tangential acceleration and normal acceleration are calculated, and the optimal velocity curve is calculated based on the preset maximum velocity and maximum acceleration, and the optimal planned trajectory is generated.

Benefits of technology

It improves the measurement efficiency and accuracy of complex workpiece surfaces, solves the problem of multiple measurement points set and time-consuming in traditional methods, and ensures the measurement accuracy and operating speed of the scanning probe.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119292190B_ABST
    Figure CN119292190B_ABST
Patent Text Reader

Abstract

The present application discloses a workpiece trajectory planning method, device and storage medium, which belongs to the field of workpiece measurement technology. Through the application of spline curve interpolation and Frenet coordinate system, the optimal trajectory in time can be achieved while ensuring stable speed, thereby improving the measurement efficiency and accuracy of complex workpiece surfaces, thereby solving the problem of setting many measurement points and consuming a long time in traditional methods, and effectively handling singular points and curvature changes on the surface, so that the measurement accuracy of the scanning probe is higher and the running speed is faster. Finally, high-precision measurement tasks can be completed in a shorter time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of workpiece measurement technology, and in particular to a workpiece trajectory planning method, device and storage medium. Background Art

[0002] In modern manufacturing and precision machining, coordinate measuring machines (CMMs) are widely used to measure the size, position and shape of workpieces with high precision. Especially when measuring complex curved workpieces, accurate and efficient measurement methods are essential.

[0003] However, traditional measurement technology often faces two major challenges when facing complex surfaces. The first is low measurement efficiency. Traditional methods usually rely on point-by-point touch measurement, and each measurement point needs to be accurately located and recorded. This method not only requires a large number of measurement points when measuring complex surfaces, but also the process is cumbersome and time-consuming. Secondly, trajectory planning is difficult to implement. In order to improve measurement efficiency, modern technology has gradually turned to the use of continuous scanning measurement. This method requires continuous scanning of the workpiece surface and requires a high-precision trajectory planning algorithm to generate a suitable motion path. However, measurement trajectory planning for complex surfaces involves multiple technical difficulties, such as efficient calculation methods, smooth control of velocity and acceleration, and optimization of the detection range of the scanning head.

[0004] Therefore, in order to solve these problems, a trajectory planning method is needed to achieve efficient calculation, smooth control and precise measurement. For example, when generating a measurement trajectory on a complex workpiece surface, it is necessary to quickly process a large amount of point data and interpolation calculations to ensure the efficiency of trajectory planning, such as ensuring that the movement of the equipment is smooth and the acceleration is bounded during the entire measurement process. For example, the measurement trajectory must be as close to the workpiece surface as possible to ensure that the scanning head measures at the optimal position, thereby improving the measurement accuracy. Summary of the invention

[0005] The present application provides a workpiece trajectory planning method, device and storage medium, and the technical solution is as follows:

[0006] In one aspect, a workpiece trajectory planning method is provided, the method being applicable to a coordinate measuring machine, the method comprising:

[0007] Generate a discrete point sequence of a target workpiece, and preset a maximum speed and a maximum acceleration of the target workpiece trajectory;

[0008] The discrete point sequence is converted into a trajectory parameter equation by a spline curve interpolation method;

[0009] Establishing a Frenet coordinate system corresponding to each point in the discrete point sequence according to the trajectory parameter equation, and calculating the tangential velocity, tangential acceleration and normal acceleration of each point in the discrete point sequence;

[0010] Constraining the tangential velocity, tangential acceleration and normal acceleration of each point in the discrete point sequence according to the preset maximum velocity and maximum acceleration;

[0011] Calculating an optimal speed curve according to the constrained tangential speed, tangential acceleration and normal acceleration of each point in the discrete point sequence, wherein the optimal speed curve includes the instantaneous speed of each point after being discretized;

[0012] An interpolation point sequence is iteratively generated point by point according to the instantaneous speed of each point, so as to obtain the optimal planning trajectory of each point in the discrete point sequence.

[0013] Optionally, generating a discrete point sequence of the target workpiece includes:

[0014] Selecting a contour line on the digital model of the target workpiece;

[0015] A discrete point sequence of the target workpiece is generated according to the contour line.

[0016] Optionally, the trajectory parameter equation is expressed as r(s)=(x(s), y(s), z(s)), s∈[0, s max ], where s max is the arc length of the complete trajectory formed by the set of all discrete points, s from 0 to s max The change of corresponds to each position point on the complete trajectory.

[0017] Optionally, the Frenet coordinate system consists of a tangent vector t, a normal vector n and a binormal vector b;

[0018]

[0019] Where v is the resultant velocity of each position point on the complete trajectory, a is the resultant acceleration of each position point on the complete trajectory, is the tangential velocity, is the tangential acceleration, κ represents the curvature of the curve, is the derivative with respect to time t, is the derivative of displacement s, is the normal acceleration.

[0020] Optionally, the discrete point sequence is uniformly sampled with equal arc length to obtain a series of constraint points N, wherein the optimal speed curve corresponding to the speed of each constraint point N is: And remember

[0021] The maximum value function of the optimal speed curve is set according to the complete trajectory

[0022] The tangential velocity, tangential acceleration and normal acceleration of each point in the discrete point sequence are constrained according to the maximum value function. After the constraints,

[0023] The tangential velocity is expressed as 0≤q i ≤V max 2 , i = 1, 2, ..., N;

[0024] The tangential acceleration can be expressed as

[0025] The normal acceleration is expressed as q i κ i ≤A max ,i=1,2,...,N, where,κ i is the k value at each point, q 1 =q N =0,0≤q i .

[0026] Optionally, the optimal speed curve is calculated according to the constrained tangential speed, tangential acceleration and normal acceleration of each point in the discrete point sequence, and the optimal speed curve includes the instantaneous speed of each point after being discretized, including:

[0027] The optimal velocity curve at each constraint point is obtained according to the tangential velocity, tangential acceleration and normal acceleration of each point in the discrete point sequence after being constrained.

[0028] According to the optimal speed curve, each constraint point is interpolated to obtain the optimal speed curve

[0029] Optionally, iteratively generating an interpolation point sequence point by point according to the instantaneous velocity of each point to obtain an optimal planning trajectory for each point in the discrete point sequence includes:

[0030] According to the optimal speed curve Calculate the tangential acceleration at each constraint point

[0031] According to the interpolation period T p The interpolation formula is iterated to the end point of the trajectory to generate the trajectory interpolation position point of each interpolation cycle, where the interpolation formula is The iteration process starts from the starting point k=1;

[0032] The interpolation point sequence is obtained according to the trajectory interpolation position points, and the optimal planning trajectory for each point in the discrete point sequence is obtained.

[0033] On the other hand, a workpiece trajectory planning device is provided, the device is used for a coordinate measuring machine, and the device comprises:

[0034] A sequence generation module, used to generate a discrete point sequence of a target workpiece, and to preset a maximum speed and a maximum acceleration of the trajectory of the target workpiece;

[0035] An equation conversion module, used for converting the discrete point sequence into a trajectory parameter equation by a spline curve interpolation method;

[0036] A velocity calculation module, used to establish a Frenet coordinate system corresponding to each point in the discrete point sequence according to the trajectory parameter equation, and calculate the tangential velocity, tangential acceleration and normal acceleration of each point in the discrete point sequence;

[0037] A velocity constraint module, used to constrain the tangential velocity, tangential acceleration and normal acceleration of each point in the discrete point sequence according to the preset maximum velocity and maximum acceleration;

[0038] An optimal calculation module, used for calculating an optimal speed curve according to the constrained tangential speed, tangential acceleration and normal acceleration of each point in the discrete point sequence, wherein the optimal speed curve includes the instantaneous speed of each point after being discretized;

[0039] The sequence interpolation module is used to iteratively generate an interpolation point sequence point by point according to the instantaneous speed of each point, so as to obtain the optimal planning trajectory of each point in the discrete point sequence.

[0040] On the other hand, a computer-readable storage medium is provided, wherein the storage medium stores at least one instruction, and the at least one instruction is used to be executed by a processor to implement the workpiece trajectory planning method as described in the above aspects.

[0041] On the other hand, a computer program product is also provided. The computer program product stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the workpiece trajectory planning method described in the above aspect.

[0042] In the embodiment of the present application, by using spline curve interpolation and Frenet coordinate system, the optimal trajectory in time can be achieved while ensuring a stable speed, thereby improving the measurement efficiency and accuracy of complex workpiece surfaces, thereby solving the problem of setting many measurement points and consuming a long time in the traditional method, and effectively handling the singular points and curvature changes on the surface, so that the scanning probe has higher measurement accuracy and faster operation speed. Ultimately, high-precision measurement tasks can be completed in a shorter time. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 A flow chart of a workpiece trajectory planning method provided by an exemplary embodiment of the present application is shown;

[0044] Figure 2 A schematic diagram of an algorithm flow of a workpiece trajectory planning method provided by an exemplary embodiment of the present application is shown;

[0045] Figure 3 A schematic structural diagram of a workpiece trajectory planning device provided by the present application is shown. DETAILED DESCRIPTION

[0046] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0047] The term "multiple" as used herein refers to two or more than two. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.

[0048] First, explain the nouns involved.

[0049] Contact coordinate measuring machine (CMM): It is a precision measuring instrument, mainly used for high-precision measurement of the geometric characteristics of workpieces. The working principle of CMM includes the following aspects.

[0050] Measuring method. CMM usually uses a stylus or probe to contact the workpiece and obtain the surface data of the workpiece through the displacement of the stylus. The stylus can be mechanical, inductive or laser.

[0051] Measurement process. By contacting the workpiece surface point by point, the CMM can obtain the three-dimensional coordinates of each measuring point on the workpiece. The coordinate data of these points are used to build a three-dimensional model of the workpiece, thereby measuring the geometric characteristics of the workpiece such as size, shape and position.

[0052] Data processing: The CMM control system compares the acquired point data with the design data of the workpiece and generates a measurement result and error analysis report.

[0053] Frenet coordinates: A local coordinate system for describing space curves, introduced by French mathematician Frenet. It plays an important role in trajectory planning and motion control, especially when dealing with curved motion.

[0054] The Frenet coordinate system includes the following three basic vectors.

[0055] The tangent vector (t), pointing in the direction of the tangent of the curve at a certain point, describes the direction of the curve. Its mathematical expression is the direction of the velocity of the curve at that point. The normal vector (n), perpendicular to the tangent vector, points to the inside of the curve and describes the bending direction of the curve. Its calculation involves the curvature of the curve. The binormal vector (b), the cross product of the tangent vector and the normal vector, describes the twisting direction of the curve. Together with the tangent vector and the normal vector, it defines the direction of the curve in three-dimensional space. In path planning, the Frenet coordinate system can help describe and control the motion of the machine on a curved path, ensuring the smoothness and stability of the motion. When dealing with complex curved trajectories, the Frenet coordinate system can be used to calculate velocity and acceleration constraints to optimize trajectory motion.

[0056] In addition, based on the above technical background, the problems and reasons of the prior art are further explained. To measure the size or position of a complex curved workpiece, in the prior art, one method is to perform touch measurement point by point, and finally fit the three-dimensional plane, calculate the position and size. Although the accuracy is high, a large number of measurement points need to be set, and the measurement process is extremely time-consuming; another method is to calculate the multi-axis interpolation trajectory according to the morphology of the surface of the workpiece to be measured, and the control system performs continuous scanning motion. During the measurement process, the high-precision scanning probe feeds back the deformation (deflection) of the workpiece on the probe in real time, and simultaneously records the corresponding grating positions of each axis, and finally calculates the measurement information such as the size of the workpiece. The second method has extremely high measurement efficiency and has high requirements on the trajectory planning capability of the measuring machine control system, which is specifically manifested in the following aspects.

[0057] First, the path point set on the complex workpiece surface needs to be interpolated into a time series of target positions of multiple motion axes according to a certain control cycle after trajectory planning calculation. The number of point sets and the speed of the interpolation cycle will directly affect the efficiency of the planning calculation. Therefore, an efficient and fast calculation method is needed.

[0058] Secondly, complex surface contours may have singular points or excessive curvature, and the planning algorithm needs to ensure smooth and continuous speed while increasing the overall operating speed as much as possible to improve the measurement efficiency and stability of the equipment.

[0059] Third, since the detection range of the scanning probe is limited, the trajectory generated by the trajectory planning algorithm needs to be as close to the given contour as possible to ensure that the probe is always in the optimal linear region for measurement during the scanning process, thereby improving the scanning measurement accuracy.

[0060] Therefore, based on the above content, the present application designs a workpiece trajectory planning method, which is as follows.

[0061] Please refer to Figure 1 , which shows a flowchart of a workpiece trajectory planning method provided by an exemplary embodiment of the present application, which is applicable to a coordinate measuring machine, and at the same time, reference Figure 2 The algorithm flow diagram of the workpiece trajectory planning method is shown. The method includes:

[0062] Step 101 : generating a discrete point sequence of a target workpiece, and presetting a maximum speed and a maximum acceleration of the trajectory of the target workpiece.

[0063] In a possible implementation, a contour line is selected on the digital model of the target workpiece, a discrete point sequence of the target workpiece is generated according to the contour line, and a maximum speed and a maximum acceleration of the trajectory of the target workpiece are preset.

[0064] Among them, for the selection of contour lines, those skilled in the art can select the measurement contour lines according to the features of the corresponding workpiece, such as the contour line of the outer circle, the involute of the turbine, etc., without limitation.

[0065] Step 102: convert the discrete point sequence into a trajectory parameter equation by using a spline curve interpolation method.

[0066] Optionally, the trajectory parameter equation is expressed as r(s) = (x(s), y(s), z(s)), s∈[0, s max ], where s max is the arc length of the complete trajectory formed by the set of all discrete points, s from 0 to s max The change of corresponds to each position point on the complete trajectory.

[0067] In specific execution, the workpiece trajectory planning method corresponds to the algorithm execution process. Figure 2 As shown in the figure, the generated discrete point sequence of the target workpiece is the input discrete path point, denoted by P i =(x i ,y i ,z i ); further, the spline interpolation method is used to perform cubic spline interpolation. It should be noted that the spline interpolation method needs to strictly pass through each discrete path point, where the velocity and acceleration of each point in the discrete point sequence are continuous, and then the discrete point sequence is converted into a trajectory parameter equation.

[0068] Step 103: establish a Frenet coordinate system corresponding to each point in the discrete point sequence according to the trajectory parameter equation, and calculate the tangential velocity, tangential acceleration and normal acceleration of each point in the discrete point sequence.

[0069] Furthermore, after obtaining the above parametric equations, a Frenet coordinate system can be established at each point on the trajectory, and then the Frenet coordinate system corresponding to each point in the discrete point sequence is established according to the trajectory parametric equation. The Frenet coordinate system consists of the tangent vector t, the normal vector n and the binormal vector b.

[0070]

[0071]

[0072] Where v is the resultant velocity of each position point on the complete trajectory, a is the resultant acceleration of each position point on the complete trajectory, is the tangential velocity, is the tangential acceleration, κ represents the curvature of the curve, is the derivative with respect to time t, is the derivative of displacement s, is the normal acceleration.

[0073] During the execution of the corresponding algorithm, this step corresponds to Figure 2 The content shown in the figure is to establish the Frenet coordinate system, which is composed of the tangent vector t, the normal vector n and the binormal vector b.

[0074] Step 104: constrain the tangential velocity, tangential acceleration and normal acceleration of each point in the discrete point sequence according to the preset maximum velocity and maximum acceleration.

[0075] A series of constraint points N are obtained by uniformly sampling the discrete point sequence with equal arc length, where the optimal speed curve corresponding to the speed of each constraint point N is: And remember

[0076] In order to minimize the trajectory motion time, the optimal speed curve needs to be as large as possible, that is, to maximize the value of the optimization variable. The maximum value function of the optimal speed curve is set according to the complete trajectory.

[0077] According to the maximum value function, the tangential velocity, tangential acceleration and normal acceleration of each point in the discrete point sequence are constrained. After the constraints:

[0078] The tangential velocity is expressed as 0≤q i ≤V max2 , i = 1, 2, ..., N;

[0079] The tangential acceleration can be expressed as

[0080] The normal acceleration is expressed as q i k i ≤A max , i = 1, 2, ..., N, where k i is the k value of each point, k is the curvature in step 103, q 1 =q N =0, in order to ensure that the starting point and the end point are completely stationary; 0≤q i The condition is to ensure the effectiveness of the optimal speed curve.

[0081] It should be noted that the maximum speed and maximum acceleration set in step 101 are used to constrain the speed and acceleration of each discrete point so as not to exceed the limit; and the maximum value function in step 104 acts as the overall objective function, which is used to expect the overall running speed to be the maximum, which is equivalent to the overall running time to be the minimum, thereby improving the running efficiency.

[0082] Step 105, calculating the optimal speed curve according to the constrained tangential speed, tangential acceleration and normal acceleration of each point in the discrete point sequence, wherein the optimal speed curve includes the instantaneous speed of each point after being discretized.

[0083] The optimal velocity curve at each constraint point is obtained according to the tangential velocity, tangential acceleration and normal acceleration of each point in the discrete point sequence after constraint.

[0084] According to the optimal speed curve, interpolate each constraint point to obtain the optimal speed curve

[0085] Finally, by uniformly sampling a series of constraint points on the trajectory and imposing various constraints on these constraint points, a linear programming problem is constructed to plan the optimal speed curve.

[0086] like Figure 2 As shown in the figure, the optimal speed curve is the feed speed curve.

[0087] Step 106, iteratively generate an interpolation point sequence point by point according to the instantaneous velocity of each point, and obtain the optimal planning trajectory for each point in the discrete point sequence.

[0088] According to the optimal speed curve Calculate the tangential acceleration at each constraint point

[0089] According to the interpolation period T pThe interpolation formula is iterated to the end point of the trajectory to generate the trajectory interpolation position point of each interpolation cycle, where the interpolation formula is The iteration process starts from the starting point k=1;

[0090] like Figure 2 As shown, further, the interpolation cycle can be obtained according to the interpolation position points of each trajectory, and a detailed interpolation point can be generated, that is, the interpolation point sequence is obtained according to the interpolation position points of the trajectory, and the optimal planning trajectory of each point in the discrete point sequence is obtained. 1 = 0, and iterate continuously according to the interpolation formula until the end of the trajectory, and the complete trajectory interpolation point can be obtained. The final interpolation trajectory is the time optimal trajectory that meets the given speed and acceleration constraints.

[0091] In summary, a workpiece trajectory planning method is provided, in which the contour scanning of the complex workpiece curve is performed. Usually, a contour line is selected from the digital model of the workpiece to generate a discrete point sequence as the input of the trajectory planning method; at the same time, the maximum speed and acceleration of the trajectory operation need to be specified. According to the above conditions, the discrete points are converted into parametric equations through the spline curve interpolation method, and then the Frenet coordinate system is established for each point on the trajectory; the tangential velocity, tangential acceleration, and normal acceleration are constrained respectively, and the time-optimal speed curve is calculated, while ensuring the smoothness of the movement and the fastest global speed, achieving the highest overall operation efficiency; finally, the optimal speed curve is used to generate the trajectory interpolation point sequence of each interpolation cycle according to the interpolation cycle, and sent to the servo driver as a position instruction in real time for servo following, thereby achieving high-precision trajectory movement. Through the application of spline interpolation and Frenet coordinate system, the optimal trajectory in time can be achieved while ensuring stable speed, improving the measurement efficiency and accuracy of complex workpiece surfaces, thus solving the problem of setting many measurement points and long time consumption in traditional methods, and effectively handling singular points and curvature changes on the surface, making the scanning probe more accurate and faster. Ultimately, high-precision measurement tasks can be completed in a shorter time.

[0092] In one embodiment, the workpiece trajectory planning method is applied to three products, CMZ / U / E. When the above three products use a scanning probe to scan and measure the spatial contour curve of a complex workpiece, the workpiece trajectory planning method is used to perform trajectory planning calculations.

[0093] In another embodiment, the workpiece trajectory planning method is used in an imager to perform trajectory planning calculations when scanning and flying measurement is performed on any path curve in the XY plane.

[0094] like Figure 3As shown, the present application also provides a structural schematic diagram of a workpiece trajectory planning device, the device is used for a coordinate measuring machine, and the device includes:

[0095] A sequence generation module 301 is used to generate a discrete point sequence of a target workpiece, and to preset a maximum speed and a maximum acceleration of the target workpiece trajectory;

[0096] An equation conversion module 302, used to convert the discrete point sequence into a trajectory parameter equation by a spline curve interpolation method;

[0097] The velocity calculation module 303 is used to establish the Frenet coordinate system corresponding to each point in the discrete point sequence according to the trajectory parameter equation, and calculate the tangential velocity, tangential acceleration and normal acceleration of each point in the discrete point sequence;

[0098] The speed constraint module 304 is used to constrain the tangential speed, tangential acceleration and normal acceleration of each point in the discrete point sequence according to the preset maximum speed and maximum acceleration;

[0099] The optimal calculation module 305 is used to calculate the optimal velocity curve according to the constrained tangential velocity, tangential acceleration and normal acceleration of each point in the discrete point sequence;

[0100] The sequence interpolation module 306 is used to generate an interpolation point sequence according to the optimal speed curve to obtain the optimal planning trajectory of each point in the discrete point sequence.

[0101] Optionally, the sequence generation module 301 includes:

[0102] A first generating unit, configured to select a contour line on the digital model of the target workpiece;

[0103] The second generating unit is used to generate a discrete point sequence of the target workpiece according to the contour line.

[0104] Optionally, the trajectory parameter equation is expressed as r(s)=(x(s), y(s), z(s)), s∈[0, s max ], where s max is the arc length of the complete trajectory formed by the set of all discrete points, s from 0 to s max The change of corresponds to each position point on the complete trajectory.

[0105] Optionally, the Frenet coordinate system consists of a tangent vector t, a normal vector n and a binormal vector b;

[0106]

[0107] Where v is the resultant velocity of each position point on the complete trajectory, a is the resultant acceleration of each position point on the complete trajectory, is the tangential velocity, is the tangential acceleration, k represents the curvature of the curve, is the derivative with respect to time t, is the derivative of displacement s, is the normal acceleration.

[0108] Optionally, the speed constraint module 304 includes:

[0109] The first constraint unit is used to uniformly sample the discrete point sequence with equal arc length to obtain a series of constraint points N, where the optimal speed curve corresponding to the speed of each constraint point N is: And remember

[0110] The second constraint unit is used to set the maximum value function of the optimal speed curve according to the complete trajectory

[0111] The third constraint unit is used to constrain the tangential velocity, tangential acceleration and normal acceleration of each point in the discrete point sequence according to the maximum value function. After the constraints,

[0112] The tangential velocity is expressed as 0≤q i ≤V max 2 , i = 1, 2, ..., N,

[0113] The tangential acceleration can be expressed as

[0114] The normal acceleration is expressed as q i κ i ≤A max ,i=1,2,...,N, where,κ i is the k value at each point, q 1 =q N =0,0≤q i .

[0115] Optionally, the optimal calculation module 305 includes:

[0116] The first calculation unit is used to obtain the optimal speed curve at each constraint point according to the tangential speed, tangential acceleration and normal acceleration of each point in the discrete point sequence after constraint.

[0117] The second calculation unit is used to interpolate each constraint point according to the optimal speed curve to obtain the optimal speed curve

[0118] Optionally, the sequence interpolation module 306 includes:

[0119] The first interpolation unit is used to calculate the optimal speed curve according to the Calculate the tangential acceleration at each constraint point

[0120] The second interpolation unit is used to interpolate according to the interpolation period T p The interpolation formula is iterated to the end point of the trajectory to generate the trajectory interpolation position point of each interpolation cycle, where the interpolation formula is The iteration process starts from the starting point k=1;

[0121] The third interpolation unit is used to obtain the interpolation point sequence according to the trajectory interpolation position points, and obtain the optimal planning trajectory for each point in the discrete point sequence.

[0122] An embodiment of the present application further provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is loaded and executed by a processor to implement the workpiece trajectory planning method provided in the above embodiments.

[0123] Optionally, the computer readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a solid state drive (SSD), or an optical disk, etc. Among them, the random access memory may include a resistance random access memory (ReRAM) and a dynamic random access memory (DRAM).

[0124] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0125] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0126] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A workpiece trajectory planning method, characterized in that: The method is applicable to a coordinate measuring machine, and the method comprises: Generate a discrete point sequence of the target workpiece, and preset the maximum speed and maximum acceleration of the target workpiece trajectory; The discrete point sequence is converted into a trajectory parameter equation by a spline curve interpolation method. The trajectory parameter equation is expressed as r(s)=(x(s), y(s), z(s)), s∈[0, s max ], where s max is the arc length of the complete trajectory formed by the set of all discrete points, s from 0 to s max The change of corresponds to each position point on the complete trajectory; Establishing a Frenet coordinate system corresponding to each point in the discrete point sequence according to the trajectory parameter equation, and calculating the tangential velocity, tangential acceleration and normal acceleration of each point in the discrete point sequence, wherein the Frenet coordinate system is composed of a tangential vector t, a normal vector n and a binormal vector b; Where v is the resultant velocity of each position point on the complete trajectory, a is the resultant acceleration of each position point on the complete trajectory, is the tangential velocity, is the tangential acceleration, k represents the curvature of the curve, is the derivative with respect to time t, is the derivative of displacement s, is the normal acceleration; The discrete point sequence is uniformly sampled with equal arc length to obtain a series of constraint points N, where the optimal speed curve corresponding to the speed of each constraint point N is: And remember The maximum value function of the optimal speed curve is set according to the complete trajectory The tangential velocity, tangential acceleration and normal acceleration of each point in the discrete point sequence are constrained according to the maximum value function. After the constraints, The tangential velocity is expressed as 0≤q i ≤V max 2 , i = 1, 2, ..., N; The tangential acceleration can be expressed as The normal acceleration is expressed as q i κ i ≤A max ,i=1,2,...,N, where,κ i is the k value of each point, q1=q N =0,0≤q i ; The optimal velocity curve at each constraint point is obtained according to the tangential velocity, tangential acceleration and normal acceleration of each point in the discrete point sequence after being constrained. Interpolating each constraint point according to the optimal speed curve to obtain an optimal speed curve; According to the optimal speed curve Calculate the tangential acceleration at each constraint point According to the interpolation period T p The interpolation formula is iterated to the end point of the trajectory to generate the trajectory interpolation position point of each interpolation cycle, where the interpolation formula is The iteration process starts from the starting point k=1; An interpolation point sequence is obtained according to the trajectory interpolation position points, and an optimal planning trajectory for each point in the discrete point sequence is obtained.

2. The method according to claim 1, characterized in that The step of generating a discrete point sequence of a target workpiece includes: Selecting a contour line on the digital model of the target workpiece; A discrete point sequence of the target workpiece is generated according to the contour line.

3. A workpiece trajectory planning device, characterized in that: The device is used for a coordinate measuring machine, and the device comprises: A sequence generation module is used to generate a discrete point sequence of a target workpiece, and to preset a maximum speed and a maximum acceleration of the trajectory of the target workpiece; An equation conversion module is used to convert the discrete point sequence into a trajectory parameter equation by a spline curve interpolation method, wherein the trajectory parameter equation is represented by r(s)=(x(s), y(s), z(s)), s∈[0, s max ], where s max is the arc length of the complete trajectory formed by the set of all discrete points, s from 0 to s max The change of corresponds to each position point on the complete trajectory; a velocity calculation module, for establishing a Frenet coordinate system corresponding to each point in the discrete point sequence according to the trajectory parameter equation, and calculating the tangential velocity, tangential acceleration and normal acceleration of each point in the discrete point sequence, wherein the Frenet coordinate system is composed of a tangential vector t, a normal vector n and a binormal vector b. Where v is the resultant velocity of each position point on the complete trajectory, a is the resultant acceleration of each position point on the complete trajectory, is the tangential velocity, is the tangential acceleration, k represents the curvature of the curve, is the derivative with respect to time t, is the derivative of displacement s, is the normal acceleration; The speed constraint module is used to uniformly sample the discrete point sequence with equal arc length to obtain a series of constraint points N, where the optimal speed curve corresponding to the speed of each constraint point N is: And remember Also used to set the maximum value function of the optimal speed curve according to the complete trajectory It is also used to constrain the tangential velocity, tangential acceleration and normal acceleration of each point in the discrete point sequence according to the maximum value function. After the constraint, the tangential velocity is expressed as 0≤q i ≤V max 2 , i = 1, 2, ..., N, the tangential acceleration is expressed as The normal acceleration is expressed as q i k i ≤A max ,i=1,2,...,N, where,κ i is the k value of each point, q1=q N =0,0≤q i ; The optimal calculation module is used to obtain the optimal velocity curve at each constraint point according to the tangential velocity, tangential acceleration and normal acceleration of each point in the discrete point sequence after constraint. It is also used to interpolate each constraint point according to the optimal speed curve to obtain the optimal speed curve A sequence interpolation module is used to calculate the optimal speed curve according to the Calculate the tangential acceleration at each constraint point It is also used to calculate the interpolation period T p The interpolation formula is iterated to the end point of the trajectory to generate the trajectory interpolation position point of each interpolation cycle, where the interpolation formula is The iterative process starts from the starting point k=1; it is also used to obtain an interpolation point sequence according to the trajectory interpolation position points, and obtain the optimal planning trajectory for each point in the discrete point sequence.

4. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which is loaded and executed by a processor to implement the workpiece trajectory planning method as described in claim 1 or 2.

Citation Information

Patent Citations

  • Unmanned vehicle trajectory planning method and system capable of reducing accident severity

    CN111750887A

  • Locally planned road adaptive sampling method

    CN111898804A