Method and device for optimizing automatic scanning path

By hiding, colliding and filtering operations on the scan points on the initial scan path in three-dimensional scanning technology, an optimized scan path is generated, which solves the problem of the error points affecting efficiency in automated scanning and improves scanning efficiency and effect.

CN119879727AActive Publication Date: 2025-04-25SCANTECH (HANGZHOU) CO LTD
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202411924393.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-04-25
Estimated Expiration
2044-12-24

AI Technical Summary

Technical Problem

In the existing three-dimensional scanning technology, error points on the automated scanning path (such as redundant points, unreachable points and collision points) affect the scanning efficiency and effect.

Method used

By obtaining the individual scan points of the initial scan path, performing hidden operations, collision adjustments and filtering operations, the scan points are optimized to generate target scan points, and the optimized scan path is determined based on the target scan points.

Benefits of technology

The optimization and adjustment of each scanning point on the initial scanning path is realized, the scanning efficiency and effect of automated scanning is improved, and the safety and efficiency of the scanning path is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119879727A_ABST
    Figure CN119879727A_ABST
Patent Text Reader

Abstract

The invention discloses an optimization method for an automatic scanning path, and the method comprises the steps: obtaining each scanning point of an initial scanning path, the initial scanning path being used for a scanning device to scan a to-be-detected workpiece, and the scanning device at least comprising a scanner and a mechanical arm; performing hiding operation and collision adjustment operation on each scanning point to obtain each target scanning point, the hiding operation being determined based on the pose information of the scanning point and the motion range of the mechanical arm, and the collision adjustment operation being determined based on the pose information of the scanning point, the size of the scanner and the test area of the tested workpiece; and determining a corresponding optimized scanning path based on each target scanning point. According to the invention, each scanning point on the initial scanning path can be optimized and adjusted, and the scanning efficiency and the scanning effect of automatic scanning are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automated scanning technology, and in particular to an automated scanning path optimization method and device. Background Art

[0002] 3D scanning technology refers to a high-tech technology that integrates optical, mechanical, electrical and computer technologies. It is mainly used to scan the spatial shape, structure and color of an object to obtain the spatial coordinates of the object's surface. 3D scanning technology can be used to reconstruct the scanned object in three dimensions, thereby creating a three-dimensional model of the actual object.

[0003] At present, three-dimensional scanning has been automated. Based on the scanning path generated by automatic path planning, there may be errors in the scanning points on the scanning path. These errors have a certain impact on the scanning efficiency and scanning effect. Summary of the invention

[0004] The purpose of the present application is to provide a method and device for automatic scanning path optimization, which can optimize and adjust each scanning point on the initial scanning path, thereby improving the scanning efficiency and scanning effect of the automatic scanning.

[0005] In a first aspect, the present application provides a method for optimizing an automated scanning path, the method comprising:

[0006] Acquire each scanning point of an initial scanning path, wherein the initial scanning path is used for a scanning device to scan a workpiece to be measured, and the scanning device at least includes a scanner and a mechanical arm;

[0007] Performing a hiding operation and a collision adjustment operation on each scanning point to obtain each target scanning point, wherein the hiding operation is determined based on the posture information of the scanning point and the motion range of the robot arm, and the collision adjustment operation is determined based on the posture information of the scanning point, the size of the scanner, and the test area of ​​the workpiece to be measured;

[0008] Based on each target scanning point, the corresponding optimized scanning path is determined.

[0009] Furthermore, the method also includes:

[0010] Performing a filtering operation on each scanning point to obtain each first scanning point, wherein the filtering operation is determined based on the posture information of the scanning point and the scanning area where the scanning point is located;

[0011] Performing a hiding operation on each first scanning point to obtain a second scanning point, wherein the hiding operation is determined based on the posture information of the first scanning point and the motion range of the robot arm;

[0012] A collision adjustment operation is performed on each second scanning point to obtain a target scanning point, wherein the collision adjustment operation is determined based on the posture information of the second scanning point, the size of the scanner, and the test area of ​​the workpiece to be measured.

[0013] Furthermore, each scanning point of the initial scanning path is obtained, including:

[0014] Discretely mesh the workpiece model of the workpiece to be tested to obtain the vertex coordinates of each triangular facet, and calculate the center point and normal vector of each triangular facet;

[0015] Select sampling points from the center point of each triangular facet, cluster the normal vectors of each sampling point to obtain an initial clustering result, divide the workpiece model into multiple initial regions based on the initial clustering result, and determine the normal vector of each initial region;

[0016] Based on the Euclidean distance algorithm and the normal vector of each initial area, each initial area is clustered to obtain multiple final clustering results, and multiple scanning areas of the workpiece to be measured are determined based on the multiple final clustering results, and each scanning point in each scanning area is determined.

[0017] Further, the position information of the scanning point includes a position point, a scanning direction vector, a scanning long side direction vector, and a scanning wide side direction vector, wherein the scanning direction vector is determined based on a cross product operation of the scanning long side direction vector and the scanning wide side direction vector, wherein a filtering operation is performed on each scanning point, including:

[0018] A straight line is formed by the position point of the scanning point and the corresponding scanning direction vector, and it is determined whether the straight line intersects with the scanning area where the scanning point is located;

[0019] If they intersect, the scan point is retained, otherwise, the scan point is filtered out.

[0020] Further, the position information of the scanning point includes a position point, a scanning direction vector, a scanning long side direction vector, and a scanning wide side direction vector, wherein the scanning direction vector is determined based on a cross product operation of the scanning long side direction vector and the scanning wide side direction vector, wherein a filtering operation is performed on each scanning point, including:

[0021] A rectangle is constructed with the position point of the scanning point as the center point and the scanning long side direction vector and the scanning wide side direction vector of the scanning point as the sides;

[0022] Determine the scanning direction vectors of the four corner points of the rectangle using the scanning direction vector of the scanning point;

[0023] The four corner points and the center point are respectively connected with the corresponding scanning direction vectors to form corresponding straight lines;

[0024] If any straight line intersects the scanning area where the scanning point is located, the scanning point is retained, otherwise, the scanning point is filtered out.

[0025] Further, the position information of the scanning point includes a position point, a scanning direction vector, a scanning long side direction vector, and a scanning wide side direction vector, and the scanning direction vector is determined based on a cross product operation of the scanning long side direction vector and the scanning wide side direction vector, wherein a hiding operation is performed on each scanning point, including:

[0026] The coordinate system of the workpiece model where the scanning point is located is converted into the coordinate system of the robot base to obtain the converted position coordinates of the scanning point;

[0027] Based on the current position relationship between the workpiece model and the robotic arm, the motion range of the robotic arm, and the position coordinates of the scan point after conversion, determining whether the scan point is within the motion range of the robotic arm;

[0028] If the scanning point is not within the motion range of the robot arm, the scanning point is hidden in the current initial scanning path.

[0029] Further, the position information of the scanning point includes a position point, a scanning direction vector, a scanning long side direction vector, and a scanning wide side direction vector, wherein the scanning direction vector is determined based on a cross product operation of the scanning long side direction vector and the scanning wide side direction vector, wherein a collision adjustment operation is performed on each scanning point, including:

[0030] Determine the position of the scanner corresponding to the scanning point based on the position point of the scanning point;

[0031] The volume of the scanner is determined based on the volume parameters of the scanner with the position of the scanner as the center;

[0032] It is determined whether the volume of the scanner intersects with the workpiece being measured and the surrounding area of ​​the workpiece being measured. If so, it is determined that there is a collision at the scanning point, and collision adjustment is performed.

[0033] Further, it is determined whether the volume of the scanner intersects with the workpiece to be measured and the surrounding area of ​​the workpiece to be measured. If so, it is determined that there is a collision at the scanning point, and collision adjustment is performed, including:

[0034] Obtaining point cloud data of the workpiece being measured and the surrounding area of ​​the workpiece being measured, and constructing a binary tree with the point cloud data;

[0035] Taking half of the scanner length as the target radius, the target radius is searched based on a binary tree. If the point cloud data of the workpiece and the surrounding area of ​​the workpiece are found within the target radius, it is determined that the scanning point has a collision, and a collision adjustment is performed. The collision adjustment is as follows: the scanning direction vector of the scanning point is rotated around the scanning long side direction vector or the scanning wide side direction vector to adjust the scanning direction of the scanner. If the scanning point still has a collision after adjusting the scanning direction of the scanner, the scanning point is deleted.

[0036] Furthermore, the method also includes:

[0037] Based on each target scanning point on each initial scanning path, determining a corresponding plurality of optimized scanning paths;

[0038] Starting from the first optimized scanning path, a path number is set for each optimized scanning path, and the path numbers are 0, 1, 2..., N in sequence;

[0039] The plurality of optimized scanning paths are adjusted so that the scanning mode between the adjusted scanning paths adopts a zigzag scanning, wherein the adjustment includes:

[0040] If the path number is an even-numbered optimized scanning path, an adjusted scanning path is generated according to the sequence from the first target scanning point to the last target scanning point on the optimized scanning path;

[0041] If the path number is an odd-numbered optimized scanning path, the adjusted scanning path is generated according to the sequence from the last target scanning point to the first target scanning point on the optimized scanning path.

[0042] Furthermore, the method also includes:

[0043] If the ratio of the number of target scanning points to the number of scanning points is less than a preset threshold, a distance matrix between any two target scanning points is calculated;

[0044] The first target scanning point is taken as the initial scanning point on the scanning path to be generated, and among all the remaining target scanning points, the target scanning point with the smallest distance matrix to the target scanning point is determined as the second scanning point on the scanning path to be generated;

[0045] By analogy, each scanning point on the scanning path to be generated is determined in sequence, and a corresponding optimized scanning path is generated based on each determined scanning point.

[0046] In a second aspect, the present application provides an automatic scanning path optimization device, the device comprising:

[0047] An acquisition module, used for acquiring each scanning point of an initial scanning path, wherein the initial scanning path is used for a scanning device to scan a workpiece to be measured, and the scanning device at least includes a scanner and a mechanical arm;

[0048] An adjustment module is used to perform a hiding operation and a collision adjustment operation on each scanning point to obtain each target scanning point, wherein the hiding operation is determined based on the posture information of the scanning point and the motion range of the robot arm, and the collision adjustment operation is determined based on the posture information of the scanning point, the size of the scanner, and the test area of ​​the workpiece to be measured;

[0049] The path generation module is used to determine the corresponding optimized scanning path based on each target scanning point.

[0050] In a third aspect, the present application provides a computer device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps of the method for automated scanning path optimization as described above.

[0051] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for optimizing the automated scanning path as described above.

[0052] The present application performs hiding operations and collision adjustment operations on each scanning point of the initial scanning path to obtain each target scanning point, and then determines the corresponding optimized scanning path. By optimizing the scanning points with errors, hiding the scanning points that are inaccessible to the robot arm, and determining the scanning points with collisions and adjusting them, it is possible to optimize and adjust each scanning point on the initial scanning path, optimize the scanning path, and improve the scanning efficiency and scanning effect of automated scanning, so as to ensure the safety and efficiency of the scanning path during actual scanning. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 A first flow chart of the method for optimizing the automated scanning path provided in an embodiment of the present application;

[0054] Figure 2 A second flow chart of the method for optimizing the automated scanning path provided in an embodiment of the present application;

[0055] Figure 3 A third flow chart of the method for optimizing the automated scanning path provided in an embodiment of the present application;

[0056] Figure 4 Schematic diagram of each initial area of ​​the workpiece model provided in the embodiment of the present application;

[0057] Figure 5A schematic diagram of each scanning area of ​​a workpiece model provided in an embodiment of the present application;

[0058] Figure 6 A fourth flow chart of the method for optimizing the automated scanning path provided in an embodiment of the present application;

[0059] Figure 7 A fifth flow chart of the method for optimizing the automated scanning path provided in an embodiment of the present application;

[0060] Figure 8 A sixth flow chart of the method for optimizing the automated scanning path provided in an embodiment of the present application;

[0061] Fig. 9 A seventh flow chart of the method for optimizing the automated scanning path provided in an embodiment of the present application;

[0062] Fig.10 A schematic diagram of the scanning point optimization result provided in the embodiment of the present application;

[0063] Fig.11 A schematic diagram of multiple scanning paths provided in an embodiment of the present application;

[0064] Fig.12 An eighth flow chart of the method for optimizing the automated scanning path provided in an embodiment of the present application;

[0065] Fig.13 A ninth flow chart of the method for optimizing the automated scanning path provided in an embodiment of the present application;

[0066] Fig.14 A system block diagram of an automatic scanning path optimization device provided in an embodiment of the present application;

[0067] Fig.15 A system block diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0068] The present application will be described in detail below in conjunction with the specific implementation modes shown in the accompanying drawings, but these implementation modes do not limit the present application. Structural, methodological, or functional changes made by ordinary technicians in the field based on these implementation modes are included in the protection scope of the present application.

[0069] The scanning path of the automated three-dimensional scanning system is usually a pre-planned scanning path. The scanning path is generally a path generated based on automated path planning. The scanning points on the path may contain redundant points, unreachable points, collision points and other erroneous points. These erroneous points have a certain impact on the scanning efficiency and scanning effect. The embodiment of the present application provides an optimization method for an automated scanning path, which optimizes the erroneous points on the initially generated automated scanning path to improve the scanning efficiency and scanning effect of automated scanning.

[0070] The execution subject of the automated scanning path optimization method in the embodiment of the present application may be an electronic device. The electronic device is in communication connection with the automated three-dimensional scanning system. The electronic device optimizes the scanning points based on each scanning point on the initial scanning path to obtain an optimized scanning path, and the scanning device in the automated three-dimensional scanning system performs a scanning operation on the workpiece to be measured based on the optimized scanning path.

[0071] Exemplarily, the electronic device may be a terminal or other device, including but not limited to a mobile terminal and a fixed terminal. For example, a mobile terminal includes but is not limited to a smart phone, a smart watch, a tablet computer, a laptop computer, a smart vehicle, a smart car-mounted device, etc., wherein a fixed terminal includes but is not limited to a desktop computer, a smart TV, etc.

[0072] Exemplarily, the electronic device may also be a device such as a server, which may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It may also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, as well as big data and artificial intelligence platforms, but is not limited to these.

[0073] Please refer to Figure 1 , an embodiment of the present application provides an automatic scanning path optimization method, the method comprising steps S101-S103.

[0074] Step S101, acquiring each scanning point of an initial scanning path, wherein the initial scanning path is used by a scanning device to scan a workpiece to be measured, and the scanning device at least includes a scanner and a mechanical arm.

[0075] The initial scanning path can be a scanning path generated based on an automated path planning algorithm. Based on the automated path planning algorithm and the workpiece to be measured, the scanning direction, scanning mode, etc. can be determined, and then each scanning point can be determined. The initial scanning path can be determined based on the order of each scanning point. Each scanning point is the posture that the scanner mounted on the robot arm needs to achieve when performing a three-dimensional scan, and each scanning point is distributed in various directions of the workpiece to be measured. The initial scanning path can be determined based on the path planning settings, the workpiece to be measured, etc. The initial scanning path can be one path or multiple paths, which is not limited in the embodiments of the present application.

[0076] Automated three-dimensional scanning systems can be divided into handheld three-dimensional scanning systems, tracking three-dimensional scanning systems, etc. Exemplarily, the automated three-dimensional scanning system includes a scanning device, a control device, a turntable and a tracking device, and the scanning device includes a scanner and a robotic arm. The robotic arm can be fixed on a base, and the robotic arm is used to carry a scanner for three-dimensional scanning, and the scanner can be set at the end of the robotic arm. The scanner can be a handheld three-dimensional scanner or a tracking scanner. The turntable is used to carry the workpiece to be measured. Under the control of the control device, the scanning device scans the workpiece to be measured according to the planned scanning path. The motion path of the robotic arm is specifically the planned motion path of the end of the robotic arm, and since the end of the robotic arm is equipped with a scanner, the motion path of the end of the robotic arm can be equivalent to the scanning path of the scanner.

[0077] Step S102, performing hiding operation and collision adjustment operation on each scanning point to obtain each target scanning point, wherein the hiding operation is determined based on the posture information of the scanning point and the motion range of the robot arm, and the collision adjustment operation is determined based on the posture information of the scanning point, the size of the scanner and the test area of ​​the workpiece to be measured.

[0078] There may be errors in each scanning point of the initial scanning path, and each scanning point needs to be adjusted and optimized, that is, hide operations and collision adjustment operations are performed on each scanning point. The scanning points can be distributed in different positions of the workpiece to be measured. There are scanning points that are inaccessible to the robot arm during automated scanning, that is, these scanning points are outside the reach of the robot arm. These scanning points are hidden, that is, based on the posture information of the scanning points and the motion range of the robot arm, determine which scanning points need to be hidden.

[0079] The scanning point is the posture that the robot-mounted scanner needs to achieve when performing three-dimensional scanning. It can be understood as the position of the scanner. Considering the size of the scanner itself, there is a possibility of collision between the scanner and the workpiece being measured and the surrounding environment during scanning. These scanning points need to be adjusted to avoid collisions during actual scanning. Based on the posture information of the scanning points, the size of the scanner, and the test area of ​​the workpiece being measured, determine which scanning points to adjust, and then perform corresponding adjustment operations.

[0080] It is understandable that there may be redundant points at each scanning point of the initial scanning path, and these redundant points need to be filtered out.

[0081] Step S103: determining a corresponding optimized scanning path based on each target scanning point.

[0082] According to each target scanning point and the order between the scanning points, a corresponding optimized scanning path is generated.

[0083] In this embodiment, erroneous points on the initial scanning path are optimized, scanning points that are inaccessible to the robot arm are hidden, and scanning points with collisions are determined and adjusted to avoid collisions. This enables optimization and adjustment of each scanning point on the initial scanning path, optimizes the scanning path, and improves the scanning efficiency and scanning effect of automated scanning, thereby ensuring the safety and efficiency of the scanning path during actual scanning.

[0084] In one embodiment, Figure 2 As shown, the method also includes the steps of:

[0085] Step S201, performing a filtering operation on each scanning point to obtain each first scanning point, wherein the filtering operation is determined based on the posture information of the scanning point and the scanning area where the scanning point is located;

[0086] Step S202, performing a hiding operation on each first scanning point to obtain a second scanning point, wherein the hiding operation is determined based on the posture information of the first scanning point and the motion range of the robot arm;

[0087] Step S203, performing a collision adjustment operation on each second scanning point to obtain a target scanning point, wherein the collision adjustment operation is determined based on the posture information of the second scanning point, the size of the scanner, and the test area of ​​the workpiece to be measured.

[0088] For each scanning point on the initial scanning path, there may be redundant scanning points. The positions of these redundant scanning points may be outside the selected scanning area. These scanning points need to be filtered out to improve the scanning efficiency. Based on the posture information of the scanning point and the scanning area where the scanning point is located, it is determined whether the scanning point is a redundant scanning point, and the scanning points determined to be redundant are filtered out to obtain each first scanning point, and a hiding operation is performed on each first scanning point to obtain a second scanning point. A collision adjustment operation is performed on each second scanning point to obtain a target scanning point, and then an optimized scanning path is determined based on each target scanning point.

[0089] In this embodiment, redundant point filtering, unreachable point hiding and collision point adjustment are performed on each scanning point on the initial scanning path in turn, which can not only improve the optimization efficiency of each scanning point on the initial path, but also realize the optimization of the scanning path, thereby improving the scanning efficiency and scanning effect of the automated scanning.

[0090] In one embodiment, before acquiring each scanning point on the initial scanning path, a coordinate system of the automated three-dimensional system is constructed. The coordinate change relationship between the scanner and the end of the robot arm is determined based on the hand-eye calibration algorithm. The coordinate change relationship between the workpiece to be measured and the base of the robot arm is determined based on the environmental calibration. The object of environmental calibration can be the workpiece to be measured, or it can be a fixed object in the surrounding environment of the workpiece to be measured, for example, the fixed object is a turntable, a fixed frame, etc. Exemplarily, the robot arm coordinate system is divided into a robot arm base coordinate system and a robot arm end coordinate system, wherein the robot arm base coordinate system is established, for example, with the intersection of the base and the axis of the bottom end of the robot arm as the origin of the coordinate system, and the robot arm end coordinate system is established with the intersection of the scanner and the axis of the end of the robot arm as the origin of the coordinate system. Among them, the hand-eye calibration algorithm can be implemented using an existing calibration algorithm, and its specific implementation process is not limited.

[0091] In one embodiment, Figure 3 As shown, obtaining each scanning point of the initial scanning path includes the steps of:

[0092] Step S301 : discretely meshing the workpiece model of the workpiece to be measured obtains vertex coordinates of each triangular facet, and calculates the center point and normal vector of each triangular facet.

[0093] The workpiece model of the workpiece to be measured can be a computer-aided design (CAD) model based on the workpiece to be measured. The workpiece model is processed into discrete grids to obtain various triangular facets, each of which is composed of three vertices. The coordinates of each vertex are determined, that is, the coordinates of each vertex in three-dimensional space are determined. Based on the coordinates of the three vertices, the center point of each triangular facet can be determined. For example, the center point can be obtained by calculating the average value of the coordinates of the three vertices. Based on the three vertices of the triangular facet, any two edges of the triangular facet can be obtained, and the normal vector of the triangular facet can be obtained by calculating the cross product of two edge vectors.

[0094] Step S302 , respectively selecting sampling points from the center points of the triangular facets, clustering the normal vectors of the sampling points to obtain initial clustering results, dividing the workpiece model into multiple initial regions based on the initial clustering results, and determining the normal vector of each initial region.

[0095] Sampling points are selected from the center point of each triangular facet. The number of sampling points can be set according to the actual situation. Clustering is performed based on the normal vectors of each sampling point, and the workpiece model is divided into multiple initial regions, and the normal vector of each initial region is determined. The workpiece model is divided into multiple different initial regions based on the normal vectors of the sampling points. For example, taking the car door as an example, the car door can be divided into the front, back, side bottom and other regions. After the region division based on the center point and normal vector, each region is continuous and has a similar direction, which facilitates the subsequent generation of scanning points. Figure 4 The workpiece model is divided into various initial regions, and the regions with the same color are one region.

[0096] For example, if the workpiece model to be measured is a CAD model, it is necessary to inversely solve the corresponding CAD model surface at the beginning through the center points of each triangular facet, and cluster and classify the CAD model surface.

[0097] Step S303, clustering each initial area based on the Euclidean distance algorithm and the normal vector of each initial area to obtain multiple final clustering results, determining multiple scanning areas of the workpiece to be measured based on the multiple final clustering results, and determining each scanning point in each scanning area.

[0098] Using the Euclidean distance algorithm and the normal vector of each initial area, a clustering algorithm is performed to cluster each initial area, and the center points of the triangles that are far apart in the initial area are divided into different categories according to the Euclidean distance. Exemplarily, for any initial area, the normal vector of the initial area is used as the initial cluster center, and the Euclidean distance between each remaining sampling point in the initial area and the initial cluster center is calculated. If the sampling point meets the threshold of the Euclidean distance, it is assigned to the initial cluster center. If it does not meet the threshold, further clustering is performed based on the Euclidean distance algorithm, and the center points of the triangles in the initial area are clustered into multiple final clustering results. Each final clustering result can be determined as a scanning area. Figure 5 The workpiece model shown is divided into various scanning areas, and the areas with the same color are one area.

[0099] According to each final clustering result, each scanning point in each scanning area is determined by an algorithm. Exemplarily, each scanning point is generated based on the surface, line, and point features of the CAD model surface of the workpiece to be measured. Exemplarily, each scanning point is generated based on the directional bounding box of the CAD model of the workpiece to be measured. The directional bounding box is a geometric body used to describe the boundary of an object, which is defined as the smallest cuboid that contains the geometric object and is in any direction relative to the coordinate axis.

[0100] In this embodiment, clustering is performed on the workpiece model of the workpiece to classify regions with similar normal vectors and spatial positions into one category, that is, each scanning region of the workpiece to be measured is obtained, and then each scanning point can be obtained.

[0101] In one embodiment, the position information of the scanning point includes a position point, a scanning direction vector, a scanning long side direction vector and a scanning wide side direction vector, and the scanning direction vector is determined based on the cross product operation of the scanning long side direction vector and the scanning wide side direction vector. The position point can be the three-dimensional coordinate of the scanning point. The scanner can be similar to a cuboid, the scanning long side direction vector can be understood as the vector in the long side direction of the scanner, the scanning wide side direction vector can be understood as the vector in the wide side direction of the scanner, and the scanning direction vector can be understood as the vector in the high side direction of the scanner. The scanning long side direction vector is cross-multiplied with the scanning wide side direction vector to obtain the scanning direction vector.

[0102] In one embodiment, Figure 6 As shown, performing filtering operation on each scanning point includes the following steps:

[0103] Step S601, a straight line is formed by the position point of the scanning point and the corresponding scanning direction vector, and it is determined whether the straight line intersects with the scanning area where the scanning point is located;

[0104] Step S602: If they intersect, the scan point is retained; otherwise, the scan point is filtered out.

[0105] For each scanning point on the initial scanning path, there may be redundant scanning points. The positions of these redundant scanning points may be outside the selected scanning area, and these scanning points need to be filtered out.

[0106] For each scanning point, a straight line is formed by the position point of the scanning point and the corresponding scanning direction vector, and it is determined whether the straight line intersects with the scanning area where the scanning point is located. If so, it indicates that the scanning point is within the scanning area and the scanning point is retained. Otherwise, it indicates that the scanning point is outside the scanning area and the scanning point is filtered out. Based on this implementation, redundant scanning points on the initial scanning path can be filtered out to improve the efficiency and effect of automated scanning.

[0107] In one embodiment, Figure 7 As shown, performing filtering operation on each scanning point includes the following steps:

[0108] Step S701, constructing a rectangle with the position point of the scanning point as the center point and the scanning long side direction vector and the scanning wide side direction vector of the scanning point as the sides;

[0109] Step S702, determining the scanning direction vectors of the four corner points of the rectangle using the scanning direction vector of the scanning point;

[0110] Step S703, respectively forming corresponding straight lines with the four corner points and the center point and their corresponding scanning direction vectors;

[0111] Step S704: if any straight line intersects with the scanning area where the scanning point is located, the scanning point is retained; otherwise, the scanning point is filtered out.

[0112] The above-mentioned technical solution of filtering out the scanning range of the scanning point instead of the scanning point's position point may result in a significant reduction in the number of scanning nodes, thereby reducing the scanning effect. In this embodiment, a rectangle is constructed with the scanning point's position point as the center point and the scanning long side direction vector and the scanning wide side direction vector of the scanning point as the sides. The rectangle can be approximated as the actual scanning range of the scanning point. The scanning direction vectors of the four corner points are made. The scanning direction vectors of the four corner points are respectively parallel to the scanning direction vector of the center point. The four corner points of the rectangle and the center point are respectively connected to the corresponding scanning direction vectors to form corresponding straight lines. If any straight line intersects with the scanning area where the scanning point is located, the scanning point is retained. This implementation method can avoid the situation where a large number of redundant scanning points are filtered out, and can not only filter out redundant scanning points, but also ensure the scanning effect.

[0113] In one embodiment, Figure 8 As shown, the steps of performing the hiding operation on each scanning point include:

[0114] Step S801, converting the coordinate system of the workpiece model where the position point of the scanning point is located into the coordinate system of the robot arm base to obtain the converted position coordinates of the scanning point;

[0115] Step S802, based on the current position relationship between the workpiece model and the robot arm, the motion range of the robot arm, and the position coordinates of the scan point after conversion, determining whether the scan point is within the motion range of the robot arm;

[0116] Step S803: If the scanning point is not within the motion range of the robot arm, the scanning point is hidden in the current initial scanning path.

[0117] Due to the limited range of motion of the robot arm, for the scanning points on the initial scanning path, the positions of some scanning points may be outside the reachable range of the robot arm, that is, there are scanning points that are inaccessible to the robot arm, and these scanning points need to be hidden. The position coordinates of each scanning point on the above-mentioned initial scanning path are in the coordinate system of the workpiece model of the workpiece to be measured. Based on the environmental calibration, the coordinate change relationship between the workpiece to be measured and the robot arm base can be determined. Based on the coordinate change relationship, the coordinate system of the workpiece model where the position point of the scanning point is located is converted to the coordinate system of the robot arm base to obtain the converted position coordinates of the scanning point, that is, the position coordinates of the scanning point in the coordinate system of the robot arm base are obtained.

[0118] Based on the current position relationship between the workpiece model and the robot arm, the range of motion of the robot arm, and the position coordinates of the converted scanning point, it is determined whether the scanning point is within the range of motion of the robot arm. The range of motion of the robot arm can be the arm span range of the robot arm, which can be obtained by the posture data of the end of the robot arm obtained in advance, and the joint parameters of each joint of the robot arm can be obtained by inverse kinematics calculation. These joint references represent the physical position of each joint. Based on the position coordinates of the converted scanning point, it is determined whether the scanning point is within the arm span range of the robot arm. If the scanning point is not within the arm span range of the robot arm, the scanning point is hidden in the current initial scanning path, so as to optimize the processing of the scanning node, and improve the scanning efficiency and scanning effect of the automated scanning.

[0119] It should be noted that the determination of whether a scanning point is within the range of motion of the robot arm is closely related to the current position of the workpiece being measured and the range of motion of the robot arm. Whether a scanning point is within the range of motion of the robot arm may result in different determination results as the position of the workpiece being measured changes. For example, assuming that the current position of the workpiece being measured is the first position, for a certain scanning point, when the workpiece being measured is at the first position, based on the above determination method, it is determined that the scanning point is not within the range of motion of the robot arm, then the scanning point is hidden in the first current initial scanning path. If the workpiece being measured is at the second position, based on the above determination method, it is determined that the scanning point is within the range of motion of the robot arm, then the scanning point does not need to be hidden in the second current initial scanning path. Therefore, in this embodiment, the processing method for scanning points that are not within the range of motion of the robot arm is to hide them, rather than to filter them out.

[0120] In one embodiment, Fig. 9 As shown, the steps of performing the collision adjustment operation on each scanning point include:

[0121] Step S901, determining the position of the scanner corresponding to the scanning point based on the position point of the scanning point;

[0122] Step S902, taking the position of the scanner as the center, determining the volume of the scanner based on the volume parameters of the scanner;

[0123] Step S903, determining whether the volume of the scanner intersects with the workpiece to be measured and the surrounding area of ​​the workpiece to be measured. If so, it is determined that there is a collision at the scanning point, and collision adjustment is performed.

[0124] The scanning point can be understood as the position of the scanner. Considering the size of the scanner itself, there is a possibility that the scanner may collide with the workpiece being measured and the surrounding environment during scanning. These scanning points need to be adjusted to avoid collisions during actual scanning. The position of the scanner corresponding to the scanning point is determined based on the position point of the scanning point. The position of the scanner can be the position point after the position point of the scanning point is extended along the scanning direction vector of the scanning point for a distance. The size of this distance can be set based on actual conditions. With the position of the scanner as the center, the scanner is approximated as a sphere or a cuboid according to its volume parameters. The volume of the scanner can be determined to determine whether the volume of the scanner intersects with the workpiece being measured and the surrounding environment area of ​​the workpiece being measured. If so, it is determined that there is a collision at the scanning point, and collision adjustment is performed. The surrounding environment area of ​​the workpiece being measured can be a turntable, a placement rack for the workpiece being measured, etc.

[0125] In one embodiment, determining whether the volume of the scanner intersects with the workpiece to be measured and the surrounding area of ​​the workpiece to be measured, and if so, determining that there is a collision at the scanning point, and performing collision adjustment, includes:

[0126] Obtaining point cloud data of the workpiece being measured and the surrounding area of ​​the workpiece being measured, and constructing a binary tree with the point cloud data;

[0127] With the position point of the scanner as the center and half of the length of the scanner as the target radius, the target radius is searched based on a binary tree. If the point cloud data of the workpiece to be measured and the surrounding area of ​​the workpiece to be measured are found within the range of the target radius, it is determined that the scanning point has a collision, and a collision adjustment is performed, wherein the collision adjustment is as follows: the scanning direction vector or the scanning wide side direction vector of the scanning point is rotated around the scanning long side direction vector to adjust the scanning direction of the scanner. If the scanning point still has a collision after adjusting the scanning direction of the scanner, the scanning point is deleted.

[0128] Obtain point cloud data of the workpiece to be measured and the surrounding area of ​​the workpiece to be measured, and construct a binary tree with the point cloud. Exemplarily, the binary tree can be a KD tree (K-Dimensional Tree) structure. The KD tree is a spatial binary tree whose nodes are point cloud space points. Take half of the length of the scanner as the target radius, search for the target radius based on the KD tree structure, start searching from the root node of the KD tree, and judge whether the point cloud data of the workpiece to be measured and the surrounding area of ​​the workpiece to be measured are within the target radius layer by layer and node by node according to the position coordinates of each scanning point. If so, it is determined that the corresponding scanning point has a collision and the scanning point needs to be adjusted. Rotate the scanning direction vector of the scanning point around the scanning long side direction vector or the scanning wide side direction vector to adjust the scanning direction of the scanner and change the position of the scanner. If the scanning point still collides after adjusting the scanning direction of the scanner, delete the scanning point.

[0129] This embodiment avoids the occurrence of collisions by determining whether there are collisions between scanning points on the initial scanning path and adjusting the scanning points that have collisions, thereby improving the scanning efficiency and effect of the automated scanning. Fig.10 The schematic diagram of the scanning point optimization result is based on the technical solution in the present application, wherein the red dots are the scanning points on the initial scanning path, and the green dots are the final target scanning points after optimization. Compared with the scanning points on the initial scanning path, a large number of redundant points are filtered out.

[0130] When the scanning area of ​​the workpiece is large, multiple scanning paths are usually generated. Each scanning path is independent of each other, and the scanning methods between the paths are generally horizontal scanning, vertical scanning and Z-shaped scanning. Fig.11 In the schematic diagram of multiple scanning paths shown, horizontal scanning can be understood as all scanning paths are scanned in order from left to right or from right to left, vertical scanning can be understood as all scanning paths are scanned in order from top to bottom or from bottom to top, and Z-shaped scanning can be understood as path 1 is scanned in order from left to right, path 2 is scanned in order from right to left, path 3 is scanned in order from left to right, and so on, similar to the letter Z. To avoid redundancy, the Z-shaped scanning method is selected. Since each scanning point on the initial scanning path is sampled from the surface of the workpiece model and processed, the sampling order of the scanning points on each initial scanning path may be determined to be horizontal or vertical from the beginning. The initial path scanning order can only be "horizontal scanning" or "vertical scanning". The generated optimized scanning path order does not necessarily satisfy the Z-shape, and the generated optimized scanning path needs to be adjusted to satisfy it.

[0131] In one embodiment, Fig.12 As shown, the method also includes the steps of:

[0132] Step S1201, determining a plurality of corresponding optimized scanning paths based on each target scanning point on each initial scanning path;

[0133] Step S1202, starting from the first optimized scanning path, setting a path number for each optimized scanning path, the path numbers are 0, 1, 2..., N in sequence;

[0134] Step S1203, adjusting the plurality of optimized scanning paths so that the scanning mode between the adjusted scanning paths adopts a zigzag scanning, wherein the adjustment includes:

[0135] Step S12031, if the path number is an even-numbered optimized scanning path, generate an adjusted scanning path in the order from the first target scanning point to the last target scanning point on the optimized scanning path;

[0136] Step S12032: if the path number is an odd-numbered optimized scanning path, an adjusted scanning path is generated according to the sequence from the last target scanning point to the first target scanning point on the optimized scanning path.

[0137] In the embodiment of the present application, by optimizing the scanning path and making further path adjustments, it is possible to save the scanning time of the automated scanning and further improve the scanning efficiency of the automated scanning.

[0138] In one embodiment, the scanning path can be further adjusted by reversing, reversing, exchanging, etc., so as to further improve the scanning efficiency of the automated scanning. Reversing can refer to reversing the scanning path by exchanging the starting point and the end point of the scanning path. Reversing can refer to rotating 180 degrees around the scanning direction to reverse the scanning long side direction and the scanning wide side direction. Exchanging is exchanging the scanning order of the two scanning paths. When actually scanning, the user may prefer to scan in a horizontal or vertical direction (reverse), or in order to make the entire scanning process more continuous and smooth (reverse), or the user wants to give priority to scanning a certain scanning area and change the scanning order of the corresponding path (exchange order). The above methods make scanning more flexible, and scanning solutions can be customized according to different scanning requirements.

[0139] In one embodiment, Fig.13 As shown, the method also includes the steps of:

[0140] Step S1301, if the ratio of the number of target scanning points to the number of scanning points is less than a preset threshold, calculate the distance matrix between any two target scanning points;

[0141] Step S1302, taking the first target scanning point as the initial scanning point on the scanning path to be generated, and determining the target scanning point with the smallest distance matrix with the target scanning point among all the remaining target scanning points as the second scanning point on the scanning path to be generated;

[0142] Step S1303, and so on, sequentially determine each scanning point on the scanning path to be generated, and generate a corresponding optimized scanning path based on each determined scanning point.

[0143] In this embodiment, when there are many redundant points on the initial scanning path, only 1-2 scanning points on each scanning path may be finally retained. If the Z-shaped scanning method is used, there will still be the defect of redundant paths. The scanning path generated based on the above method no longer strictly follows the Z-shaped scanning method, avoiding the occurrence of the above situation and being able to flexibly generate the scanning path.

[0144] Exemplarily, the threshold may be set to 0.4.

[0145] Based on the same inventive concept, the embodiment of the present application also provides a device for realizing the above-mentioned automatic scanning path optimization. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in the embodiment of the automatic scanning path optimization device provided below can refer to the limitations of the automatic scanning path optimization method above, and will not be repeated here.

[0146] like Fig.14 As shown, an embodiment of the present application provides an automated scanning path optimization device, which:

[0147] An acquisition module 1401 is used to acquire each scanning point of an initial scanning path, wherein the initial scanning path is used for a scanning device to scan a workpiece to be measured, and the scanning device at least includes a scanner and a mechanical arm;

[0148] An adjustment module 1402 is used to perform a hiding operation and a collision adjustment operation on each scanning point to obtain each target scanning point, wherein the hiding operation is determined based on the posture information of the scanning point and the motion range of the robot arm, and the collision adjustment operation is determined based on the posture information of the scanning point, the size of the scanner, and the test area of ​​the workpiece to be measured;

[0149] The path generation module 1403 is used to determine the corresponding optimized scanning path based on each target scanning point.

[0150] In this embodiment, erroneous points on the initial scanning path are optimized, scanning points that are inaccessible to the robot arm are hidden, and scanning points with collisions are determined and adjusted to avoid collisions. This enables optimization and adjustment of each scanning point on the initial scanning path, optimizes the scanning path, and improves the scanning efficiency and scanning effect of automated scanning, thereby ensuring the safety and efficiency of the scanning path during actual scanning.

[0151] Furthermore, the adjustment module 1402 is specifically used for:

[0152] Performing a filtering operation on each scanning point to obtain each first scanning point, wherein the filtering operation is determined based on the posture information of the scanning point and the scanning area where the scanning point is located;

[0153] Performing a hiding operation on each first scanning point to obtain a second scanning point, wherein the hiding operation is determined based on the posture information of the first scanning point and the motion range of the robot arm;

[0154] A collision adjustment operation is performed on each second scanning point to obtain a target scanning point, wherein the collision adjustment operation is determined based on the posture information of the second scanning point, the size of the scanner, and the test area of ​​the workpiece to be measured.

[0155] Furthermore, the acquisition module 1401 is specifically used for:

[0156] Discretely mesh the workpiece model of the workpiece to be tested to obtain the vertex coordinates of each triangular facet, and calculate the center point and normal vector of each triangular facet;

[0157] Select sampling points from the center point of each triangular facet, cluster the normal vectors of each sampling point to obtain an initial clustering result, divide the workpiece model into multiple initial regions based on the initial clustering result, and determine the normal vector of each initial region;

[0158] Based on the Euclidean distance algorithm and the normal vector of each initial area, each initial area is clustered to obtain multiple final clustering results, and multiple scanning areas of the workpiece to be measured are determined based on the multiple final clustering results, and each scanning point in each scanning area is determined.

[0159] Further, the posture information of the scanning point includes the position point, the scanning direction vector, the scanning long side direction vector and the scanning wide side direction vector. The scanning direction vector is determined based on the cross product operation of the scanning long side direction vector and the scanning wide side direction vector. The adjustment module 1402 is specifically used for:

[0160] A straight line is formed by the position point of the scanning point and the corresponding scanning direction vector, and it is determined whether the straight line intersects with the scanning area where the scanning point is located;

[0161] If they intersect, the scan point is retained, otherwise, the scan point is filtered out.

[0162] Further, the posture information of the scanning point includes the position point, the scanning direction vector, the scanning long side direction vector and the scanning wide side direction vector. The scanning direction vector is determined based on the cross product operation of the scanning long side direction vector and the scanning wide side direction vector. The adjustment module 1402 is specifically used for:

[0163] A rectangle is constructed with the position point of the scanning point as the center point and the scanning long side direction vector and the scanning wide side direction vector of the scanning point as the sides;

[0164] Determine the scanning direction vectors of the four corner points of the rectangle using the scanning direction vector of the scanning point;

[0165] The four corner points and the center point are respectively connected with the corresponding scanning direction vectors to form corresponding straight lines;

[0166] If any straight line intersects the scanning area where the scanning point is located, the scanning point is retained, otherwise, the scanning point is filtered out.

[0167] Further, the posture information of the scanning point includes the position point, the scanning direction vector, the scanning long side direction vector and the scanning wide side direction vector. The scanning direction vector is determined based on the cross product operation of the scanning long side direction vector and the scanning wide side direction vector. The adjustment module 1402 is specifically used for:

[0168] The coordinate system of the workpiece model where the scanning point is located is converted into the coordinate system of the robot base to obtain the converted position coordinates of the scanning point;

[0169] Based on the current position relationship between the workpiece model and the robotic arm, the motion range of the robotic arm, and the position coordinates of the scan point after conversion, determining whether the scan point is within the motion range of the robotic arm;

[0170] If the scanning point is not within the motion range of the robot arm, the scanning point is hidden in the current initial scanning path.

[0171] Further, the posture information of the scanning point includes the position point, the scanning direction vector, the scanning long side direction vector and the scanning wide side direction vector. The scanning direction vector is determined based on the cross product operation of the scanning long side direction vector and the scanning wide side direction vector. The adjustment module 1402 is specifically used for:

[0172] Determine the position of the scanner corresponding to the scanning point based on the position point of the scanning point;

[0173] The volume of the scanner is determined based on the volume parameters of the scanner with the position of the scanner as the center;

[0174] It is determined whether the volume of the scanner intersects with the workpiece being measured and the surrounding area of ​​the workpiece being measured. If so, it is determined that there is a collision at the scanning point, and collision adjustment is performed.

[0175] Furthermore, the adjustment module 1402 is specifically used for:

[0176] Obtaining point cloud data of the workpiece being measured and the surrounding area of ​​the workpiece being measured, and constructing a binary tree with the point cloud data;

[0177] Taking half of the scanner length as the target radius, the target radius is searched based on a binary tree. If the point cloud data of the workpiece and the surrounding area of ​​the workpiece are found within the target radius, it is determined that the scanning point has a collision, and a collision adjustment is performed. The collision adjustment is as follows: the scanning direction vector of the scanning point is rotated around the scanning long side direction vector or the scanning wide side direction vector to adjust the scanning direction of the scanner. If the scanning point still has a collision after adjusting the scanning direction of the scanner, the scanning point is deleted.

[0178] Furthermore, the path generation module 1403 is specifically used for:

[0179] Based on each target scanning point on each initial scanning path, determining a corresponding plurality of optimized scanning paths;

[0180] Starting from the first optimized scanning path, a path number is set for each optimized scanning path, and the path numbers are 0, 1, 2..., N in sequence;

[0181] The plurality of optimized scanning paths are adjusted so that the scanning mode between the adjusted scanning paths adopts a zigzag scanning, wherein the adjustment includes:

[0182] If the path number is an even-numbered optimized scanning path, an adjusted scanning path is generated according to the sequence from the first target scanning point to the last target scanning point on the optimized scanning path;

[0183] If the path number is an odd-numbered optimized scanning path, the adjusted scanning path is generated according to the sequence from the last target scanning point to the first target scanning point on the optimized scanning path.

[0184] Furthermore, the path generation module 1403 is specifically used for:

[0185] If the ratio of the number of target scanning points to the number of scanning points is less than a preset threshold, a distance matrix between any two target scanning points is calculated;

[0186] The first target scanning point is taken as the initial scanning point on the scanning path to be generated, and among all the remaining target scanning points, the target scanning point with the smallest distance matrix to the target scanning point is determined as the second scanning point on the scanning path to be generated;

[0187] By analogy, each scanning point on the scanning path to be generated is determined in sequence, and a corresponding optimized scanning path is generated based on each determined scanning point.

[0188] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, any of the above-mentioned methods for optimizing the automated scanning path is implemented.

[0189] Fig.15 It is a schematic diagram of the hardware structure of a computer device provided in an embodiment of the present application. Fig.15 The computer device shown includes: a processor 1501, a communication interface 1502, a memory 1503 and a communication bus 1504. The processor 1501, the communication interface 1502 and the memory 1503 communicate with each other via the communication bus 1504. Fig.15The connection method between the processor 1501, the communication interface 1502, and the memory 1503 shown is merely exemplary. During implementation, the processor 1501, the communication interface 1502, and the memory 1503 may also be connected to each other in communication with each other using other connection methods besides the communication bus 1504.

[0190] The memory 1503 can be used to store a computer program, which may include instructions and data to implement the steps of any of the above automated scan path optimization methods. In an embodiment of the present application, the memory 1503 may be various types of storage media, such as random access memory (RAM), read only memory (ROM), non-volatile RAM (NVRAM), programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), flash memory, optical storage, and registers. The memory 1503 may include a hard disk and / or memory.

[0191] The processor 1501 may be a general-purpose processor, which may be a processor that performs specific steps and / or operations by reading and executing a computer program (e.g., a computer program) stored in a memory (e.g., memory 1503). The general-purpose processor may use data stored in the memory (e.g., memory 1503) in the process of performing the steps and / or operations. The general-purpose processor may be, for example, but not limited to, a central processing unit (CPU). In addition, the processor 1501 may also be a special-purpose processor, which may be a processor specially designed to perform specific steps and / or operations. The special-purpose processor may be, for example, but not limited to, an ASIC and an FPGA. In addition, the processor 1501 may also be a combination of multiple processors, such as a multi-core processor.

[0192] The communication interface 1502 may include an input / output (I / O) interface, a physical interface, and a logical interface for interconnecting devices within the network device, as well as an interface for interconnecting the network device with other devices (such as network devices). The communication network may be Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc. The communication interface 1502 may be a module, a circuit, a transceiver, or any device capable of implementing communication.

[0193] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 1501 or an instruction in the form of software. The method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in the processor for execution. The software module can be located in a mature storage medium in the art such as a random access memory flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 1503, and the processor 1501 reads the information in the memory 1503 and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.

[0194] Although the preferred embodiments of the present application have been disclosed for illustrative purposes, those skilled in the art will appreciate that various modifications, additions and substitutions are possible, without departing from the scope and spirit of the application as disclosed in the accompanying claims.

Claims

1. A method for optimizing an automated scanning path, characterized in that: The method comprises: Acquire each scanning point of an initial scanning path, wherein the initial scanning path is used for a scanning device to scan a workpiece to be measured, and the scanning device at least includes a scanner and a mechanical arm; Performing a hiding operation and a collision adjustment operation on each of the scanning points to obtain each target scanning point, wherein the hiding operation is determined based on the posture information of the scanning point and the motion range of the robot arm, and the collision adjustment operation is determined based on the posture information of the scanning point, the size of the scanner, and the test area of ​​the workpiece to be measured; A corresponding optimized scanning path is determined based on each target scanning point.

2. The method for optimizing the automated scanning path according to claim 1, characterized in that: The method further comprises: Performing a filtering operation on each of the scanning points to obtain each first scanning point, wherein the filtering operation is determined based on the posture information of the scanning point and the scanning area where the scanning point is located; Performing a hiding operation on each of the first scanning points to obtain a second scanning point, wherein the hiding operation is determined based on the posture information of the first scanning point and the motion range of the robot arm; A collision adjustment operation is performed on each of the second scanning points to obtain a target scanning point, wherein the collision adjustment operation is determined based on the posture information of the second scanning point, the size of the scanner, and the test area of ​​the workpiece to be measured.

3. The method for optimizing the automated scanning path according to claim 1, characterized in that: The step of obtaining each scanning point of the initial scanning path includes: Discretely mesh the workpiece model of the workpiece to be tested to obtain the vertex coordinates of each triangular facet, and calculate the center point and normal vector of each triangular facet; Selecting sampling points from the center points of the triangular facets respectively, clustering the normal vectors of the sampling points to obtain initial clustering results, dividing the workpiece model into a plurality of initial regions based on the initial clustering results, and determining the normal vector of each initial region; Based on the Euclidean distance algorithm and the normal vector of each initial area, each initial area is clustered to obtain multiple final clustering results, and multiple scanning areas of the workpiece to be measured are determined based on the multiple final clustering results, as well as each scanning point in each scanning area.

4. The method for optimizing the automated scanning path according to claim 2, characterized in that: The position information of the scanning point includes a position point, a scanning direction vector, a scanning long side direction vector, and a scanning wide side direction vector, wherein the scanning direction vector is determined based on a cross product operation of the scanning long side direction vector and the scanning wide side direction vector, wherein the filtering operation is performed on each of the scanning points, including: A straight line is formed by the position point of the scanning point and the corresponding scanning direction vector, and it is determined whether the straight line intersects with the scanning area where the scanning point is located; If they intersect, the scan point is retained, otherwise, the scan point is filtered out.

5. The method for optimizing the automated scanning path according to claim 2, characterized in that: The position information of the scanning point includes a position point, a scanning direction vector, a scanning long side direction vector, and a scanning wide side direction vector, wherein the scanning direction vector is determined based on a cross product operation of the scanning long side direction vector and the scanning wide side direction vector, wherein the filtering operation is performed on each scanning point, including: Constructing a rectangle with the position point of the scanning point as the center point and the scanning long side direction vector and the scanning wide side direction vector of the scanning point as the sides; Determine the scanning direction vectors of the four corner points of the rectangle using the scanning direction vector of the scanning point; The four corner points and the center point are respectively connected with the corresponding scanning direction vectors to form corresponding straight lines; If any straight line intersects the scanning area where the scanning point is located, the scanning point is retained, otherwise, the scanning point is filtered out.

6. The method for optimizing the automated scanning path according to claim 1, characterized in that: The position information of the scanning point includes a position point, a scanning direction vector, a scanning long side direction vector, and a scanning wide side direction vector, wherein the scanning direction vector is determined based on a cross product operation of the scanning long side direction vector and the scanning wide side direction vector, wherein the performing of a hiding operation on each of the scanning points includes: Convert the coordinate system of the workpiece model where the position point of the scanning point is located into the coordinate system of the robot base to obtain the converted position coordinates of the scanning point; Based on the current position relationship between the workpiece model and the robotic arm, the motion range of the robotic arm, and the position coordinates of the scan point after conversion, determining whether the scan point is within the motion range of the robotic arm; If the scanning point is not within the motion range of the robot arm, the scanning point is hidden in the current initial scanning path.

7. The method for optimizing the automated scanning path according to claim 1, characterized in that: The position information of the scanning point includes a position point, a scanning direction vector, a scanning long side direction vector and a scanning wide side direction vector, wherein the scanning direction vector is determined based on a cross product operation of the scanning long side direction vector and the scanning wide side direction vector, wherein the performing of the collision adjustment operation on each of the scanning points includes: Determine the position of the scanner corresponding to the scanning point based on the position point of the scanning point; Determining the volume of the scanner based on volume parameters of the scanner with the position of the scanner as the center; It is determined whether the volume of the scanner intersects with the workpiece to be measured and the surrounding area of ​​the workpiece to be measured. If so, it is determined that there is a collision at the scanning point, and collision adjustment is performed.

8. The method for optimizing the automated scanning path according to claim 7, characterized in that: The step of determining whether the volume of the scanner intersects with the workpiece to be measured and the surrounding area of ​​the workpiece to be measured, and if so, determining that there is a collision at the scanning point, and performing collision adjustment, includes: Acquire point cloud data of the workpiece to be measured and the surrounding area of ​​the workpiece to be measured, and construct a binary tree with the point cloud data; Taking half of the length of the scanner as the target radius, the target radius is searched based on the binary tree. If point cloud data of the workpiece to be measured and the surrounding area of ​​the workpiece to be measured are searched within the range of the target radius, it is determined that the scanning point has a collision, and a collision adjustment is performed, wherein the collision adjustment is as follows: the scanning direction vector of the scanning point is rotated around the scanning long side direction vector or the scanning wide side direction vector to adjust the scanning direction of the scanner. If the scanning point still has a collision after adjusting the scanning direction of the scanner, the scanning point is deleted.

9. The method for optimizing the automated scanning path according to claim 1, characterized in that: The method further comprises: Based on each target scanning point on each initial scanning path, determining a corresponding plurality of optimized scanning paths; Starting from the first optimized scanning path, a path number is set for each optimized scanning path, and the path numbers are 0, 1, 2..., N in sequence; The plurality of optimized scanning paths are adjusted so that the scanning mode between the adjusted scanning paths adopts a zigzag scanning, wherein the adjustment includes: If the path number is an even-numbered optimized scanning path, an adjusted scanning path is generated according to the sequence from the first target scanning point to the last target scanning point on the optimized scanning path; If the path number is an odd-numbered optimized scanning path, the adjusted scanning path is generated according to the sequence from the last target scanning point to the first target scanning point on the optimized scanning path.

10. The method for optimizing the automated scanning path according to claim 1, characterized in that: The method comprises: If the ratio of the number of the target scanning points to the number of the scanning points is less than a preset threshold, calculating a distance matrix between any two target scanning points; The first target scanning point is used as the initial scanning point on the scanning path to be generated, and among all the remaining target scanning points, the target scanning point with the smallest distance matrix to the target scanning point is determined as the second scanning point on the scanning path to be generated; By analogy, each scanning point on the scanning path to be generated is determined in sequence, and a corresponding optimized scanning path is generated based on each determined scanning point.

11. An automatic scanning path optimization device, characterized in that: The device: An acquisition module, used for acquiring each scanning point of an initial scanning path, wherein the initial scanning path is used for a scanning device to scan a workpiece to be measured, and the scanning device at least includes a scanner and a mechanical arm; An adjustment module, configured to perform a hiding operation and a collision adjustment operation on each of the scanning points to obtain each target scanning point, wherein the hiding operation is determined based on the posture information of the scanning point and the motion range of the robot arm, and the collision adjustment operation is determined based on the posture information of the scanning point, the size of the scanner, and the test area of ​​the workpiece to be measured; The path generation module is used to determine the corresponding optimized scanning path based on each target scanning point.

12. A computer device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps of the method for optimizing the automated scanning path according to any one of claims 1 to 10.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the automatic scanning path optimization method according to any one of claims 1 to 10 are implemented.

Citation Information

Patent Citations

  • Multi-resolution self-adapting marking method in 3DGIS

    CN101477562A

  • Visual range determination method, device and equipment

    CN111833428A

  • Scanning attitude and coverage path planning method for optical measurement

    CN112733428A

  • Full-automatic scanning path planning method for CAD model surface structured light

    CN112818428A

  • Automatic three-dimensional scanning planning method for surface structured light

    CN113155054A