Workpiece machining path obtaining method and device and robot

By collecting data and point cloud processing of workpieces, the workpiece processing paths are automatically obtained, which solves the problem of cumbersome acquisition process and low accuracy in the existing technology, and achieves efficient and convenient processing path acquisition.

CN119887842APending Publication Date: 2025-04-25SHEN ZHEN QIAN HAI RUI JI TECHNOLOGY CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411948465.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The existing method of obtaining workpiece processing paths depends on manual experience, resulting in cumbersome acquisition process, poor accuracy and inefficient efficiency.

Method used

By collecting data on the workpiece, obtaining the target workpiece point cloud, filtering data points with curvature greater than the threshold as the initial path point, calculating its normal vector characteristics, determining the target path point, and then generating a processing path.

Benefits of technology

Automatic acquisition of workpiece processing paths is realized, acquisition efficiency is improved, human resources waste is reduced, and the accuracy of processing paths is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119887842A_ABST
    Figure CN119887842A_ABST
Patent Text Reader

Abstract

The invention provides a workpiece machining path obtaining method and device, a robot and a storage medium. The method comprises the following steps: carrying out data acquisition on a workpiece to obtain a target workpiece point cloud, taking a data point of which the curvature is greater than a curvature threshold value in the target workpiece point cloud as an initial path point, calculating a target feature of the initial path point according to a normal vector of each initial path point, and if the target feature of the initial path point meets a set condition, determining that the target workpiece point cloud is the target workpiece point cloud; if yes, the initial path point is a target path point, and the machining path of the workpiece is determined according to the target path point. The automatic acquisition of the workpiece processing path is realized. According to the method, the workpiece machining path is automatically obtained, the obtaining efficiency of the machining path is greatly improved, and then the machining efficiency of the workpiece is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The technical field of the present application is the field of workpiece processing, and specifically relates to a method, device, and robot for acquiring a workpiece processing path. Background Art

[0002] In the field of workpiece processing, for the processing of workpieces or workpiece joints, and for the segmentation of workpieces, it is necessary to determine the processing position of the workpiece in advance, and then generate the corresponding processing path, and finally perform processing according to the processing path in a preset processing method.

[0003] At present, the acquisition method of the processing path on the workpiece is mostly determined by a combination of manual and machine. The data acquisition device of the manually driven machine measures the processing position of the workpiece, obtains the coordinate information of the processing position, and generates the processing path. However, this working method is particularly dependent on manual work experience and manual machine operation experience. The acquisition of the processing path is extremely cumbersome and the accuracy is poor, so that when the workpiece is processed, the staff also needs to observe on the side to avoid mistakes. This greatly wastes precious human resources. On the other hand, it greatly reduces the efficiency of obtaining the processing path, which ultimately leads to the inability to efficiently complete the processing of the workpiece.

[0004] Therefore, how to obtain the processing path of the workpiece efficiently and conveniently is a technical problem that needs to be solved urgently. Summary of the invention

[0005] The present application aims to solve the technical problem of how to efficiently and conveniently obtain a processing path for a workpiece.

[0006] According to one aspect of an embodiment of the present application, the present application provides a method for acquiring a workpiece processing path, the method comprising:

[0007] Collect data on the workpiece to obtain the point cloud of the target workpiece;

[0008] Taking data points in the target workpiece point cloud whose curvature is greater than a curvature threshold as initial path points;

[0009] Calculating the target feature of the initial path point according to the normal vector of each initial path point, and if the target feature of the initial path point meets the set conditions, taking the initial path point as the target path point;

[0010] A processing path for the workpiece is determined according to the target path point.

[0011] According to one aspect of an embodiment of the present application, data collection is performed on a workpiece to obtain a target workpiece point cloud, including:

[0012] Collect data from a single perspective on the workpiece to obtain a workpiece point cloud;

[0013] Clustering and segmenting the workpiece point cloud to obtain a plurality of initial segmented point clouds;

[0014] Determining data collection points of a portion of the workpiece corresponding to the initial segmented point cloud according to the coordinates of each data point in the initial segmented point cloud;

[0015] Controlling a data acquisition device to move to the data acquisition point, performing data acquisition on the workpiece, and obtaining a segmented point cloud corresponding to the initial segmented point cloud;

[0016] The plurality of segmented point clouds are combined with the workpiece point cloud to obtain a target workpiece point cloud.

[0017] According to one aspect of an embodiment of the present application, clustering and segmenting the workpiece point cloud to obtain a plurality of initial segmented point clouds includes:

[0018] Taking any data point that is not divided into clusters in the workpiece point cloud as a seed point, and forming a neighborhood of the seed point with a first set distance as a radius;

[0019] All data points in the neighborhood of the seed point are classified into the same cluster, and any data point is continuously selected as a seed point in the cluster, the neighborhood of the seed point is determined, and the data points in the neighborhood of the seed point are added to the cluster to grow the cluster;

[0020] Until the cluster cannot grow any more, all the data points in the cluster are used as an initial segmentation point cloud.

[0021] According to one aspect of an embodiment of the present application, determining the data collection points of the portion of the workpiece corresponding to the initial segmented point cloud according to the coordinates of each data point in the initial segmented point cloud includes:

[0022] Determine the minimum enclosing space of the initial segmented point cloud with the centroid of the initial segmented point cloud as the center;

[0023] Determining the number of data collection points according to the collection area of ​​the data collection device and the surface area of ​​the minimum enclosed space;

[0024] The data acquisition point positions are determined on the surface of the minimum enclosing space, so that the acquisition area of ​​the data acquisition device can traverse various positions of the part of the workpiece corresponding to the initial segmented point cloud.

[0025] According to one aspect of an embodiment of the present application, determining the number of data collection points according to the collection area of ​​the data collection device and the surface area of ​​the minimum enclosed space includes:

[0026] According to the preset data collection accuracy, the collection area of ​​the data collection device is determined, and under the same data collection conditions, the collection area is negatively correlated with the data collection accuracy;

[0027] The number of data collection points is determined according to the data collection area and the surface area of ​​the minimum enclosed space.

[0028] According to one aspect of an embodiment of the present application, determining the number of data collection points according to a collection area of ​​a data collection device and a surface area of ​​the minimum enclosed space further includes:

[0029] According to the preset data collection accuracy, determining the collection area of ​​the data collection device, wherein the collection area is negatively correlated with the data collection accuracy;

[0030] Determine the distance between the data acquisition device and the workpiece according to the data acquisition area. Under the same data acquisition conditions, the distance between the data acquisition device and the workpiece is positively correlated with the acquisition area.

[0031] Determine a collection space according to the distance between the data collection device and the workpiece, the collection space is larger than the minimum enclosing space, the data collection points are distributed on the surface of the collection space, and there is a scaling relationship between the collection space and the minimum enclosing space;

[0032] The number of data collection points is determined according to the collection area and the surface area of ​​the minimum enclosed space.

[0033] According to one aspect of an embodiment of the present application, the target feature of the initial path point is calculated according to the normal vector of each of the initial path points, and if the target feature of the initial path point satisfies a set condition, the initial path point is a target path point, including:

[0034] Determine at least three data points adjacent to the initial path point and not on the same straight line as selected points, and the plane where the selected points are located is the selected plane;

[0035] A vector determined according to the projection point and the initial path point is used as a selected vector, wherein the projection point refers to a projection of the initial path point on the selected plane;

[0036] If the angle between the normal vector of the initial path point and the selected vector is less than an angle threshold, the initial path point is used as the target path point.

[0037] According to one aspect of an embodiment of the present application, the present application provides a robot, comprising a memory, a processor, and a readable program stored in the memory, and when the processor executes the readable program, it implements any of the methods described above.

[0038] According to one aspect of an embodiment of the present application, the present application provides a readable storage medium having a readable program / instruction stored thereon. When the readable program / instruction is executed by a processor, any of the methods described above is implemented.

[0039] According to one aspect of an embodiment of the present application, the present application provides a program product, including a readable program / instruction, and when the readable program / instruction is executed by a processor, the method as described in any one of the above items is implemented.

[0040] This application collects data on the workpiece to obtain the target workpiece point cloud, and then uses the data points in the target workpiece point cloud whose curvature is greater than the curvature threshold as the initial path point, and then calculates the target feature of the initial path point according to the normal vector of the initial path point. If the target feature of the initial path point meets the set conditions, the initial path point is used as the target path point, and finally the processing path of the workpiece is determined according to the target path point. This realizes the automatic acquisition of the processing path on the workpiece, saving a lot of human resources. On the other hand, it increases the efficiency of obtaining the processing path, and completes the processing of the workpiece more efficiently and conveniently.

[0041] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.

[0042] It should be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The above and other objects, features and advantages of the present application will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings.

[0044] Figure 1 A schematic diagram of a robot processing a workpiece according to an embodiment of the present application is shown.

[0045] Figure 2 A flow chart of a method for acquiring a workpiece processing path according to an embodiment of the present application is shown.

[0046] Figure 3 A flow chart of collecting data on a workpiece and obtaining a target workpiece point cloud according to an embodiment of the present application is shown.

[0047] Figure 4 A flow chart of clustering and segmenting a workpiece point cloud to obtain a plurality of initial segmented point clouds according to an embodiment of the present application is shown.

[0048] Figure 5 A flow chart is shown for determining data collection points of a portion of a workpiece corresponding to an initial segmented point cloud according to the coordinates of each data point in the initial segmented point cloud according to an embodiment of the present application.

[0049] Figure 6 A flow chart is shown for determining the number of data collection points according to a collection area of ​​a data collection device and a surface area of ​​a minimum enclosed space according to an embodiment of the present application.

[0050] Figure 7 A flow chart is shown for determining the number of data collection points according to the collection area of ​​the data collection device and the surface area of ​​the minimum enclosing space according to another embodiment of the present application.

[0051] Figure 8 A schematic diagram of the normal vector direction according to an embodiment of the present application is shown.

[0052] Fig. 9 A flowchart of determining a target path point in an initial path point based on a normal vector of the initial path point according to an embodiment of the present application is shown.

[0053] Fig.10 A flowchart of extracting skeleton lines from at least one path point cloud formed by aggregation of target path points according to an embodiment of the present application is shown.

[0054] Fig.11 A distribution diagram of a first straight line and a second straight line according to an embodiment of the present application is shown.

[0055] Fig.12 A flowchart of performing linear fitting on skeleton lines to obtain a processing path for a workpiece according to an embodiment of the present application is shown.

[0056] Fig.13 A flowchart of performing linear fitting on skeleton lines to obtain a processing path for a workpiece according to another embodiment of the present application is shown.

[0057] Fig.14 A flow chart for determining whether a skeleton line can form a closed figure according to an embodiment of the present application is shown.

[0058] Fig.15 A hardware structure diagram of a method for acquiring a workpiece path according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0059] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that the description of the present application will be more comprehensive and complete and the concepts of the example embodiments will be fully conveyed to those skilled in the art. The accompanying drawings are only schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.

[0060] In addition, the described features, structures or characteristics may be combined in one or more example embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the example embodiments of the present application. However, those skilled in the art will appreciate that the technical solution of the present application may be practiced while omitting one or more of the specific details, or other methods, components, steps, etc. may be adopted. In other cases, known structures, methods, implementations or operations are not shown or described in detail to avoid obscuring the present application and making the various aspects of the present application obscure.

[0061] Some of the blocks shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0062] See also Figure 1 , Figure 1 A schematic diagram of a robot processing a workpiece according to an embodiment of the present application is shown. The schematic diagram includes a robot and a workpiece. The robot is used to obtain a processing path of the workpiece and process the workpiece. The workpiece is used to be processed.

[0063] A control device may be provided in the robot to directly control the robot to execute the method for determining the processing path described in the present application, and to control the robot to process the workpiece.

[0064] In some embodiments, the control device is disposed outside the robot, and the control device is connected to the robot wirelessly or by wire to control the robot to execute the processing path method described in this application, and to control other devices of the robot to process the workpiece.

[0065] In some embodiments, the robot further includes a data acquisition device and a processing device. The data acquisition device is used to collect data from the workpiece. The processing device is used to process the workpiece. Processing includes all actions that change the appearance, structure, and connection relationship of the workpiece, such as welding, cutting, grinding, and polishing.

[0066] See also Figure 2 , Figure 2 A flowchart of a method for obtaining a workpiece processing path according to an embodiment of the present application is shown. The present application embodiment provides a method for obtaining a workpiece processing path, including:

[0067] Step S210, collecting data on the workpiece to obtain a point cloud of the target workpiece;

[0068] Step S220, taking a data point in the target workpiece point cloud whose curvature is greater than a curvature threshold as an initial path point;

[0069] Step S230, calculating the target feature of the initial path point according to the normal vector of each initial path point, and if the target feature of the initial path point meets the set conditions, the initial path point is used as the target path point;

[0070] Step S240, determining a processing path for the workpiece according to the target path point.

[0071] The above four steps are described in detail below.

[0072] In step S210, data is collected on the workpiece to obtain a target workpiece point cloud of the workpiece, wherein structured light measurement can be performed on the workpiece to obtain the target workpiece point cloud.

[0073] In some embodiments, a number of measurement points may be determined on the workpiece, and then coordinate information of each measurement point on the workpiece may be obtained. Finally, based on the coordinate information of each measurement point, data points corresponding to the obtained coordinate information may be materialized in the virtual space to obtain a target workpiece point cloud.

[0074] See also Figure 3 , Figure 3 The flowchart of collecting data on a workpiece and obtaining a target workpiece point cloud according to an embodiment of the present application is shown. The present application embodiment provides a step S210 of collecting data on a workpiece and obtaining a target workpiece point cloud, including:

[0075] Step S211, collecting data from a single perspective on the workpiece to obtain a workpiece point cloud;

[0076] Step S212, clustering and segmenting the workpiece point cloud to obtain a plurality of initial segmented point clouds;

[0077] Step S213, determining the data collection points of the part of the workpiece corresponding to the initial segmented point cloud according to the coordinates of each data point in the initial segmented point cloud;

[0078] Step S214, controlling the data acquisition device to move to the data acquisition point, performing data acquisition on the workpiece, and obtaining a segmented point cloud corresponding to the initial segmented point cloud;

[0079] Step S215, combining the segmented point cloud with the workpiece point cloud to obtain the target workpiece point cloud.

[0080] The above five steps are described in detail below.

[0081] It should be noted that the workpiece point cloud obtained in step S211 is used to simply describe the structure of the workpiece. In step S212, the workpiece point cloud is segmented to obtain multiple initial segmented point clouds. In step S213, each initial segmented point cloud corresponds to a part of the workpiece, and multiple data collection points are determined according to the initial segmented point cloud. These data collection points are used to perform multi-angle collection on the part of the workpiece corresponding to the initial segmented point cloud (compared to step S211, step S212 belongs to omnidirectional collection) to perform comprehensive data collection on the part of the workpiece corresponding to the initial segmented point cloud. In step S214, the control device controls the data collection device to move to each data collection point, performs omnidirectional data collection on the part of the workpiece, and then obtains the segmented point cloud corresponding to each initial segmented point cloud. Finally, in step S215, according to the position of the initial segmented point cloud corresponding to the segmented point cloud in the workpiece point cloud, the segmented point cloud is fused with the workpiece point cloud to obtain an accurate target workpiece point cloud.

[0082] In step S211, it should be clear that data collection from a single perspective on the workpiece refers to data collection from only one direction or angle of the workpiece, such as collecting data from a top-down perspective. The workpiece point cloud obtained using this data collection method represents the overall structure or approximate structure of the workpiece.

[0083] Exemplarily, the control device controls the data acquisition device to always emit a line laser to the workpiece in one direction, form a light on the workpiece surface, and obtain the coordinate information of the area covered by the light on the workpiece surface. At the same time, the robot is controlled to move along the axial direction of the workpiece so that the light formed by the line laser traverses the surface of one side of the workpiece, and all the coordinate information of the surface of one side of the workpiece is obtained by using a preset measurement method to form a workpiece point cloud.

[0084] In some embodiments, the control device can also control the data acquisition device to emit a measurement pattern to the workpiece in a set direction. The measurement pattern can cover all surface areas or part of the surface area on one side of the workpiece. Then, based on the deformation of the measurement pattern, data of the area covered by the measurement pattern on the workpiece surface is obtained to obtain a workpiece point cloud.

[0085] When it is necessary to clarify, the area traversed by the light or the area covered by the measurement pattern may be the entire surface area of ​​one side of the workpiece or a portion thereof, depending on the acquisition parameters preset in the control device. The acquisition parameters may be generated by the control device in response to the user's operation behavior.

[0086] In step S212, clustering and segmenting is performed on the obtained workpiece point cloud, and the workpiece point cloud is segmented to obtain a plurality of initial segmented point clouds.

[0087] In some embodiments, the workpiece point cloud is cut at a set distance along the axial direction of the workpiece point cloud to obtain a plurality of initial segmented point clouds.

[0088] In some embodiments, the workpiece point cloud is segmented along the axial direction of the workpiece point cloud to obtain multiple initial segmented point clouds, and the difference in the number of data points in each initial segmented point cloud is within a set range. That is, the number of data points in each initial segmented point cloud is approximate. This may make the "length" of each initial segmented point cloud different (the length refers to the axial length of the workpiece point cloud occupied in the initial segmented point cloud), but considering that there are some complex structures and some simple structures in the workpiece, the surface area of ​​the complex structure part of the workpiece will be larger. When the workpiece is measured from a certain direction, more measurement points may be distributed on the surface of the complex part of the workpiece. Therefore, the workpiece point cloud corresponding to this part of the workpiece has a greater density of data points. Therefore, the workpiece point cloud corresponding to the complex part of the workpiece is segmented more frequently to obtain multiple initial segmented point clouds, so that the initial segmented point cloud corresponding to the complex part of the workpiece can be determined separately. The data collection points can be more accurately collected around the complex part of the complex workpiece. This realizes targeted data collection of the complex part and the simple part of the workpiece, so that the target workpiece point cloud obtained in the end is more accurate.

[0089] Through the method described in this embodiment, the parts corresponding to the simple workpiece parts and the complex workpiece parts in the workpiece point cloud can be separated to obtain initial segmented point clouds of different "lengths". And it is entirely possible to determine the complexity of the initial segmented point cloud according to the length of the initial segmented point cloud, and then determine a larger number of data collection points to perform more detailed data collection on the part of the workpiece corresponding to the complex initial segmented point cloud, so as to avoid insufficient data collection on the part of the workpiece corresponding to the complex initial segmented point cloud due to fewer data collection points, and fail to find the position on the workpiece that needs to be processed and obtain the processing path.

[0090] See also Figure 4 , Figure 4 The present invention provides a flowchart of clustering and segmenting a workpiece point cloud to obtain multiple initial segmented point clouds according to an embodiment of the present invention. The present invention provides a flowchart of clustering and segmenting a workpiece point cloud to obtain multiple initial segmented point clouds, step S212, including:

[0091] Step S2121, taking any data point that is not divided into clusters in the workpiece point cloud as a seed point, and forming a neighborhood of the seed point with a first set distance as a radius;

[0092] Step S2122, classifying all data points in the neighborhood of the seed point into the same cluster, and continuing to select any data point in the cluster as a seed point, determining the neighborhood of the seed point, and adding the data points in the neighborhood of the seed point to the cluster to grow the cluster;

[0093] Step S2123, until the cluster cannot grow, all the data points in the cluster are used as an initial segmented point cloud.

[0094] The above three steps are described in detail below.

[0095] In some embodiments, the initial segmented point cloud may be obtained in the following manner.

[0096] In step S2121, any data point that is not divided into clusters in the workpiece point cloud is used as a seed point, and a neighborhood of the seed point is formed with the seed point as the center and the first set distance as the radius.

[0097] In step S2122, all data points in the neighborhood of the seed point are classified into the same cluster, and any data point in the cluster is continuously selected as the seed point, the neighborhood of the seed point is determined, and the data points in the neighborhood of the seed point are added to the cluster to grow the cluster, that is, each data point in the cluster is used as a seed point, and the first set distance is used as the radius to determine the neighboring points of the seed point.

[0098] In step S2123, the neighboring points of the seed point are continuously added to the cluster to which the seed point belongs, so as to continuously grow the cluster. This process continues until the cluster cannot grow, that is, the neighboring points of any data point in the cluster as a seed point have been added to the current cluster. The point cloud formed by all the data points in the cluster is used as an initial segmented point cloud.

[0099] Continue to use any data point of an undivided cluster in the workpiece point cloud as a seed point to determine the next cluster, until after a cluster is determined, there is no data point of an undivided cluster in the workpiece point cloud, and the cluster segmentation of the workpiece point cloud is completed.

[0100] In step S213, the data collection points of the part of the workpiece corresponding to each initial segment point cloud are determined according to the coordinate information of the data points in each initial segment point cloud. Since the workpiece point cloud is used to describe the overall structure of the workpiece, and the initial segment point cloud is a part of the workpiece point cloud, the initial segment point cloud corresponds to the part of the workpiece point cloud, and each initial segment point cloud corresponds to a part of the workpiece.

[0101] See also Figure 5 , Figure 5A flowchart of determining data collection points of a portion of a workpiece corresponding to an initial segmented point cloud according to the coordinates of each data point in the initial segmented point cloud according to an embodiment of the present application is shown. The embodiment of the present application provides a step S213 of determining data collection points of a portion of a workpiece corresponding to an initial segmented point cloud according to the coordinates of each data point in the initial segmented point cloud, including:

[0102] Step S2131, determining the minimum enclosing space of the initial segmented point cloud with the centroid of the initial segmented point cloud as the center;

[0103] Step S2132, determining the number of data collection points according to the collection area of ​​the data collection device and the surface area of ​​the minimum enclosed space;

[0104] Step S2133, determining the data acquisition point positions on the minimum enclosing space surface, so that the acquisition area of ​​the data acquisition device can traverse all positions of the part of the workpiece corresponding to the initial segmented point cloud.

[0105] The above three steps are described in detail below.

[0106] In step S2131, the minimum enclosing space of the initial segmented point cloud is determined with the centroid of the initial segmented point cloud as the center. It should be noted that the shape of the minimum enclosing space includes but is not limited to a quadrangular prism and a sphere.

[0107] In step S2132, the determination of the data collection points for the initial segmented point cloud includes two parts, namely, the determination of the number of data collection points (step S2132), and the determination of the positions of the data collection points (step 2133).

[0108] The collection area of ​​the collection device is the area on the workpiece surface where the collection device can collect data once. It can also be the area on the workpiece surface where a single collection device can collect data. The collection device can be single, and the data collection of the workpiece is completed by moving the collection device. There can also be multiple collection devices, which are distributed at different positions to complete the data collection of the workpiece.

[0109] In some embodiments, the number of data acquisition points corresponding to the initial segmented point cloud can be determined in different ways according to different data acquisition devices. Data acquisition devices generally include three types. (1) The acquisition area of ​​the data acquisition device is determined and does not change with the distance between the data acquisition device and the workpiece, that is, the acquisition accuracy of the first type of data acquisition device is fixed. (2) The acquisition area of ​​the data acquisition device can be adjusted freely and is not affected by the distance between the data acquisition device and the workpiece. The acquisition area of ​​the data acquisition device is negatively correlated with the acquisition accuracy. (3) The acquisition area of ​​the data acquisition device can only increase as the distance between the data acquisition device and the workpiece increases. The larger the acquisition area, the lower the data acquisition accuracy. That is, the greater the distance between the data acquisition device and the workpiece, the lower the data acquisition accuracy.

[0110] (1) For the first data acquisition device, the following method is used to determine the number of data acquisition points of the initial segmented point cloud.

[0111] According to the collection area of ​​the data collection device and the surface area of ​​the minimum enclosing space, the number of data collection points is determined on the surface of the minimum enclosing space. In some embodiments, the ratio of the surface area of ​​the minimum enclosing space to the collection area is calculated, and the natural number closest to the area ratio and greater than the area ratio is used as the number of data collection points, which can just meet the collection area of ​​the data collection device to traverse all positions of the part of the workpiece corresponding to the initial segmented point cloud. The area of ​​the collection area is the collection area of ​​the data collection device.

[0112] In some embodiments, the sum of the natural number closest to the area ratio and greater than the area ratio and the set value is used as the number of data collection points, so as to avoid the data collection device being unable to traverse all positions of the part of the workpiece corresponding to the initial segmented point cloud due to the complex structure of the workpiece.

[0113] That is, the number of data acquisition points must be sufficient to enable the acquisition area of ​​the data acquisition device to traverse all positions of the part of the workpiece corresponding to the initial segmented point cloud.

[0114] (2) For the second data acquisition device, the following method is used to determine the number of data acquisition points of the initial segmented point cloud.

[0115] See also Figure 6 , Figure 6 A flow chart of determining the number of data collection points according to the collection area of ​​the data collection device and the surface area of ​​the minimum enclosing space according to an embodiment of the present application is shown. The present application embodiment provides a step S2132 of determining the number of data collection points according to the collection area of ​​the data collection device and the surface area of ​​the minimum enclosing space, including:

[0116] Step S301, determining the collection area of ​​the data collection device according to the preset data collection accuracy, under the same data collection conditions, the collection area is negatively correlated with the data collection accuracy;

[0117] Step S302, determining the number of data collection points according to the data collection area and the surface area of ​​the minimum enclosing space.

[0118] The above two steps are described in detail below.

[0119] In step S301, the collection area of ​​the data collection device is determined according to the preset data collection accuracy, wherein the data collection accuracy can be set by the control device according to the instruction information triggered by the user's operation behavior.

[0120] In step S302, the number of data collection points is determined according to the collection area of ​​the data collection device and the surface area of ​​the minimum enclosed space.

[0121] In some embodiments, the ratio of the surface area of ​​the minimum enclosing space to the area of ​​the collection area is calculated, and the natural number closest to the area ratio and greater than the area ratio is used as the number of data collection points, which can just meet the collection area of ​​the data collection device to traverse all positions of the part of the workpiece corresponding to the initial segmented point cloud. The area of ​​the collection area is the collection area of ​​the data collection device.

[0122] In some embodiments, the sum of the natural number closest to the area ratio and greater than the area ratio and the set value is used as the number of data collection points, so as to avoid the data collection device being unable to traverse all positions of the part of the workpiece corresponding to the initial segmented point cloud due to the complex structure of the workpiece.

[0123] (3) For the third data acquisition device, the following method is used to determine the number of data acquisition points of the initial segmented point cloud.

[0124] See also Figure 7 , Figure 7 A flowchart of determining the number of data collection points according to the collection area of ​​the data collection device and the surface area of ​​the minimum enclosing space according to another embodiment of the present application is shown. The present application embodiment provides a step S2132 of determining the number of data collection points according to the collection area of ​​the data collection device and the surface area of ​​the minimum enclosing space, further comprising:

[0125] Step S401, determining the collection area of ​​the data collection device according to the preset data collection accuracy, where the collection area is negatively correlated with the data collection accuracy;

[0126] Step S402, determining the distance between the data acquisition device and the workpiece according to the data acquisition area, under the same data acquisition conditions, the distance between the data acquisition device and the workpiece is positively correlated with the acquisition area;

[0127] Step S403, determining the acquisition space according to the distance between the data acquisition device and the workpiece, the acquisition space is larger than the minimum enclosing space, the data acquisition points are distributed on the surface of the acquisition space, and there is a scaling relationship between the acquisition space and the minimum enclosing space;

[0128] Step S404, determining the number of data collection points according to the collection area and the surface area of ​​the minimum enclosing space.

[0129] The above four steps are described in detail below.

[0130] In step S401, the collection area of ​​the data collection device is determined according to the preset data collection accuracy.

[0131] In step S402, the distance between the data acquisition device and the workpiece is determined according to the data acquisition area, because the distance between the data acquisition device and the workpiece is positively correlated with the acquisition area. Therefore, the size of the acquisition area can be adjusted by adjusting the distance between the data acquisition device and the workpiece.

[0132] In step S403, the acquisition space is determined according to the distance between the data acquisition device and the workpiece, and the acquisition space is larger than the minimum enclosing space and has a scaling relationship with the minimum enclosing space, that is, the acquisition space is a space proportionally enlarged by the minimum enclosing space.

[0133] In step S404, the number of data collection points distributed on the surface of the collection space is determined according to the collection area of ​​the data collection device and the surface area of ​​the minimum enclosing space. In some embodiments, the ratio of the surface area of ​​the minimum enclosing space to the collection area is calculated, and the natural number closest to the area ratio and greater than the area ratio is used as the number of data collection points, which can just meet the collection area of ​​the data collection device to traverse all positions of the part of the workpiece corresponding to the initial segmented point cloud. The area of ​​the collection area is the collection area of ​​the data collection device.

[0134] In some embodiments, the sum of the natural number closest to the area ratio and greater than the area ratio and the set value is used as the number of data collection points, so as to avoid the data collection device being unable to traverse all positions of the part of the workpiece corresponding to the initial segmented point cloud due to the complex structure of the workpiece.

[0135] In step S2133, the following method may be used to determine the location of the data collection point.

[0136] For the first data acquisition device and the second data acquisition device, the data acquisition points are distributed on the surface of the minimum enclosing space.

[0137] First, through neural network training, the positions of data collection points are automatically generated, so that the collection area of ​​the data collection device can traverse all positions of the part of the workpiece corresponding to the initial segmented point cloud.

[0138] Second, determine the same number of experimental areas as the data collection points. Each data collection point corresponds to an experimental area. The area of ​​each experimental area is the same as the sampling area, and the shape of each experimental area is the same as the sampling area. Arrange the experimental areas closely on the surface of the minimum enclosing space. Make multiple experimental areas spread across various positions in the minimum enclosing space. Take the center position of each experimental area as the position of the corresponding data collection point.

[0139] If there are any remaining experimental areas, the remaining experimental areas are moved to the joint of any multiple experimental areas to increase the accuracy of the segmented point cloud obtained subsequently.

[0140] For the third data acquisition device, the data acquisition points are distributed on the surface of the acquisition space.

[0141] First, the positions of data acquisition points are automatically generated through neural network training, so that the acquisition area of ​​the data acquisition device can traverse all positions of the part of the workpiece corresponding to the initial segmented point cloud.

[0142] Second, determine the same number of experimental areas as the data collection points. Each data collection point corresponds to an experimental area. The area of ​​each experimental area is the same as the sampling area, and the shape of each experimental area is the same as the sampling area. Arrange the experimental areas closely on the surface of the minimum enclosing space. Make multiple experimental areas spread over various positions of the minimum enclosing space. The position of the data collection point corresponding to each experimental area in the collection space is the position of the corresponding data collection point.

[0143] In step S214, the control device controls the data acquisition device to move to the data acquisition point, collect data on the workpiece, and obtain segmented point clouds corresponding to each initial segmented point cloud. The multiple data acquisition points around the workpiece enable the data acquisition device to collect data on the workpiece from multiple perspectives to obtain segmented point clouds. That is, in step S211, data collection from a single perspective is sufficient only to obtain a workpiece point cloud representing the structure of the workpiece. In step S214, detailed data collection is required for the part of the workpiece corresponding to the initial path point cloud, so multi-perspective data collection is performed.

[0144] In step S215, each initial segment point cloud corresponds to a position in the workpiece point cloud. According to the position of the initial segment point cloud in the workpiece point cloud, the segment point cloud corresponding to the initial segment point cloud is fused into the workpiece point cloud to obtain the target workpiece point cloud.

[0145] In some embodiments, a plurality of alignment points are provided on the workpiece, and the fusion of a segmented point cloud and a workpiece point cloud can be performed in the following manner: first, the portion of the workpiece corresponding to the segmented point cloud is determined, and then at least two alignment points on the portion of the workpiece corresponding to the segmented point cloud are used as target alignment points, and the first mapping point corresponding to the target alignment point is determined in the segmented point cloud, and the second mapping point corresponding to the target alignment point is determined in the workpiece point cloud. The segmented point cloud is rotated and translated until the first mapping point and the second mapping point coincide, and the fusion of the segmented point cloud and the workpiece point cloud can be completed. Each segmented point cloud is fused with the workpiece point cloud to obtain the target workpiece point cloud.

[0146] In some implementations, since the coordinate information of each data point in both the workpiece point cloud and the segment point cloud comes from the same coordinate system, the workpiece point cloud and the segment point cloud can be directly fused to obtain the target workpiece point cloud.

[0147] In the embodiment of the present application, the target workpiece point cloud is obtained in this way. First, the workpiece is roughly data collected to locate the workpiece and obtain the simple structure of the workpiece. Secondly, the workpiece point cloud is segmented and data collection points are obtained respectively. Among them, it is more targeted to determine the data collection points for the initial segmented point cloud, so that each initial segmented point cloud has a relatively appropriate number of data collection points, and the accuracy of data collection is guaranteed without wasting computing resources. Secondly, the segmented point cloud obtained by multi-directional data collection is obtained through these data collection points. Since the data collection points are obtained respectively according to the initial segmented point cloud, they are more suitable for the part of the workpiece corresponding to the initial segmented point cloud, and then the segmented point cloud of the part of the workpiece corresponding to each initial segmented point cloud can be obtained more accurately. Finally, the segmented point cloud is merged with the workpiece point cloud to obtain the target workpiece point cloud. In the above process, the segmented point cloud focuses on the details of the part of the workpiece, but lacks the coordination of the overall structure. The workpiece point cloud focuses on the overall structure of the workpiece, but lacks the detailed description of the workpiece. By fusing the workpiece point cloud and each segment point cloud, the details of the workpiece can be optimally described, and the description of the workpiece as a whole can be more coordinated.

[0148] In step S220, the curvature of each data point in the target workpiece point cloud is calculated. This is because the position in the workpiece that needs to be processed (that is, the position of the processing path to be determined by the present application) generally has significantly different characteristics compared to the position of the workpiece that does not need to be processed. For example, the position in the workpiece that needs to be processed generally exists in the form of a groove, or at the joint of different parts of the workpiece. Whether it is a groove or a joint of different parts of the workpiece, two different planes will be clamped. Exemplarily, the internal angle (also called the internal angle) formed by different sides of the workpiece. The groove can also be regarded as the internal angle formed by different sides of the workpiece to some extent. Therefore, the curvature of the part that needs to be processed on the workpiece must be larger than the plane. This is because the position on the workpiece that does not need to be processed is generally located at a relatively flat position on the surface of the workpiece, so the position on the workpiece that does not need to be processed has a smaller curvature than the position on the workpiece that needs to be processed.

[0149] However, the above method is only used to directly determine the positions on the workpiece that need to be processed, and then determine them as the processing path. It is easily affected by the structure of the workpiece itself and the influence of the outside world. Therefore, only the above method is used to preliminarily screen the data points in the target workpiece point cloud to obtain the initial path points. In order to reduce the amount of data to be processed when determining the processing path later, save computing resources and improve computing efficiency.

[0150] For determining the curvature of a data point in the target workpiece point cloud, in some embodiments, for any data point in the target workpiece point cloud, a neighborhood of the data point is determined with a preset length as the radius. The neighborhood of the data point is fitted with a surface to obtain a fitting plane, and then based on the coordinate information of each data point in the neighborhood, a mathematical method is used to calculate the curvature of the fitting plane as the curvature of the data point.

[0151] The data points in the target workpiece point cloud whose curvature is greater than the curvature threshold are used as initial path points. In some embodiments, the curvature threshold is obtained through multiple experiments in the laboratory. The current curvature threshold can make the initial path points smaller, but ensure that the initial path points almost include all the target path points, and will not affect the formation of each processing path on the workpiece.

[0152] In some embodiments, based on the different types of workpieces or their applications in different industries, each type of workpiece has a corresponding curvature threshold. The workpiece type corresponding to the workpiece is obtained; the curvature threshold corresponding to the workpiece is determined according to the workpiece type; and the data point in the target workpiece point cloud whose curvature is greater than the curvature threshold is used as the initial path point.

[0153] In some embodiments, the curvature and normal vector of each data point in the target workpiece point cloud may be determined in the following manner.

[0154] Taking any data point in the target workpiece point cloud as the center and the second distance as the radius, determine the neighborhood of the data point; according to the coordinate information of the data point in the neighborhood of the data point, use the covariance matrix to calculate the eigenvalue of the neighborhood of the data point as the eigenvalue of the data point; use the eigenvector corresponding to the minimum eigenvalue of the data point as the normal vector of the data point, and use the ratio of the minimum eigenvalue of the data point to the sum of all eigenvalues ​​as the curvature of the data point. In the embodiment of the present application, the curvature and normal vector of each data point in the target workpiece point cloud can be quickly and accurately determined by the above method.

[0155] In step S230, after the initial path points are preliminarily obtained, there are too many noise data points, such as data points located on the "edge" of the target workpiece point cloud, which is also the angle formed by two adjacent sides of the workpiece, but it is an external angle (also called a positive angle). The curvature of the data points located on the "edge" of the target workpiece point cloud will also be relatively large, so in step S220, such positions that are obviously not required to be processed on the workpiece will also be mistaken as initial path points.

[0156] The reason for this is that curvature has no direction, so whether it is bending toward the workpiece (such as the "edge" in the target workpiece point cloud) or bending away from the center of the workpiece (such as the groove in the workpiece), the curvature will be large and considered as the initial path point. In view of this situation, the normal vector with direction can be used as a reference to distinguish the above situations. For example, the normal vectors of all initial path points are obtained, and the target features of each initial path point are calculated based on the normal vectors of each initial path point.

[0157] Regarding the acquisition of the normal vector, first determine the surface formed by the neighborhood of the initial path point. The straight line vector passing through this initial path point and perpendicular to the surface is the normal vector of this path point. The normal vector has two directions, the first direction is the same as the curvature direction of the fitted surface. The second direction is opposite to the first direction. See Figure 8 As shown, Figure 8 A schematic diagram of the normal vector direction according to an embodiment of the present application is shown.

[0158] Please continue reading Figure 8 , we can see that for the initial path points located at the outer angle, the first direction of their normal vectors is toward the workpiece. For the initial path points located at the inner angle, the first direction of their normal vectors is toward the outside of the workpiece. That is, the initial path points whose first direction of the normal vectors is toward the workpiece can be used as target path points.

[0159] In some embodiments, the target feature of the initial path point can represent the direction of the normal vector of the initial path point in a numerical value or other form, such as different directions of the first direction of the normal vector of the initial path point corresponding to different target features. The first direction of the normal vector of the initial path point toward the workpiece is one type of target feature, and the first direction of the normal vector of the initial path point toward the outside of the workpiece is another type of target feature.

[0160] According to different target features, the initial path points can be screened by setting the setting conditions. The setting conditions are used to screen out the initial path points whose first direction of the normal vector is facing outside the workpiece, and these initial path points are used as target path points. The target path points are obtained by screening the initial path points.

[0161] In some embodiments, the first direction of the normal vector of the initial path point can be directly used as the target feature of the initial path point, so as to select the target path point from the initial path points by setting conditions.

[0162] See also Fig. 9 , Fig. 9 A flowchart of determining a target path point in an initial path point according to a normal vector of the initial path point according to an embodiment of the present application is shown. The embodiment of the present application provides a step S230 of determining a target path point in an initial path point according to a normal vector of the initial path point, including:

[0163] Step S231, determining at least three initial path points adjacent to the initial path point and not in the same straight line as selected points, and the plane where the selected points are located is the selected plane;

[0164] Step S232, taking a vector determined according to the projection point and the initial path point as a selected vector, where the projection point refers to a projection of the initial path point on the selected plane;

[0165] Step S233, if the angle between the normal vector of the initial path point and the selected vector is less than the angle threshold, the initial path point is used as the target path point.

[0166] The above three steps are described in detail below.

[0167] Since it is necessary to determine whether each initial path point is a target path point, taking any initial path point as an example, it is determined whether the initial path point is a target path point in the following manner.

[0168] In step S231, at least three initial path points that are adjacent to the initial path point and not in the same straight line are determined as selected points, and the plane where the selected points are located is the selected plane.

[0169] In step S232,

[0170] The projection of the initial path point on the selected plane is taken as the projection point. According to the projection point and the initial path point, a vector passing through the initial path point and the projection point in sequence can be calculated as the selected vector.

[0171] In some embodiments, the direction of the selected vector is the direction from the initial path point to the projection point.

[0172] In step S233, if the angle between the normal vector of the initial path point and the selected vector is less than the angle threshold, the initial path point is used as the target path point. That is, the angle between the normal vector of the initial path point and the selected vector is used as the target feature, and the angle between the normal vector of the initial path point and the selected vector is less than the angle threshold as a setting condition, and the target path point is determined from a plurality of initial path points.

[0173] The initial path point whose normal vector and the selected vector have an angle less than the angle threshold. In the specific experiment, the first direction of the normal vector of such initial path point is toward the outside of the workpiece. Therefore, if the angle between the normal vector of the initial path point and the selected vector is less than the angle threshold, the initial path point is used as the target path point. Through the pre-set calculation method, the target feature of the initial path point can be directly calculated according to the normal vector of the initial path point, so that the target feature is digitized. This can more conveniently calculate the target feature of the initial path point, and at the same time, it can more efficiently determine the target path point in the initial path point.

[0174] In step S240, the line obtained by fitting the target path points is the processing path. In some embodiments, since the target path points may represent many processing paths, the target path points are clustered according to the distances between the target path points to obtain at least one target path point set, and the target path points in each target path point set are linearly fitted to obtain the processing path corresponding to each target path point set.

[0175] In some embodiments, skeleton lines are extracted from at least one path point cloud formed by aggregation of target path points, and then linear fitting is performed on the skeleton lines to obtain a processing path for the workpiece.

[0176] There may be multiple processing paths on a workpiece, and the target path points belonging to the same processing path must be clustered together, because the distance between the target path points belonging to the same processing path is small. Then, the target path points can be clustered according to the distance between the target path points to obtain at least one path point cloud representing the processing path.

[0177] Since there are many target path points in the path point cloud, the control device cannot know in what order to traverse the target path points to complete the processing of the workpiece when controlling the robot to perform processing. Even if the traversal order of the target path points is known, if a large number of target path points are traversed one by one, the computing resources required by the control device will be greatly increased, thereby reducing the processing efficiency. Because the processing path generally exists in the form of lines, the path point cloud can be directly simplified into the form of "lines". For example, the skeleton line of the path point cloud is extracted to obtain the skeleton line of the path point cloud to replace the path point cloud.

[0178] See also Fig.10 , Fig.10 A flowchart of extracting skeleton lines from at least one path point cloud formed by aggregating target path points according to an embodiment of the present application is shown. The present application embodiment provides a step of extracting skeleton lines from at least one path point cloud formed by aggregating target path points according to an embodiment of the present application, including:

[0179] Step S501, randomly select a target path point in the path point cloud as a selection point, and draw two straight lines with a set angle through the selection point;

[0180] Step S502, adjusting the directions of the two straight lines so that the difference in the number of adjacent points between the two straight lines is maximized, and taking the straight line with the larger number of adjacent points as the first straight line and the other straight line as the second straight line;

[0181] Step S503, among the non-hiring points adjacent to the first straight line of the hiring point, select a non-hiring point as the next hiring point, and the distance between the hiring point and the next hiring point is within a preset distance interval; wherein, if the next hiring point cannot be obtained according to the first straight line of the latest hiring point, the next hiring point is obtained from the non-hiring points adjacent to the second straight line of the latest hiring point;

[0182] Step S504: If the next recruitment point cannot be determined based on the first straight line and the second straight line of the latest recruitment point, all recruitment points are used as skeleton points to obtain a skeleton line.

[0183] The above four steps are described in detail below.

[0184] Step S501, randomly select a target path point in the path point cloud as a selection point, and draw two straight lines with a set angle through the selection point, and the selection point is the intersection of the two straight lines. In some embodiments, a right angle or 45 degrees is used as the set angle of the two straight lines. This is because the angles of the connections between the various parts of the workpiece are mostly right angles or 45 degrees.

[0185] Specifically, the path point cloud is fitted with a surface to obtain a path plane. Two straight lines with a set angle are drawn through the selected points, and the planes where the two straight lines are located are parallel or belong to the path plane.

[0186] In step S502, the two straight lines are rotated at the same time to change their directions. The two straight lines are rotated 360 degrees around the intersection of the two straight lines in the plane where the two straight lines are located. In this process, the difference in the number of adjacent points of the two straight lines is recorded.

[0187] It should be noted that the neighboring points of two straight lines can be obtained in the following way: for any straight line, the number of target path points in the path point cloud whose distance to it is less than a preset length is calculated, which is the number of neighboring points of this straight line. The number of neighboring points of the two straight lines is obtained respectively and the difference is calculated to obtain the difference of the number of neighboring points of the two straight lines.

[0188] According to the difference in the number of adjacent points of the two straight lines at different angles, the two straight lines are rotated to an angle where the difference in the number of adjacent points is the largest. At this time, the straight line with more adjacent points is used as the first straight line, and the other straight line is used as the second straight line.

[0189] At this time, the line where the first straight line is located is the axial direction of the partial path point cloud. Fig.11 , Fig.11 A distribution diagram of the first straight line and the second straight line according to an embodiment of the present application is shown. Since the path point cloud is mostly in the shape of strips, it can also be called a rectangle. When the difference in the number of adjacent points of two straight lines is the largest, it means that there is a straight line that coincides with most of the path point cloud, and the extension direction of this straight line is the same as the extension direction of the path point cloud, that is, the first straight line. The biggest feature of the skeleton line is that it is used to indicate the extension direction of the path point cloud, so the adjacent points of the first straight line can all be used as recruitment points. However, in order to prevent the path point cloud from bending or having corners, the adjacent recruitment points are determined only based on the first straight line of the current recruitment point, and then the next recruitment point of the latest recruitment point is obtained based on the first straight line of the latest recruitment point. This ensures that the skeleton line finally obtained guarantees the extension direction of the path point cloud to the greatest extent.

[0190] In step S503, among the neighboring points of the first straight line of the current recruitment point, a target path point whose distance from the current recruitment point is within a set range and is not a non-recruitment point is determined as the next recruitment point. Each recruitment point has two corresponding straight lines, and the technical means described in steps S501 and S502 are used for each recruitment point to determine the first straight line and the second straight line of this recruitment point.

[0191] It should be made clear that the first straight line has two directions, and each recruiting point can theoretically determine a recruiting point on both sides of it. However, this situation is only applicable when the first recruiting point determines the next adjacent recruiting point. This is because there are no adjacent recruiting points on both sides of the first recruiting point, and the subsequently determined recruiting points have no adjacent recruiting points determined only in one of the directions of the first straight line. Therefore, in order to avoid determining two recruiting points again on both sides of the subsequently determined recruiting points, resulting in repeated determination of recruiting points. Setting: For any of the two directions of the first straight line, if there is already a recruiting point in the target path point within the preset distance interval from the current recruiting point, it is not necessary to determine the recruiting point in this direction. If there is no recruiting point within the preset distance interval from the current recruiting point, then among the neighboring points of the first straight line of the current recruiting point, determine any target path point that is not a recruiting point as the next recruiting point adjacent to the current recruiting point.

[0192] Please continue reading Fig.11 , Fig.11 Another distribution of the first straight line and the second straight line is also shown. When the current recruitment point is at the corner of the path point cloud, there is already a recruitment point in the preset distance interval from the current recruitment point in the direction to the left of the first straight line of the current recruitment point, so the first recruitment point can no longer be determined in the direction to the left of the first straight line of the current recruitment point. In the right direction of the first straight line of the current recruitment point, there is no neighboring point of the first straight line in the preset distance interval from the current recruitment point, so at this time, the first recruitment point can no longer be determined based on the first straight line of the current recruitment point. However, there are still parts in the path point cloud where the skeleton line has not been extracted. At this time, find whether there is a target path point that is within the preset distance interval from the current recruitment point and is a non-skeleton point among the neighboring points of the second straight line of the current recruitment point. If so, any one of the target path points that is a non-skeleton point will be used as the next recruitment point of the current recruitment point. For the newly acquired recruitment point, the next recruitment point is still determined preferentially through the neighboring points of the first straight line.

[0193] It should be made clear that the current admission point refers to the most recently obtained admission point.

[0194] In step S504, the technical means described in step S503 are still used for the newly acquired admission point to determine the next admission point. Until the newly acquired admission point cannot determine the next admission point among the neighboring points of the first straight line and the second straight line, all admission points are used as skeleton points, and each skeleton point forms the skeleton line of the path point cloud, that is, the skeleton line extraction of the path point cloud is completed.

[0195] Through the method in the embodiment of the present application, the skeleton line of the path point cloud can be extracted, and the shape of the path point cloud can be maintained to the greatest extent without being affected by the bending of the path point cloud.

[0196] The skeleton line is fitted, the traversal order of the target path points in the skeleton line is determined, or the starting point and end point of the processing path are determined, and then the processing direction of the processing path is determined. It is convenient for the control device to directly control the processing device of the robot to process the workpiece according to the processing path.

[0197] See also Fig.12 , Fig.12 The flowchart of linear fitting of skeleton lines to obtain a processing path of a workpiece according to an embodiment of the present application is shown. The embodiment of the present application provides a step of linear fitting of skeleton lines to obtain a processing path of a workpiece, including:

[0198] Step S601a, if the skeleton line can form a closed figure, obtain the centroid of the skeleton line;

[0199] Step S602a, taking the center of gravity as the origin, calculating the polar angle of each skeleton point in the skeleton line;

[0200] Step S603a, sorting the skeleton points according to the polar angles, the skeleton point at the front of the sort is the starting point of the processing path, and the skeleton point at the back of the sort is the end point of the processing path;

[0201] Step S604a, performing linear fitting on the skeleton line according to the sorting result of the skeleton points to obtain a processing path, so that the processing device sequentially traverses all the skeleton points in the processing path according to the sorting result of the skeleton points.

[0202] The above four steps are described in detail below.

[0203] Each path point cloud has a skeleton line. Let’s take a skeleton line as an example to determine the processing path.

[0204] In step S601a, if the skeleton line can form a closed figure, the centroid of the skeleton line is obtained. The skeleton line can be closed, which means that the skeleton line can form a closed figure, that is, the processing path corresponding to the skeleton line is a ring. The centroid of the skeleton line is calculated based on the coordinate information of each skeleton point in the skeleton line.

[0205] In step S602a, the polar angle of each skeleton point in the skeleton line is calculated with the center of gravity as the origin, and each skeleton point has a corresponding polar angle.

[0206] In step S603a, the skeleton points are sorted according to the polar angles, the skeleton point at the front of the sort is the starting point of the processing path, and the skeleton point at the back of the sort is the end point of the processing path.

[0207] In step S604a, the skeleton line is linearly fitted according to the sorting result of the skeleton points to obtain a processing path, so that the processing device traverses all the skeleton points in the processing path in sequence according to the sorting result of the skeleton points. In some embodiments, the skeleton line is linearly fitted using the least squares method.

[0208] In some embodiments, according to the sorting result of the skeleton points, the curve or straight line formed by sequentially connecting the skeleton points is the processing path. In some embodiments, the curve or straight line formed by sequentially connecting the skeleton points is optimized, and the angle formed at the skeleton points is removed to obtain a relatively soft curve as the processing path. This facilitates the processing device to process the workpiece more smoothly according to the processing path.

[0209] See also Fig.13 , Fig.13 A flowchart of performing linear fitting on a skeleton line to obtain a processing path of a workpiece according to another embodiment of the present application is shown. The embodiment of the present application provides a step of performing linear fitting on a skeleton line to obtain a processing path of a workpiece, including:

[0210] Step S601b, if the skeleton line cannot form a closed figure, randomly select a skeleton point in the skeleton line as a selection point;

[0211] Step S602b, selecting a skeleton point farthest from the selected point in the skeleton line as the starting point of the processing path;

[0212] Step S603b, sorting the skeleton points according to the distance between each skeleton point in the skeleton line and the starting point;

[0213] Step S604b, performing linear fitting on the skeleton line according to the sorting result to obtain a processing path, so that the processing device can sequentially traverse all the skeleton points in the processing path according to the sorting result of the skeleton points.

[0214] The above four steps are described in detail below.

[0215] In step S601b, if the skeleton line cannot form a closed figure, a skeleton point is randomly selected in the skeleton line as a selected point.

[0216] In step S602b, a skeleton point farthest from the selected point is selected in the skeleton line as the starting point of the processing path.

[0217] In step S603b, the skeleton points are sorted according to the distance between each skeleton point in the skeleton line and the starting point, and the last skeleton point in the sorting is the end point of the processing path.

[0218] In step S604b, the skeleton line is linearly fitted according to the sorting result of the skeleton points to obtain a processing path, so that the processing device traverses all the skeleton points in the processing path in sequence according to the sorting result of the skeleton points. In some embodiments, the skeleton line is linearly fitted using the least squares method.

[0219] In some embodiments, according to the sorting result of the skeleton points, the curve or straight line formed by sequentially connecting the skeleton points is the processing path. In some embodiments, the curve or straight line formed by sequentially connecting the skeleton points is optimized, and the angle formed at the skeleton points is removed to obtain a relatively soft curve as the processing path. This facilitates the processing device to process the workpiece more smoothly according to the processing path.

[0220] In some embodiments, after determining the processing path, since the processing path includes a straight processing path and a curved processing path, and the curved processing path requires continuous change of the moving direction of the processing device, the processing path is divided into a straight processing path and a curved processing path, and different processing modes are used for the straight processing path and the curved processing path.

[0221] In some embodiments, the curvature of each point on the processing path is calculated; if the curvature difference between adjacent points is greater than a first curvature threshold, any point among the adjacent points is used as a breakpoint to divide the processing path to obtain multiple sub-processing paths; the average curvature of each point on the sub-processing path is obtained, and if the average curvature is greater than a second curvature threshold, the sub-processing path is used as a curve processing path, otherwise, as a straight line processing path; the processing posture of the processing device is calculated for the curve processing path. The straight line processing path is directly processed in the corresponding straight line processing mode.

[0222] Since the processing path may be at the connection between parts of the workpiece, at the angle between the two sides of the workpiece, or in the form of a groove, especially the curved processing path, a control device is also required to control the moving direction of the processing device. In order to better process the curved processing path, the processing posture of the processing device is required. Especially when processing the curved processing path. The specific method of obtaining the processing posture of the processing device is as follows: according to the processing direction of the curved processing path and the curvature of each processing point on the curved processing path, the tangential component and the normal component of each processing point on the curved processing path are calculated; the tangential component and the normal component are used as the first axis and the second axis of the processing point respectively, and the cross product result of the tangential component and the normal component is used as the third axis of the processing point; the contact end of the processing device is set at an angle to the first axis, the second axis, and the third axis respectively as the processing posture of the processing device.

[0223] It should be clarified that, in some embodiments, the above processing posture can also be used as the processing posture for a straight line processing path.

[0224] See also Fig.14 , Fig.14 A flowchart of determining whether a skeleton line can form a closed figure according to an embodiment of the present application is shown. The embodiment of the present application provides steps for determining whether a skeleton line can form a closed figure, including:

[0225] Step S701, taking any skeleton point on the skeleton line as a test point;

[0226] Step S702, taking the non-test point with the smallest distance from the target test point in the skeleton line as the test point, until all the skeleton points on the skeleton line are test points, and the target test point is the most recently determined test point;

[0227] Step S703, obtaining a test distance between the first determined test point and the last determined test point, if the test distance is less than a distance threshold, the skeleton line can form a closed figure, otherwise, the skeleton line cannot form a closed figure.

[0228] The above three steps are described in detail below.

[0229] In step S701, any skeleton point on the skeleton line is used as a test point.

[0230] In step S702, the latest determined skeleton point is used as the target test point, and the non-test point with the smallest distance from the target test point in the skeleton line is used as the next test point, where the non-test point refers to a skeleton point that is not used as a test point, until all skeleton points on the skeleton line are test points, and the target test point is the latest determined test point.

[0231] If there are several non-test points in the skeleton line with the smallest distance to the target test point, any one of them is selected as the next test point.

[0232] In step S703, the test distance between the first determined test point and the last determined test point is obtained. If the skeleton line can form a closed figure, the last determined test point must be close to the first determined test point. Therefore, if the test distance is less than the distance threshold, the skeleton line can form a closed figure, otherwise, the skeleton line cannot form a closed figure.

[0233] In the embodiment of the present application, it is possible to quickly determine whether the skeleton line can form a closed figure.

[0234] The method for obtaining the workpiece processing path of the embodiment of the present application can be as follows: Fig.15 The hardware device shown is implemented. Fig.15 To describe the hardware device according to the embodiment of the present application. Fig.15 The hardware device shown is only an example and should not bring any limitation to the functions and scope of application of the embodiments of the present application.

[0235] like Fig.15 As shown, the hardware device may be in the form of a general computing device. The components of the hardware device may include, but are not limited to: at least one processing unit 810, at least one storage unit 820, and a bus 830 connecting different system components (including the storage unit 820 and the processing unit 810).

[0236] The storage unit stores program codes, which can be executed by the processing unit 810, so that the processing unit 810 performs the steps according to various exemplary embodiments of the present invention described in the description of the exemplary method described above in this specification. For example, the processing unit 810 can perform the following steps: Figure 2 The steps shown in .

[0237] The storage unit 820 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 8201 and / or a cache storage unit 8202 , and may further include a read-only storage unit (ROM) 8203 .

[0238] The storage unit 820 may also include a program / utility 8204 having a set (at least one) of program modules 8205, such program modules 8205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0239] Bus 830 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0240] The hardware device may also communicate with one or more external devices 700 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may communicate with one or more devices that enable a user to interact with the hardware device, and / or may communicate with any device that enables the hardware device to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed through an input / output (I / O) interface 850. Furthermore, the hardware device may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 860. As shown, the network adapter 860 communicates with other modules of the hydrogen refueling device through a bus 830. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the hardware device, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0241] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation methods of the present application.

[0242] In an exemplary embodiment of the present application, a computer program medium is further provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer is enabled to execute the method described in the above method embodiment.

[0243] According to one embodiment of the present application, a program product for implementing the method in the above method embodiment is also provided, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited to this. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0244] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0245] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0246] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0247] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0248] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0249] In addition, although the steps of the method in the present application are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0250] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.

[0251] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the inventions applied for herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that the present application does not apply for. The specification and embodiments are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the appended claims.

Claims

1. A method for obtaining a workpiece processing path, characterized in that: The method comprises: Collect data on the workpiece to obtain the point cloud of the target workpiece; Taking data points in the target workpiece point cloud whose curvature is greater than a curvature threshold as initial path points; Calculating the target feature of the initial path point according to the normal vector of each initial path point, and if the target feature of the initial path point meets the set conditions, taking the initial path point as the target path point; A processing path for the workpiece is determined according to the target path point.

2. The method according to claim 1, characterized in that Collect data on the workpiece to obtain the target workpiece point cloud, including: Collect data from a single perspective on the workpiece to obtain a workpiece point cloud; Clustering and segmenting the workpiece point cloud to obtain a plurality of initial segmented point clouds; Determining data collection points of a portion of the workpiece corresponding to the initial segmented point cloud according to the coordinates of each data point in the initial segmented point cloud; Controlling a data acquisition device to move to the data acquisition point, performing data acquisition on the workpiece, and obtaining a segmented point cloud corresponding to the initial segmented point cloud; The plurality of segmented point clouds are combined with the workpiece point cloud to obtain a target workpiece point cloud.

3. The method according to claim 2, characterized in that The workpiece point cloud is clustered and segmented to obtain a plurality of initial segmented point clouds, including: Taking any data point that is not divided into clusters in the workpiece point cloud as a seed point, and forming a neighborhood of the seed point with a first set distance as a radius; All data points in the neighborhood of the seed point are classified into the same cluster, and any data point is continuously selected as a seed point in the cluster, the neighborhood of the seed point is determined, and the data points in the neighborhood of the seed point are added to the cluster to grow the cluster; Until the cluster cannot grow any more, all the data points in the cluster are used as an initial segmentation point cloud.

4. The method according to claim 2, characterized in that: Determining data collection points of a portion of the workpiece corresponding to the initial segmented point cloud according to the coordinates of each data point in the initial segmented point cloud includes: Determine the minimum enclosing space of the initial segmented point cloud with the centroid of the initial segmented point cloud as the center; Determining the number of data collection points according to the collection area of ​​the data collection device and the surface area of ​​the minimum enclosed space; The data acquisition point positions are determined on the surface of the minimum enclosing space, so that the acquisition area of ​​the data acquisition device can traverse various positions of the part of the workpiece corresponding to the initial segmented point cloud.

5. The method according to claim 4, characterized in that Determining the number of data collection points according to the collection area of ​​the data collection device and the surface area of ​​the minimum enclosed space includes: According to the preset data collection accuracy, the collection area of ​​the data collection device is determined, and under the same data collection conditions, the collection area is negatively correlated with the data collection accuracy; The number of data collection points is determined according to the data collection area and the surface area of ​​the minimum enclosed space.

6. The method according to claim 4, characterized in that Determining the number of data collection points according to the collection area of ​​the data collection device and the surface area of ​​the minimum enclosed space also includes: According to the preset data collection accuracy, determining the collection area of ​​the data collection device, wherein the collection area is negatively correlated with the data collection accuracy; Determine the distance between the data acquisition device and the workpiece according to the data acquisition area. Under the same data acquisition conditions, the distance between the data acquisition device and the workpiece is positively correlated with the acquisition area. Determine a collection space according to the distance between the data collection device and the workpiece, the collection space is larger than the minimum enclosing space, the data collection points are distributed on the surface of the collection space, and there is a scaling relationship between the collection space and the minimum enclosing space; The number of data collection points is determined according to the collection area and the surface area of ​​the minimum enclosed space.

7. The method according to claim 1, characterized in that Calculating the target feature of the initial path point according to the normal vector of each initial path point, and if the target feature of the initial path point meets the set condition, the initial path point is the target path point, including: Determine at least three data points adjacent to the initial path point and not on the same straight line as selected points, and the plane where the selected points are located is the selected plane; A vector determined according to the projection point and the initial path point is used as a selected vector, wherein the projection point refers to a projection of the initial path point on the selected plane; If the angle between the normal vector of the initial path point and the selected vector is less than an angle threshold, the initial path point is used as the target path point.

8. A robot comprising a memory, a processor and a readable program stored in the memory, characterized in that: The processor executes the readable program to implement the method according to any one of claims 1 to 7.

9. A readable storage medium, characterized in that: A readable program / instruction is stored thereon, and when the readable program / instruction is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

10. A program product, comprising a readable program / instruction, characterized in that: When the readable program / instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.