Automobile part paint spraying path optimization method and system based on data processing
By optimizing the three-dimensional surface model of automotive parts and the painting path planning, the problem of ineffective movement of the robotic arm during the painting process was solved, achieving more efficient painting effects and extending the life of the robotic arm.
Patent Information
- Application Number
- CN202511163573.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-20
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-08-20
AI Technical Summary
In the prior art, the robot arm does not take into account the actual situation of automobile parts during the painting process, resulting in the spray gun moving too long or having many invalid rotations, which affects the painting efficiency.
By obtaining the three-dimensional surface model of automobile parts, merging and processing the triangular meshes in the local range, determining the key painting points and optimizing the painting path, using the objective function minimization algorithm to plan the painting path, and combining historical painting path adjustment and virtual collision detection to optimize the painting process.
It reduces the ineffective movement of the spray gun during the painting process, improves the painting efficiency, extends the service life of the robotic arm, and improves the consistency and efficiency of the painting effect.
Smart Images

Figure CN120671407A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method and system for optimizing the painting path of automobile parts based on data processing. Background Art
[0002] Painting auto parts is an indispensable part of automobile manufacturing. Painting can form a protective film on the surface of parts to prevent them from rusting or corroding due to long-term exposure to the air, thereby extending the service life of auto parts. By painting auto parts, the durability of auto parts can also be improved. The surface of the parts after painting has higher wear resistance and UV resistance, and can better resist the erosion of the external environment, thereby maintaining the performance and appearance of auto parts.
[0003] Currently, a spray gun can be set at the end of a robotic arm. The spray gun moves more flexibly under the drive of the robotic arm, thereby changing the position of the spray gun during painting and the painting angle relative to the painting position of the automobile parts. When the position of the spray gun reaches a predetermined position and the angle between the spray gun and the automobile parts reaches a predetermined angle, the spray gun can be controlled to spray paint, thereby achieving painting of automobile parts.
[0004] In the related technology, the robotic arm can move according to a preset trajectory and speed through a preset program. During the movement of the robotic arm, the spray gun maintains a certain distance (for example, 15 cm to 30 cm) from the surface of the workpiece to be painted, ensuring the surface painting effect of the automotive parts.
[0005] Currently, when using a spray gun to paint automobile parts, the pre-set movement trajectory of the spray gun may not be determined in combination with the actual situation of the automobile parts. In order to ensure the painting effect of the automobile parts, the spray gun needs to move a long distance, or the spray gun performs a large number of ineffective rotations, which affects the efficiency of painting the automobile parts. Summary of the Invention
[0006] In order to improve the efficiency of painting automobile parts, the present application provides a method and system for optimizing the painting path of automobile parts based on data processing.
[0007] According to a first aspect of an embodiment of the present application, a method for optimizing a painting path for automobile parts based on data processing is provided, comprising: obtaining an initial three-dimensional surface model of a surface to be painted of an automobile part, the initial three-dimensional surface model being obtained by constructing a triangular mesh based on three-dimensional point cloud data of the surface to be painted; determining whether to merge the triangular meshes within a local range in the initial three-dimensional surface model based on a difference in normal vectors of the triangular meshes within the local range to obtain a target three-dimensional surface model after processing the initial three-dimensional surface model; determining all key painting points that need to be passed through by painting from the target three-dimensional surface model, and determining a cost value for painting between two key painting points based on the distance between the two key painting points, the angular change required for painting, and the curvature at the two key painting points; taking the sum of the cost values of adjacent key painting points in the painting path as an objective function, and determining a target painting path with the objective function minimized as the goal, so as to paint the surface to be painted along the target painting path.
[0008] In this way, the ineffective movement time of the spray gun during the painting process can be reduced, thereby improving the painting efficiency of automobile parts.
[0009] Optionally, based on the difference in normal vectors of the triangular meshes within a local range in the initial three-dimensional surface model, it is determined whether to merge the triangular meshes within the local range, including: determining a representative vector of the normal vectors of the triangular meshes within the local range, and determining the painting difficulty value of the local range based on the degree of difference in direction between the normal vectors of the triangular meshes within the local range and the representative vector; when the painting difficulty values of two adjacent local ranges are both less than a preset painting difficulty threshold, determining to merge the triangular meshes of the two adjacent local ranges.
[0010] Optionally, the triangular meshes of two adjacent local ranges are merged, including: for two adjacent triangular meshes in the total local range composed of the two local ranges, determining new position points of the two adjacent triangular meshes according to the average value of the normal vectors of the triangular meshes in the total local range; connecting the new position points with the boundaries of the two adjacent triangular meshes respectively to obtain the merging result of the two adjacent triangular meshes, so as to complete the merging of all two adjacent triangular meshes that have not been merged in the total local range.
[0011] In this way, the sub-regions of the total local range after the triangular mesh is merged can be made smoother, which facilitates the painting of the total local range, reduces the number of times or angles of rotation of the spray gun, and improves the service life of the rotating parts of the robotic arm.
[0012] Optionally, the cost of painting between two key painting points is determined by: determining a first ratio between the angle change required for painting the two key painting points and the maximum angle change, and determining a first sum of the first ratio and a first preset positive number; determining the maximum curvature among the normalized curvatures at the two key painting points, and determining a second sum of the maximum curvature and a second preset positive number; multiplying the normalized distance between the two key painting points, the first sum, and the second sum to obtain the cost of painting between the two key painting points.
[0013] In this way, the normalized distance between two key painting points and the complexity of the surface can be comprehensively considered, which facilitates the planning of the painting path of automobile parts.
[0014] Optionally, all key painting points that need to be passed through during painting are determined from the target three-dimensional surface model, including: determining a target interval for selecting key painting points from the local range based on the curvature of the vertices in the local range in the target three-dimensional surface model, so as to select the key painting points from the local range according to the target interval; the target interval is positively correlated with the average value of the curvature of all vertices of the triangular mesh in the local range.
[0015] Optionally, the target painting path is determined with the objective of minimizing the objective function, including: searching the painting path using a target optimization algorithm with the objective of minimizing the objective function, and taking the painting path obtained when the search process converges as the target painting path; wherein the target optimization algorithm is any one of a genetic algorithm, an ant colony algorithm, a simulated annealing algorithm, and a particle swarm optimization algorithm.
[0016] In this way, the painting path can be searched and a more accurate target painting path can be obtained.
[0017] Optionally, painting the surface to be painted along the target painting path includes: painting the surface to be painted along the target painting path, and painting the target position point in the target painting path according to the curvature information of the target position point in the target painting path in the target three-dimensional surface model, at a driving speed inversely proportional to the curvature information.
[0018] Optionally, the method also includes: determining the angle between the driving direction of the previous position point and the driving direction of the next position point of the target painting path, and when the angle is greater than a preset angle threshold, performing multiple spline interpolation processing on the sub-path between adjacent position points, so as to re-use the path obtained after multiple spline interpolation processing on the sub-path as the target painting path.
[0019] In this way, the shaking caused by the possible sharp turns of the robotic arm during the movement can be avoided, thereby increasing the service life of the robotic arm that drives the spray gun to move.
[0020] Optionally, the method also includes: obtaining a historical painting path of a painted surface of the same model whose painting results have passed inspection, and a historical three-dimensional surface model of the painted surface of the same model; matching the target three-dimensional surface model and the historical three-dimensional surface model, adjusting the historical painting path according to the difference information obtained from the matching to obtain a candidate painting path, and storing the correspondence between the target three-dimensional surface model and the candidate painting path.
[0021] In this way, the correspondence between the target three-dimensional surface model and the candidate painting paths can be stored, which facilitates the direct call of the matching painting path in the subsequent painting process, thereby improving the painting efficiency of automobile parts.
[0022] According to a second aspect of an embodiment of the present application, a data processing-based automobile parts painting path optimization system is provided, comprising: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the steps of the data processing-based automobile parts painting path optimization method provided in the first aspect of the present application are implemented.
[0023] The technical solution provided by the embodiments of the present application may include the following beneficial effects: obtaining an initial three-dimensional surface model of the surface to be painted of an automobile part, and determining whether to merge the triangular meshes within a local range of the initial three-dimensional surface model based on the difference in the normal vectors of the triangular meshes within a local range to obtain a target three-dimensional surface model; the target three-dimensional surface model helps to reduce the number of rotations or adjustments of the movement direction of the spray gun by the robotic arm during the painting process; the sum of the cost values of adjacent key painting points in the painting path is used as the objective function, and the target painting path is determined with the goal of minimizing the objective function. The obtained target painting path can achieve the global optimization of the painting process, and painting the surface to be painted along the target painting path can reduce the ineffective movement time of the spray gun during the painting process, thereby improving the painting efficiency of automobile parts.
[0024] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 This is a flow chart showing a method for optimizing a painting path for automobile parts based on data processing according to an exemplary embodiment; Figure 2The figure is a schematic structural diagram of a system for optimizing the painting path of automobile parts based on data processing according to an exemplary embodiment. DETAILED DESCRIPTION
[0026] In order to improve the painting efficiency of automobile parts during the painting process, the embodiment of the present application provides a method and system for optimizing the painting path of automobile parts based on data processing. Figure 1 FIG. 1 is a flow chart showing a method for optimizing a painting path of an automobile part based on data processing according to an exemplary embodiment. Figure 1 As shown, the method includes the following steps.
[0027] In step S101 , an initial three-dimensional surface model of the surface to be painted of an automobile part is obtained.
[0028] The initial three-dimensional surface model is obtained by constructing a triangular mesh based on the three-dimensional point cloud data of the surface to be painted.
[0029] A 3D laser scanner can be used to pre-scan the surface of the automobile part to be painted in all directions to obtain 3D point cloud data of the surface to be painted. The 3D point cloud data includes the 3D coordinates of different position points on the surface of the automobile part to be painted.
[0030] Based on the obtained point cloud data, the point cloud data can be processed using algorithms such as Delaunay triangulation and Poisson surface reconstruction algorithm to obtain an initial three-dimensional surface model composed of triangular meshes.
[0031] The density of the triangular mesh can be determined based on actual conditions such as the coverage radius of the spray gun. For example, in order to improve the accuracy of the triangular mesh, a higher density can be used to construct the initial three-dimensional surface model; or, if the surface of the automotive parts is relatively flat, a lower density can be used to construct the initial three-dimensional surface model.
[0032] The process of constructing the three-dimensional surface model can be specifically executed by a terminal with stronger computing power, such as a server, and after completion, the obtained three-dimensional surface model is sent to a terminal device used to control the painting process of automobile parts.
[0033] By obtaining an initial three-dimensional surface model of the surface to be painted of an automobile part, the actual condition of the surface to be painted of the automobile part can be understood, so that a matching painting path can be determined for the surface to be painted based on the actual condition of the surface to be painted of the automobile part; the automobile part can be a component in a vehicle such as a frame or a door that needs to be painted.
[0034] In step S102, based on the difference in normal vectors of the triangular meshes in the local range of the initial 3D surface model, it is determined whether to merge the triangular meshes in the local range to obtain a target 3D surface model after processing the initial 3D surface model.
[0035] The normal vector of a triangular mesh can reflect the direction of the triangular mesh. For the same local range in the initial three-dimensional surface model, if the normal vectors of multiple triangular meshes in the local range are relatively similar, it means that the directions of the multiple triangular meshes in the local range are relatively consistent and the multiple triangular meshes in the local range are relatively flat.
[0036] On the contrary, for the same local range in the initial three-dimensional surface model, if the normal vectors of multiple triangular meshes in the local range are greatly different, it means that the directions of the multiple triangular meshes in the local range are greatly different, and the shapes of the multiple triangular meshes in the local range may be more complex. The local range may correspond to a more complex surface area of an automotive part; for example, the door handle area of a car door.
[0037] In order to ensure the processing accuracy of the more complex surface areas of automobile parts and reduce the processing difficulty of the relatively flat surface areas of automobile parts, it is possible to determine whether to merge the triangular meshes in the local range based on the difference in the normal vectors of the triangular meshes in the local range in the initial three-dimensional surface model.
[0038] In one embodiment, based on the difference in normal vectors of triangular meshes within a local range in an initial three-dimensional surface model, determining whether to merge the triangular meshes within the local range includes: determining a representative vector of the normal vectors of the triangular meshes within the local range, and determining a painting difficulty value of the local range based on the degree of difference in direction between the normal vectors of the triangular meshes within the local range and the representative vector; when the painting difficulty values of two adjacent local ranges are both less than a preset painting difficulty threshold, determining to merge the triangular meshes of the two adjacent local ranges.
[0039] The painting difficulty value of the local range is determined based on the degree of difference in direction between the normal vector of the triangular mesh in the local range and the representative vector, so that the difficulty of painting the local range can be quantified; the higher the painting difficulty value of the local area, the more complex the surface of the local area, and the higher the difficulty of painting the local area, which may require a more complex painting trajectory or more changes in the painting angle.
[0040] On the contrary, the lower the painting difficulty value of a local area, the simpler the surface of the local area is, and the lower the difficulty of painting the local area. When painting the local area, it may be possible to effectively paint the entire local area at the same painting angle.
[0041] When the painting difficulty values of two adjacent local areas are both less than the preset painting difficulty threshold, it means that the painting difficulty of the two adjacent local areas is relatively small, and the two adjacent local areas may be relatively flat. The painting of these two local areas can be effectively achieved by adjusting the painting angle fewer times.
[0042] When the painting difficulty values of two adjacent local ranges are both less than the preset painting difficulty threshold, it is determined that the triangular meshes of the two adjacent local ranges are merged. This can achieve the screening of the triangular mesh areas that need to be merged, facilitate the subsequent planning of the painting paths for these adjacent local ranges, and reduce the number of changes in the painting angle during the painting process.
[0043] The preset painting difficulty threshold can be set according to actual needs. When the painting difficulty value is normalized, the preset painting difficulty threshold can be set between 0.3 and 0.4.
[0044] When the painting difficulty value of at least one of two adjacent local ranges is greater than or equal to a preset painting difficulty threshold, it can be determined that the triangular meshes of the two adjacent local ranges are retained in their original directions instead of being merged, taking into account the painting effects of the more complex and relatively flat areas of the surface to be painted of the automobile parts.
[0045] For the more complex areas on the surface of automobile parts to be painted, the shapes of the more complex areas can be completely preserved, thereby ensuring the painting effect of the more complex areas on the surface to be painted; for the relatively flat areas on the surface of automobile parts to be painted, the number of times the painting angle is adjusted during the painting process can be reduced, the service life of the rotating structure of the robotic arm can be increased, and the time required for painting the relatively flat areas can be shortened, thereby improving the painting efficiency of automobile parts.
[0046] In one embodiment, the triangular meshes of two adjacent local ranges are merged, including: for two adjacent triangular meshes in the total local range composed of the two local ranges, newly added position points of the two adjacent triangular meshes are determined according to the average value of the normal vectors of the triangular meshes in the total local range; the newly added position points are connected to the boundaries of the two adjacent triangular meshes respectively to obtain the merging result of the two adjacent triangular meshes, so as to complete the merging of all two adjacent triangular meshes that have not been merged in the total local range.
[0047] The two local ranges to be subjected to the merging process of the triangular meshes may be two adjacent local ranges that are similar in the direction of the average vector, so as to perform the painting process on a relatively flat surface area of the automobile part.
[0048] For example, the total local range composed of two local ranges may include multiple triangular meshes with the same direction; or, there may be some triangular meshes with different directions in the total local range, but the directions of these triangular meshes with different directions are relatively similar, so that the painting processing of these triangular meshes in the total local range can be achieved through the same painting direction or a smoother painting path.
[0049] Determining the newly added position points of two adjacent triangular meshes based on the average value of the normal vectors of the triangular meshes within the total local range can include: determining a target normal vector where the average value of the normal vectors of the triangular meshes within the total local range is located; determining a target plane perpendicular to the target normal vector, the target plane passing through two vertices of the two adjacent triangular meshes other than the endpoints of the common edge; determining the newly added position points based on the common edge of the two adjacent triangular meshes and the target plane; the shortest distance from the newly added position point to the target plane is equal to the shortest distance from the newly added position point to the common edge of the two adjacent triangular meshes.
[0050] For example, for two adjacent triangular meshes within the total local range, it can include vertices P1, P2, P3 and P4, where P2 and P3 are the two endpoints of the common edge of the two adjacent triangular meshes, and P1 and P4 are respectively located in different triangular meshes in the two adjacent triangular meshes; P1, P2 and P3 are located in one triangular mesh of the two adjacent triangular meshes, and P2, P3 and P4 are located in the other triangular mesh of the two adjacent triangular meshes.
[0051] The target normal vector at the average value of the normal vectors of the triangular meshes within the total local range can be determined, and a target plane perpendicular to the target normal vector can be determined. The target plane passes through vertices P1 and P4. The newly added position point P5 can be determined based on the common edge of the two adjacent triangular meshes and the target plane; the shortest distance from the newly added position point P5 to the target plane is equal to the shortest distance from the newly added position point P5 to the common edge of the two adjacent triangular meshes.
[0052] If the line segment between vertices P1 and P4 is L1, the line segment between P2 and P3 is L2, and the newly added position point P5 is between the line segment L1 and the line segment L2; the position point P5 can be connected with P1, P2, P3 and P4 in sequence to form multiple triangular meshes after merging. The triangular mesh after merging is smoother than the triangular mesh before merging, and the difference between the two triangular meshes before merging is smaller.
[0053] Furthermore, the merging process is determined based on the average value of the normal vectors of the triangular meshes within the total local range. After completing the merging of the triangular meshes that have not been merged in the entire total local range, the overall direction of the total local range after the merging of the triangular meshes can be made consistent with the original overall direction while maintaining the original vertices, and the sub-areas of the total local range can be made smoother, which is convenient for painting the total local range.
[0054] In the total local range obtained after merging the unmerged triangular meshes, the robotic arm can perform smoother operations and ensure the painting effect on the total local range when driving the spray gun to paint the surface of the total local range.
[0055] For example, the number of rotations or angles of the spray gun can be reduced, the service life of the rotating parts of the robot arm can be increased, and the ineffective movement of the robot arm during the painting process can be avoided, thereby improving the painting efficiency of the total local range.
[0056] In step S103, all key painting points that need to be passed through by painting are determined from the target three-dimensional surface model, and the cost of painting between two key painting points is determined based on the distance between the two key painting points, the angle change required for painting, and the curvature at the two key painting points.
[0057] The spray gun has a corresponding coverage diameter when performing a painting operation. By controlling the spray gun to spray all key painting points on the surface of the automotive part to be painted, the painting process of the entire surface to be painted can be completed. Therefore, all key painting points that the paint needs to pass through can be determined from the target three-dimensional surface model, so as to determine a more matching painting path for the surface to be painted.
[0058] In one embodiment, all key painting points that need to be passed through during painting are determined from a target three-dimensional surface model, including: determining a target interval for selecting key painting points from a local range based on the curvature of vertices in a local range in the target three-dimensional surface model, so as to select key painting points from the local range according to the target interval; the target interval is positively correlated with the average value of the curvature of all vertices of the triangular mesh in the local range.
[0059] The curvature of the vertices of the triangular mesh in a local range can reflect the sharpness of the triangular mesh in the local range, and can also reflect the magnitude of the change in the painting angle when painting the local range. In order to better realize the painting of areas with higher complexity and to improve the painting efficiency in areas with lower complexity, the key point selection strategy can be adaptively determined based on the actual conditions of different areas.
[0060] When the average value of the curvature of all vertices of the triangular mesh in the local range is greater than the preset curvature threshold, the key painting points can be selected from the local range according to the first preset interval; when the average value of the curvature of all vertices of the triangular mesh in the local range is less than or equal to the preset curvature threshold, the key painting points can be selected from the local range according to the second preset interval; the first preset interval is smaller than the second preset interval.
[0061] In the case where the curvature is normalized, the value of the preset curvature threshold may be between 0.4 and 0.6.
[0062] The second preset interval can be determined based on the maximum coverage diameter of the spray gun to fully utilize the spraying capacity of the spray gun to achieve painting of the relatively flat areas of the surface to be painted of automobile parts; when painting the key painting points of the first preset interval, in order to ensure the painting effect of the area where the key painting points are located and avoid over-spraying, the spray gun can be controlled to use a matching coverage diameter for painting operations based on the distance between the current key painting point and other adjacent painting points to ensure that the paint thickness of all positions on the surface to be painted is consistent.
[0063] The higher the curvature of all vertices of the triangular mesh in the local range, the more complex the surface condition in the local range. Using a smaller interval to select key painting points can ensure the painting effect in areas with more complex conditions.
[0064] The lower the curvature of all vertices of the triangular mesh in a local area, the flatter the surface in that local area. Using a larger interval to select key painting points can improve the painting efficiency of flatter areas, reduce the number of rotations of the rotating parts of the robot arm, and increase the service life of the robot arm.
[0065] Among them, the first preset interval and the second preset interval can be set according to the actual needs of the surface to be painted; for example, the first preset interval can be equal to 2 cm, and the second preset interval can be equal to 5 cm; those skilled in the art can also use more levels of interval radius to select key painting points, which will not be repeated in this application.
[0066] In one embodiment, the cost of painting between two key painting points is determined by: determining a first ratio between an angle change required for painting the two key painting points and a maximum angle change, and determining a first sum of the first ratio and a first preset positive number; determining a maximum curvature among the normalized curvatures at the two key painting points, and determining a second sum of the maximum curvature and a second preset positive number; and multiplying the normalized distance between the two key painting points, the first sum, and the second sum to obtain the cost of painting between the two key painting points.
[0067] The first ratio of the angle change to the maximum angle change can reflect the angle flexibility requirement of the robot arm when moving between two points; the angle change required when painting two key paint points can be determined based on the normal vector of at least one triangular mesh where the two position points are located; the greater the angle change required when painting two key paint points, the greater the rotation mechanism of the robot arm needs to control the spray gun to rotate when moving from painting one key paint point to painting another key paint point.
[0068] Determining the first sum of the first ratio and the first preset positive number can ensure that the first sum is at least greater than 0, so as to avoid being effectively involved in the calculation during the subsequent multiplication operation; the first preset positive number can be a positive number such as 0.01 and 0.02.
[0069] The maximum curvature among the normalized curvatures at the two key painting points can be the maximum of the normalized curvatures at the two key painting points; using the maximum of the curvatures of the two key painting points to determine the cost value can better match the key painting points with more complex surfaces when there is at least one key painting point with a larger curvature among the two key painting points.
[0070] When the key painting point is a vertex of a triangular mesh, the curvature of the key painting point can be determined based on the degree of difference in normal vectors of the three triangular meshes with the key painting point as a vertex; the greater the degree of difference in normal vectors of the three triangular meshes with the key painting point as a vertex, the greater the curvature of the key painting point.
[0071] Alternatively, when the key painting point is not a vertex of a triangular mesh, the curvature of the key painting point can be determined by the degree of difference in normal vector between the triangular mesh where the key painting point is located and other adjacent triangular meshes; the greater the degree of difference in normal vector between the triangular mesh where the key painting point is located and other adjacent triangular meshes, the greater the curvature of the key painting point.
[0072] Determining the second sum of the maximum curvature and the second preset positive number can ensure that the second sum is at least greater than 0, so as to avoid being effectively involved in the calculation in the subsequent multiplication operation process; the second preset positive number can be a positive number such as 0.01 and 0.02.
[0073] The normalization process of the curvature at the key painting points can be achieved by minimum-maximum normalization, logarithmic transformation, inverse tangent function and sigmoid function.
[0074] The larger the normalized distance between two key painting points, the more likely it is that the robot arm will need to move between the two key painting points again after painting the two key painting points to cover other key painting points between the two key painting points. This increases the likelihood that the robot arm will have invalid movement distances. Therefore, the larger the normalized distance between two key painting points, the larger the cost value that can be set.
[0075] The normalized distance between two key painting points, the first sum, and the second sum are multiplied together to obtain the cost of painting between the two key painting points. This method can comprehensively consider the normalized distance between the two key painting points and the curvature information of the two key painting points to achieve planning of the painting path of automobile parts.
[0076] The following uses an exemplary calculation formula as an example to illustrate the calculation process of the cost value in the embodiment of the present application: ,in, is the cost of painting between two key painting points, is the normalized distance between two key painting points, is the first preset positive number, The angle change required to paint two key painting points is: is the second preset positive number, max is the maximum value, as well as are the curvatures at two key painting points respectively.
[0077] The angle change required to paint two key painting points is within the range of 0 to 180 degrees. It can realize the normalization processing of the angle change required when painting two key painting points.
[0078] In step S104, the sum of the cost values of adjacent key painting points in the painting path is used as the objective function, and a target painting path is determined with the objective of minimizing the objective function, so as to paint the surface to be painted along the target painting path.
[0079] When the robotic arm drives the spray gun to paint the surface to be painted, in order to achieve complete painting of the surface to be painted, it needs to pass through at least all the key painting points. Therefore, the sum of the cost values of adjacent key painting points in the painting path can be used as the objective function. When the objective function obtains the minimum value, the difficulty or cost of painting the surface to be painted can be minimized, the painting efficiency of the surface to be painted is improved, and by reducing the rotation angle that the robotic arm needs to perform during the painting process, at least the service life of the rotating parts of the robotic arm can be improved.
[0080] In one embodiment, determining a target painting path with the objective of minimizing an objective function includes: searching for a painting path using a target optimization algorithm with the objective of minimizing the objective function, and using the painting path obtained when the search process converges as the target painting path; wherein the target optimization algorithm is any one of a genetic algorithm, an ant colony algorithm, a simulated annealing algorithm, and a particle swarm optimization algorithm.
[0081] For example, the target optimization algorithm can be used to search for the painting path, and the painting path passes through at least all the key painting points; when the number of searches reaches a preset number, or the search time is longer than the preset specified time, the painting path that makes the objective function achieve the minimum value in the search process can be used as the target painting path.
[0082] Using the target optimization algorithm to search the painting path can obtain a more accurate target painting path and avoid the local optimal solution of the painting path.
[0083] In one embodiment, painting a surface to be painted along a target painting path includes: painting the surface to be painted along the target painting path, and painting the target position point in the target painting path according to curvature information of the target position point in the target painting path in a target three-dimensional surface model at a driving speed inversely proportional to the curvature information.
[0084] When painting the surface to be painted, for flat areas on the surface to be painted, the robotic arm requires fewer steering operations on the spray gun, and can use a higher driving speed to paint, thereby improving the painting efficiency of the flat area.
[0085] When painting the surface to be painted, the robot arm needs to turn the spray gun more times for the sharper or more complex areas on the surface to be painted. In order to ensure the painting quality of the sharper or more complex areas on the surface to be painted, a lower driving speed can be used for painting.
[0086] When painting the surface to be painted along the target painting path, the paint flow of the spray gun can be adaptively controlled so that the amount of paint sprayed by the spray gun on different areas of the surface to be painted is consistent, avoiding insufficient or excessive painting on the surface to be painted.
[0087] In one embodiment, the angle between the driving direction of the previous position point and the driving direction of the next position point of the target painting path can also be determined. When the angle is greater than a preset angle threshold, multiple spline interpolation processes are performed on the sub-path between adjacent position points, so that the path obtained after multiple spline interpolation processes on the sub-path is re-used as the target painting path.
[0088] The preset angle threshold can be between 90 degrees and 120 degrees. When the angle is greater than the preset angle threshold, multiple spline interpolation processes are performed on the sub-paths between adjacent position points to obtain a smoother trajectory, thereby reducing the difficulty of the robotic arm driving the spray gun to rotate or move; avoiding possible sharp turns of the robotic arm during movement, and improving the service life of the robotic arm; and making the coverage of the painting process more continuous, thereby obtaining a better painting effect.
[0089] In one embodiment, the historical painting paths of the painted surfaces of the same model whose painting results have passed the inspection, as well as the historical three-dimensional surface models of the painted surfaces of the same model, can also be obtained; the target three-dimensional surface model and the historical three-dimensional surface model are matched, and the historical painting paths are adjusted according to the difference information obtained from the matching to obtain candidate painting paths, and the correspondence between the target three-dimensional surface model and the candidate painting paths is stored.
[0090] The surface of auto parts of the same model may have certain differences in some areas due to errors that may exist in the production process; or users may have customized requirements for auto parts of the same model, resulting in certain subtle differences between different auto parts obtained under the same model.
[0091] The automobile parts to be painted in the embodiment of the present application are at least automobile parts that have passed the inspection. Therefore, different automobile parts under the same model have the same shape in at least most areas (for example, 80%). Therefore, the target three-dimensional surface model and the historical three-dimensional surface model can be matched. Since the painting results of the historical three-dimensional surface model have passed the inspection, the historical painting path can be better utilized to provide a reference for the current painting process.
[0092] The target three-dimensional surface model and the historical three-dimensional surface model are matched, and the historical painting path is adjusted according to the difference information obtained from the matching to obtain a candidate painting path. Only local adjustments need to be made to the parts where there are differences to obtain a painting path that more closely matches the target three-dimensional surface model, without having to re-execute the painting path planning process. Therefore, it can not only ensure the accuracy of the obtained painting path, but also improve the efficiency of obtaining the painting path.
[0093] The correspondence between the target 3D surface model and the candidate painting paths is stored. When the same model of automobile parts is subsequently painted, the candidate painting paths can be called from the pre-stored correspondence, thereby improving the efficiency of painting automobile parts.
[0094] In one embodiment, before painting the surface to be painted along the target painting path, a virtual robotic arm can be used to control a virtual spray gun along the target painting path to simulate painting the virtual surface corresponding to the target three-dimensional surface model, and perform collision detection on the simulated painting process; the target painting path is adjusted according to the collision detection result to avoid contact between the outer side of the virtual robotic arm and the surface to be painted; and the painting path obtained after the adjustment is used again as the target painting path.
[0095] The actual size of the robotic arm can be used to construct a virtual robotic arm, and the virtual surface can be constructed according to the three-dimensional model of the target surface. The virtual surface corresponding to the target three-dimensional surface model can be simulated for painting. The painting action can be pre-rehearsed in a simulated environment to avoid possible collisions during the actual painting process and reduce the cost required for painting.
[0096] To prevent the robotic arm from being contaminated by paint in the painting environment, a wrapping cloth made of nylon or other materials can be wrapped around the outside of the robotic arm. The size of the virtual robotic arm can be set in combination with the size of the wrapping cloth to prevent the outside of the wrapping cloth from touching the painted area of the surface to be painted during the subsequent actual painting process.
[0097] By adjusting the target painting path according to the collision detection results, the distance from the path segment with collision to the surface to be painted can be increased, and by adjusting the pressure of the spray gun when spraying, the pressure of the paint falling on the surface to be painted can be kept consistent.
[0098] By re-using the adjusted painting path as the target painting path, it is possible to avoid the robot arm from touching the surface of the automobile part to be painted during movement during the actual painting process, thereby affecting the painting effect, and to improve the painting quality of the surface of the automobile part to be painted.
[0099] Figure 2FIG. 1 is a structural diagram of a data processing-based automobile parts painting path optimization system 1000 according to an exemplary embodiment. Figure 2 The automobile parts painting path optimization system 1000 based on data processing includes: a processor 1100 and a memory 1200, wherein the memory 1200 stores computer program instructions, and when the computer program instructions are executed by the processor 1100, all or part of the steps of the automobile parts painting path optimization method based on data processing in this application are implemented.
[0100] Those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art not disclosed herein, and the description and examples are to be considered merely as exemplary.
[0101] It will be understood that the present application is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.
Claims
1. A method for optimizing the painting path of automobile parts based on data processing, characterized in that: include: Obtaining an initial three-dimensional surface model of the surface to be painted of the automobile part, wherein the initial three-dimensional surface model is obtained by constructing a triangular mesh based on three-dimensional point cloud data of the surface to be painted; determining whether to merge the triangular meshes within a local range of the initial three-dimensional surface model according to differences in normal vectors of the triangular meshes within the local range, so as to obtain a target three-dimensional surface model after processing the initial three-dimensional surface model; Determine all key painting points that the paint spraying machine needs to pass through from the target three-dimensional surface model, and determine the cost of painting between the two key painting points based on the distance between the two key painting points, the angle change required for painting, and the curvature at the two key painting points; The sum of the cost values of adjacent key painting points in the painting path is used as the objective function, and the target painting path is determined with the goal of minimizing the objective function, so as to paint the surface to be painted along the target painting path.
2. The method for optimizing the painting path of automobile parts based on data processing according to claim 1, characterized in that: According to the difference in normal vectors of the triangular meshes in a local range in the initial three-dimensional surface model, determining whether to merge the triangular meshes in the local range includes: Determining a representative vector of the normal vectors of the triangular mesh within the local range, and determining a painting difficulty value for the local range based on a degree of difference in direction between the normal vectors of the triangular mesh within the local range and the representative vector; When the painting difficulty values of two adjacent local ranges are both less than a preset painting difficulty threshold, it is determined to merge the triangular meshes of the two adjacent local ranges.
3. The method for optimizing the painting path of automobile parts based on data processing according to claim 2, characterized in that: Merge two adjacent local triangle meshes, including: For two adjacent triangular meshes in the total local range formed by the two local ranges, determining newly added position points of the two adjacent triangular meshes according to an average value of the normal vectors of the triangular meshes in the total local range; The newly added position points are connected to the boundaries of two adjacent triangular meshes respectively to obtain the merging result of the two adjacent triangular meshes, so as to complete the merging of all two adjacent triangular meshes that have not been merged in the total local range.
4. The method for optimizing the painting path of automobile parts based on data processing according to claim 1, characterized in that: The cost of painting between two critical painting points is determined as follows: Determining a first ratio between an angle change required for painting two key painting points and a maximum angle change, and determining a first sum of the first ratio and a first preset positive number; Determining a maximum curvature among the normalized curvatures at two key painting points, and determining a second sum of the maximum curvature and a second preset positive number; The normalized distance between two key painting points, the first sum value, and the second sum value are multiplied together to obtain the cost of painting between the two key painting points.
5. The method for optimizing the painting path of automobile parts based on data processing according to claim 1, characterized in that: Determine all key painting points that the paint needs to pass through from the target 3D surface model, including: Based on the curvature of the vertices in a local range in the target three-dimensional surface model, a target interval for selecting key painting points from the local range is determined, so that the key painting points are selected from the local range according to the target interval; the target interval is positively correlated with the average curvature of all vertices of the triangular mesh in the local range.
6. The method for optimizing the painting path of automobile parts based on data processing according to claim 1, characterized in that: The target painting path is determined with the goal of minimizing the objective function, including: With the goal of minimizing the objective function, the target optimization algorithm is used to search for the painting path, and the painting path obtained when the search process converges is used as the target painting path; The target optimization algorithm is any one of a genetic algorithm, an ant colony algorithm, a simulated annealing algorithm, and a particle swarm optimization algorithm.
7. The method for optimizing the painting path of automobile parts based on data processing according to claim 1, characterized in that: Paint the surface to be painted along the target painting path, including: The surface to be painted is painted along a target painting path, and according to curvature information of the target position point in the target painting path in a target three-dimensional surface model, the target position point is painted at a driving speed inversely proportional to the curvature information.
8. The method for optimizing the painting path of automobile parts based on data processing according to claim 1, characterized in that: The method further comprises: The angle between the driving direction of the previous position point and the driving direction of the next position point on the target painting path is determined. When the angle is greater than a preset angle threshold, multiple spline interpolation processes are performed on the sub-path between adjacent position points, so that the path obtained after the multiple spline interpolation processes on the sub-path is re-used as the target painting path.
9. The method for optimizing the painting path of automobile parts based on data processing according to claim 1, characterized in that: The method further comprises: Obtaining a historical painting path of a painted surface of the same model whose painting results have passed inspection, and a historical three-dimensional surface model of the painted surface of the same model; The target 3D surface model and the historical 3D surface model are matched, the historical painting path is adjusted according to the difference information obtained from the matching to obtain a candidate painting path, and the correspondence between the target 3D surface model and the candidate painting path is stored.
10. A system for optimizing the painting path of automobile parts based on data processing, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the method for optimizing the painting path of automobile parts based on data processing according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Intelligent automobile paint spraying method based on cloud computing
CN106853433A
Intelligent interconnection control method and system for paint spraying curing barn
CN118818991A
Automatic scanning paint spraying method
CN118990517A
Workpiece surface complete spraying path generation method based on design model
CN120070810A
Spray gun trajectory planning method for spraying robot
WO2024145986A1