Fly-cutting processing method and device, storage medium and computer equipment

By setting sliding windows and reserved windows to limit the number of trajectories, and integrating and planning the speed of trajectory data on the fly, the problem of low fly-cutting efficiency in traditional laser cutting is solved, and more efficient trajectory data processing and processing is achieved.

CN114755981BActive Publication Date: 2025-10-10HANS LASER TECH IND GRP CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210359961.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-07
Publication Date
2025-10-10
Estimated Expiration
2042-04-07

AI Technical Summary

Technical Problem

In traditional laser cutting, the fly-cutting function of small line segments is inefficient and easily affected by the real-time system memory size, resulting in the trajectory connection speed having to start from 0, affecting processing efficiency.

Method used

By setting the sliding window and reserved window, the number of trajectories processed by the compiler at one time is limited, and the trajectories that meet the fly-cut integration conditions are integrated to generate large-segment fly-cut trajectory data. Combined with speed planning, the trajectory data output is optimized.

Benefits of technology

The efficiency of fly-cutting processing is improved, the problem of corner connection speed being 0 caused by all trajectory data being output at one time is avoided, and the controller is ensured to perform processing at a certain speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114755981B_ABST
    Figure CN114755981B_ABST
Patent Text Reader

Abstract

The application provides a method and device for processing, a storage medium and a computer device. A sliding window and a reserved window are set, and the number of stored trajectories of the sliding window and the reserved window is set. A first preset number of trajectory data is obtained from the to-be-processed trajectory data according to the number of stored trajectories of the sliding window, and the first preset number of trajectory data is stored in the sliding window, wherein the first preset number is not more than the number of stored trajectories of the sliding window. Trajectory data meeting a fly-cut integration condition is fly-cut integrated to generate fly-cut large-section trajectory data. Speed planning is performed between the fly-cut large-section trajectory data and between the fly-cut large-section trajectory data and trajectory data that cannot be fly-cut integrated. According to the number of stored trajectories of the sliding window and the number of stored trajectories of the reserved window, a target output number of trajectory data after speed planning is determined, and the trajectory data of the target output number is output to a controller for processing, wherein the number of stored trajectories of the reserved window is greater than 0, and the fly-cut efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of automation control technology, and more specifically, relates to a fly-cutting processing method, device, storage medium and computer equipment. Background Art

[0002] In traditional laser cutting, the fly-cutting function for small line segments is typically designed into forward trajectory processing. To meet the real-time requirements of the kernel, this approach typically combines as many small line segments with consistent vector directions as possible into a sufficiently long trajectory before performing velocity planning. However, this processing method is highly susceptible to the limitations of real-time system memory, forcing the speed of connecting large segments of fly-cutting trajectories with consistent vector directions to start from zero, resulting in low fly-cutting efficiency. Summary of the Invention

[0003] The purpose of the present application is to provide a fly cutting method, which can improve the efficiency of the fly cutting process.

[0004] To achieve the above-mentioned purpose, the technical solution adopted in this application is to provide a fly-cut processing method, wherein the compiler performs the following steps:

[0005] Set the sliding window and reserved window, and set the number of tracks stored in the sliding window and reserved window;

[0006] Obtaining a first preset number of trajectory data from the trajectory data to be processed according to the number of trajectories stored in the sliding window and storing the data in the sliding window, wherein the first preset number does not exceed the number of trajectories stored in the sliding window;

[0007] Perform fly-cut integration on the trajectory data that meets the fly-cut integration conditions to generate fly-cut large-segment trajectory data;

[0008] Perform speed planning between large sections of fly-cut trajectory data, and between large sections of fly-cut trajectory data and trajectory data that cannot be integrated for fly-cut;

[0009] According to the number of trajectories stored in the sliding window and the number of trajectories stored in the reserved window, the target output number of trajectory data after velocity planning is determined, and the target output number of trajectory data is output to the controller for processing, wherein the number of trajectories stored in the reserved window is greater than 0.

[0010] Furthermore, the step of “obtaining a first preset number of trajectory data from the trajectory data to be processed and storing the data in the sliding window according to the number of trajectories stored in the sliding window, wherein the first preset number does not exceed the number of trajectories stored in the sliding window” specifically includes:

[0011] Obtaining trajectory data from the trajectory data to be processed in sequence according to a preset order, and storing the acquired trajectory data in a cache queue of the sliding window;

[0012] When the number of trajectories in the cache queue exceeds the number of trajectories stored in the sliding window or a trajectory end instruction is encountered, the acquisition of the next trajectory data is stopped; otherwise, the acquisition of the next trajectory data is continued.

[0013] Furthermore, before the step of "performing fly-cut integration on the trajectory data that meets the fly-cut integration conditions to generate fly-cut large-segment trajectory data", the following steps are further included:

[0014] Determine whether the number of trajectories in the cache queue exceeds 1; if the number of trajectories in the cache queue exceeds 1, jump to step "fly-cut integration of trajectory data that meets the fly-cut integration conditions to generate large-segment fly-cut trajectory data"; otherwise, directly output the trajectory data in the cache queue to the controller for processing.

[0015] Furthermore, the step of “performing fly-cut integration on the trajectory data that meets the fly-cut integration conditions to generate fly-cut large-segment trajectory data” specifically includes:

[0016] According to the fly-cut integration condition, it is determined whether the trajectory data in the cache queue meets the fly-cut integration condition; if the fly-cut integration condition is met, the trajectory data meeting the fly-cut integration condition is marked as fly-cut small-segment trajectory data, and the trajectory data meeting the fly-cut integration condition is integrated to generate fly-cut large-segment trajectory data; if the fly-cut integration condition is not met, the trajectory data not meeting the fly-cut integration condition is marked as regular trajectory data; wherein, the trajectory meeting the fly-cut integration condition is a straight line trajectory with a consistent unit direction vector.

[0017] Furthermore, the step of “determining whether the trajectory data in the cache queue meets the fly-cut integration condition according to the fly-cut integration condition; if the fly-cut integration condition is met, marking the trajectory data meeting the fly-cut integration condition as fly-cut small-segment trajectory data, and integrating the trajectory data meeting the fly-cut integration condition to generate fly-cut large-segment trajectory data; if the fly-cut integration condition is not met, marking the trajectory data not meeting the fly-cut integration condition as regular trajectory data” specifically includes:

[0018] A1. Initialize N=0, F=true, where N is defined as the number of small fly-cut trajectories contained in the current large fly-cut trajectory, and F=true means that the trajectory currently capable of fly-cut integration is the first segment of the large fly-cut trajectory;

[0019] A2, traverse the trajectory data in the cache queue in the preset order, and take the i-th trajectory in the cache queue as P f , the i+1th trajectory is P s , at the same time, let N = N + 1;

[0020] A3. Judge P f With P sWhether the flying cutting integration conditions are met, and judge the size of N and SB-1, if P f With P s If the flying cut integration condition is met and N<SB-1, then jump to A4; if P f With P s If the flying cut integration condition is not met, then jump to A5; if P f With P s If the fly-cut integration condition is met but N≥SB-1, then jump to A6; where the number of trajectories stored in the sliding window is defined as S, and the number of trajectories stored in the reserved window is defined as B;

[0021] A4. Determine whether F is true. If F = true, jump to A7; otherwise, jump to A8.

[0022] A5, judging whether F is false, if F=false, jumping to A6; otherwise jumping to A9; wherein, F=false is defined as the existence of a large segment of fly-cut integrated trajectory data in the current trajectory queue;

[0023] A6. Initialize N to 0, F to true, P f The fly-cut mark nF is set to 2, and the current P f The end point is assigned to P t The end point, then P t Insert before the trajectory of the first fly-cut integration, and continue to execute A9 after A6; where P is defined t To fly and cut large sections of trajectory data;

[0024] A7, P f Assign the value to P t , as the first segment of the large trajectory of the fly-cut integration, and P t The fly-cut flag nF is set to 1, and the P f With P s The fly-cut flag nF is set to 2, and F is set to false. After A7, execution continues with A9.

[0025] A8, P s The flying cut flag nF is set to 2, and A9 is continued after A8;

[0026] A9. Judge P s Is it the last track in the cache queue? If P s If it is the last track in the cache queue, then jump to A10; otherwise, let i = i + 1 and repeatedly return to A2 until P s is the last track in the cache queue;

[0027] A10. Determine whether F is false. If so, modify P.t End point, and P t Insert the trajectory before the start of the current first fly-cut integration to obtain the integrated queue IQ; otherwise, directly obtain the integrated queue IQ.

[0028] Furthermore, the step of "planning the speed between the large-segment trajectory data and between the large-segment trajectory data and the trajectory data that cannot be integrated by the fly-cut" specifically includes:

[0029] Traverse the integration queue IQ in a preset order, and store the trajectory data with the flying cut flag nF of 0 and 1 in the trajectory queue NB in ​​sequence;

[0030] Forward traverse the trajectory data in the trajectory queue NB, and forward calculate the forward connection speed between the i-th trajectory and the i+1-th trajectory;

[0031] Traverse the trajectory data in the trajectory queue NB in ​​reverse order and calculate the reverse connection speed between the i-th trajectory segment and the i+1-th trajectory segment. Compare the forward connection speed and the reverse connection speed between the i-th trajectory segment and the i+1-th trajectory segment. If the reverse connection speed is less than or equal to the forward connection speed, use the reverse connection speed as the corner connection speed between the i-th trajectory segment and the i+1-th trajectory segment. Otherwise, use the forward connection speed as the corner connection speed between the i-th trajectory segment and the i+1-th trajectory segment.

[0032] Furthermore, the step of “forward traversing the trajectory data in the trajectory queue NB and forward calculating the forward connection speed between the i-th trajectory segment and the i+1-th trajectory segment” specifically includes:

[0033] Assign the starting speed of the first trajectory in the trajectory queue NB to the final speed V output to the controller by the last sliding window le ;

[0034] Forward traverse the trajectory data in the trajectory queue NB, take the i-th trajectory as P i , the i+1th trajectory is P i+1 , determine P by linear acceleration and deceleration method i The terminal velocity V ife , and V ife As P i and P i+1 The corner connection speed and P i+1 Starting speed;

[0035] Return to step "Forward traverse the trajectory data in the trajectory queue NB, take the i-th trajectory as P i , the i+1th trajectory is P i+1 , determine P by linear acceleration and deceleration method i The terminal velocity Vife and V ife is the start speed of P i , and V i+1 is the start speed of P i+1 , and the step of "iterating the trajectory data in the trajectory queue NB in a forward direction, and calculating the forward corner joint speed between the i-th trajectory and the i+1-th trajectory; and comparing the forward corner joint speed between the i-th trajectory and the i+1-th trajectory with the start speed of P i+1 , and the start speed of P i+1 , until the iteration of the trajectory in the trajectory queue NB in the forward direction is completed.

[0036] Further, the step of "iterating the trajectory data in the trajectory queue NB in a reverse direction, and calculating the reverse corner joint speed between the i-th trajectory and the i+1-th trajectory; and comparing the forward corner joint speed between the i-th trajectory and the i+1-th trajectory with the reverse corner joint speed, if the reverse corner joint speed is less than or equal to the forward corner joint speed, then the reverse corner joint speed is taken as the corner joint speed between the i-th trajectory and the i+1-th trajectory; otherwise, the forward corner joint speed is taken as the corner joint speed between the i-th trajectory and the i+1-th trajectory", specifically includes:

[0037] assigning the end speed of the last trajectory in the trajectory queue NB as 0;

[0038] iterating the trajectory data in the trajectory queue NB in a reverse direction, taking the i+1-th trajectory as P i+1 , and determining the start speed V (i+1)s of P i+1 by using the straight line acceleration and deceleration method;

[0039] comparing the start speed V (i+1)s of P i+1 with V ife , if V (i+1)s ≤ V ife , then V (i+1)s is taken as the corner joint speed between the trajectory P i and P i+1 ; otherwise, V ife is taken as the corner joint speed between the trajectory P i and P i+1 ;

[0040] returning to the step of "iterating the trajectory data in the trajectory queue NB in a reverse direction, taking the i+1-th trajectory as P i+1 , and determining the start speed V (i+1)s of P i+1 by using the straight line acceleration and deceleration method", until the iteration of the trajectory in the trajectory queue NB in the reverse direction is completed.

[0041] Furthermore, the step of "reversely traversing the trajectory data in the trajectory queue NB, reversely calculating the reverse connection speed between the i-th trajectory segment and the i+1-th trajectory segment; and comparing the forward connection speed and the reverse connection speed between the i-th trajectory segment and the i+1-th trajectory segment; if the reverse connection speed is less than or equal to the forward connection speed, using the reverse connection speed as the corner connection speed between the i-th trajectory segment and the i+1-th trajectory segment; otherwise, using the forward connection speed as the corner connection speed between the i-th trajectory segment and the i+1-th trajectory segment" further includes:

[0042] Update the trajectory queue NB, replace the original trajectory queue NB without connection speed with the trajectory queue NB with connection speed, and obtain a new integrated trajectory queue OB.

[0043] Furthermore, the step of “updating the trajectory queue NB, replacing the original trajectory queue NB without the connection speed with the trajectory queue NB with the connection speed, and obtaining a new integrated trajectory queue OB” specifically includes:

[0044] Traverse the updated trajectory queue NB in ​​the order in which the trajectories are stored, and take out the trajectory P with the connection speed i ;

[0045] Traverse the integrated queue IQ in the order in which the trajectories are stored, and take out the trajectories P with the flying cut flags nF=0 and nF=1. j ;

[0046] Analysis trajectory P i and trajectory P j Trajectory information, if the trajectory P i and trajectory P j The trajectory information is consistent, which means that P i and trajectory P j If they belong to the same trajectory, then execute the step "determine the target output quantity of trajectory data after speed planning according to the number of trajectories stored in the sliding window and the number of trajectories stored in the reserved window, and output the target output quantity of trajectory data to the controller for processing"; otherwise, jump to the step "traverse the integrated queue IQ in the order of trajectory storage, and take out the trajectory P with the flying cut flag nF=0 and nF=1" j ", until the corresponding trajectory information P is found j ;

[0047] The trajectory P in the integrated queue IQ j Use the trajectory P with connecting speed in NB i replace;

[0048] Repeat the steps of "traversing the integrated queue IQ in the order of track storage, taking out the track P with the fly-cut flag nF=0 and nF=1 jUntil all the trajectories with flying cut flags nF=0 and nF=1 in the integrated queue IQ are replaced by trajectories with the same trajectory information in the updated trajectory queue NB;

[0049] The processed integration queue IQ is assigned to the trajectory queue OB, and the caches of the original integration queue IQ and trajectory queue NB are cleared at the same time.

[0050] Furthermore, the step of “determining a target output quantity of trajectory data after velocity planning based on the number of trajectories stored in the sliding window and the number of trajectories stored in the reserved window, and outputting the target output quantity of trajectory data to the controller for processing, wherein the number of trajectories stored in the reserved window is greater than 0” specifically includes:

[0051] Traverse the trajectory queue OB in order and take the i-th trajectory as P i ;

[0052] Determine whether i is less than SB;

[0053] If i <S-B,则直接将轨迹P i Output to the controller for processing, and repeat S81 to I2 to continue to obtain the new trajectory P i ;

[0054] If i≥SB, then determine the trajectory P i The flying cut flag nF, if the trajectory P i The flying cut flag nF is 2, and the trajectory P i Output to the controller for processing until trajectory P i The flying cutting mark is nF = 0 or nF is 1, and it stops; if the trajectory P i When the flying cutting mark is nF is 0 or nF is 1, the trajectory P i Not output to the controller for processing;

[0055] Determine whether there is a track P without output in the track queue OB i , if it exists, judge the trajectory P again i The flying cut flag nF, if the trajectory P i If the flying cutting flag is nF is 0, then the trajectory P i Store in cache queue Q; if trajectory P i If the flying cut flag is nF 1, then the track P is skipped or deleted directly. i ; If the trajectory P i The flying cutting mark is nF is 2, first track P i Assign nF to 0, and then move the trajectory P i Store in the cache queue;

[0056] Repeat the above steps until the trajectory queue OB is traversed and the cache of the trajectory queue OB is cleared.

[0057] Furthermore, the step of "determining a target output quantity of trajectory data after velocity planning based on the number of trajectories stored in the sliding window and the number of trajectories stored in the reserved window, and outputting the target output quantity of trajectory data to the controller for processing, wherein the number of trajectories stored in the reserved window is greater than 0" further includes:

[0058] Determine whether there is any unacquired trajectory data in the trajectory data to be processed. If so, return to the step of "acquiring a first preset number of trajectory data from the trajectory data to be processed according to the number of trajectories stored in the sliding window and storing them in the sliding window, wherein the first preset number does not exceed the number of trajectories stored in the sliding window"; otherwise, continue to determine whether there is trajectory data in the cache queue. If there is trajectory data in the cache queue, return to the step of "performing fly-cut integration on the trajectory data that meets the fly-cut integration condition to generate fly-cut large-segment trajectory data" until all the trajectory data in the cache queue are output to the controller.

[0059] The present application also provides a fly cutting processing device, comprising:

[0060] A setting module, used to set the sliding window and the reserved window, and set the number of tracks stored in the sliding window and the reserved window;

[0061] an acquisition module, configured to acquire a first preset number of trajectory data according to a size of the sliding window and store the data in the sliding window, wherein the first preset number does not exceed the number of trajectories stored in the sliding window;

[0062] A fly-cut integration module is used to perform fly-cut integration on the trajectory data that meets the fly-cut integration conditions to generate large-segment fly-cut trajectory data;

[0063] A speed planning module is used to plan the speed between large sections of fly-cut trajectory data, and between large sections of fly-cut trajectory data and trajectory data that cannot be integrated by fly-cut; and

[0064] The output module is used to determine the target output quantity of trajectory data after velocity planning based on the number of trajectories stored in the sliding window and the number of trajectories stored in the reserved window, and output the target output quantity of trajectory data to the controller for processing, wherein the number of trajectories stored in the reserved window is greater than 0.

[0065] The present application also provides a computer device, comprising:

[0066] a processor configured to execute computer-executable instructions;

[0067] The memory stores one or more computer executable instructions, and when the computer executable instructions are executed by the processor, the steps of the above-mentioned fly-cutting processing method are implemented.

[0068] Furthermore, the processor includes a compiler and a controller, the compiler is used to execute the various steps of the fly-cutting processing method described above, and the controller is used to receive the trajectory data output by the compiler and process the output trajectory data.

[0069] The present application also provides a computer-readable storage medium on which a computer program is stored. The computer program is executed by a processor to implement the various steps of the fly-cutting processing method described above.

[0070] The beneficial effects of the fly-cut processing method provided by the present application are as follows: first, a sliding window and a reserved window are set, and the number of trajectories stored in the sliding window and the reserved window is set; a first preset number of trajectory data is obtained from the trajectory data to be processed according to the number of trajectories stored in the sliding window and stored in the sliding window, and the first preset number does not exceed the number of trajectories stored in the sliding window; the trajectory data that meets the fly-cut integration conditions are fly-cut integrated to generate fly-cut large-section trajectory data; speed planning is performed between the fly-cut large-section trajectory data and between the fly-cut large-section trajectory data and the trajectory data that cannot be fly-cut integrated; and the speed planning is determined according to the number of trajectories stored in the sliding window and the number of trajectories stored in the reserved window. The target output number of trajectory data after the target output number is determined, and the trajectory data of the target output number is output to the controller for processing, wherein the number of trajectories stored in the reserved window is greater than 0. By setting the sliding window, the number of trajectories that the compiler can process at one time can be limited, which can improve the efficiency of fly-cutting integration and avoid the compiler processing time being too long due to processing all the trajectory data at one time. By setting the reserved window, the number of trajectories stored in the reserved window is greater than 0, which can avoid outputting all the trajectory data in the sliding window at one time, thereby avoiding the corner connection speed of the trajectory data output to the controller being 0, so that the controller can process at a certain speed, thereby further improving the fly-cutting processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0072] Figure 1 A schematic flow chart of a fly-cutting method according to an embodiment of the present application;

[0073] Figure 2 A flowchart of a specific application embodiment of the fly-cutting processing method provided by the present application is shown.

[0074] In the drawings, various reference numerals refer to various identical or similar elements. DETAILED DESCRIPTION

[0075] In order to make the technical problems, technical solutions and beneficial effects of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, and not to limit the present application.

[0076] It should be noted that when an element is referred to as being "fixed to" or "disposed on" another element, it can be directly on the other element or indirectly on the other element. When an element is referred to as being "connected to" another element, it can be directly connected to the other element or indirectly connected to the other element.

[0077] It should be understood that the terms "length", "width", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like indicate the orientation or positional relationship shown in the drawings based on the orientation or positional relationship shown in the drawings, and are only for the purpose of facilitating the description of the present application and simplifying the description, and therefore cannot be understood as indicating or implying that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application.

[0078] In addition, the terms "first" and "second" are only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first" and "second" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise explicitly specified.

[0079] Please refer to Figure 1 The fly-cutting processing method provided by the present application will now be described. The fly-cutting processing method provided by the present application is executed by a compiler to perform S1, S2, S4, S6 and S8.

[0080] S1, set the sliding window and the reserved window, and set the number of trajectories stored in the sliding window and the reserved window.

[0081] S2, obtain a first preset number of trajectory data from the to-be-processed trajectory data according to the number of trajectories stored in the sliding window and store the first preset number of trajectory data in the sliding window, the first preset number being not more than the number of trajectories stored in the sliding window.

[0082] Among them, by limiting the size of the sliding window and the number of trajectories that the compiler processes at one time, the efficiency of fly-cut integration can be improved, and the compiler can avoid processing all trajectory data at one time, which causes the compiler to take too long.

[0083] S4. Perform fly-cut integration on the trajectory data that meets the fly-cut integration conditions to generate fly-cut large-segment trajectory data.

[0084] In S4 , the fly-cutting efficiency can be improved by fly-cutting integration of the trajectory data that meets the fly-cutting integration conditions.

[0085] S6. Perform speed planning between the large-section trajectory data for fly-cutting, and between the large-section trajectory data for fly-cutting and the trajectory data that cannot be integrated for fly-cutting.

[0086] In S6, by performing speed planning between the large sections of fly-cut trajectory data and between the large sections of fly-cut trajectory data and the trajectory data that cannot be integrated by fly-cut, the corner connection speed between the large sections of fly-cut trajectory data and between the large sections of fly-cut trajectory data and the trajectory data that cannot be integrated by fly-cut can be obtained.

[0087] S8. Determine a target output quantity of trajectory data after velocity planning based on the number of trajectories stored in the sliding window and the number of trajectories stored in the reserved window, and output the target output quantity of trajectory data to the controller for processing, wherein the number of trajectories stored in the reserved window is greater than 0.

[0088] In S8, the target output number of trajectory data after speed planning is determined based on the number of trajectories stored in the sliding window and the number of trajectories stored in the reserved window, and the number of trajectories stored in the reserved window is greater than 0, so as to avoid outputting all the trajectory data in the sliding window at one time, thereby avoiding the corner connection speed of the trajectory data output to the controller being 0, thereby further improving the fly cutting processing efficiency.

[0089] The fly-cut processing method provided by the present application first sets a sliding window and a reserved window, and sets the number of trajectories stored in the sliding window and the reserved window; obtains a first preset number of trajectory data from the trajectory data to be processed according to the number of trajectories stored in the sliding window and stores them in the sliding window, wherein the first preset number does not exceed the number of trajectories stored in the sliding window; performs fly-cut integration on the trajectory data that meets the fly-cut integration conditions to generate fly-cut large-segment trajectory data; performs speed planning between the fly-cut large-segment trajectory data and between the fly-cut large-segment trajectory data and the trajectory data that cannot be fly-cut integrated; determines the trajectory after speed planning according to the number of trajectories stored in the sliding window and the number of trajectories stored in the reserved window The target output quantity of the data is determined, and the trajectory data of the target output quantity is output to the controller for processing, wherein the number of trajectories stored in the reserved window is greater than 0. By setting the sliding window, the number of trajectories that the compiler can process at one time can be limited, which can improve the efficiency of fly-cutting integration and avoid the compiler processing time being too long due to processing all the trajectory data at one time. By setting the reserved window, the number of trajectories stored in the reserved window is greater than 0, which can avoid outputting all the trajectory data in the sliding window at one time, thereby avoiding the corner connection speed of the trajectory data output to the controller being 0, so that the controller can process at a certain speed, thereby further improving the fly-cutting processing efficiency.

[0090] See also Figure 2 Step S2 of "obtaining a first preset number of trajectory data from the trajectory data to be processed and storing them in the sliding window according to the number of trajectories stored in the sliding window, wherein the first preset number does not exceed the number of trajectories stored in the sliding window" may specifically include S21 and S22.

[0091] S21 . Acquire trajectory data from the trajectory data to be processed in sequence according to a preset order, and store the acquired trajectory data in a cache queue of the sliding window.

[0092] In S21 , the compiler parses the NC-coded trajectory data to be processed line by line, and stores the acquired trajectory data in the sliding window cache queue Q. The trajectory data may be a straight line or an arc.

[0093] S22 , when the number of trajectories in the cache queue exceeds the number of trajectories stored in the sliding window or a trajectory end instruction is encountered, then stop acquiring the next trajectory data; otherwise, continue acquiring the next trajectory data.

[0094] When the number of trajectories in the cache queue exceeds the number of trajectories stored in the sliding window or when a trajectory end instruction is encountered, the system stops acquiring the next trajectory data to ensure that the number of trajectories processed at one time does not exceed the size of the sliding window, thereby improving processing efficiency. The trajectory end instruction is the M02 instruction or the M30 instruction.

[0095] The step S3 may also be included before step S4 of "performing fly-cut integration on the trajectory data that meets the fly-cut integration conditions to generate fly-cut large-segment trajectory data".

[0096] S3. Determine whether the number of trajectories in the cache queue exceeds 1; if the number of trajectories in the cache queue exceeds 1, jump to step S4 "perform fly-cut integration on the trajectory data that meets the fly-cut integration conditions to generate fly-cut large-segment trajectory data"; otherwise, directly output the trajectory data in the cache queue to the controller for processing.

[0097] S3 is used to determine whether the number of trajectories in the cache queue meets the conditions for fly-cutting. Fly-cutting is to enable multiple straight-line trajectories in the same direction to be organized into a long straight line, so the number of trajectory data must be greater than 1. When the number of trajectory data in the cache queue does not exceed 1, it means that the number of trajectories in the cache queue is 0 or only 1, and the fly-cutting conditions are not met. In this case, the trajectory data in the cache queue can be directly output to the controller for processing. For example, when there is only one straight line or an arc in the cache queue, fly-cutting is not required and it is directly output to the controller for processing.

[0098] Step S4 of “performing fly-cut integration on the trajectory data that meets the fly-cut integration conditions to generate fly-cut large-segment trajectory data” may specifically include S40 .

[0099] S40: Determine whether the trajectory data in the cache queue meets the fly-cut integration condition according to the fly-cut integration condition; if the fly-cut integration condition is met, mark the trajectory data meeting the fly-cut integration condition as fly-cut small-segment trajectory data, and integrate the trajectory data meeting the fly-cut integration condition to generate fly-cut large-segment trajectory data; if the fly-cut integration condition is not met, mark the trajectory data not meeting the fly-cut integration condition as regular trajectory data; wherein the trajectory meeting the fly-cut integration condition is a straight line trajectory with a consistent unit direction vector.

[0100] Specifically, the following method can be used to determine whether the unit direction vectors of adjacent straight line trajectories Pf and Ps are consistent:

[0101] Assume that the starting and ending coordinates of the Pf straight line trajectory are (xfs, yfs) and (x fe ,y fe ) The trajectory length is L f , P s The starting and ending points of the straight line are (x ss ,y ss ) and (x se ,y se ), the trajectory length is L s . Where (x fe ,y fe ) and (x ss ,yss ) have the same coordinates, which is P f and P s The unit direction vectors of these two trajectories are If v f =v s , then P f and P s The unit direction vectors are consistent, enabling trajectory integration.

[0102] Step S40, "determining whether the trajectory data in the cache queue meets the fly-cut integration condition according to the fly-cut integration condition; if the fly-cut integration condition is met, marking the trajectory data meeting the fly-cut integration condition as fly-cut small-segment trajectory data, and integrating the trajectory data meeting the fly-cut integration condition to generate fly-cut large-segment trajectory data; if the fly-cut integration condition is not met, marking the trajectory data not meeting the fly-cut integration condition as regular trajectory data," may specifically include:

[0103] S41 , initializing N=0, F=true, wherein N is defined as the number of small fly-cut trajectories contained in the current large fly-cut trajectory, and F=true is defined as the trajectory currently capable of fly-cut integration is the first segment of the large fly-cut trajectory.

[0104] Wherein, F=true indicates that the on-the-fly switching integration has not started in the cache queue.

[0105] S42, traverse the trajectory data in the cache queue in a preset order, and take the i-th trajectory in the cache queue as P f , the i+1th trajectory is P s , at the same time, let N=N+1.

[0106] The i-th and i+1-th trajectories are two adjacent and continuous trajectories in the cache queue. i can be 1, 2, 3, 4, ..., n. Since N is initialized to 0, when N = 0, it means that the number of small fly-cut trajectories contained in the current large fly-cut trajectory is 1. When N = 1, it means that the number of small fly-cut trajectories contained in the current large fly-cut trajectory is 2. When N = 2, it means that the number of small fly-cut trajectories contained in the current large fly-cut trajectory is 3.

[0107] S43, judge P f With P s Whether the flying cutting integration conditions are met, and judge the size of N and SB-1, if P f With P s If the flying cut integration condition is met and N<SB-1, then jump to S44; if P f With P s If the flying cut integration condition is not met, then jump to S45; if P f With Ps If the fly-cut integration condition is met, but N≥S-B-1, jump to S46; wherein, the number of trajectories stored in the sliding window is defined as S, and the number of trajectories stored in the reserved window is defined as B.

[0108] In S43, the size of N and S-B-1 is determined, mainly to ensure that the cache queue Q, after completing the fly-cut and speed trajectory processing, when the trajectory data is output to the controller, the number of fly-cut small section trajectories behind the fly-cut large section trajectory is controlled within S-B-1, so that the current fly-cut small section trajectory also meets the fly-cut integration condition.

[0109] If P f and P s meet the fly-cut integration condition, and N f and P s meet the fly-cut integration condition, but N≥S-B-1, indicating that the number of current fly-cut small section trajectories has reached the number of trajectories output to the controller for processing, and the current fly-cut integration operation needs to be interrupted.

[0110] S44, determine whether F is true, if F=true, jump to S47; otherwise, jump to S48.

[0111] S45, determine whether F is false, if F=false, jump to S46; otherwise, jump to S49; wherein, F=false is defined as the existence of fly-cut integration large section trajectory data in the current trajectory queue.

[0112] S46, initialize N to 0, F to true, P f the fly-cut flag nF to 2, and assign the end point of the current P f to the end point of P t , and then insert P t before the trajectory at which the first fly-cut integration starts, and continue to execute S49 after S46; wherein, P t is defined as the fly-cut large section trajectory data.

[0113] In S45, if F=false, it indicates that there is fly-cut large section trajectory data P t in the cache queue at the end of the current fly-cut, and N needs to be initialized to 0, and F needs to be initialized to true. And it indicates that P f and P s cannot be fly-cut integrated, P f belongs to the fly-cut small section trajectory in the current fly-cut large section trajectory data P t , and P s does not belong to the current fly-cut large section trajectory data Pt In the fly-cut small track, you need to change the current P f The end point is assigned to P t The end point, then P t Insert before the trajectory where the first fly-cut integration starts.

[0114] S47, P f Assign the value to P t , as the first segment of the large trajectory of the fly-cut integration, and P t The fly-cut flag nF is set to 1, and the P f With P s The fly-cut flag nF is set to 2, and F is set to false. After S47, S49 is continued to be executed.

[0115] In S44, determine whether F is true. If F=true, it means P t Currently there is no large section of P for fly-cut integration t , and P f With P s If the flying cutting integration condition is met, P f Assign the value to P t , as the first segment of the large trajectory of the fly-cut integration, and P t The fly-cut flag nF is set to 1, and the P f With P s The fly-cut flag of nF is set to 2, while F is set to false.

[0116] S48, P s The flying cut flag nF is set to 2, and S49 is executed after S48.

[0117] In S44, it is determined whether F is true. If F=false, it indicates that there is already a large section of the fly-cut trajectory P. t Due to the current P f P in the previous paragraph s , then we only need to change P s The fly-cut mark nF can be set to 2, indicating that P s It also belongs to the existing large-segment flying cut trajectory P t Flying cut short trajectory.

[0118] S49, judge P s Is it the last track in the cache queue? If P s If it is the last track in the cache queue, jump to S50; otherwise, set i=i+1 and repeatedly return to S42 until Ps is the last track in the cache queue.

[0119] S50, determine whether F is false, if so, modify Pt end point of P t If the current first fly-cut integration start track is inserted before the track, the integration queue IQ is obtained; otherwise, the integration queue IQ is directly obtained.

[0120] In S50, it is judged again whether F is false, in order to insert the current first fly-cut integration start track before the track after S42 to E20, and thus P t is inserted before the current first fly-cut integration start track.

[0121] In one embodiment of the present application, if the tracks arranged in the buffer queue Q are P1, P2, P3, P4, P5, P6 and P7 in sequence. If P1, P2 and P3 meet the fly-cut integration condition, P3 and P4 do not meet the fly-cut integration condition, P4 and P5 meet the fly-cut integration condition, and P6 and P7 do not meet the fly-cut condition. P1 is assigned to the first fly-cut large track Pt1, the end point of P3 is assigned to the first fly-cut large track Pt1, indicating that the first fly-cut large track Pt1 has the fly-cut small tracks P1, P2 and P3, and Pt1 is inserted before P1. Since P4 and P5 also meet the fly-cut integration condition, P4 is assigned to the second fly-cut large track Pt2, the end point of P5 is assigned to the second fly-cut large track Pt2, indicating that the second fly-cut large track Pt2 has the fly-cut small tracks P4 and P5, and Pt2 is inserted before P4. That is, the tracks arranged in the integration queue IQ are Pt1, P1, P2, P3, Pt2, P4, P5, P6 and P7 in sequence. t1

[0122] Please refer to Figure 2 , step S6, speed planning is performed between the fly-cut large track data and between the fly-cut large track data and the track data that cannot be fly-cut integrated. Specifically, the speed planning can include:

[0123] S61, the integration queue IQ is traversed in a preset order, and the track data with fly-cut marks nF of 0 and 1 are sequentially stored in the track queue NB.

[0124] ​nF=0 represents a normal trajectory, that is, it does not meet the conditions for fly-cut integration and does not perform fly-cut trajectory integration; nF=1 represents a large segment for fly-cut integration; nF=2 represents a small segment for fly-cut integration. Therefore, the trajectory with nF=1 is the integration of all nF=2 small segment trajectory information, and the speed trajectory only needs to be planned for the trajectories with nF=0 and nF=1 in the order of trajectory storage. For example, in the above embodiment, the trajectories arranged in sequence in the integration queue IQ are Pt1, P1, P2, P3, Pt2, P4, P5, P6, and P7. In S61, the trajectory data with fly-cut marks nF of 0 and 1 are stored in the trajectory queue NB in ​​sequence, and the trajectories arranged in sequence in the trajectory queue NB are Pt1, Pt2, P6, and P7. It is only necessary to perform speed planning between Pt1 and Pt2, between Pt2 and P6, and between P6 and P7.

[0125] In S61 , the trajectory data with the fly-cut flags nF being 0 and 1 are sequentially stored in the trajectory queue NB, mainly to facilitate the subsequent speed planning.

[0126] S62 , forwardly traverse the trajectory data in the trajectory queue NB, and forwardly calculate the forward connection speed between the i-th trajectory segment and the (i+1)-th trajectory segment.

[0127] S63. Reversely traverse the trajectory data in the trajectory queue NB and reversely calculate the reverse connection speed between the i-th trajectory segment and the i+1-th trajectory segment. Compare the forward connection speed and the reverse connection speed between the i-th trajectory segment and the i+1-th trajectory segment. If the reverse connection speed is less than or equal to the forward connection speed, use the reverse connection speed as the corner connection speed between the i-th trajectory segment and the i+1-th trajectory segment. Otherwise, use the forward connection speed as the corner connection speed between the i-th trajectory segment and the i+1-th trajectory segment.

[0128] The forward connection speed is calculated from the trajectory's starting speed to the trajectory's end speed, while the reverse connection speed is calculated from the trajectory's end speed to the trajectory's starting speed.

[0129] First, the trajectory data in the trajectory queue NB are traversed forward, and the forward connection speed between the i-th trajectory segment and the i+1-th trajectory segment is forward calculated. Then, the trajectory data in the trajectory queue NB are traversed backward, and the reverse connection speed between the i-th trajectory segment and the i+1-th trajectory segment is reversely calculated. The forward connection speed and the reverse connection speed between the same trajectory segments are compared, and the smaller speed is selected as the corner connection speed to ensure that each trajectory segment can be processed reasonably.

[0130] Step S62 of "forward traversing the trajectory data in the trajectory queue NB and forward calculating the forward connection speed between the i-th trajectory segment and the i+1-th trajectory segment" may specifically include:

[0131] S621, assign the starting speed of the first track in the track queue NB to the final speed V output to the controller by the last sliding window le .

[0132] S621 can ensure the speed continuity between the trajectory and the previous trajectory.

[0133] S622, forward traverse the trajectory data in the trajectory queue NB, take the i-th segment trajectory as P i , the i+1th trajectory is P i+1 , determine P by linear acceleration and deceleration method i The terminal velocity V ife , and V ife As P i and P i+1 The corner connection speed and P i+1 Starting speed.

[0134] S623 , returning to step S622 , until the forward traversal of the trajectories in the trajectory queue NB is completed.

[0135] Among them, according to the storage order of the trajectory queue NB, traverse from the beginning to the end to determine the final velocity of each trajectory segment. The specific process is as follows: First, the final velocity of the first trajectory segment is calculated using the linear acceleration and deceleration method based on the starting velocity of the first trajectory segment; then, this final velocity is used as the starting velocity of the second trajectory segment. At this time, this final velocity is also called the corner connection velocity of the first and second trajectories; then, the final velocity of the second trajectory segment is calculated based on the starting velocity of the second trajectory segment. Similarly, this final velocity is used as the corner connection velocity of the second and third trajectories and the starting velocity of the third trajectory segment; then, the final velocity of the third trajectory segment is calculated; finally, the above operation is repeated until the corner connection point velocities of the second to last trajectory segment and the last trajectory segment in the trajectory queue NB are calculated.

[0136] Step S63, "reversely traversing the trajectory data in the trajectory queue NB, reversely calculating the reverse connection speed between the i-th trajectory segment and the i+1-th trajectory segment; and comparing the forward connection speed and the reverse connection speed between the i-th trajectory segment and the i+1-th trajectory segment; if the reverse connection speed is less than or equal to the forward connection speed, using the reverse connection speed as the corner connection speed between the i-th trajectory segment and the i+1-th trajectory segment; otherwise, using the forward connection speed as the corner connection speed between the i-th trajectory segment and the i+1-th trajectory segment" may specifically include:

[0137] S631. Assign the final velocity of the last trajectory in the trajectory queue NB to 0.

[0138] S632, reversely traverse the trajectory data in the queue NB, and take the i+1th trajectory as P i+1, determine P by linear acceleration and deceleration method i+1 Starting speed V (i+1)s .

[0139] S633, P i+1 Starting speed V (i+1)s With V ife For comparison, if V (i+1)s ≤V ife , V (i+1)s As the trajectory P i and P i+1 The corner connection speed between them; otherwise, V ife As the trajectory P i and P i+1 The corner connection speed between them.

[0140] S634: Return to step S632 until the reverse traversal of the tracks in the track queue NB is completed.

[0141] Among them, according to the reverse order of the trajectory queue NB, traverse from the end to the beginning to determine the starting speed of each trajectory. The specific process is:

[0142] First, based on the final velocity of the last segment in the trajectory queue NB, the starting velocity of the last segment is determined using the linear acceleration / deceleration method. Then, this starting velocity is compared with the starting velocity of the last segment determined during the forward corner connection velocity calculation step S622, and the smaller velocity is selected as the starting velocity of the last segment.

[0143] Next, the starting speed is used as the final speed of the penultimate trajectory. At this time, the starting speed is also called the corner connection speed between the last trajectory and the penultimate trajectory.

[0144] Next, the starting speed of the penultimate segment is calculated based on the final speed of the penultimate segment. Similarly, this starting speed is compared with the starting speed of the penultimate segment determined in the forward corner connection speed calculation process in step S622. The smaller starting speed is selected as the final speed of the third-to-last segment, as well as the corner connection speeds of the penultimate and third-to-last segments.

[0145] Next, calculate the starting speed of the third-to-last trajectory;

[0146] Finally, the above operation is repeated until the corner connection speed of the second track segment and the first track segment of the track queue NB is calculated. Compared with S622, the calculation of the reverse corner connection speed includes the correction process of the forward corner connection speed, which can ensure that each track segment can be processed reasonably.

[0147] Among them, taking the forward connection speed calculation of the fly cutting trajectory as an example, the linear acceleration and deceleration method adopted is: Assuming that the linear trajectory Pf The starting speed is V s , the terminal velocity is V e , the trajectory length is L f , trajectory acceleration A cc , maximum trajectory speed V m , programming feed rate V F , trajectory jerk J. In addition to trajectory P f V e is the value to be evaluated, and the others are known. Then, the trajectory P f Under jerk J, the acceleration reaches A from 0 cc Time taken V s The maximum speed V achieved under J rm =V s +Acc×Δt, and reach the maximum speed V rm The required displacement increment ΔL=(V rm +V s )×Δt. Let V tm =min(V m ,V F ), the following is based on ΔL and L f , V rm With V tm Classification for discussion V e Value:

[0148] Case 1: ΔL ≥ L f And V rm ≤V tm , indicating that A cc Speed ​​up, there is enough distance to complete L f , the speed can reach V rm , and will not exceed the maximum speed V set by the system tm At this time, there must be V e , and the solution process is as follows:

[0149] First, solve for V tm The distance increment ΔL2 is:

[0150]

[0151] If P f The remaining trajectory length is longer than ΔL2, indicating that P f The final speed can reach V tm , so let V e =V tm Otherwise, let V rm =V e , ΔL2=L f , solve for V eThe linear equation of two variables:

[0152]

[0153] If the above formula has a solution, it means that V s Can accelerate to V under J e , and take V e >V s Correct answer. Otherwise, let V e =V s , indicating that under J, P f Uniform motion.

[0154] The second case: ΔL<L f And V rm ≤V tm , indicating that A cc Speed ​​up, there is not enough distance to complete L f , but at the maximum acceleration A cc Under the condition of rm , and does not exceed the maximum speed V set by the system tm At this point, it is necessary to re-solve the appropriate acceleration A through the successive approximation method. cc and final velocity V e This application adopts the dichotomy method, and the specific solution process is as follows:

[0155] First initialize the maximum speed to V bm =V rm , minimum speed V hm =V s , average speed V mm =0.5×(V bm +V hm ), distance tolerance err:

[0156]

[0157] If err>0, the average speed V mm As the maximum speed V bm , that is, V bm =V mm ; Otherwise, the average speed V mm As the minimum speed V hm , that is, V hm =V mm ; If |err|≥0.2, the average speed V mm , take the maximum speed V bm and minimum speed V hm The average value, V mm =0.5×(V bm +V hmRepeat the above steps until the distance tolerance |err|≥0.2, and then set V mm As the final velocity V e , at this time, the acceleration Alternatively, if no result can be calculated after a certain number of iterations (50 times in this application), it is considered that the speed planning cannot reach the appropriate final speed V e and acceleration A cc , the cycle ends, indicating that in this case, V e There is no solution.

[0158] The third case: ΔL≥L f And V rm >V tm , indicating that A cc Speed ​​up, there is enough distance to complete L f , but at the maximum acceleration A cc The speed that can be achieved is V rm The maximum speed V set by the system has been exceeded tm , so the maximum acceleration A cannot be reached cc At this time, the final velocity V e =V tm , acceleration

[0159] The fourth case: ΔL<L f And V rm >V tm , indicating that A cc Speed ​​up, there is not enough distance to complete L f , and at the maximum acceleration A cc Under the condition of rm It also exceeds the maximum speed V set by the system tm , so the maximum acceleration A cannot be reached cc At this time, A cc and V e The solution is as follows:

[0160] First calculate the maximum speed V tm The distance increment ΔL3 is:

[0161]

[0162] If L f >ΔL3, indicating V e Able to reach V tm , that is, V e =V tm Otherwise, you need to use the dichotomy method to solve the appropriate A again cc and V eThe solution process is the same as that of the second method and will not be repeated here.

[0163] After the above calculations, in order to protect the safety of the entire motion process, it is also necessary to compare V e and L f If V e ≥L f , indicating that the final speed exceeds the remaining distance, at this time let V e =L f Otherwise, V e This is the result of the above solution.

[0164] See also Figure 2 After step S63 of "reversely traversing the trajectory data in the trajectory queue NB, reversely calculating the reverse connection speed between the i-th trajectory segment and the i+1-th trajectory segment; and comparing the forward connection speed and the reverse connection speed between the i-th trajectory segment and the i+1-th trajectory segment; if the reverse connection speed is less than or equal to the forward connection speed, then using the reverse connection speed as the corner connection speed between the i-th trajectory segment and the i+1-th trajectory segment; otherwise, using the forward connection speed as the corner connection speed between the i-th trajectory segment and the i+1-th trajectory segment" can also include:

[0165] S64 , updating the trajectory queue NB, replacing the original trajectory queue NB without the connection speed with the trajectory queue NB with the connection speed, to obtain a new integrated trajectory queue OB.

[0166] Specifically, step S64 updates the trajectory queue NB, replacing the original trajectory queue NB without the connection speed with the trajectory queue NB with the connection speed to obtain a new integrated trajectory queue OB, which may specifically include:

[0167] S641, traverse the updated trajectory queue NB according to the storage order of the trajectory, and take out the trajectory P with the connection speed i .

[0168] S642, traverse the integrated queue IQ according to the storage order of the trajectory, and take out the trajectory P with the flying cut flag nF=0 and nF=1 j .

[0169] S643, Analyze Track P i and trajectory P j Trajectory information, if the trajectory P i and trajectory P j The trajectory information is consistent, which means that P i and trajectory P j If they belong to the same trajectory, execute S8; otherwise, repeat S642 until the corresponding trajectory information P is found. j .

[0170] S644: Integrate the trajectory P in the queue IQ j Use the trajectory P with connecting speed in NB i replace.

[0171] S645 , repeat S642 until all traces with flying cut flags nF=0 and nF=1 in the integrated queue IQ are replaced by traces with the same trace information in the updated trace queue NB.

[0172] S646 : Assign the processed integration queue IQ to the trajectory queue OB, and clear the caches of the original integration queue IQ and trajectory queue NB.

[0173] Step S8, "determining a target output quantity of trajectory data after velocity planning based on the number of trajectories stored in the sliding window and the number of trajectories stored in the reserved window, and outputting the target output quantity of trajectory data to the controller for processing, wherein the number of trajectories stored in the reserved window is greater than 0," may specifically include:

[0174] S81, traverse the trajectory queue OB in order, take the i-th trajectory and define it as P i .

[0175] S82. Determine whether i is less than SB.

[0176] S83, if i <S-B,则直接将轨迹P i Output to the controller for processing, and repeat S81 to I2 to continue to obtain the new trajectory P i .

[0177] S84. If i≥SB, then determine the trajectory P i The flying cut flag nF, if the trajectory P i The flying cut flag nF is 2, and the trajectory P i Output to the controller for processing until trajectory P i The flying cutting mark is nF = 0 or nF is 1, and it stops; if the trajectory P i When the flying cutting mark is nF is 0 or nF is 1, the trajectory P i Not output to the controller for processing.

[0178] Among them, in S84, when i≥SB, it is necessary to judge the trajectory P i The flying cut mark nF. If the trajectory P i The flying cut flag nF is 2, indicating that the trajectory P i If it is a small segment in the current large segment trajectory data, you need to continue to move the trajectory P i Output. When P iWhen the flying cut flag nF is 0 or nF is 1, it means that all small segments in the current large segment trajectory data have been output, and it is necessary to stop outputting.

[0179] If the trajectory P i When the flying cutting mark is nF 0 or nF 1, it means that the trajectory P i For regular trajectory data or the next large segment of trajectory data, the trajectory P will not be i Output to the controller for processing.

[0180] Specifically, in one embodiment of the present application, if S=7, B=2, SB=5, the trajectories in the integrated trajectory queue OB are sorted in sequence as P t1 , P1, P2, P3, Pt2, P4, P5, P6, P7. When the trajectory needs to be output to the controller, first, determine the size of i and SB. When i = 1, since i < 5, directly output P t1 Then, when i=2, since i<5, P1 is directly output to the controller; when i=3, since i<5, P2 is directly output to the controller; when i=4, since i<5, P3 is directly output to the controller; when i=5, it is necessary to judge the trajectory P t2 The flying cut mark nF. t2 The flying cut flag nF is 1, indicating that the 5th segment belongs to the flying cut large segment trajectory, and it is necessary to stop outputting. The output trajectory at this time is P t1 , P1, P2, P3, there is still P in the trajectory queue OB t2 , P4, P5, P6, P7.

[0181] In another embodiment of the present application, if S=7, B=4, SB=3, the trajectories in the integrated trajectory queue OB are sorted in sequence as P t1 , P1, P2, P3, Pt2, P4, P5, P6, P7. When the trajectory needs to be output to the controller, first, determine the size of i and SB. When i = 1, since i < 3, the output P is directly t1 to the controller; then, when i=2, since i<3, P1 is directly output to the controller at this time; when i=3, since i=SB, it is necessary to judge the fly-cut flag nF of trajectory P2. Since the fly-cut flag nF of P2 is 2, it means that the third segment belongs to the small segment trajectory in the current fly-cut large segment trajectory, and P2 is continued to be output to the controller. Then, when i=4, since i>SB, it is necessary to judge the fly-cut flag nF of trajectory P3. Since the fly-cut flag nF of P3 is 2, it means that the fourth segment belongs to the small segment trajectory in the current fly-cut large segment trajectory, and P3 is continued to be output to the controller. Then, when i=5, since i>SB, it is necessary to judge the trajectory P t2The flying cut mark nF. t2 The flying cut flag nF is 1, indicating that the 5th segment belongs to the flying cut large segment trajectory, and it is necessary to stop outputting. The output trajectory at this time is P t1 , P1, P2, P3, there is still P in the trajectory queue OB t2 , P4, P5, P6, P7.

[0182] S85, determine whether there is a track P without output in the track queue OB i , if it exists, judge the trajectory P again i The flying cut flag nF, if the trajectory P i If the flying cutting flag is nF is 0, then the trajectory P i Store in cache queue Q; if trajectory P i If the flying cut flag is nF 1, then the track P is skipped or deleted directly. i ; If the trajectory P i The flying cutting mark is nF is 2, first track P i Assign nF to 0, and then move the trajectory P i Stored in the cache queue.

[0183] To ensure that the corner connection speed does not start from 0, the number of trajectories stored in the reserved window needs to be greater than 0, so that there are trajectories P that have not been output in the trajectory queue OB. i The setting of S85 is mainly to set the track P that has not been output in the track queue OB i Restore to facilitate the remaining trajectory P i Continue to re-integrate the flight cutting with the next newly acquired trajectory data.

[0184] In S85, the trajectory P is determined. i The flying cut flag nF, when the track P i When the flying cutting mark of nF is 0, it indicates that the trajectory is a normal trajectory, then the trajectory P i Store in cache queue Q; when trajectory P i The flying cutting flag is nF is 1, indicating that the trajectory P i To cut a large section of track, just skip or delete track P i ; When the trajectory P i When the flying cutting mark is nF 2, it indicates that the trajectory P i To cut a small section of the trajectory, you need to first i Assign nF to 0, and then move the trajectory P i Stored in the cache queue.

[0185] For example, in the above implementation, the trajectories in the integrated trajectory queue OB are sorted in order as P t1 、P1、P2、P3、Pt2 , P4, P5, P6, P7. The output trajectory is P t1 , P1, P2, P3, there is still P in the trajectory queue OB t2 , P4, P5, P6, P7. When there is still P in the trajectory queue OB t2 , P4, P5, P6, P7. The process of trajectory restoration is as follows:

[0186] First, determine the trajectory P t2 The fly-cut mark nF, due to the trajectory P t2 The flying cutting flag is nF is 1, indicating that the trajectory P t2 To cut a large section of track, just skip or delete track P t2 ;

[0187] Next, the fly-cut flag nF of the trajectory P4 is determined. Since the fly-cut flag nF of the trajectory P4 is 2, it indicates that the trajectory P4 is a fly-cut small segment trajectory. At this time, it is necessary to first assign nF of the trajectory P4 to 0, and then store the trajectory P4 in the cache queue;

[0188] Then, the fly-cut flag nF of the trajectory P5 is determined. Since the fly-cut flag nF of the trajectory P5 is 2, it indicates that the trajectory P5 is a fly-cut small segment trajectory. At this time, it is necessary to first assign nF of the trajectory P5 to 0, and then store the trajectory P5 in the cache queue;

[0189] Next, the fly-cut flag nF of the trajectory P6 is determined. Since the fly-cut flag nF of the trajectory P6 is 0, it indicates that the trajectory P6 is a normal trajectory. At this time, the trajectory P6 is directly stored in the cache queue Q.

[0190] Next, the fly-cut flag nF for trajectory P7 is checked. Since nF is 0, it indicates that trajectory P7 is a normal trajectory. Trajectory P7 is directly stored in cache queue Q. After the above trajectory restoration steps, the restored trajectories in cache queue Q are P4, P5, P6, and P7. During the next fly-cut integration, new trajectory data will need to be acquired and stored in the cache queue.

[0191] S86. Repeat steps S81 to S85 until the trajectory queue OB is traversed and the cache of the trajectory queue OB is cleared.

[0192] Step S8 "determining a target output quantity of trajectory data after velocity planning based on the number of trajectories stored in the sliding window and the number of trajectories stored in the reserved window, and outputting the target output quantity of trajectory data to the controller for processing, wherein the number of trajectories stored in the reserved window is greater than 0" may further include:

[0193] S9. Determine whether there is any unacquired trajectory data in the trajectory data to be processed. If so, return to step S2 of "acquire a first preset number of trajectory data from the trajectory data to be processed according to the number of trajectories stored in the sliding window and store them in the sliding window, wherein the first preset number does not exceed the number of trajectories stored in the sliding window." Otherwise, continue to determine whether there is trajectory data in the cache queue. If there is trajectory data in the cache queue, return to step S4 of "performing fly-cut integration on the trajectory data that meets the fly-cut integration condition to generate fly-cut large-segment trajectory data" until all the trajectory data in the cache queue are output to the controller.

[0194] In step S9, it is determined whether there is any unacquired trajectory data in the trajectory data to be processed. If so, the process jumps to step S2 to obtain new trajectory data and start the next fly-cut integration. If there is no unacquired trajectory data in the trajectory data to be processed, it is determined whether there is trajectory data in the cache queue. If there is trajectory data in the cache queue, it means that trajectory data was restored in the previous fly-cut process and is stored in the cache queue. At this time, the process jumps to step S4 to re-integrate the trajectory data and perform speed planning until all the trajectory data in the cache queue is output to the controller.

[0195] The present application also provides a fly-cutting processing device, comprising:

[0196] A setting module, used to set the sliding window and the reserved window, and set the number of tracks stored in the sliding window and the reserved window;

[0197] an acquisition module, configured to acquire a first preset number of trajectory data according to a size of the sliding window and store the data in the sliding window, wherein the first preset number does not exceed the number of trajectories stored in the sliding window;

[0198] A fly-cut integration module is used to perform fly-cut integration on the trajectory data that meets the fly-cut integration conditions to generate large-segment fly-cut trajectory data;

[0199] A speed planning module is used to plan the speed between large sections of fly-cut trajectory data, and between large sections of fly-cut trajectory data and trajectory data that cannot be integrated by fly-cut; and

[0200] The output module is used to determine the target output quantity of trajectory data after velocity planning based on the number of trajectories stored in the sliding window and the number of trajectories stored in the reserved window, and output the target output quantity of trajectory data to the controller for processing, wherein the number of trajectories stored in the reserved window is greater than 0.

[0201] The present application also provides a computer device, including:

[0202] a processor configured to execute computer-executable instructions;

[0203] The memory stores one or more computer-executable instructions. When the computer-executable instructions are executed by the processor, each step of the fly-cutting processing method in any of the above embodiments is implemented.

[0204] The computer device of the embodiment of the present application, the processor includes a compiler and a controller, the compiler is used to execute the various steps of the fly-cutting processing method in any of the above embodiments, and the controller is used to receive the trajectory data output by the compiler and process the output trajectory data.

[0205] An embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. The computer program is executed by a processor to implement each step of the fly-cutting processing method in any of the above embodiments.

[0206] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present application should be included in the scope of protection of the present application.

Claims

1. A fly cutting method, characterized in that: The following steps are performed by the compiler: Set the sliding window and reserved window, and set the number of tracks stored in the sliding window and reserved window; Obtaining a first preset number of trajectory data from the trajectory data to be processed according to the number of trajectories stored in the sliding window and storing the data in the sliding window, wherein the first preset number does not exceed the number of trajectories stored in the sliding window; Perform fly-cut integration on the trajectory data that meets the fly-cut integration conditions to generate fly-cut large-segment trajectory data; Perform speed planning between large sections of fly-cut trajectory data, and between large sections of fly-cut trajectory data and trajectory data that cannot be integrated for fly-cut; According to the number of trajectories stored in the sliding window and the number of trajectories stored in the reserved window, the target output number of trajectory data after velocity planning is determined, and the target output number of trajectory data is output to the controller for processing, wherein the number of trajectories stored in the reserved window is greater than 0.

2. The fly cutting method according to claim 1, wherein: The step of "obtaining a first preset number of trajectory data from the trajectory data to be processed according to the number of trajectories stored in the sliding window and storing the data in the sliding window, wherein the first preset number does not exceed the number of trajectories stored in the sliding window" specifically includes: Obtaining trajectory data from the trajectory data to be processed in sequence according to a preset order, and storing the acquired trajectory data in a cache queue of the sliding window; When the number of trajectories in the cache queue exceeds the number of trajectories stored in the sliding window or a trajectory end instruction is encountered, the acquisition of the next trajectory data is stopped; otherwise, the acquisition of the next trajectory data is continued.

3. The fly cutting method according to claim 2, wherein: The step of "performing fly-cut integration on the trajectory data that meets the fly-cut integration conditions to generate fly-cut large-segment trajectory data" also includes: Determine whether the number of trajectories in the cache queue exceeds 1; if the number of trajectories in the cache queue exceeds 1, jump to step "fly-cut integration of trajectory data that meets the fly-cut integration conditions to generate large-segment fly-cut trajectory data"; otherwise, directly output the trajectory data in the cache queue to the controller for processing.

4. The fly cutting method according to claim 2, wherein: The step of "performing fly-cut integration on the trajectory data that meets the fly-cut integration conditions to generate fly-cut large-segment trajectory data" specifically includes: According to the fly-cut integration condition, it is determined whether the trajectory data in the cache queue meets the fly-cut integration condition; if the fly-cut integration condition is met, the trajectory data meeting the fly-cut integration condition is marked as fly-cut small-segment trajectory data, and the trajectory data meeting the fly-cut integration condition is integrated to generate fly-cut large-segment trajectory data; if the fly-cut integration condition is not met, the trajectory data not meeting the fly-cut integration condition is marked as regular trajectory data; wherein, the trajectory meeting the fly-cut integration condition is a straight line trajectory with a consistent unit direction vector.

5. The fly cutting method according to claim 4, wherein: The step "determines whether the trajectory data in the cache queue meets the fly-cut integration condition according to the fly-cut integration condition; if the fly-cut integration condition is met, marks the trajectory data meeting the fly-cut integration condition as fly-cut small-segment trajectory data, and integrates the trajectory data meeting the fly-cut integration condition to generate fly-cut large-segment trajectory data;" If the fly-cut integration conditions are not met, the trajectory data that does not meet the fly-cut integration conditions will be marked as regular trajectory data, specifically including: A1. Initialize N=0, F=true, where N is defined as the number of small fly-cut trajectories contained in the current large fly-cut trajectory, and F=true means that the trajectory currently capable of fly-cut integration is the first segment of the large fly-cut trajectory; A2, traverse the trajectory data in the cache queue in the preset order, and take the i-th trajectory in the cache queue as P f , the i+1th trajectory is P s , at the same time, let N = N + 1; A3. Judge P f With P s Whether the flying cutting integration conditions are met and the size of N and SB-1 are determined. If P f With P s If the flying cut integration condition is met and N<SB-1, then jump to A4; if P f With P s If the flying cut integration condition is not met, then jump to A5; if P f With P s If the fly-cut integration condition is met but N≥SB-1, then jump to A6; where the number of trajectories stored in the sliding window is defined as S, and the number of trajectories stored in the reserved window is defined as B; A4. Determine whether F is true. If F = true, jump to A7; otherwise, jump to A8. A5, judging whether F is false, if F=false, jumping to A6; otherwise jumping to A9; wherein, F=false is defined as the existence of a large segment of fly-cut integrated trajectory data in the current trajectory queue; A6. Initialize N to 0, F to true, P f The fly-cut mark nF is set to 2, and the current P f The end point is assigned to P t The end point, then P t Insert before the trajectory of the first fly-cut integration, and continue to execute A9 after A6; where P is defined t It is the data of large-section trajectory for flying cut; A7、P f Assign the value to P t , as the first segment of the large trajectory of the fly-cut integration, and P t The fly-cut flag nF is set to 1, and the P f With P s The fly-cut flag nF is set to 2, and F is set to false. After A7, execution continues with A9. A8, P s The flying cut flag nF is set to 2, and A9 is continued after A8; A9. Judge P s Is it the last track in the cache queue? If P s If it is the last track in the cache queue, then jump to A10; otherwise, let i = i + 1 and return to A2 repeatedly until P s is the last track in the cache queue; A10. Determine whether F is false. If so, modify P. t End point, and P t Insert the trajectory before the start of the first fly-cut integration to obtain the integrated queue IQ; otherwise, directly obtain the integrated queue IQ.

6. The fly cutting method according to claim 5, wherein: The step of "planning the speed between the large-section trajectory data of the fly-cut and between the large-section trajectory data of the fly-cut and the trajectory data that cannot be integrated by the fly-cut" specifically includes: Traverse the integration queue IQ in a preset order, and store the trajectory data with the flying cut flag nF of 0 and 1 in the trajectory queue NB in ​​sequence; Forward traverse the trajectory data in the trajectory queue NB, and forward calculate the forward connection speed between the i-th trajectory and the i+1-th trajectory; Traverse the trajectory data in the trajectory queue NB in ​​reverse order and calculate the reverse connection speed between the i-th trajectory segment and the i+1-th trajectory segment. Compare the forward connection speed and the reverse connection speed between the i-th trajectory segment and the i+1-th trajectory segment. If the reverse connection speed is less than or equal to the forward connection speed, use the reverse connection speed as the corner connection speed between the i-th trajectory segment and the i+1-th trajectory segment. Otherwise, use the forward connection speed as the corner connection speed between the i-th trajectory segment and the i+1-th trajectory segment.

7. The fly cutting method according to claim 6, wherein: The step of "forward traversing the trajectory data in the trajectory queue NB and forward calculating the forward connection speed between the i-th trajectory segment and the i+1-th trajectory segment" specifically includes: Assign the starting speed of the first trajectory in the trajectory queue NB to the final speed V output to the controller by the last sliding window le ; Forward traverse the trajectory data in the trajectory queue NB, take the i-th trajectory as P i , the i+1th trajectory is P i+1 , determine P by linear acceleration and deceleration method i The terminal velocity V ife , and V ife As P i and P i+1 The corner connection speed and P i+1 Starting speed; Return to step "forward traverse the trajectory data in the trajectory queue NB, take the i-th trajectory as P i , the i+1th trajectory is P i+1 , determine P by linear acceleration and deceleration method i The terminal velocity V ife , and V ife As P i and P i+1 The corner connection speed and P i+1 The starting speed is set to "below", until the forward traversal of the trajectory in the trajectory queue NB is completed.

8. The fly cutting method according to claim 7, wherein: The step "reversely traverses the trajectory data in the trajectory queue NB, reversely calculates the reverse connection speed between the i-th trajectory segment and the i+1-th trajectory segment; and compares the forward connection speed and the reverse connection speed between the i-th trajectory segment and the i+1-th trajectory segment; if the reverse connection speed is less than or equal to the forward connection speed, then uses the reverse connection speed as the corner connection speed between the i-th trajectory segment and the i+1-th trajectory segment; Otherwise, the forward connection speed is used as the corner connection speed between the i-th track and the i+1-th track. Specifically, it includes: Assign the final velocity of the last trajectory in the trajectory queue NB to 0; Reversely traverse the trajectory data in the queue NB and take the i+1th trajectory as P i+1 , determine P by linear acceleration and deceleration method i+1 Starting speed V (i+1)s ; P i+1 Starting speed V (i+1)s With V ife For comparison, if V (i+1)s ≤V ife , V (i+1)s As the trajectory P i and P i+1 The corner connection speed between them; otherwise, V ife As the trajectory P i and P i+1 The corner connection speed between them; Return to step "reversely traverse the trajectory data in queue NB, take the i+1th trajectory as P i+1 , determine P by linear acceleration and deceleration method i+1 Starting speed V (i+1)s ", until the reverse traversal of the trajectory in the trajectory queue NB is completed.

9. The fly cutting method according to claim 6, wherein: The step "reversely traverses the trajectory data in the trajectory queue NB, reversely calculates the reverse connection speed between the i-th trajectory segment and the i+1-th trajectory segment; and compares the forward connection speed and the reverse connection speed between the i-th trajectory segment and the i+1-th trajectory segment; if the reverse connection speed is less than or equal to the forward connection speed, then uses the reverse connection speed as the corner connection speed between the i-th trajectory segment and the i+1-th trajectory segment; Otherwise, the forward connection speed is used as the corner connection speed between the i-th track segment and the i+1-th track segment. The following also includes: Update the trajectory queue NB, replace the original trajectory queue NB without connection speed with the trajectory queue NB with connection speed, and obtain a new integrated trajectory queue OB.

10. The fly cutting method according to claim 9, wherein: The step of "updating the trajectory queue NB, replacing the original trajectory queue NB without the connection speed with the trajectory queue NB with the connection speed, and obtaining a new integrated trajectory queue OB" specifically includes: Traverse the updated trajectory queue NB in ​​the order in which the trajectories are stored, and take out the trajectory P with the connection speed i ; Traverse the integrated queue IQ in the order in which the trajectories are stored, and take out the trajectories P with the flying cut flags nF=0 and nF=1. j ; Analysis trajectory P i and trajectory P j Trajectory information, if the trajectory P i and trajectory P j The trajectory information is consistent, which means that P i and trajectory P j If they belong to the same trajectory, then execute step "determine the target output quantity of trajectory data after speed planning according to the number of trajectories stored in the sliding window and the number of trajectories stored in the reserved window, and output the target output quantity of trajectory data to the controller for processing"; otherwise, jump to step "traverse the integrated queue IQ in the order of trajectory storage, and take out the trajectory P with the flying cut flag nF=0 and nF=1" j ", until the corresponding trajectory information P is found j ; The trajectory P in the integrated queue IQ j Use the trajectory P with connecting speed in NB i replace; Repeat step "traverse the integrated queue IQ in the order in which the trajectories are stored, and take out the trajectories P with the flying cut flags nF=0 and nF=1. j Until all the trajectories with flying cut flags nF=0 and nF=1 in the integrated queue IQ are replaced by trajectories with the same trajectory information in the updated trajectory queue NB; The processed integration queue IQ is assigned to the trajectory queue OB, and the caches of the original integration queue IQ and trajectory queue NB are cleared at the same time.

11. The fly cutting method according to claim 10, wherein: The step of "determining a target output quantity of trajectory data after velocity planning based on the number of trajectories stored in the sliding window and the number of trajectories stored in the reserved window, and outputting the target output quantity of trajectory data to the controller for processing, wherein the number of trajectories stored in the reserved window is greater than 0" specifically includes: Traverse the trajectory queue OB in order and take the i-th trajectory as P i ; Determine whether i is less than SB; If i < S - B, then directly output the trajectory P i to the controller for processing, and repeat from S81 to I2 to continue obtaining a new trajectory P i ; If i≥SB, then determine the trajectory P i The flying cut flag nF, if the trajectory P i The flying cut flag nF is 2, directly change the trajectory P i Output to the controller for processing until trajectory P i The flying cutting mark is nF = 0 or nF is 1, and it stops; if the trajectory P i When the flying cutting mark is nF is 0 or nF is 1, the trajectory P i Not output to the controller for processing; Determine whether there is a track P without output in the track queue OB i , if it exists, judge the trajectory P again i The flying cut flag nF, if the trajectory P i If the flying cutting flag is nF is 0, then the trajectory P i Store in cache queue Q; if trajectory P i If the flying cut flag is nF 1, then the track P is skipped or deleted directly. i ; If the trajectory P i The flying cutting mark is nF is 2, first track P i Assign nF to 0, and then move the trajectory P i Store in the cache queue; Repeat the above steps until the trajectory queue OB is traversed and the cache of the trajectory queue OB is cleared.

12. The fly cutting method according to claim 11, wherein: The step of "determining a target output quantity of trajectory data after velocity planning based on the number of trajectories stored in the sliding window and the number of trajectories stored in the reserved window, and outputting the target output quantity of trajectory data to the controller for processing, wherein the number of trajectories stored in the reserved window is greater than 0" also includes: Determine whether there is any unacquired trajectory data in the trajectory data to be processed. If so, return to the step of "acquiring a first preset number of trajectory data from the trajectory data to be processed according to the number of trajectories stored in the sliding window and storing them in the sliding window, wherein the first preset number does not exceed the number of trajectories stored in the sliding window." Otherwise, continue to determine whether there is trajectory data in the cache queue. If there is trajectory data in the cache queue, return to the step of "performing fly-cut integration on the trajectory data that meets the fly-cut integration condition to generate fly-cut large-segment trajectory data" until all the trajectory data in the cache queue are output to the controller.

13. A fly cutting processing device, characterized in that: include: A setting module, used to set the sliding window and the reserved window, and set the number of tracks stored in the sliding window and the reserved window; an acquisition module, configured to acquire a first preset number of trajectory data according to a size of the sliding window and store the data in the sliding window, wherein the first preset number does not exceed the number of trajectories stored in the sliding window; A fly-cut integration module is used to perform fly-cut integration on the trajectory data that meets the fly-cut integration conditions to generate large-segment fly-cut trajectory data; A speed planning module is used to plan the speed between large sections of fly-cut trajectory data, and between large sections of fly-cut trajectory data and trajectory data that cannot be integrated by fly-cut; and The output module is used to determine the target output quantity of trajectory data after velocity planning based on the number of trajectories stored in the sliding window and the number of trajectories stored in the reserved window, and output the target output quantity of trajectory data to the controller for processing, wherein the number of trajectories stored in the reserved window is greater than 0.

14. A computer device, characterized in that: include: a processor configured to execute computer-executable instructions; A memory storing one or more computer executable instructions, wherein when the computer executable instructions are executed by the processor, each step of the fly-cutting processing method according to any one of claims 1 to 12 is implemented.

15. The computer device according to claim 14, wherein: The processor includes a compiler and a controller, the compiler is used to execute each step of the fly-cutting processing method according to any one of claims 1 to 12, and the controller is used to receive trajectory data output by the compiler and process the output trajectory data.

16. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is executed by a processor to implement each step of the fly cutting method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Laser cutting speed planning method and device, storage medium and computer equipment

    CN109048091A

  • Fly-cutting trajectory planning method, fly-cutting control method and fly-cutting system

    CN113296470A