Automatic spraying method and device for workpiece and robot

By determining the robot's spraying posture based on the workpiece's grid model and point cloud data, the automatic spraying of the workpiece is achieved efficiently and accurately. It solves the problems of long manual spraying and low accuracy in the existing technology, and is suitable for complex workpieces.

CN118721202AInactive Publication Date: 2024-10-01SHENGJING INTELLIGENT TECH (JIAXING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410945996.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-15
Publication Date
2024-10-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the existing technology, direct manual spraying of workpieces takes a long time, has low accuracy, and high labor costs, making it difficult to adapt to workpieces with complex geometric structures.

Method used

The pre-spraying trajectory is determined based on the initial grid model of the target workpiece, and the target spraying posture of the robot is determined based on the side point cloud data of the hoisted workpiece. The robot is used for automatic spraying, reducing labor costs and improving spraying accuracy.

Benefits of technology

It achieves the efficiency and accuracy of automatic spraying, reduces spraying time and labor costs, and is suitable for workpieces with complex geometric structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118721202A_ABST
    Figure CN118721202A_ABST
Patent Text Reader

Abstract

The invention provides an automatic spraying method and device for a workpiece and a robot, and relates to the technical field of workpiece spraying, and the method comprises the steps that a pre-spraying track is determined based on an initial grid model corresponding to a target workpiece; determining a target spraying posture corresponding to at least one robot based on the pre-spraying track, the initial grid model and the side point cloud data corresponding to the hoisting workpiece; the hoisting workpiece comprises a hoisting tool and a target workpiece, and the hoisting tool is used for hoisting the target workpiece; and aiming at each robot, controlling the robot to spray the target workpiece based on the target spraying posture corresponding to the robot. According to the technical scheme, the spraying posture of the robot is determined through the grid model and the point cloud data of the target workpiece, then the robot is controlled to spray the target workpiece, manual spraying is not needed, the labor cost is reduced, the spraying time is shortened, and the spraying accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of workpiece spraying, and in particular to an automatic spraying method, device and robot for a workpiece. Background Art

[0002] In order to improve the service life and aesthetics of the workpiece, it is usually necessary to spray the workpiece.

[0003] In the prior art, for workpieces with relatively simple configurations such as flat pieces, a scanning method is usually used to perform spraying on the basis of scanning imaging.

[0004] However, the scanning method is not applicable to workpieces with complex geometric structures. For workpieces with complex geometric structures, spraying is usually performed manually. The above-mentioned existing technologies usually take a long time, have low spraying accuracy, and require high professional skills of operators, which increases labor costs. Summary of the invention

[0005] The present invention provides an automatic spraying method, device and robot for workpieces, which are used to solve the defects of manual spraying in the prior art, such as long spraying time, low precision and high labor cost. The present invention does not require manual spraying, reduces labor costs, reduces spraying time and improves spraying precision.

[0006] The invention provides an automatic spraying method for a workpiece, comprising the following steps.

[0007] Determine the pre-spraying trajectory based on the initial mesh model corresponding to the target workpiece; Determining a target spraying posture corresponding to at least one robot based on the pre-spraying trajectory, the initial grid model, and the side point cloud data corresponding to the hoisted workpiece; the hoisted workpiece includes a hoisting tool and the target workpiece, and the hoisting tool is used to hoist the target workpiece; For each of the robots, the robot is controlled to spray the target workpiece based on the target spraying posture corresponding to the robot.

[0008] According to an automatic spraying method for a workpiece provided by the present invention, the pre-spraying trajectory is determined based on an initial grid model corresponding to the target workpiece, comprising: Determine a plurality of partitioned grid models corresponding to the initial grid model; Perform convex hull calculations on each of the partitioned grid models to obtain partitioned envelope grid models corresponding to each of the partitioned grid models; The pre-spraying trajectory is determined based on all the partition envelope grid models and spraying area parameters.

[0009] According to an automatic spraying method for a workpiece provided by the present invention, the determining of a plurality of partitioned grid models corresponding to the initial grid model comprises: Triangulating the initial mesh model to obtain a triangular mesh model; Determine the normal vectors of all triangular meshes in the triangular mesh model, and determine the triangular meshes whose normal vectors meet the preset screening conditions as target meshes; Performing clustering processing on each of the target grids to obtain a clustering result; Determining a plurality of partition planes according to the clustering result; The triangular mesh model is divided into the plurality of partition mesh models based on the plurality of partition planes.

[0010] According to an automatic spraying method for a workpiece provided by the present invention, the pre-spraying trajectory is determined based on all the partition envelope grid models and spraying area parameters, including: Merging all the partitioned envelope grid models to obtain a merged envelope grid model; Performing concave hull calculation on the merged envelope grid model to obtain an outer envelope grid model; The pre-spraying trajectory is determined based on the outer envelope mesh model and the spraying area parameters.

[0011] According to an automatic spraying method for a workpiece provided by the present invention, the determining of the pre-spraying trajectory based on the outer envelope grid model and the spraying area parameters comprises: Sampling the outer envelope grid model to obtain outer envelope point cloud data; Based on the spraying area parameters, trajectory points are extracted from the outer envelope point cloud data to obtain the pre-spraying trajectory; wherein the spraying area parameters at least include the spray width.

[0012] According to an automatic spraying method for a workpiece provided by the present invention, the target spraying posture corresponding to at least one robot is determined based on the pre-spraying trajectory, the initial grid model and the side point cloud data corresponding to the hoisted workpiece, including: Matching the side point cloud data with the initial point cloud data corresponding to the initial grid model to obtain a posture transfer matrix, and converting the pre-spraying trajectory into a target spraying trajectory based on the posture transfer matrix; Determine obstacle information corresponding to the lifting tool based on the side point cloud data and the initial grid model; A target spraying posture corresponding to at least one robot is determined based on the obstacle information and the target spraying trajectory.

[0013] According to an automatic spraying method for a workpiece provided by the present invention, the obstacle information corresponding to the hoisting tool is determined based on the side point cloud data and the initial grid model, including: Converting the side point cloud data and the initial grid model to a workpiece coordinate system, and determining a point cloud in the side point cloud data that exceeds a preset distance on the surface of the initial grid model as a target point cloud; Performing clustering processing on the target point cloud to obtain lifting tool point cloud data, and determining a lifting tool grid model based on the lifting tool point cloud data; Obstacle information corresponding to the lifting tool is determined based on the lifting tool grid model.

[0014] According to an automatic spraying method for a workpiece provided by the present invention, the step of determining a target spraying posture corresponding to at least one robot based on the obstacle information and the target spraying trajectory comprises: Determine the spraying area corresponding to each of the robots based on the target spraying trajectory and the position information of each of the robots; For each of the robots, determining an initial spraying posture of the robot in a corresponding spraying area based on the target spraying trajectory; The initial spraying posture corresponding to the robot is corrected based on the obstacle information to determine the target spraying posture corresponding to the robot.

[0015] The present invention also provides an automatic spraying device for a workpiece, comprising the following modules: A first determination module is used to determine a pre-spraying trajectory based on an initial grid model corresponding to the target workpiece; A second determination module is used to determine a target spraying posture corresponding to at least one robot based on the pre-spraying trajectory, the initial grid model and the side point cloud data corresponding to the hoisted workpiece; the hoisted workpiece includes a hoisting tool and the target workpiece, and the hoisting tool is used to hoist the target workpiece; The control module is used to control each robot to spray the target workpiece based on the target spraying posture corresponding to the robot.

[0016] The present invention also provides a robot, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the automatic spraying method for a workpiece as described in any one of the above is implemented.

[0017] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the automatic spraying method for a workpiece as described in any one of the above methods is implemented.

[0018] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned automatic spraying methods for a workpiece.

[0019] The automatic spraying method, device and robot for workpieces provided by the present invention determine the pre-spraying trajectory based on the initial grid model corresponding to the target workpiece, and then determine the target spraying posture corresponding to at least one robot based on the pre-spraying trajectory, the initial grid model and the side point cloud data corresponding to the hoisted workpiece, and further control the robot to spray the target workpiece based on the target spraying posture corresponding to the robot for each robot. The technical solution of the present invention determines the spraying posture of the robot through the grid model and point cloud data of the target workpiece, and then controls the robot to spray the target workpiece, without the need for manual spraying, which reduces labor costs, reduces spraying time, and improves spraying accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0021] Figure 1 It is a schematic flow chart of the automatic spraying method for a workpiece provided by the present invention.

[0022] Figure 2 It is a schematic structural diagram of an automatic spraying device for a workpiece provided by the present invention.

[0023] Figure 3 It is a structural schematic diagram of the robot provided by the present invention. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0025] In view of the above problems in the prior art, the present invention provides an automatic spraying method for a workpiece. Figure 1 Schematic diagram of the process of the automatic spraying method for a workpiece provided by the present invention, such as Figure 1 As shown, the method includes the following steps 110, 120 and 130.

[0026] Step 110: Determine a pre-spraying trajectory based on an initial mesh model corresponding to the target workpiece.

[0027] Specifically, the initial grid model corresponding to the target workpiece can be determined in advance, and then the pre-spraying trajectory can be determined based on the initial grid model corresponding to the target workpiece. The initial grid model is a three-dimensional grid model, and the file type of the initial grid model can be set as needed. The embodiment of the present invention does not make specific limitations here. For example, the file type of the initial grid model can be an stl model file.

[0028] In one embodiment, determining the pre-spraying trajectory based on the initial grid model corresponding to the target workpiece includes: Determine a plurality of partitioned grid models corresponding to the initial grid model; Perform convex hull calculations on each of the partitioned grid models to obtain partitioned envelope grid models corresponding to each of the partitioned grid models; The pre-spraying trajectory is determined based on all the partition envelope grid models and spraying area parameters.

[0029] Specifically, after determining the initial grid model corresponding to the target workpiece, multiple partitioned grid models corresponding to the initial grid model can be determined. Multiple partitioned grid models divide the initial grid model into multiple partitions. Then, the convex hull calculation can be performed on each partitioned grid model to obtain the partitioned envelope grid model corresponding to each partitioned grid model. The partitioned envelope model can better represent the boundary characteristics of each partitioned grid model. After determining the partitioned envelope grid model corresponding to each partitioned grid model, the pre-spraying trajectory can be determined based on all the partitioned envelope grid models and the spraying area parameters. Among them, the spraying area parameters can be pre-configured, and the spraying area parameters can include parameters such as spray width, spray gun type and spray flow rate. The value of each parameter can be set as needed, and the embodiment of the present invention is not specifically limited here.

[0030] In the above embodiment, multiple partitioned mesh models corresponding to the initial mesh model are determined, and convex hull calculation is performed on each partitioned mesh model to obtain partitioned envelope mesh models corresponding to each partitioned mesh model. The partitioned envelope mesh model determined by convex hull calculation can better characterize the boundary of the target workpiece model, and then the pre-spraying trajectory is determined based on all partitioned envelope mesh models and spraying area parameters, so that the determination of the pre-spraying trajectory is more accurate.

[0031] In one embodiment, determining a plurality of partitioned grid models corresponding to the initial grid model comprises: Triangulating the initial mesh model to obtain a triangular mesh model; Determine the normal vectors of all triangular meshes in the triangular mesh model, and determine the triangular meshes whose normal vectors meet the preset screening conditions as target meshes; Performing clustering processing on each of the target grids to obtain a clustering result; Determining a plurality of partition planes according to the clustering result; The triangular mesh model is divided into the plurality of partition mesh models based on the plurality of partition planes.

[0032] Specifically, the initial mesh model can be triangulated to obtain a triangular mesh model, in which the meshes in the triangular mesh model are triangular meshes, and then the normal vectors of all triangular meshes in the triangular mesh model can be determined. The triangular meshes whose normal vectors meet the preset screening conditions can also be determined as target meshes, and the preset screening conditions can be set as needed. Further, all target meshes can be clustered to obtain clustering results, that is, the target meshes are divided into multiple categories. Then, a category of target meshes can be determined as a partition plane, and then the triangular mesh model can be divided into multiple partition mesh models based on multiple partition planes.

[0033] In the above embodiment, by triangulating the initial mesh model, it is convenient to solve the normal vector of each mesh, and then after clustering the target meshes determined based on the normal vectors, the triangular meshes can be clearly divided reasonably.

[0034] In one embodiment, the determining the pre-spraying trajectory based on all the partition envelope grid models and spraying area parameters includes: Merging all the partitioned envelope grid models to obtain a merged envelope grid model; Performing concave hull calculation on the merged envelope grid model to obtain an outer envelope grid model; The pre-spraying trajectory is determined based on the outer envelope mesh model and the spraying area parameters.

[0035] Specifically, all the partitioned envelope mesh models can be merged to obtain a merged envelope mesh model. It is easy to understand that the merged envelope mesh model is a mesh model corresponding to the complete target workpiece. Further, the merged retained mesh model can be subjected to concave hull calculation, and an outer envelope mesh model can be obtained according to the calculation result. The outer envelope mesh model obtained by the concave hull calculation can represent complex shapes.

[0036] Furthermore, the pre-spraying trajectory may be determined based on the outer envelope mesh model and the spraying area parameters.

[0037] In the above embodiment, all partitioned envelope grid models are merged to obtain a merged envelope grid model, which ensures the correspondence between the model and the target workpiece as a whole. Then, the concave hull calculation is performed on the merged envelope grid model to obtain an outer envelope grid model. The outer envelope grid model can characterize complex geometric shapes, and thus can more accurately express the shape of the target workpiece, and the pre-spraying trajectory determined is also more accurate.

[0038] In one embodiment, the determining the pre-spraying trajectory based on the outer envelope grid model and the spraying area parameters includes: Sampling the outer envelope grid model to obtain outer envelope point cloud data; Based on the spraying area parameters, trajectory points are extracted from the outer envelope point cloud data to obtain the pre-spraying trajectory; wherein the spraying area parameters at least include the spray width.

[0039] Specifically, in order to improve the accuracy of the pre-spraying trajectory, the pre-spraying trajectory can be determined by using the point cloud data sampling method. Therefore, the outer envelope grid model can be sampled first to obtain the outer envelope point cloud data, and then the trajectory points can be extracted from the outer envelope point cloud data based on the spraying area parameters, and the extracted trajectory points are spliced ​​to obtain the pre-spraying trajectory. The spraying area parameters need to include at least the spray width.

[0040] In the above embodiment, the outer envelope grid model is sampled to obtain outer envelope point cloud data, and trajectory points are extracted from the outer envelope point cloud data based on the spraying area parameters to obtain the pre-spraying trajectory, so that the pre-spraying trajectory is more reasonable and accurate.

[0041] Step 120: Determine a target spraying posture corresponding to at least one robot based on the pre-spraying trajectory, the initial grid model, and the side point cloud data corresponding to the hoisted workpiece; the hoisted workpiece includes a hoisting tool and the target workpiece, and the hoisting tool is used to hoist the target workpiece.

[0042] Specifically, the target spraying posture corresponding to at least one robot can be determined based on the pre-spraying trajectory, the initial grid model, and the side point cloud data corresponding to the hoisted workpiece. The side point cloud data can be acquired by a three-dimensional camera, and the hoisted workpiece includes a hoisting tool and a target workpiece. The hoisting tool is used to hoist the target workpiece. For example, the hoisting tool can be a hanging iron chain, and the non-hanging end of the iron chain is used to fix the target workpiece.

[0043] In one embodiment, the determining of a target spraying posture corresponding to at least one robot based on the pre-spraying trajectory, the initial grid model, and the side point cloud data corresponding to the hoisted workpiece includes: Matching the side point cloud data with the initial point cloud data corresponding to the initial grid model to obtain a posture transfer matrix, and converting the pre-spraying trajectory into a target spraying trajectory based on the posture transfer matrix; Determine obstacle information corresponding to the lifting tool based on the side point cloud data and the initial grid model; A target spraying posture corresponding to at least one robot is determined based on the obstacle information and the target spraying trajectory.

[0044] Specifically, the side point cloud data can be matched with the initial point cloud data corresponding to the initial mesh model to obtain the pose transfer matrix, and then the pre-spraying trajectory can be converted into the target spraying trajectory based on the pose transfer matrix. It is easy to understand that the pre-spraying trajectory is obtained only based on the mesh model, and the influence of the lifting tools is not considered. Therefore, the pre-spraying trajectory may be different from the actual spraying situation. The side point cloud data reflects the actual spraying situation. The target spraying trajectory obtained after matching and correction will be more accurate.

[0045] Furthermore, since the side point cloud data also includes point cloud data corresponding to the lifting tool used to lift the target workpiece, it is possible to determine which point clouds are point cloud data corresponding to the lifting tool by comparing with the initial mesh model. Therefore, the obstacle information corresponding to the lifting tool can be determined based on the side point cloud data and the initial mesh model, that is, the point cloud data corresponding to the lifting tool can be obtained by comparing the side point cloud data and the initial mesh model.

[0046] Furthermore, determining the spraying posture of the robot based only on the target spraying trajectory may result in unnecessary spraying of the hoisting tool, resulting in a waste of resources. Therefore, the target spraying posture corresponding to at least one robot may be determined based on the obstacle information and the target spraying trajectory.

[0047] In the above embodiment, the side point cloud data is matched with the initial point cloud data corresponding to the initial mesh model to obtain a posture transfer matrix, and the pre-spraying trajectory is converted into a target spraying trajectory based on the posture transfer matrix. The obtained target spraying trajectory is more in line with the actual spraying requirements, and then the obstacle information corresponding to the lifting tool is determined based on the side point cloud data and the initial mesh model, and the target spraying posture corresponding to at least one robot is determined based on the obstacle information and the target spraying trajectory, so that the target spraying posture includes obstacle avoidance.

[0048] In one embodiment, determining the obstacle information corresponding to the lifting tool based on the side point cloud data and the initial grid model includes: Converting the side point cloud data and the initial grid model to a workpiece coordinate system, and determining a point cloud in the side point cloud data that exceeds a preset distance on the surface of the initial grid model as a target point cloud; Performing clustering processing on the target point cloud to obtain lifting tool point cloud data, and determining a lifting tool grid model based on the lifting tool point cloud data; Obstacle information corresponding to the lifting tool is determined based on the lifting tool grid model.

[0049] Specifically, in order to compare the side point cloud data with the initial mesh model to obtain obstacle information, the side point cloud data and the initial mesh model need to be converted to the same coordinate system. Therefore, the side point cloud data and the initial mesh model can be converted to the workpiece coordinate system according to the aforementioned posture transfer matrix, and the side point cloud data and the initial mesh model can also be aligned, and the point cloud in the side point cloud data that exceeds the surface preset distance of the initial mesh model is determined as the target point cloud. The preset distance can be set as needed, and the embodiment of the present invention does not make specific limitations here.

[0050] Furthermore, the target point cloud can be clustered and filtered to obtain lifting tool point cloud data, and the lifting tool point cloud data can be converted into a lifting tool grid model, and then the obstacle information can be determined based on the lifting tool grid model.

[0051] In the above embodiment, the side point cloud data and the initial grid model are converted to the same coordinate system for comparison, so that accurate obstacle information can be obtained, which lays a foundation for the robot to avoid lifting tools when spraying the target workpiece.

[0052] In one embodiment, determining a target spraying posture corresponding to at least one robot based on the obstacle information and the target spraying trajectory includes: Determine the spraying area corresponding to each of the robots based on the target spraying trajectory and the position information of each of the robots; For each of the robots, determining an initial spraying posture of the robot in a corresponding spraying area based on the target spraying trajectory; The initial spraying posture corresponding to the robot is corrected based on the obstacle information to determine the target spraying posture corresponding to the robot.

[0053] Specifically, the spraying area corresponding to each robot can be determined based on the target spraying trajectory and the position information of each robot. It is easy to understand that when there are multiple robots, each robot corresponds to a spraying area, and the collection of all spraying areas constitutes the total spraying area corresponding to the target spraying trajectory. The spraying area corresponding to the robot can be divided according to its position information.

[0054] Furthermore, for each robot, the initial spraying posture of the robot in the corresponding spraying area is determined based on the target spraying trajectory, and the initial spraying posture may include the movement information of the robot, the joint movement information of the robot, and the opening and closing of the spray gun during the corresponding spraying process. Then, the initial spraying posture corresponding to the robot can be corrected based on the obstacle information to determine the target spraying posture corresponding to the robot.

[0055] In the above embodiment, a different spraying area is allocated to each robot, which improves the overall spraying efficiency, and the initial spraying posture corresponding to the robot is corrected based on the obstacle information. The obtained target spraying posture prevents the robot from spraying the lifting tool unnecessarily.

[0056] Step 130: For each of the robots, control the robot to spray the target workpiece based on the target spraying posture corresponding to the robot.

[0057] Specifically, for each robot, the robot can be controlled to spray the target workpiece based on the target spraying posture corresponding to the robot, and then after the spraying is completed, the sprayed target workpiece can be obtained. The target spraying posture can be sent to the robot in the form of a spraying program to control the robot.

[0058] The automatic spraying method for workpieces provided by the present invention determines the pre-spraying trajectory based on the initial grid model corresponding to the target workpiece, and then determines the target spraying posture corresponding to at least one robot based on the pre-spraying trajectory, the initial grid model and the side point cloud data corresponding to the hoisted workpiece, and further controls the robot to spray the target workpiece based on the target spraying posture corresponding to the robot for each robot. The technical solution of the present invention determines the spraying posture of the robot through the grid model and point cloud data of the target workpiece, and then controls the robot to spray the target workpiece, without the need for manual spraying, which reduces labor costs, reduces spraying time, and improves spraying accuracy.

[0059] The automatic spray coating device for a workpiece provided by the present invention is described below. The automatic spray coating device for a workpiece described below and the automatic spray coating method for a workpiece described above can be referred to each other.

[0060] Figure 2 Schematic diagram of the structure of the automatic spraying device for workpieces provided by the present invention, such as Figure 2 As shown, the automatic spraying device 200 includes the following modules: A first determination module 210 is used to determine a pre-spraying trajectory based on an initial grid model corresponding to the target workpiece; A second determination module 220 is used to determine a target spraying posture corresponding to at least one robot based on the pre-spraying trajectory, the initial grid model, and the side point cloud data corresponding to the hoisted workpiece; the hoisted workpiece includes a hoisting tool and the target workpiece, and the hoisting tool is used to hoist the target workpiece; The control module 230 is used to control each of the robots to spray the target workpiece based on the target spraying posture corresponding to the robot.

[0061] In one embodiment, the first determining module 210 is specifically configured to: Determine a plurality of partitioned grid models corresponding to the initial grid model; Perform convex hull calculations on each of the partitioned grid models to obtain partitioned envelope grid models corresponding to each of the partitioned grid models; The pre-spraying trajectory is determined based on all the partition envelope grid models and spraying area parameters.

[0062] In one embodiment, the first determining module 210 is further configured to: Triangulating the initial mesh model to obtain a triangular mesh model; Determine the normal vectors of all triangular meshes in the triangular mesh model, and determine the triangular meshes whose normal vectors meet the preset screening conditions as target meshes; Performing clustering processing on each of the target grids to obtain a clustering result; Determining a plurality of partition planes according to the clustering result; The triangular mesh model is divided into the plurality of partition mesh models based on the plurality of partition planes.

[0063] In one embodiment, the first determining module 210 is further configured to: Merging all the partitioned envelope grid models to obtain a merged envelope grid model; Performing concave hull calculation on the merged envelope grid model to obtain an outer envelope grid model; The pre-spraying trajectory is determined based on the outer envelope mesh model and the spraying area parameters.

[0064] In one embodiment, the first determining module 210 is further configured to: Sampling the outer envelope grid model to obtain outer envelope point cloud data; Based on the spraying area parameters, trajectory points are extracted from the outer envelope point cloud data to obtain the pre-spraying trajectory; wherein the spraying area parameters at least include the spray width.

[0065] In one embodiment, the second determining module 220 is specifically configured to: Matching the side point cloud data with the initial point cloud data corresponding to the initial grid model to obtain a posture transfer matrix, and converting the pre-spraying trajectory into a target spraying trajectory based on the posture transfer matrix; Determine obstacle information corresponding to the lifting tool based on the side point cloud data and the initial grid model; A target spraying posture corresponding to at least one robot is determined based on the obstacle information and the target spraying trajectory.

[0066] In one embodiment, the second determining module 220 is further configured to: Converting the side point cloud data and the initial grid model to a workpiece coordinate system, and determining a point cloud in the side point cloud data that exceeds a preset distance on the surface of the initial grid model as a target point cloud; Performing clustering processing on the target point cloud to obtain lifting tool point cloud data, and determining a lifting tool grid model based on the lifting tool point cloud data; Obstacle information corresponding to the lifting tool is determined based on the lifting tool grid model.

[0067] In one embodiment, the second determining module 220 is further configured to: Determine the spraying area corresponding to each of the robots based on the target spraying trajectory and the position information of each of the robots; For each of the robots, determining an initial spraying posture of the robot in a corresponding spraying area based on the target spraying trajectory; The initial spraying posture corresponding to the robot is corrected based on the obstacle information to determine the target spraying posture corresponding to the robot.

[0068] The automatic spraying device for workpieces provided by the present invention determines the pre-spraying trajectory based on the initial grid model corresponding to the target workpiece, and then determines the target spraying posture corresponding to at least one robot based on the pre-spraying trajectory, the initial grid model and the side point cloud data corresponding to the hoisted workpiece, and further controls the robot to spray the target workpiece based on the target spraying posture corresponding to the robot for each robot. The technical solution of the present invention determines the spraying posture of the robot through the grid model and point cloud data of the target workpiece, and then controls the robot to spray the target workpiece, without the need for manual spraying, which reduces labor costs, reduces spraying time, and improves spraying accuracy.

[0069] Figure 3 The following is an example of a robot physical structure diagram: Figure 3As shown, the robot may include: a processor 310, a communications interface 320, a memory 330 and a communication bus 340, wherein the processor 310, the communications interface 320 and the memory 330 communicate with each other through the communication bus 340. The processor 310 may call the logic instructions in the memory 330 to execute an automatic spraying method for a workpiece, the method comprising: Determine the pre-spraying trajectory based on the initial mesh model corresponding to the target workpiece; Determining a target spraying posture corresponding to at least one robot based on the pre-spraying trajectory, the initial grid model, and the side point cloud data corresponding to the hoisted workpiece; the hoisted workpiece includes a hoisting tool and the target workpiece, and the hoisting tool is used to hoist the target workpiece; For each of the robots, the robot is controlled to spray the target workpiece based on the target spraying posture corresponding to the robot.

[0070] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0071] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the automatic spraying method for a workpiece provided by the above methods, the method comprising: Determine the pre-spraying trajectory based on the initial mesh model corresponding to the target workpiece; Determining a target spraying posture corresponding to at least one robot based on the pre-spraying trajectory, the initial grid model, and the side point cloud data corresponding to the hoisted workpiece; the hoisted workpiece includes a hoisting tool and the target workpiece, and the hoisting tool is used to hoist the target workpiece; For each of the robots, the robot is controlled to spray the target workpiece based on the target spraying posture corresponding to the robot.

[0072] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the automatic spraying method for a workpiece provided by the above methods, the method comprising: Determine the pre-spraying trajectory based on the initial mesh model corresponding to the target workpiece; Determining a target spraying posture corresponding to at least one robot based on the pre-spraying trajectory, the initial grid model, and the side point cloud data corresponding to the hoisted workpiece; the hoisted workpiece includes a hoisting tool and the target workpiece, and the hoisting tool is used to hoist the target workpiece; For each of the robots, the robot is controlled to spray the target workpiece based on the target spraying posture corresponding to the robot.

[0073] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0074] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0075] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An automatic spraying method for a workpiece, characterized in that: include: Determine the pre-spraying trajectory based on the initial mesh model corresponding to the target workpiece; Determining a target spraying posture corresponding to at least one robot based on the pre-spraying trajectory, the initial grid model, and the side point cloud data corresponding to the hoisted workpiece; the hoisted workpiece includes a hoisting tool and the target workpiece, and the hoisting tool is used to hoist the target workpiece; For each of the robots, the robot is controlled to spray the target workpiece based on the target spraying posture corresponding to the robot.

2. The automatic spraying method for a workpiece according to claim 1, characterized in that: The determining of the pre-spraying trajectory based on the initial grid model corresponding to the target workpiece includes: Determine a plurality of partitioned grid models corresponding to the initial grid model; Perform convex hull calculations on each of the partitioned grid models to obtain partitioned envelope grid models corresponding to each of the partitioned grid models; The pre-spraying trajectory is determined based on all the partition envelope grid models and spraying area parameters.

3. The automatic spraying method for a workpiece according to claim 2, characterized in that: The determining of a plurality of partitioned grid models corresponding to the initial grid model comprises: Triangulating the initial mesh model to obtain a triangular mesh model; Determine the normal vectors of all triangular meshes in the triangular mesh model, and determine the triangular meshes whose normal vectors meet the preset screening conditions as target meshes; Performing clustering processing on each of the target grids to obtain a clustering result; Determining a plurality of partition planes according to the clustering result; The triangular mesh model is divided into the plurality of partition mesh models based on the plurality of partition planes.

4. The automatic spraying method for a workpiece according to claim 2, characterized in that: The determining of the pre-spraying trajectory based on all the partition envelope grid models and spraying area parameters comprises: Merging all the partitioned envelope grid models to obtain a merged envelope grid model; Performing concave hull calculation on the merged envelope grid model to obtain an outer envelope grid model; The pre-spraying trajectory is determined based on the outer envelope mesh model and the spraying area parameters.

5. The automatic spraying method for a workpiece according to claim 4, characterized in that: The determining the pre-spraying trajectory based on the outer envelope grid model and the spraying area parameters comprises: Sampling the outer envelope grid model to obtain outer envelope point cloud data; Based on the spraying area parameters, trajectory points are extracted from the outer envelope point cloud data to obtain the pre-spraying trajectory; wherein the spraying area parameters at least include the spray width.

6. The automatic spraying method for a workpiece according to any one of claims 1 to 5, characterized in that: The determining of a target spraying posture corresponding to at least one robot based on the pre-spraying trajectory, the initial grid model, and the side point cloud data corresponding to the hoisted workpiece includes: Matching the side point cloud data with the initial point cloud data corresponding to the initial grid model to obtain a posture transfer matrix, and converting the pre-spraying trajectory into a target spraying trajectory based on the posture transfer matrix; Determine obstacle information corresponding to the lifting tool based on the side point cloud data and the initial grid model; A target spraying posture corresponding to at least one robot is determined based on the obstacle information and the target spraying trajectory.

7. The automatic spraying method for a workpiece according to claim 6, characterized in that: The determining the obstacle information corresponding to the lifting tool based on the side point cloud data and the initial grid model includes: Converting the side point cloud data and the initial grid model to a workpiece coordinate system, and determining a point cloud in the side point cloud data that exceeds a preset distance on the surface of the initial grid model as a target point cloud; Performing clustering processing on the target point cloud to obtain lifting tool point cloud data, and determining a lifting tool grid model based on the lifting tool point cloud data; Obstacle information corresponding to the lifting tool is determined based on the lifting tool grid model.

8. The automatic spraying method for a workpiece according to claim 6, characterized in that: The determining of a target spraying posture corresponding to at least one robot based on the obstacle information and the target spraying trajectory includes: Determine the spraying area corresponding to each of the robots based on the target spraying trajectory and the position information of each of the robots; For each of the robots, determining an initial spraying posture of the robot in a corresponding spraying area based on the target spraying trajectory; The initial spraying posture corresponding to the robot is corrected based on the obstacle information to determine the target spraying posture corresponding to the robot.

9. An automatic spraying device for a workpiece, characterized in that: include: A first determination module is used to determine a pre-spraying trajectory based on an initial grid model corresponding to the target workpiece; A second determination module is used to determine a target spraying posture corresponding to at least one robot based on the pre-spraying trajectory, the initial grid model and the side point cloud data corresponding to the hoisted workpiece; the hoisted workpiece includes a hoisting tool and the target workpiece, and the hoisting tool is used to hoist the target workpiece; The control module is used to control each robot to spray the target workpiece based on the target spraying posture corresponding to the robot.

10. A robot comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the automatic spraying method for a workpiece as claimed in any one of claims 1 to 8 is implemented.