Method, apparatus, and computer device for generating operation trajectory
By obtaining and analyzing the motion parameters of the moving components, determining the distance and vertical distance, filtering out the locations of the machining components that meet the preset conditions, and generating the work trajectory, the problem of low accuracy in the generation of work trajectories in the prior art is solved, and the accuracy and accuracy of the work trajectory generation of the machining components are improved.
Patent Information
- Application Number
- CN202411179969.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2044-08-27
AI Technical Summary
The existing operation trajectory generation methods are not very accurate when processing complex paths, which affects the control accuracy of the machine and leads to low product processing quality.
By obtaining the motion parameters of the first and second moving components, determining the distance and vertical distance between them, filtering out the location of the processing component that meets the preset value range, and generating a job trajectory.
It improves the accuracy and accuracy of operation trajectory generation, ensures the precise determination of the distance between the machining components and the processing object, and improves the overall accuracy and accuracy of operation trajectory generation of the machining components.
Smart Images

Figure CN119200584B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automation technology, and in particular, to a method, device, computer device, storage medium, and computer program product for generating an operation trajectory. Background Art
[0002] Automated operations require the machine to move precisely along a pre-set operation trajectory. Automated operations are widely used in fields such as precision manufacturing and electronic device assembly. Before performing an automated operation, simulating the path is a crucial step. By simulating the path, potential interference, collisions, or inefficiencies can be identified and corresponding adjustments can be made. This not only helps optimize the operation process but also effectively reduces risks during actual execution, ensuring that the automated equipment can complete tasks smoothly and efficiently. However, existing methods for generating operation trajectories have low accuracy when dealing with complex paths, affecting the control accuracy of the machine and thus resulting in low product processing quality. Summary of the Invention
[0003] Based on this, it is necessary to provide a method, device, computer device, computer-readable storage medium, and computer program product for generating an operation trajectory in view of the above technical problems.
[0004] In a first aspect, the present application provides a method for generating an operation trajectory. Applied to a control unit, the control unit is electrically connected to at least one processing unit; the processing unit includes a first motion component and a second motion component; the two motion components are respectively movably connected to a processing component through corresponding linkages; the method includes: The method includes:
[0005] Obtain the motion parameters of the first motion component and the motion parameters of the second motion component; wherein, the motion parameters include an initial velocity curve and an initial position;
[0006] Determine the distance between the first motion component and the second motion component according to the motion parameters of the first motion component and the motion parameters of the second motion component;
[0007] Determine the perpendicular distance from the processing component to the motion directions of the first motion component and the second motion component according to the distance; screen the positions of the processing components whose perpendicular distances meet a preset value range to obtain the operation trajectory of the processing component.
[0008] In one embodiment, the obtaining the motion parameters of the first motion component and the motion parameters of the second motion component includes:
[0009] Obtain the standard operation trajectory of the processing component; wherein, the standard operation trajectory includes a plurality of sub-trajectories; the plurality of sub-trajectories are obtained by segmenting the standard operation trajectory;
[0010] Determine the starting positions and ending positions of each sub-trajectory from the said standard operation trajectory;
[0011] Obtain the initial position of the first moving component and the initial position of the second moving component;
[0012] Determine the initial velocity curve of the first moving component and the initial velocity curve of the second moving component according to the starting positions and ending positions of each sub-trajectory, as well as the initial position of the first moving component and the initial position of the second moving component.
[0013] In one embodiment, the determining the perpendicular distance of the processing component to the moving directions of the first moving component and the second moving component according to the said distance includes:
[0014] Obtain the distance threshold between the first moving component and the second moving component;
[0015] Determine the perpendicular distance of the processing component to the moving directions of the first moving component and the second moving component according to the distance threshold, the said distance, and a preset conversion coefficient.
[0016] In one embodiment, the distance threshold includes a maximum threshold, and the determining the perpendicular distance of the processing component to the moving directions of the first moving component and the second moving component according to the distance threshold, the said distance, and a preset conversion coefficient includes:
[0017] Obtain the minimum perpendicular distance of the processing component;
[0018] Compensate the difference between the maximum threshold and the said distance to the minimum perpendicular distance according to the preset conversion coefficient to obtain the perpendicular distance of the processing component to the moving directions of the first moving component and the second moving component.
[0019] In one embodiment, the screening the positions of the processing components where the perpendicular distance meets a preset value range to obtain the operation trajectory of the processing component includes:
[0020] Screen out the target time periods where the perpendicular distance meets the preset value range;
[0021] Record the movement trajectory of the processing component during the target time periods to obtain the operation trajectory of the processing component.
[0022] In one embodiment, after the screening the positions of the processing components where the perpendicular distance meets a preset value range to obtain the operation trajectory of the processing component, it further includes:
[0023] Adjust the motion parameters of the first motion component and the motion parameters of the second motion component according to the difference between the operation trajectory and the standard operation trajectory until the difference meets the preset requirements, and use the operation trajectory that meets the preset requirements as the target operation trajectory.
[0024] In a second aspect, the present application also provides a device for generating an operation trajectory. Applied to a control unit, the control unit is electrically connected to at least one processing unit; the processing unit includes a first motion component and a second motion component; the two motion components are respectively movably connected to a processing component through corresponding connecting rods; the device includes:
[0025] A parameter acquisition module, configured to acquire the motion parameters of the first motion component and the motion parameters of the second motion component; wherein, the motion parameters include an initial velocity curve and an initial position.
[0026] A distance determination module, configured to determine the distance between the first motion component and the second motion component according to the motion parameters of the first motion component and the motion parameters of the second motion component.
[0027] The distance determination module is further configured to determine the perpendicular distance from the processing component to the motion directions of the first motion component and the second motion component according to the distance.
[0028] A trajectory generation module, configured to screen the positions of the processing components where the perpendicular distance meets a preset value range to obtain the operation trajectory of the processing components.
[0029] In one embodiment, the parameter acquisition module includes:
[0030] A standard trajectory acquisition sub-module, configured to acquire the standard operation trajectory of the processing component; wherein, the standard operation trajectory includes a plurality of sub-trajectories; the plurality of sub-trajectories are obtained by segmenting the standard operation trajectory.
[0031] A path point determination sub-module, configured to determine the starting position and the ending position of each sub-trajectory from the standard operation trajectory.
[0032] An initial position acquisition sub-module, configured to acquire the initial position of the first motion component and the initial position of the second motion component.
[0033] A velocity curve generation sub-module, configured to determine the initial velocity curve of the first motion component and the initial velocity curve of the second motion component according to the starting position and the ending position of each sub-trajectory, and the initial position of the first motion component and the initial position of the second motion component.
[0034] In one embodiment, the distance determination module includes:
[0035] A distance threshold acquisition sub-module, configured to acquire a distance threshold between the first motion component and the second motion component;
[0036] A vertical distance determination sub-module, configured to determine a vertical distance of the processing component in the motion directions of the first motion component and the second motion component according to the distance threshold, the distance, and a preset conversion coefficient.
[0037] In one embodiment, the distance threshold includes a maximum threshold, and the vertical distance determination sub-module includes:
[0038] A vertical distance determination unit, configured to acquire a minimum vertical distance of the processing component;
[0039] The vertical distance determination unit is further configured to compensate a difference between the maximum threshold and the distance to the minimum vertical distance according to the preset conversion coefficient, so as to obtain a vertical distance of the processing component in the motion directions of the first motion component and the second motion component.
[0040] In one embodiment, the trajectory generation component includes:
[0041] A time period screening sub-module, configured to screen out a target time period in which the vertical distance satisfies a preset value range;
[0042] A trajectory generation sub-module, configured to record a motion trajectory of the processing component during the target time period to obtain an operation trajectory of the processing component.
[0043] In one embodiment, the device further includes:
[0044] A target trajectory determination module, configured to adjust motion parameters of the first motion component and motion parameters of the second motion component according to a difference between the operation trajectory and a standard operation trajectory until the difference meets a preset requirement, and use the operation trajectory that meets the preset requirement as a target operation trajectory.
[0045] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the method for generating an operation trajectory according to any one of the embodiments of the present disclosure is implemented.
[0046] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for generating an operation trajectory according to any one of the embodiments of the present disclosure is implemented.
[0047] Fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program which, when executed by a processor, implements the method for generating an operation trajectory as described in any one of the embodiments of the present disclosure.
[0048] The above method, device, computer device, storage medium and computer program product for generating an operation trajectory determine the distance between two moving components and the vertical distance from the processing component to the moving directions of the first moving component and the second moving component through the motion parameters of the moving components, so as to screen out the operation trajectories of the processing component that meet the preset value range. By obtaining and analyzing the motion parameters of the first moving component and the second moving component, their position information can be accurately confirmed, providing an accurate basis for the subsequent generation of the operation trajectory of the processing component and improving the accuracy of trajectory generation. At the same time, dynamically calculating the distance between the moving components and their vertical positions in the moving directions of the first moving component and the second moving component ensures the accurate determination of the distance between the processing component and the processing object, providing a data basis for whether the processing component processes the processing object and further improving the accuracy of the operation trajectory generation of the processing component. In addition, by screening the positions of the processing component that meet the preset conditions, the moving path of the processing component on the processing object, that is, the operation trajectory, can be effectively obtained, thus significantly improving the overall accuracy and precision of the operation trajectory of the processing component. Description of the Drawings
[0049] Figure 1 It is a schematic flowchart of the method for generating an operation trajectory in one embodiment;
[0050] Figure 2 It is a first application environment diagram of the method for generating an operation trajectory in one embodiment;
[0051] Figure 3 It is a second application environment diagram of the method for generating an operation trajectory in one embodiment;
[0052] Figure 4 It is a third application environment diagram of the method for generating an operation trajectory in one embodiment;
[0053] Figure 5 It is a schematic flowchart of the determination of motion parameters in one embodiment;
[0054] Figure 6 It is a first schematic flowchart of the determination of the vertical distance in one embodiment;
[0055] Figure 7 It is a second schematic flowchart of the determination of the vertical distance in one embodiment;
[0056] Figure 8 It is a schematic flowchart of screening to obtain an operation trajectory in one embodiment;
[0057] Figure 9 is a schematic flowchart of the implementation of a method for generating an operation trajectory in an embodiment;
[0058] Figure 10 is a structural block diagram of a device for generating an operation trajectory in an embodiment;
[0059] Figure 11 is an internal structure diagram of a computer device in an embodiment. Detailed implementation manners
[0060] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0061] In one embodiment, as Figure 1 shown, a method for generating an operation trajectory is provided, which is applied to a control unit, and the control unit is electrically connected to at least one processing unit; the processing unit includes a first motion component and a second motion component; the two motion components are respectively movably connected to a processing component through corresponding connecting rods. In this embodiment, the method includes the following steps:
[0062] Step S100, obtaining the motion parameters of the first motion component and the motion parameters of the second motion component; wherein, the motion parameters include an initial velocity curve and an initial position.
[0063] In an exemplary embodiment, the velocity change curve may include the relationship between time and velocity (the velocity may change with time, etc.). It can be understood that when the velocities of the two motion components are inconsistent, the distance between the two motion components will become larger or smaller, thereby changing the distance between the processing component and the processing object, etc. Specifically, the method for generating the operation trajectory can be applied to the schematic diagrams as Figure 2 and Figure 3 shown, and specifically includes two motion components 1, a processing component 2 and a processing object 3; taking Figure 2 as an example, assuming that the motion component 1 moves to the right, when the left motion component accelerates or the right motion component decelerates, the distance between the two motion components 1 will become smaller, thereby causing the processing component 2 to rise; when the left motion component decelerates or the right motion component accelerates, the distance between the two motion components 1 will increase, thereby causing the processing component 2 to descend, etc. Taking Figure 3For example, assume that the moving component 1 moves downward. When the upper moving component accelerates or the lower moving component decelerates, the distance between the two moving components 1 will become smaller, which will cause the processing component 2 to move to the right, making the processing component 2 approach the processing object 3; when the upper moving component decelerates or the lower moving component accelerates, the distance between the two moving components will become larger, which will cause the processing component 2 to move to the left, making the processing component 2 move away from the processing object 3, etc.
[0064] In an exemplary embodiment, the motion parameters may include obtaining an automated motion plan for the machine using a standard operation trajectory, etc. Specifically, the motion trajectory of the processing component can be correspondingly planned through the standard operation trajectory, and further the motion parameters of the moving component can be planned, etc.
[0065] Step S200, determine the distance between the first moving component and the second moving component according to the motion parameters of the first moving component and the motion parameters of the second moving component.
[0066] In an exemplary embodiment, the distance between the first moving component and the second moving component can be determined by determining the positions of the two moving components at the corresponding time according to the initial positions and velocity change curves of the first moving component and the second moving component, and then determining the distance between the first moving component and the second moving component, etc.
[0067] Step S300, determine the perpendicular distance from the processing component to the moving directions of the first moving component and the second moving component according to the distance.
[0068] In an exemplary embodiment, the moving directions of the first moving component and the second moving component may include the moving directions of the first moving component and the second moving component, and may also be the straight line of the movement obtained through the connection line of the first moving component and the second moving component, etc.; and determine the perpendicular distance between the processing component and the moving direction or the straight line of the movement, etc. In the actual use process, after determining the moving direction or the straight line of the movement, a perpendicular line from the processing component to the moving direction or the straight line of the movement can be established, and its length can be calculated to obtain the perpendicular distance from the processing component to the moving directions of the first moving component and the second moving component, etc.
[0069] In an exemplary embodiment, the perpendicular distance from the processing component to the moving directions of the first moving component and the second moving component can be obtained through the Pythagorean theorem, etc. Specifically, by obtaining the length of the connecting rod between the moving component and the processing component and the general distance between the moving components, the hypotenuse and one right side of the right triangle can be obtained, and then the other right side, that is, the perpendicular distance from the processing component to the moving directions of the first moving component and the second moving component, can be obtained, etc.
[0070] Step S400: Screen the positions of the processing components with the vertical distance meeting the preset value range to obtain the operation trajectory of the processing components.
[0071] In an exemplary embodiment, the operation trajectory can be applied to scenarios such as Figure 4 the described scenario. Specifically, it may include: two motion components 1, a processing component 2, a processing object 3, a straight line connecting the first motion component and the second motion component (the motion directions of the first motion component and the second motion component) 4; in state 5, the distance between the two motion components is large, so the vertical distance between the straight line and the processing component is small, not meeting the preset value range, further resulting in a large distance between the processing component 2 and the processing object 3, so the processing object is not processed; in state 6, the distance between the two motion components is small, the vertical distance between the straight line and the processing component is large, meeting the preset value range. At this time, the processing component is next to the processing object, and at this time, the processing component is processing the processing object, etc.
[0072] In an exemplary embodiment, the value range may include the distance between the processing component and the processing object, etc.; specifically, the distance between the farthest point of the processing component (the farthest point of the processing component from the processing object) and the processing object can be obtained by taking the difference between the distances between the processing object and the first motion component and the second motion component, and the vertical distance from the processing component to the motion directions of the first motion component and the second motion component; it can be understood that after obtaining this distance, the length of the processing component can also be removed (subtracted), that is, the distance between the nearest point of the processing component (the nearest point of the processing component from the processing object) and the processing object can be obtained, etc.
[0073] In an exemplary embodiment, the screening of the positions of the processing components with the vertical distance meeting the preset value range to obtain the operation trajectory of the processing components may include: by analyzing the motion parameters of the motion components, determining the path where the vertical distance from the processing component to the motion directions of the first motion component and the second motion component meets the preset value range when the processing component is moving, and recording the trajectory of the processing component on this section of the path, that is, the operation trajectory. In another exemplary embodiment, the vertical distance from the processing component to the motion directions of the first motion component and the second motion component may not be considered, the initial operation trajectory of the processing component is recorded, and then the motion parameters of the motion components are analyzed to screen out the trajectory that meets the preset value range from the initial operation trajectory, so as to obtain the operation trajectory of the processing component, etc.
[0074] In the above method for generating the operation trajectory, the distance between two moving components and the vertical distance from the processing component to the moving directions of the first moving component and the second moving component are determined through the motion parameters of the moving components, so as to screen out the operation trajectory of the processing component that meets the preset value range. By obtaining and analyzing the motion parameters of the first moving component and the second moving component, their position information can be accurately confirmed, providing an accurate basis for the subsequent generation of the operation trajectory of the processing component and improving the accuracy of trajectory generation. At the same time, the distance between the moving components and their vertical positions in the moving directions of the first moving component and the second moving component are dynamically calculated, ensuring the accurate determination of the distance between the processing component and the processing object, providing a data basis for whether the processing component processes the processing object, and further improving the accuracy of the operation trajectory generation of the processing component. In addition, by screening the positions of the processing components that meet the preset conditions, the moving path of the processing component on the processing object, that is, the operation trajectory, can be effectively obtained, thus significantly improving the overall accuracy and precision of the operation trajectory of the processing component.
[0075] In one embodiment, as Figure 5 shown, the step of obtaining the motion parameters of the first moving component and the motion parameters of the second moving component includes:
[0076] Step S101, obtaining the standard operation trajectory of the processing component; wherein, the standard operation trajectory includes a plurality of sub-trajectories; the plurality of sub-trajectories are obtained by segmenting the standard operation trajectory.
[0077] In an exemplary embodiment, the standard operation trajectory may include the expected operation trajectory of the processing component, etc. Specifically, the automated machine can be used in the processes of manufacturing high-precision electronic devices, semiconductor manufacturing, and surface treatments such as spraying, welding, and cutting; when using the machine for automated operations, it is necessary to pre-simulate the trajectory of the machine operation, etc. For example, when placing and welding components on a PCB (printed circuit board), it is necessary to move precisely along the pre-set trajectory to ensure correct alignment and fixation of each component; the pre-set trajectory here is the standard operation trajectory, etc.; when using the machine for automated processes such as lithography, etching, and deposition, it is also necessary to move along a precise trajectory to create tiny circuit patterns on the silicon wafer, etc.; when using the machine for automated surface treatment processes such as spraying, welding, and cutting, high-precision path control is also required to ensure surface quality and process effects, etc.
[0078] In an exemplary embodiment, the object to be processed may include components that need to be processed by a processing component, such as a PCB (printed circuit board), a silicon wafer, etc. The sub-trajectory may include, when soldering different components on the same PCB, the soldering trajectories corresponding to different components; when lithographing different circuit patterns during the lithography process, etc. It can be understood that in the case where multiple sub-trajectories are required and the sub-trajectories are not connected, after passing through one sub-trajectory, the processing component needs to be moved away from the object to be processed and further moved to the starting point of the next sub-trajectory, etc.
[0079] Step S102, determine the starting position and the ending position of each sub-trajectory from the standard operation trajectory.
[0080] In an exemplary embodiment, the starting position and the ending position of the sub-trajectory can be obtained by manual definition, etc.; it can be understood that the starting point of the sub-trajectory may include a path point where the processing component needs to be close to the object to be processed and perform processing; the ending point of the sub-trajectory may include a path point where the processing component needs to be moved away from the object to be processed and moved to the next sub-trajectory, etc.
[0081] In an exemplary embodiment, a high-resolution path point generation algorithm can also be used to generate path points and paths. Specifically, Bezier curves or spline interpolation can be used to create a fine and smooth path.
[0082] Step S103, obtain the initial position of the first motion component and the initial position of the second motion component.
[0083] Step S104, determine the initial velocity curve of the first motion component and the initial velocity curve of the second motion component according to the starting position and the ending position of each sub-trajectory, and the initial position of the first motion component and the initial position of the second motion component.
[0084] In an exemplary embodiment, the starting velocity curves of the first motion component and the second motion component can be determined by the initial positions of the first motion component and the second motion component and each path point (starting position and ending position). Specifically, according to the position information of the path point, the motion identifier of the processing component at the path point (whether it needs to move away from the object to be processed or close to the object to be processed) can be determined. When it is not necessary to move close to or away from the object to be processed, a preset moving speed can be set. When it is necessary to move away from the object to be processed and close to the object to be processed, the distance between the two motion components can be changed by changing the motion speeds of the two motion components, so as to change the distance between the processing component and the object to be processed. For example Figure 2As shown, there are two moving components 1, a processing component 2, and a processing object 3. Assume that the current state is stationary and the whole moving component starts to move to the right. It is necessary to accelerate both the left and right moving components simultaneously. After accelerating to a preset speed threshold, they move smoothly. When the processing component needs to approach the processing object, the left moving component is accelerated, decelerated after accelerating for a certain distance, and continues to move smoothly at the speed threshold. It can be understood that during the acceleration and deceleration of the left moving component, the speed of the left moving component is always greater than that of the right moving component, so the distance between the two moving components will be reduced, further causing the processing component to approach the processing object. The specific speed change rate (the magnitude of acceleration) can be determined by the time of approaching the processing object and the approaching distance. When the processing component needs to move away from the processing object, the right moving component is accelerated, decelerated after accelerating for a certain distance, and continues to move smoothly at the speed threshold. It can be understood that during the acceleration and deceleration of the right moving component, the speed of the right moving component is always greater than that of the left moving component, making the distance between the two moving components larger, further causing the processing component to move away from the processing object. The specific speed change rate can be determined by the time of moving away from the processing object and the safe distance of moving away, etc. Specifically, during the actual planning process, a preset smooth moving speed can be set, and the time required to approach and move away from the processing object can be determined. Accelerate to the smooth moving speed, and according to the time required to approach and move away from the object, determine the acceleration, and then determine the speed of the moving component when the processing component approaches the processing object, and finally obtain the speed of the moving component, etc. In another exemplary embodiment, the distance between the moving components can also be increased or decreased by first decelerating and then accelerating the moving component, thereby realizing the approach or separation of the processing component from the processing object, etc.
[0085] It can be understood that the speed change curve of the moving component can start from 0, first accelerate to a preset threshold. When the processing component needs to approach the processing object, the rear (the opposite direction of the movement of the moving component) moving component is accelerated and then decelerated to complete the approach and keep the speed at the preset threshold and continue to move. When the processing component needs to move away from the processing object, the front (the positive direction of the movement of the moving component) moving component is accelerated and then decelerated to complete the separation and keep the speed at the preset threshold and continue to move, etc.
[0086] In this embodiment, by obtaining the standard operation trajectory, determining the starting positions and ending positions of each sub-trajectory in the standard operation trajectory, and using the obtained starting positions, ending positions, and the initial position of the moving component, the initial velocity curve of the moving component is further determined. By analyzing the starting and ending points of multiple trajectories, the speed planning is made more refined, improving the accuracy of the velocity curve; by analyzing different sub-trajectories, the moving component and the processing component can adapt to complex processing requirements, improving the flexibility and adaptability of the processing unit and the accuracy of the generated velocity curve.
[0087] In one embodiment, as Figure 6 shown, determining the perpendicular distance of the processing component to the moving directions of the first moving component and the second moving component according to the distance includes:
[0088] Step S301, obtain the distance threshold between the first moving component and the second moving component.
[0089] In an exemplary embodiment, the distance threshold between the first moving component and the second moving component may include the maximum value and the minimum value of the distance between the moving components, etc.
[0090] Step S302, determine the perpendicular distance of the processing component to the moving directions of the first moving component and the second moving component according to the distance threshold, the distance, and a preset conversion coefficient.
[0091] In an exemplary embodiment, the difference between the distance between the first moving component and the second moving component and the minimum distance may be calculated, and the perpendicular distance of the processing component to the moving directions of the first moving component and the second moving component may be obtained by using the conversion coefficient. Specifically, the following formula (1) may be used to obtain the perpendicular distance of the processing component to the moving directions of the first moving component and the second moving component:
[0092] (1)
[0093] where htarget represents the perpendicular distance of the processing component to the moving directions of the first moving component and the second moving component; hmin represents the minimum perpendicular distance of the processing component (i.e., the perpendicular distance of the processing component to the moving directions of the first moving component and the second moving component when the distance between the two moving components reaches the maximum value); |xM1 - xM2| represents the distance between the two moving components; Kh represents the preset conversion coefficient; dmin represents the minimum value of the distance between the first moving component and the second moving component, etc.
[0094] In this embodiment, the vertical distance of the processing component in the moving directions of the first moving component and the second moving component is determined based on the distance threshold, the distance, and the conversion coefficient between the first moving component and the second moving component. The distance between the two components can be converted into the vertical distance of the processing component in the moving directions of the first moving component and the second moving component through the conversion threshold, providing a data basis for the determination of the vertical distance, improving the accuracy of the distance between the processing component and the processing object, and further improving the accuracy of the generation of the operation trajectory of the processing component.
[0095] In one embodiment, as Figure 7 shown, the distance threshold includes a maximum threshold. Determining the vertical distance of the processing component in the moving directions of the first moving component and the second moving component according to the distance threshold, the distance, and a preset conversion coefficient includes:
[0096] Step S311, obtaining the minimum vertical distance of the processing component.
[0097] In an exemplary embodiment, the minimum vertical distance may include the vertical distance of the processing component in the moving directions of the first moving component and the second moving component corresponding to the maximum distance between the two moving components, etc.
[0098] Step S312, compensating the difference between the maximum threshold and the distance to the minimum vertical distance according to the preset conversion coefficient to obtain the vertical distance of the processing component in the moving directions of the first moving component and the second moving component.
[0099] In an exemplary embodiment, the vertical distance of the processing component in the moving directions of the first moving component and the second moving component can be obtained by the method of the following formula (2):
[0100] (2)
[0101] where htarget represents the vertical distance of the processing component in the moving directions of the first moving component and the second moving component; hmin represents the minimum vertical distance of the processing component; Kh represents the preset conversion coefficient; dmax represents the maximum distance threshold between the two moving components; and |xM1 - xM2| represents the distance between the two moving components, etc.
[0102] In this embodiment, by using a preset conversion coefficient, the difference between the maximum threshold and the distance is compensated to the minimum vertical distance, so as to obtain the vertical distance of the processing component in the moving directions of the first moving component and the second moving component. The distance between the moving components can be converted into the vertical distance of the processing component in the moving directions of the first moving component and the second moving component through the conversion coefficient, which provides a data basis for the confirmation of the vertical distance, improves the accuracy of the distance between the processing component and the processing object, and improves the accuracy of the operation trajectory of the processing component.
[0103] In one embodiment, as Figure 8 shown, screening the positions of the processing components whose vertical distances meet the preset value range to obtain the operation trajectory of the processing components includes:
[0104] Step S401, screening out the target time period in which the vertical distance meets the preset value range.
[0105] In an exemplary embodiment, the distance change curve of the two moving components can be determined according to the speed change curves and initial positions of the two moving components, and according to the distance change curve, the vertical distance change curve of the processing component in the moving directions of the first moving component and the second moving component can be determined, and then the target time period that meets the preset value range can be further screened out, etc.
[0106] Step S402, recording the movement trajectory of the processing component during the target time period to obtain the operation trajectory of the processing component.
[0107] In an exemplary embodiment, after determining the target time period, it may only be necessary to record the movement trajectory of the processing component during the target time period to obtain the operation trajectory of the processing component, etc. Among them, the target time period may include the time period when the processing component is next to the processing object. It can be understood that when the processing component is next to the processing object, that is, the processing component is processing the processing object, and the path taken is the operation trajectory, etc.
[0108] In this embodiment, by screening out the target time period in which the vertical distance meets the preset value range and recording the movement trajectory of the processing component during the target time period, it is the operation trajectory of the processing component. The operation time period of the processing component can be determined, which provides a data basis for the generation of the operation trajectory of the processing component. By recording the movement path of the processing component during the operation time period, the operation trajectory of the processing component is obtained, avoiding the recording of all the movement trajectories of the processing component, reducing the pressure on the operation trajectory generation system, and improving the accuracy of the operation trajectory generation.
[0109] In one embodiment, after screening the positions of the processing components whose vertical distances meet the preset value range to obtain the operation trajectory of the processing components, it further includes:
[0110] Adjust the motion parameters of the first motion component and the motion parameters of the second motion component according to the difference between the operation trajectory and the standard operation trajectory until the difference meets the preset requirements, and use the operation trajectory that meets the preset requirements as the target operation trajectory.
[0111] In an exemplary embodiment, the difference between the initial operation trajectory and the standard operation trajectory may include differences in the operation trajectory, operation depth, etc.; among them, the difference in the target operation trajectory may include that the trajectory paths of the initial operation trajectory and the standard operation trajectory are different, etc.; the difference in the target operation depth may include that the depth of the target operation trajectory does not reach the target depth. For example, when cutting a component, if the depth does not reach the target depth, the component may not be cut completely, etc.
[0112] In an exemplary embodiment, adjusting the motion parameters may include adjusting the motion parameters so that the estimated path of the operation trajectory is the same as the standard operation trajectory, and by adjusting the motion parameters, adjusting the distance between the two motion components to further control the distance between the processing component and the processing object, so that the processing depth meets the target depth, etc.
[0113] In an exemplary embodiment, the preset requirements may include that the similarity between the operation trajectory and the standard operation trajectory reaches a preset threshold, etc.; for example, when cutting some components, when 99% is completed and the machine does not need to cut, and only manual work can complete the non-destructive cutting, it is determined that the operation trajectory meets the preset requirements, etc.
[0114] In an exemplary embodiment, adjusting the motion parameters according to the difference between the operation trajectory and the standard operation trajectory may include: position and speed error calculation, synchronization error calculation, control machine design, control of the vertical distance from the processing component to the motion directions of the first motion component and the second motion component, control signal calculation. Specifically, the position and speed error calculation can be obtained as follows in equations (3) and (4):
[0115] (3)
[0116] (4)
[0117] Among them, eM1 represents the position error of the first motion component; xtarget represents the target position of the processing component; xM1 represents the current position of the first motion component; evM1 represents the speed error of the first motion component; vtarget represents the target speed of the processing component; vM1 represents the current speed of the first motion component; eM2 represents the position error of the second motion component; xM2 represents the current position of the second motion component; evM2 represents the speed error of the second motion component; vM2 represents the current speed of the second motion component;
[0118] The synchronous error calculation can be obtained through the following equations (5) and (6):
[0119] (5)
[0120] (6)
[0121] Among them, esync represents the position synchronous error between two moving components; xM1 represents the current position of the first moving component; xM2 represents the current position of the second moving component; evsync represents the speed synchronous error between two moving components; vM1 represents the current speed of the first moving component; vM2 represents the current speed of the second moving component;
[0122] The controller design can be obtained through the following equations (7) and (8):
[0123] (7)
[0124] (8)
[0125] Among them, uM1 represents the control signal of the first moving component; eM1 represents the position error of the first moving component; evM1 represents the speed error of the first moving component; esync represents the position synchronous error between two moving components; evsync represents the speed synchronous error between two moving components; uM2 represents the control signal of the second moving component; eM2 represents the position error of the second moving component; evM2 represents the speed error of the second moving component; Kp1, Kd1, Ksync1, Kvsync1 are the control gains of the first moving component; Kp2, Kd2, Ksync2, Kvsync2 are the control gains of the second moving component;
[0126] The control of the vertical distance of the processing component in the moving directions of the first moving component and the second moving component can be obtained through the following equation (9):
[0127] (9)
[0128] Among them, htarget represents the vertical distance of the processing component in the moving directions of the first moving component and the second moving component; hmin represents the minimum vertical distance of the processing component; Kh represents the height gain coefficient; dmax represents the maximum allowable distance between two moving components; |xM1 - xm2| represents the distance between two moving components;
[0129] The control signal calculation can be obtained through the following equations (10) and (11):
[0130] (10)
[0131] (11)
[0132] Among them, uM1 represents the control signal of the first motion component; xtarget represents the target position of the processing component; xM1 represents the current position of the first motion component; vtarget represents the target speed of the processing component; vM1 represents the current speed of the first motion component; uM2 represents the control signal of the second motion component; xM2 represents the current position of the second motion component; vM2 represents the current speed of the second motion component; Kp1, Kd1, Ksync1, Kvsync1 are the control gains of the first motion component; Kp2, Kd2, Ksync2, Kvsync2 are the control gains of the second motion component; specifically, the first motion component and the second motion component adjust their motions according to the control signals uM1 and uM2 respectively; specifically, it can be understood that by calculating the error between the current position and the target position in real time, as well as the error between the actual speed and the target speed, a compensation control signal can be generated by the controller, and the controller parameters, such as Kp1, Kd1, Kp2, Kd2, etc., can be dynamically adjusted, and the controller parameters Kp1, Kd1, Kp2, Kd2, etc. can be updated according to the real-time error.
[0133] In this embodiment, the motion parameters are adjusted based on the difference between the operation trajectory and the standard operation trajectory to obtain a target operation trajectory that meets the preset requirements. By adjusting the motion parameters, the operation trajectory is made more in line with the preset requirements, improving the accuracy of the operation trajectory.
[0134] In an exemplary embodiment, the method for generating the operation trajectory can be implemented as shown in Figure 9 the flowchart shown below, and specifically includes:
[0135] Step S901, path point planning; specifically, it can include obtaining the standard operation trajectory, defining path points (the start and end points of sub-trajectories) and their corresponding actions (which can include processing or moving, specifically, it can be understood that the start point of the sub-trajectory is processing and the end point is moving, etc.) for the standard operation trajectory, and using a high-resolution path point generation algorithm (such as Bezier curve or spline interpolation, etc.) to create a fine and smooth path, etc.;
[0136] Step S902, speed planning of the motion component; obtain the current position of the motion component and the obtained path points, and confirm the initial speed curve of the motion component. Specifically, it can include using the initial position of the motion component, the path points, the preset stable speed (i.e., the speed when not approaching or leaving the motion object), and the time required for the processing component to approach and leave the processing object to determine the initial speed change curve of the motion component, etc.;
[0137] Step S903, calculation of the distance between the processing component and the processing object; based on the initial position and velocity change curve of the motion component, the position change curve of the motion component can be determined. According to the position change curve of the motion component, the distance change curve between two motion components can be determined. According to the distance change curve, the distance between the processing component and the processing object can be determined, etc.
[0138] Step S904, confirmation of the operating state of the processing component; based on the distance between the processing component and the processing object, the operating state of the processing component is determined. Specifically, the operating state may include processing or moving, etc. Specifically, a processing distance and a safety distance can be set. When the distance between the processing component and the processing object reaches the processing distance, it is determined that the processing component is next to the processing object. At this time, the processing component processes the processing object. When the distance between the processing component and the processing object is greater than the safety distance, it is determined that the distance between the processing component and the processing object is within the safety distance. At this time, the processing component does not process the processing object and the processing component can be moved. Here, the safety distance may not be equal to the processing distance. For example, during welding, the distance during welding is not the same as the safety distance, etc.
[0139] Step S905, simulation of motion execution; using the operating state and motion path of the processing component, the operating trajectory of the processing component is determined. Specifically, the time period when the processing component is operating can be determined through the operating state, and the motion path of the processing component during this time period is recorded, which is the operating trajectory, etc.
[0140] Step S906, feedback control and error correction; monitor and compare the operating trajectory with the standard operating trajectory. According to the difference between the operating trajectory and the standard operating trajectory, the velocity change curve of the motion component is corrected to ensure the accuracy and stability of the processing trajectory of the processing component during the processing process.
[0141] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.
[0142] Based on the same inventive concept, an embodiment of the present application further provides a generation device for an operation trajectory for implementing the generation method of the operation trajectory involved above. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the generation device for the operation trajectory provided below can refer to the limitations on the generation method of the operation trajectory in the above text, and will not be elaborated here.
[0143] In one embodiment, as Figure 10 shown, a generation device 100 for an operation trajectory is provided, which is applied to a control unit. The control unit is electrically connected to at least one processing unit. The processing unit includes a first motion component and a second motion component. The two motion components are respectively movably connected to a processing component through corresponding connecting rods. The device includes: a parameter acquisition module 101, a distance determination module 102, and a trajectory generation module 103, where:
[0144] The parameter acquisition module is configured to acquire the motion parameters of the first motion component and the motion parameters of the second motion component. Wherein, the motion parameters include an initial velocity curve and an initial position.
[0145] The distance determination module is configured to determine the distance between the first motion component and the second motion component according to the motion parameters of the first motion component and the motion parameters of the second motion component.
[0146] The distance determination module is further configured to determine the perpendicular distance from the processing component to the motion directions of the first motion component and the second motion component according to the distance.
[0147] The trajectory generation module is configured to screen the positions of the processing components where the perpendicular distance meets a preset value range to obtain the operation trajectory of the processing component.
[0148] In one of the embodiments, the parameter acquisition module includes:
[0149] A standard trajectory acquisition sub-module is configured to acquire the standard operation trajectory of the processing component. Wherein, the standard operation trajectory includes a plurality of sub-trajectories. The plurality of sub-trajectories are obtained by segmenting the standard operation trajectory.
[0150] A path point determination sub-module is configured to determine the starting position and the ending position of each sub-trajectory from the standard operation trajectory.
[0151] An initial position acquisition sub-module is configured to acquire the initial position of the first motion component and the initial position of the second motion component.
[0152] A speed curve generation sub-module, configured to determine an initial speed curve of the first motion component and an initial speed curve of the second motion component according to the starting positions and ending positions of the respective sub-trajectories, as well as the initial positions of the first motion component and the second motion component.
[0153] In one embodiment, the distance determination module includes:
[0154] A distance threshold acquisition sub-module, configured to acquire a distance threshold between the first motion component and the second motion component;
[0155] A vertical distance determination sub-module, configured to determine a vertical distance of the processing component in the motion directions of the first motion component and the second motion component according to the distance threshold, the distance, and a preset conversion coefficient.
[0156] In one embodiment, the distance threshold includes a maximum threshold, and the vertical distance determination sub-module includes:
[0157] A vertical distance determination unit, configured to acquire a minimum vertical distance of the processing component;
[0158] The vertical distance determination unit is further configured to compensate a difference between the maximum threshold and the distance to the minimum vertical distance according to the preset conversion coefficient, to obtain the vertical distance of the processing component in the motion directions of the first motion component and the second motion component.
[0159] In one embodiment, the trajectory generation component includes:
[0160] A time period screening sub-module, configured to screen out a target time period in which the vertical distance satisfies a preset value range;
[0161] A trajectory generation sub-module, configured to record a motion trajectory of the processing component during the target time period, to obtain an operation trajectory of the processing component.
[0162] In one embodiment, the device further includes:
[0163] A target trajectory determination module, configured to adjust motion parameters of the first motion component and motion parameters of the second motion component according to a difference between the operation trajectory and a standard operation trajectory, until the difference meets a preset requirement, and use the operation trajectory that meets the preset requirement as a target operation trajectory.
[0164] Each module in the above-described operation trajectory generation device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above modules can be embedded in the processor of the computer device in hardware form or be independent of it, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.
[0165] In one embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 11 shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used for exchanging information between the processor and external devices. The communication interface of the computer device is used for communicating with external terminals in a wired or wireless manner. The wireless manner can be implemented through WIFI, a mobile cellular network, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a method for generating an operation trajectory. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the outer shell of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0166] Those skilled in the art can understand that Figure 11 the structure shown in
[0167] is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0168] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0169] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0170] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. A method for generating an operation trajectory, characterized in that, Applied to a control unit, the control unit is electrically connected to at least one processing unit; the processing unit includes a first motion component and a second motion component; the two motion components are respectively movably connected to a processing component through corresponding connecting rods; the method includes: Obtain the motion parameters of the first motion component and the motion parameters of the second motion component; wherein, the motion parameters include an initial velocity curve and an initial position; Determine the distance between the first motion component and the second motion component according to the motion parameters of the first motion component and the motion parameters of the second motion component; Obtain the distance threshold between the first motion component and the second motion component; the distance threshold includes a maximum threshold; obtain the minimum vertical distance of the processing component; according to a preset conversion coefficient, compensate the difference between the maximum threshold and the distance to the minimum vertical distance to obtain the vertical distance of the processing component in the motion direction of the first motion component and the second motion component; Screen the positions of the processing components where the vertical distance meets a preset value range to obtain the working trajectory of the processing component.
2. The method according to claim 1, wherein The obtaining the motion parameters of the first motion component and the motion parameters of the second motion component includes: Obtain the standard working trajectory of the processing component; wherein, the standard working trajectory includes a plurality of sub-trajectories; the plurality of sub-trajectories are obtained by segmenting the standard working trajectory; Determine the starting position and the ending position of each sub-trajectory from the standard working trajectory; Obtain the initial position of the first motion component and the initial position of the second motion component; Determine the initial velocity curve of the first motion component and the initial velocity curve of the second motion component according to the starting position and the ending position of each sub-trajectory, and the initial position of the first motion component and the initial position of the second motion component.
3. The method according to claim 1, wherein The screening the positions of the processing components where the vertical distance meets a preset value range to obtain the working trajectory of the processing component includes: Screen out the target time period where the vertical distance meets the preset value range; Record the motion trajectory of the processing component during the target time period to obtain the working trajectory of the processing component.
4. The method according to claim 1, wherein After the screening the positions of the processing components where the vertical distance meets a preset value range to obtain the working trajectory of the processing component, it further includes: Adjust the motion parameters of the first motion component and the motion parameters of the second motion component according to the difference between the working trajectory and the standard working trajectory until the difference meets a preset requirement, and use the working trajectory that meets the preset requirement as the target working trajectory.
5. A generation device for an operation trajectory, characterized in that Applied to a control unit, the control unit is electrically connected to at least one processing unit; the processing unit includes a first motion component and a second motion component; the two motion components are respectively movably connected to a processing component through corresponding connecting rods; the device includes: A parameter acquisition module, configured to acquire the motion parameters of the first motion component and the motion parameters of the second motion component; wherein, the motion parameters include an initial velocity curve and an initial position; A distance determination module, configured to determine the distance between the first motion component and the second motion component according to the motion parameters of the first motion component and the motion parameters of the second motion component; The distance determination module is further configured to obtain a distance threshold between the first motion component and the second motion component; the distance threshold includes a maximum threshold; obtain the minimum vertical distance of the processing component; and compensate the difference between the maximum threshold and the distance to the minimum vertical distance according to a preset conversion coefficient, so as to obtain the vertical distance of the processing component in the motion direction of the first motion component and the second motion component; A trajectory generation module, configured to screen the positions of the processing components whose vertical distances meet a preset value range to obtain the operation trajectory of the processing components.
6. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
8. A computer program product comprising a computer program, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Ultrasonic device and floating device
CN109363717A
Equipment operation control method and device, computer equipment and storage medium
CN118466355A