Spraying robot path planning method and system

By converting a three-dimensional freeform surface into a two-dimensional parametric mesh and removing singular points, the problems of discontinuous spraying paths and uneven coverage in rail vehicle painting were solved, achieving high-quality spraying results.

CN121492010APending Publication Date: 2026-02-10CRRC TANGSHAN CO LTD

Patent Information

Application Number
CN202511531001.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-24
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Existing technologies for painting rail vehicles suffer from problems such as discontinuous spraying paths and uneven spraying coverage, especially in complex curved areas, where robot spraying path planning struggles to meet the kinematic constraints of the robotic arm and the constraints of the spraying task.

Method used

The three-dimensional freeform surface mesh model is converted into a two-dimensional parametric mesh (UV mesh). The initial path is determined according to the preset constraints, and the target path is generated by singular point detection and removal to ensure the kinematic feasibility and continuity of the painting robot.

Benefits of technology

It improves the adaptability of the spraying path to three-dimensional freeform surfaces, ensures spraying quality and efficiency, and achieves high-quality spraying of complex curved areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121492010A_ABST
    Figure CN121492010A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a spraying robot path planning method and system. The method comprises the steps that a grid model of a three-dimensional free-form surface and model parameters of a spraying robot are obtained, and the model parameters are used for representing the kinematics relation between joints in a mechanical structure of the spraying robot; determining a two-dimensional parameter grid corresponding to the three-dimensional free-form surface according to the grid model; according to preset constraint conditions, an initial path covering the two-dimensional parameter grid is determined, and the constraint conditions are at least used for guaranteeing kinematics feasibility of the spraying robot; and removing singular points in the initial path to obtain a target path. According to the method, the adaptability of the target path to the three-dimensional free-form surface can be improved, the kinematics feasibility and continuity of the target path are guaranteed, and high-quality spraying is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of robot automation technology, and in particular to a path planning method and system for a painting robot. Background Technology

[0002] In the context of rail vehicle manufacturing, the painting process is a key step in ensuring the appearance quality and corrosion resistance of the vehicles. Rail vehicle painting is gradually transforming from manual operation to automation by industrial robots.

[0003] In related methods for painting vehicles using robots, the robot spraying path is generated by mapping the parameter space. However, in complex curved areas, there are problems such as discontinuous paths and uneven spraying coverage. Summary of the Invention

[0004] This application provides a path planning method and system for a painting robot, which solves the problems of discontinuous painting paths and uneven painting coverage in related technologies.

[0005] In a first aspect, embodiments of this application provide a path planning method for a painting robot, including:

[0006] Obtain the mesh model of the three-dimensional freeform surface and the model parameters of the spraying robot. The model parameters are used to characterize the kinematic relationship between the joints in the mechanical structure of the spraying robot.

[0007] Based on the mesh model, determine the two-dimensional parametric mesh corresponding to the three-dimensional freeform surface;

[0008] Based on the preset constraints, determine the initial path covering the two-dimensional parametric mesh. The constraints are at least used to ensure the kinematic feasibility of the painting robot.

[0009] Remove singularities from the initial path to obtain the target path.

[0010] In one possible implementation, obtaining the mesh model of the three-dimensional freeform surface and the model parameters of the painting robot includes:

[0011] The original data of the three-dimensional freeform surface is obtained by using a three-dimensional scanning device or a computer-aided design system. The original data includes at least one of the following: vertex coordinates, triangular facets, and normal vectors.

[0012] Convert the raw data into a grid model;

[0013] Obtain the model parameters of the painting robot. The model parameters can be DH parameters or model files based on the Unified Robot Description Format (URDF).

[0014] In one possible implementation, determining the initial path covering the two-dimensional parametric mesh according to preset constraints includes:

[0015] Determine the surface type of the three-dimensional freeform surface;

[0016] Based on the surface type and constraints, the target path pattern is determined from at least one preset basic path pattern.

[0017] Determine the initial path based on the target path pattern.

[0018] In one possible implementation, determining the surface type of the three-dimensional freeform surface includes:

[0019] Calculate the principal curvature distribution and normal vector field of the three-dimensional freeform surface, and perform principal component analysis to obtain the main geometric extension directions;

[0020] Using the main extension direction as the candidate axis, calculate the radial distribution similarity of the mesh model rotating around the candidate axis;

[0021] When the radial distribution similarity is greater than the first similarity threshold, the surface type is determined to be a revolution surface;

[0022] When the radial distribution similarity is less than the first similarity threshold, the shape similarity of the slice contours of the mesh model along the main geometric extension direction is calculated.

[0023] When the shape similarity is greater than the second similarity threshold, the surface type is determined to be a translational surface;

[0024] When the shape similarity is less than the second similarity threshold, the surface type is determined to be a hybrid surface, and the three-dimensional freeform surface is divided into multiple sub-regions, and the surface type of each sub-region is determined.

[0025] In one possible implementation, the constraints include task constraints and robotic arm constraints.

[0026] Task constraints are used to ensure the quality of the spraying process. Task constraints include at least one of the following: spraying distance and direction constraints, and spraying uniformity constraints.

[0027] Robotic arm constraints are used to indicate the feasibility of robotic arm movements. Robotic arm constraints include at least one of the following: joint position constraints, speed limits, singularity avoidance, and continuous motion.

[0028] In one possible implementation, removing singularities from the initial path to obtain the target path includes:

[0029] Singularity detection is performed on the initial path to obtain the singularity detection results;

[0030] Based on the singularity detection results, the initial path is modified to obtain the target path.

[0031] In one possible implementation, singularity detection is performed on the initial path to obtain singularity detection results, including:

[0032] Multiple first path points are selected on the initial path according to the first sampling density;

[0033] Calculate the Jacobian matrix condition number of the robotic arm at the first path point. When the Jacobian matrix condition number is greater than the first threshold, the region corresponding to the path point is determined as the target region.

[0034] Multiple second path points are selected in the target area according to a second sampling density, wherein the second sampling density is higher than the first sampling density;

[0035] Based on the model parameters, inverse kinematics calculations are performed on the second path point to obtain the joint angles of the painting robot at the second path point.

[0036] Based on the joint angle, determine the joint change between two adjacent second path points. When the joint change is greater than the second threshold, the second path point is determined as a singular point; otherwise, the second path point is determined as a non-singular point.

[0037] Singular points and / or non-singular points are identified as singular point detection results.

[0038] In one possible implementation, the method further includes, prior to singularity detection on the initial path:

[0039] The initial path is divided into regions, which include potential risk areas and non-potential risk areas. The curvature of the potential risk areas is higher than that of the non-potential risk areas.

[0040] Based on the segmentation results, the order of singularity detection is determined, with singularity detection in potentially risky areas taking precedence over singularity detection in non-potentially risky areas.

[0041] In one possible implementation, the initial path is modified based on the singularity detection results to obtain the target path, including:

[0042] A spherical region centered on the singular point and with a preset length as its radius is set as the avoidance region. Based on the constraints, at least one offset operation is performed along the normal direction of the initial path to generate a modified path.

[0043] The system checks for singularities in the modified path. If no singularities are found, the modified path is selected as the target path.

[0044] Secondly, embodiments of this application provide a path planning system for a painting robot, used to implement the path planning method for a painting robot as described in any of the first aspects, the system comprising:

[0045] The data acquisition module is used to acquire the mesh model of the three-dimensional freeform surface and the model parameters of the spraying robot;

[0046] A robotic arm for spraying;

[0047] The path planning module, connected to the data acquisition module, is used to generate target paths covering the three-dimensional freeform surface;

[0048] The motion control module, connected to the path planning module, is used to control the movement of the spraying robot arm according to the target path.

[0049] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;

[0050] The memory stores instructions that the computer executes;

[0051] The processor executes computer execution instructions stored in memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.

[0052] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.

[0053] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.

[0054] This application provides a path planning method and system for a painting robot, including acquiring a mesh model of a three-dimensional freeform surface and model parameters of the painting robot. The model parameters characterize the kinematic relationships between joints in the mechanical structure of the painting robot. Based on the mesh model, a two-dimensional parametric mesh corresponding to the three-dimensional freeform surface is determined. Based on preset constraints, an initial path covering the two-dimensional parametric mesh is determined, whereby the constraints at least ensure the kinematic feasibility of the painting robot. Singularities in the initial path are removed to obtain the target path. By converting the mesh model of the three-dimensional freeform surface into a two-dimensional parametric mesh (UV mesh), determining an initial path that can cover the two-dimensional parametric mesh based on preset constraints, and removing singularities in the initial path to obtain the target path, the adaptability of the target path to the three-dimensional freeform surface can be improved, ensuring the kinematic feasibility and continuity of the target path, and achieving high-quality painting. Attached Figure Description

[0055] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0056] Figure 1 Flowchart of the painting robot path planning method provided in this application Figure 1 ;

[0057] Figure 2 for Figure 1 A flowchart illustrating the specific implementation of step S103 in the illustrated embodiment;

[0058] Figure 3 Flowchart of the painting robot path planning method provided in this application Figure 2 ;

[0059] Figure 4 for Figure 3 A flowchart illustrating the specific implementation of step S304 in the illustrated embodiment;

[0060] Figure 5 for Figure 3 A flowchart illustrating the specific implementation of step S305 in the illustrated embodiment;

[0061] Figure 6 This is a schematic diagram of the path planning system for the painting robot provided in this application.

[0062] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0063] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0064] In the field of rail vehicle manufacturing, the painting process is a crucial step in ensuring the appearance quality and corrosion resistance of vehicles. Its core requirement is to achieve uniform and efficient spraying of complex vehicle surfaces (such as the curved roofline and the transition surfaces of door and window frames, which are three-dimensional freeform surfaces). This process is currently undergoing a gradual transition from manual operation to automation by industrial robots. The relevant technical field is industrial robot automation control, specifically focusing on the three-dimensional freeform surface coverage path planning technology for painting robots, which directly impacts the production efficiency and process stability of rail vehicle painting.

[0065] Existing path planning technologies for painting robots mainly fall into two categories: one is for two-dimensional planes or simple parametric surfaces (such as spline surfaces), generating coverage trajectories through preset grid paths, spiral paths, and other patterns, relying on human experience to adjust path parameters. For example, equidistant grid traversal is used for two-dimensional planar areas, and polar coordinate spiral paths are used for specific rotating surfaces. The other category attempts to handle three-dimensional surfaces, but it is only suitable for surface types with explicit parametric equations and cannot adapt to unparametric three-dimensional free-form surfaces without explicit parameters, such as those of rail vehicle bodies, which are obtained through 3D scanning and composed of polygonal meshes. Furthermore, existing technologies do not consider the kinematic constraints of the robotic arm (such as joint position, speed limits, and singularity avoidance) and the constraints of the painting task (such as spray gun distance and angle control), often leading to infeasible paths.

[0066] Based on this, embodiments of this application provide a path planning method and system for a painting robot, which converts the mesh model of a three-dimensional freeform surface into a two-dimensional parametric mesh (UV mesh), determines an initial path that can cover the two-dimensional parametric mesh according to preset constraints, and removes singular points in the initial path to obtain the target path. This can improve the adaptability of the target path to the three-dimensional freeform surface, ensure the kinematic feasibility and continuity of the target path, and achieve high-quality painting.

[0067] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0068] Figure 1 Flowchart of the painting robot path planning method provided in this application Figure 1 ,like Figure 1 As shown, the method includes:

[0069] S101. Obtain the mesh model of the three-dimensional freeform surface and the model parameters of the painting robot.

[0070] Among them, the model parameters are used to characterize the kinematic relationships between the joints in the mechanical structure of the painting robot.

[0071] A mesh model is a visualized and computable 3D geometric model formed by processing the raw data of a 3D freeform surface; it resembles a solid surface composed of triangles / tetrahedrons. The raw data includes vertex coordinates, triangular facets, and normal vectors.

[0072] For example, a mesh model can be obtained as follows: The raw data of a 3D freeform surface is acquired using a 3D scanning device or a computer-aided design system. The raw data includes at least one of the following: vertex coordinates, triangular facets, and normal vectors; the raw data is then converted into a mesh model. Specifically, the 3D scanning device acquires the raw data of the 3D freeform surface using technologies such as lasers and vision. The computer-aided design (CAD) system can directly export the raw data from the drawn or modeled 3D freeform surface. Then, the raw data undergoes noise reduction, topology optimization, and mesh re-division to obtain the mesh model.

[0073] Model parameters are parameters used to characterize the kinematic relationships between joints in the structure of the painting robot. Model parameters can be DH parameters or model files based on the Unified Robot Description Format (URDF).

[0074] DH parameters, or De Navet-Haltenberg parameters, are used to describe the spatial geometric relationship between two adjacent links of a robotic arm. URDF files are XML-based files used to describe data related to the physical model of the robotic arm. DH parameters and URDF files can be converted to each other.

[0075] Manufacturers of painting robots typically provide DH parameters and URDF files for the painting robot. These parameters can be imported through a data interface or obtained through measurement or other methods.

[0076] In the above method, by converting the original three-dimensional freeform surface data into a mesh model and obtaining the model parameters of the painting robot, high-quality basic data support can be provided for subsequent path planning, thereby improving the reliability of the path planning premise.

[0077] Optionally, since the surface of rail vehicles is huge and contains a large number of complex transition surfaces, such as the roof arc and the edges of door and window frames, the accuracy and consistency of the normal vectors are very important. Otherwise, it will cause coating accumulation or be too thin. To ensure the accuracy and consistency of the normal vectors, the accuracy of the normal vectors can be improved by preprocessing cleaning, feature-preserving re-partitioning, accurate normal calculation, and visual verification.

[0078] Specifically, preprocessing and cleaning include denoising and smoothing the initial data to eliminate high-frequency disturbances caused by scanning noise. Feature-preserving re-meshing includes employing an anisotropic re-meshing algorithm to adaptively adjust the mesh density based on the surface curvature, optimizing mesh quality while preserving key geometric features (such as door and window frames and waistlines). Accurate normal calculation includes using an angle-weighted averaging method for vertex normal calculation. Simultaneously, a hard edge detection algorithm (adjacent face normal angle thresholding method) automatically identifies and protects sharp feature edges in the model, ensuring that normals in such areas are not incorrectly smoothed, thus fundamentally avoiding coating buildup or excessive thinning issues caused by normal errors. Visual verification includes providing normal visualization tools, allowing operators to visually verify the normal directions of key areas and make necessary manual corrections.

[0079] S102. Based on the mesh model, determine the two-dimensional parametric mesh corresponding to the three-dimensional freeform surface.

[0080] Two-dimensional parametric meshes, also known as UV meshes, are used where each small cell represents an area that the end effector (such as a spray gun) of a painting robot needs to cover. This uniform grid structure ensures consistent thickness during robot painting.

[0081] A two-dimensional parametric mesh can be determined using a software system. Specifically, the software system automatically unfolds the three-dimensional freeform surface to generate a two-dimensional UV coordinate system based on the marked reference curve C and direction, and generates a uniformly distributed UV mesh. This process is similar to unfolding a globe into a two-dimensional map.

[0082] S103. Determine the initial path covering the two-dimensional parametric mesh according to the preset constraints.

[0083] Constraints are at least used to ensure the kinematic feasibility of the painting robot, such as restrictions on the joint position and speed of the robotic arm, and continuous operation. The initial path is obtained by selecting from several preset basic painting path modes based on the surface type of the 3D freeform surface, under the constraints, such as grid path, spiral path, Hilbert path, and hybrid path. The grid path uses an equal residual height model to calculate the spacing between adjacent paths; the spiral path is an Archimedean spiral in polar coordinates; the Hilbert path is suitable for surfaces with high curvature; and the hybrid path is an adaptive combination of a spiral path in concave regions and a grid path in planar regions.

[0084] Optionally, the constraints include task constraints and robotic arm constraints. Task constraints are used to ensure the quality of the spraying process and include at least one of the following: spraying distance and direction constraints, and spraying uniformity constraints. Robotic arm constraints are used to indicate the feasibility of robotic arm movement and include at least one of the following: joint position constraints, speed limits, singularity avoidance, and continuous movement.

[0085] The constraints mentioned above may not be satisfied simultaneously. Therefore, a priority can be set for these constraints: first, ensure safety; second, ensure quality; and finally, ensure work efficiency. Depending on the actual work situation, at least one constraint should be satisfied in the above order. Safety corresponds to the joint position constraint in the robotic arm constraint, quality corresponds to the spraying distance and direction constraint in the task constraint, and work efficiency corresponds to other constraints, including spraying uniformity constraint, speed limit, singularity avoidance, and continuous motion.

[0086] By clearly defining the task constraints and robot arm constraints through constraints, the requirements of the spraying process (such as uniform coating thickness) and the robot motion restrictions (such as joints not exceeding their limits) can be met simultaneously in the path planning, avoiding spraying quality defects or robot motion failures caused by ignoring constraints, and improving feasibility and spraying quality.

[0087] For example, such as Figure 2 As shown, step S103 can be achieved by the following steps:

[0088] S1031. Determine the surface type of the three-dimensional freeform surface.

[0089] Surface types include translational surfaces, revolution surfaces, and hybrid surfaces. By analyzing the geometric characteristics of the surface, such as the distribution of principal curvature and normal vectors, and calculating the matching degree with the mathematical definition of the ideal surface type, the surface type is determined by an automatic recognition algorithm. Operators can then confirm and modify the results.

[0090] In one possible implementation, the surface type can be determined as follows: calculate the principal curvature distribution and normal vector field of the 3D freeform surface, and perform principal component analysis to obtain the main geometric extension directions; using the main extension directions as candidate axes, calculate the radial distribution similarity of the mesh model rotating around the candidate axes; when the radial distribution similarity is greater than a first similarity threshold, the surface type is determined to be a revolution surface; when the radial distribution similarity is less than the first similarity threshold, calculate the shape similarity of the slice contour of the mesh model along the main geometric extension directions; when the shape similarity is greater than a second similarity threshold, the surface type is determined to be a translation surface; when the shape similarity is less than the second similarity threshold, the surface type is determined to be a hybrid surface, and the 3D freeform surface is divided into multiple sub-regions, and the surface type of each sub-region is determined.

[0091] Specifically, feature extraction is performed first, including calculating the principal curvature distribution and normal vector field of the surface mesh, and performing Principal Component Analysis (PCA) to obtain the main geometric extension directions of the model. Next, rotational identification is performed, including calculating the radial distribution similarity of the mesh model rotating around the PCA principal direction as a candidate axis. If the average similarity exceeds a first similarity threshold T1, it is classified as a rotational surface, and the rotation axis and reference generatrix are determined accordingly. The first similarity threshold is pre-set, such as 0.85. Then, translational identification is performed, including calculating the shape similarity of the slice contour along the PCA principal direction when rotational identification fails. If the average similarity exceeds a second similarity threshold T2, it is classified as a translational surface, and a reference curve is determined. The second similarity threshold is pre-set, such as 0.9. If the above identification fails, a hybrid processing is performed, including: dividing the three-dimensional freeform surface into multiple sub-regions with consistent features using a region growth segmentation algorithm, and recursively performing the above feature extraction, rotational identification and translational identification operations on each sub-region to classify the sub-regions, determine the surface type corresponding to each sub-region, and determine the overall mesh model as a hybrid surface.

[0092] Optionally, through a human-computer interaction interface, operators can review the classification results, baseline curves, and partition boundaries automatically generated by the system, and have full manual overwrite and adjustment capabilities to ensure that the classification results conform to the actual engineering situation.

[0093] The above method classifies surface types by analyzing principal curvature distribution, radial distribution similarity, and shape similarity, and makes regional determinations for hybrid surfaces. This enables refined classification of complex three-dimensional freeform surfaces, matching the most suitable path pattern to different sub-regions, solving the problem that a single pattern is difficult to adapt to complex surfaces, and improving the pertinence of path planning.

[0094] S1032. Determine the target path pattern from at least one preset basic path pattern according to the surface type and constraints.

[0095] Matching specific surface types with path patterns is key to maximizing coating quality and efficiency, and this is mainly based on geometric properties, kinematic performance, and coating uniformity models.

[0096] For translational surfaces (such as large planes and regular curved surfaces), the target path pattern preferentially adopts the grid path. This is because the path pattern is highly compatible with the linear parameter space of the translational surface, and can generate smooth motion, simple control, and paths calculated based on the equal residual height model, thereby achieving the best coating uniformity while ensuring efficiency.

[0097] For rotating surfaces (such as cylindrical parts), the target path mode preferentially adopts a spiral path. This is because the mode perfectly matches the rotational symmetry of the surface, and is a continuous path without turning back, which can completely eliminate the coating accumulation problem at the start and stop points, and significantly improve the surface spraying quality and work efficiency.

[0098] For areas with high curvature or complex features (such as door and window frames), the target path pattern preferentially adopts the Hilbert path or its variants. This is because the fractal space filling curve can achieve dense and complete coverage of complex areas with an extremely short path length, and is conducive to maintaining the stability of the spray gun posture in local areas.

[0099] For overall hybrid surfaces (such as a train body), the target path pattern adopts a hybrid path strategy. First, the region is segmented based on geometric features (such as curvature distribution). Then, the most suitable path pattern is adaptively selected in each sub-region. Finally, an optimization algorithm is used to achieve smooth and seamless stitching between paths in each region, thereby achieving high-quality and high-efficiency coverage globally.

[0100] S1033. Determine the initial path based on the target path pattern.

[0101] Based on the target path pattern described above, and combined with preset constraints, the target path pattern is mapped onto a UV mesh to generate the continuous motion trajectory of the end effector (such as a spray gun) of the painting robot, thus obtaining the initial path.

[0102] In the above method, the initial path is generated by selecting the target path mode from the preset modes based on the surface type. Combined with the constraints, the path rationality is ensured. This enables the initial path to accurately match the geometric features of the surface, avoids uneven coverage caused by the mismatch between the path mode and the surface, and improves the geometric adaptability and process compliance of the initial path.

[0103] S104. Remove singularities from the initial path to obtain the target path.

[0104] In the full-coverage path planning of a painting robot, the presence of singularities can lead to non-unique inverse kinematics solutions, causing abrupt changes in joint velocity or preventing smooth motion, resulting in severe shaking of the robotic arm and damage to the equipment or the painted surface. Therefore, singularities in the initial path can be removed to obtain the target path. The target path is one that can continuously cover the UV grid and achieve high-quality painting.

[0105] In one possible implementation, the speed of the joint base point can be monitored, and an emergency stop can be triggered if the speed exceeds the limit to avoid uneven coating thickness caused by loss of control of the spray gun posture or fluctuation of the gun distance.

[0106] In one possible implementation, singularities in the initial path can be detected. When a singularity is detected, a new path is generated along the normal direction of the initial path, ensuring that the spray gun stays away from the singularity region. Furthermore, in areas where singularities cannot be avoided, the deviation angle between the spray gun and the surface normal can be widened to obtain a feasible solution and ensure path continuity, such as widening it from ±5 degrees to ±15 degrees.

[0107] The spraying robot path planning method provided in this application converts the mesh model of a three-dimensional freeform surface into a two-dimensional parametric mesh (UV mesh), determines an initial path that can cover the two-dimensional parametric mesh according to preset constraints, and removes singular points in the initial path to obtain the target path. This can improve the adaptability of the target path to the three-dimensional freeform surface, ensure the kinematic feasibility and continuity of the target path, and achieve high-quality spraying.

[0108] Figure 3 Flowchart of the painting robot path planning method provided in this application Figure 2 ,like Figure 3 As shown, the method includes:

[0109] S301. Obtain the mesh model of the three-dimensional freeform surface and the model parameters of the spraying robot.

[0110] S302. Based on the mesh model, determine the two-dimensional parametric mesh corresponding to the three-dimensional freeform surface.

[0111] S303. Determine the initial path covering the two-dimensional parametric mesh according to the preset constraints.

[0112] S304. Perform singularity detection on the initial path and obtain the singularity detection results.

[0113] The existence of singularities in the initial path can be determined by methods such as analysis based on the condition number of the Jacobian matrix, resulting in singularity detection results. These results include whether singularities exist in the initial path, or whether they do not, and the specific location of the singularities when they do exist.

[0114] Optionally, before performing singularity detection on the initial path, the detection order can be determined based on the curvature of the three-dimensional freeform surface, including: dividing the initial path to obtain the division result, wherein the division result includes potential risk areas and non-potential risk areas, and the curvature of the potential risk areas is higher than that of the non-potential risk areas; and determining the singularity detection order based on the division result, wherein singularity detection in potential risk areas is superior to singularity detection in non-potential risk areas.

[0115] Specifically, the initial path is divided into multiple sub-regions. For each sub-region, the curvature of the corresponding 3D freeform surface is determined. When the curvature is greater than a preset curvature threshold, the sub-region is identified as a potential risk region. When the curvature is less than or equal to the preset curvature threshold, the sub-region is identified as a non-potential risk region. Then, when performing singularity detection, potential risk regions are prioritized for detection. This can focus on the key areas in the path where singularities are most likely to occur (such as coverage pattern boundaries, path turning points, etc.), reduce invalid detection of low-risk regions, shorten path planning time while ensuring detection effectiveness, and improve overall planning efficiency.

[0116] For example, such as Figure 4 As shown, step S304 can be achieved by the following steps:

[0117] S3041. Select multiple first path points on the initial path according to the first sampling density.

[0118] The first sampling density is preset, such as taking a sampling point every 20mm to obtain multiple first path points.

[0119] S3042. Calculate the Jacobian matrix condition number of the robotic arm at the first path point. When the Jacobian matrix condition number is greater than the first threshold, the region corresponding to the path point is determined as the target region.

[0120] The condition number of the Jacobian matrix ranges from 1 to infinity. A condition number of 1 indicates that the matrix is ​​orthogonal and the robotic arm is in an optimal state. A larger condition number indicates a closer proximity to a singularity. A first threshold is pre-set; for example, if the first threshold is 100, then when the condition number of the Jacobian matrix for the first path point is greater than 100, the region corresponding to that first path point is identified as the target region. The target region is an initially determined area where singularities may exist, to be further detected in subsequent steps. When the condition number of the Jacobian matrix for the first path point is less than or equal to the first threshold, it indicates that the region corresponding to that first path point does not contain singularities.

[0121] S3043. Select multiple second path points in the target area according to the second sampling density.

[0122] The second sampling density is predefined and is higher than the first sampling density. A sampling point is taken every 5 mm to obtain multiple second path points in the target area.

[0123] S3044. Based on the model parameters, perform inverse kinematics calculations on the second path point to obtain the joint angles of the painting robot at the second path point.

[0124] Inverse kinematics calculation is the process of deducing the joint angles of the robotic arm from the spray gun's pose. Based on model parameters, one or more sets of joint angles are solved using numerical or analytical methods to ensure the spray gun reaches the second path point. If multiple sets of joint angles exist, an optimal solution is selected based on the constraints to ensure the physical feasibility of the solution.

[0125] S3045. Based on the joint angle, determine the joint change between two adjacent second path points. When the joint change is greater than the second threshold, the second path point is determined as a singular point; otherwise, the second path point is determined as a non-singular point.

[0126] For two consecutive second path points, the difference in joint angles between them is calculated to obtain the joint change. When the joint change exceeds a second threshold, it indicates that the robotic arm has experienced a sudden change in joint angles near that path point, and this point (usually the latter of the adjacent points) is identified as a singularity. The second threshold is a pre-set critical value based on the robot's joint performance, typically determined by the maximum allowable angular velocity of the joint, acceleration, and the smoothness requirements of the painting process. .

[0127] S3046. Singular points and / or non-singular points are identified as singular point detection results.

[0128] The singularity detection result is whether there are no singularities in the initial path, or whether there are singularities, and the specific location of the singularities when they exist.

[0129] The above method employs a hierarchical detection approach that uses a first sampling density for initial screening (Jacobi matrix condition number) and a second sampling density for fine-tuning (joint variation). This approach can quickly identify potential singular regions and then accurately locate singular points through high-density sampling. This avoids redundant calculations in full-path high-density sampling and prevents singular points from being missed due to sparse sampling, thereby improving the efficiency and accuracy of singular point detection.

[0130] S305. Based on the singularity detection results, modify the initial path to obtain the target path.

[0131] Based on the singularity detection results, the initial path can be offset at the singularity location to form a new path, thus avoiding the singularity region and obtaining the target path.

[0132] For example, such as Figure 5 As shown, step S305 can be achieved by the following steps:

[0133] S3051. Set the spherical region centered on the singular point and with a preset length as the avoidance region. According to the constraints, perform at least one offset operation along the normal direction of the initial path to generate a modified path.

[0134] The radius of the avoidance zone is adaptively adjustable. Specifically, based on the gradient of the change in the condition number of the robot's Jacobian matrix, a safe distance R_initial that allows motion performance to return to normal is initially estimated through offline simulation. Then, an engineering safety factor is introduced to amplify R_initial, forming an initial conservative design value R_design to ensure reliability. Finally, the radius R_final needs to be verified by real machine testing on a specific robot model to ensure that when running outside this zone, sudden changes in joint speed have been effectively suppressed within the threshold allowed by the system.

[0135] The modified path is obtained by avoiding the singularities in the initial path. Under the condition that at least one constraint is satisfied, an offset operation is performed along the normal direction of the initial path to obtain the modified path.

[0136] S3052. Detect whether there are singularities in the modified path. If there are no singularities in the modified path, determine the modified path as the target path.

[0137] It can be done as follows Figure 4 The method shown detects whether there are singularities in the modified path. When there are no singularities in the modified path, it means that the current modified path is the optimal path and is determined as the target path.

[0138] If a singularity exists in the modified path, continue to execute step S3051 to perform the offset operation, and perform singularity detection on the modified path obtained by each offset operation until no singularity is detected in the modified path, and then determine the modified path as the target modified path.

[0139] Furthermore, there may be cases where singularities still exist in the modified path obtained after multiple offset operations. In this case, a feasible solution can be obtained by widening the deviation angle between the spray gun and the surface normal to ensure the continuity of the path, such as widening it from ±5 degrees to ±15 degrees.

[0140] In the above method, an avoidance area is set with the singular point as the center, and a modified path is generated by offsetting along the normal of the initial path and then detected. This can avoid singularities and maintain the relative positional relationship between the path and the surface (such as spraying distance and direction) to the greatest extent possible, thus avoiding a decrease in spraying quality caused by a large adjustment of the path.

[0141] The painting robot path planning method provided in this application locates singular points in the initial path through singular point detection and modifies the initial path. This accurately eliminates or avoids singular points that cause abnormal robot movement, ensuring that the target path is kinematically feasible and preventing problems such as painting trajectory deviation caused by singular points, thereby improving the executability of the path and the painting quality. Furthermore, operators can automatically find a feasible robot end effector path (target path) that covers a three-dimensional freeform surface simply by providing relevant parameters (mesh model and model parameters), without needing specialized robot knowledge.

[0142] like Figure 6 As shown, Figure 6 This is a schematic diagram of the path planning system for the painting robot provided in this application, as shown below. Figure 6 As shown, the spraying robot path planning system 60 includes a data acquisition module 61, a spraying robotic arm 62, a path planning module 63, and a motion control module 64.

[0143] The data acquisition module 61 is used to acquire the mesh model of the three-dimensional freeform surface and the model parameters of the spraying robot;

[0144] The painting robot arm 62 is used to perform painting tasks.

[0145] The path planning module 63 is connected to the data acquisition module 61 and is used to generate a target path covering the three-dimensional freeform surface.

[0146] The motion control module 64 is connected to the path planning module 63 and is used to control the movement of the spraying robot arm 62 according to the target path.

[0147] The data acquisition module 61 can acquire the raw data of the three-dimensional freeform surface through a three-dimensional scanning device or a computer-aided design system, convert the raw data into a mesh model, and acquire the model parameters of the painting robot. The data acquisition module 61 sends the mesh model and model parameters to the path planning module 63.

[0148] The path planning module 63 receives the mesh model and model parameters, determines the two-dimensional parametric mesh corresponding to the three-dimensional freeform surface based on the mesh model, determines the initial path covering the two-dimensional parametric mesh based on preset constraints, and the constraints are at least used to ensure the kinematic feasibility of the painting robot, removes singular points in the initial path, and obtains the target path. The path planning module sends the target path to the motion control module 64.

[0149] The motion control module 64 receives the target path and controls the spraying robot arm 62 to perform the spraying task according to the target path.

[0150] The system in this embodiment can execute the method provided in this embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.

[0151] This application provides an electronic device, including: a memory and a processor;

[0152] The memory stores instructions that the computer executes;

[0153] The processor executes computer execution instructions stored in memory, causing the processor to perform the above-mentioned path planning method for the painting robot.

[0154] This application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the above-described spraying robot path planning method.

[0155] This application provides a computer program product, including a computer program that, when executed by a processor, implements the above-described spraying robot path planning method.

[0156] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0157] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0158] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0159] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0160] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0161] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0162] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0163] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A path planning method for a painting robot, characterized in that, include: Obtain the mesh model of the three-dimensional freeform surface and the model parameters of the spraying robot. The model parameters are used to characterize the kinematic relationship between the joints in the mechanical structure of the spraying robot. Based on the mesh model, determine the two-dimensional parametric mesh corresponding to the three-dimensional freeform surface; Based on preset constraints, an initial path covering the two-dimensional parametric mesh is determined, wherein the constraints are at least used to ensure the kinematic feasibility of the painting robot. Remove the singularities from the initial path to obtain the target path.

2. The path planning method for a painting robot according to claim 1, characterized in that, The process of obtaining the mesh model of the three-dimensional freeform surface and the model parameters of the spraying robot includes: The original data of the three-dimensional freeform surface is obtained by a three-dimensional scanning device or a computer-aided design system. The original data includes at least one of the following: vertex coordinates, triangular facets, and normal vectors. The raw data is converted into the grid model; Obtain the model parameters of the painting robot, which are DH parameters or model files based on the Unified Robot Description Format (URDF).

3. The path planning method for a painting robot according to claim 1, characterized in that, Determining the initial path covering the two-dimensional parametric mesh according to preset constraints includes: Determine the surface type of the three-dimensional freeform surface; Based on the surface type and the constraints, a target path pattern is determined from at least one preset basic path pattern. The initial path is determined based on the target path pattern.

4. The path planning method for a painting robot according to claim 3, characterized in that, Determining the surface type of the three-dimensional freeform surface includes: Calculate the principal curvature distribution and normal vector field of the three-dimensional freeform surface, and perform principal component analysis to obtain the main geometric extension directions; Using the main extension direction as the candidate axis, calculate the radial distribution similarity of the mesh model rotating around the candidate axis; When the radial distribution similarity is greater than the first similarity threshold, the surface type is determined to be a revolution surface; When the radial distribution similarity is less than the first similarity threshold, the shape similarity of the slice contour of the mesh model along the main geometric extension direction is calculated; When the shape similarity is greater than the second similarity threshold, the surface type is determined to be a translational surface; When the shape similarity is less than the second similarity threshold, the surface type is determined to be a hybrid surface, and the three-dimensional freeform surface is divided into multiple sub-regions, and the surface type of each sub-region is determined.

5. The path planning method for a painting robot according to claim 1, characterized in that, The constraints include task constraints and robotic arm constraints. The task constraints are used to ensure the quality of the spraying process, and the task constraints include at least one of the following: spraying distance and direction constraints, and spraying uniformity constraints; The robotic arm constraints are used to indicate the feasibility of robotic arm movement, and the robotic arm constraints include at least one of the following: joint position constraints, speed limits, singularity avoidance, and continuous movement.

6. The path planning method for a painting robot according to claim 1, characterized in that, The step of removing singularities from the initial path to obtain the target path includes: Singularity detection is performed on the initial path to obtain the singularity detection results; Based on the singularity detection results, the initial path is modified to obtain the target path.

7. The path planning method for a painting robot according to claim 6, characterized in that, The process of performing singularity detection on the initial path to obtain singularity detection results includes: Multiple first path points are selected on the initial path according to a first sampling density; Calculate the Jacobian matrix condition number of the robotic arm at the first path point. When the Jacobian matrix condition number is greater than a first threshold, the region corresponding to the path point is determined as the target region. Multiple second path points are selected in the target area according to a second sampling density, wherein the second sampling density is higher than the first sampling density; Based on the model parameters, inverse kinematics calculations are performed on the second path point to obtain the joint angles of the painting robot at the second path point; Based on the joint angle, the joint change between two adjacent second path points is determined. When the joint change is greater than a second threshold, the second path point is determined as a singular point; otherwise, the second path point is determined as a non-singular point. The singular points and / or the non-singular points are identified as the singular point detection results.

8. The path planning method for a painting robot according to claim 6, characterized in that, Before performing singularity detection on the initial path, the method further includes: The initial path is divided to obtain a division result, wherein the division result includes a potential risk region and a non-potential risk region, and the curvature of the potential risk region is higher than that of the non-potential risk region; Based on the division results, the singularity detection order is determined, wherein singularity detection in the potential risk region is preferred over singularity detection in the non-potential risk region.

9. The path planning method for a painting robot according to claim 6, characterized in that, The step of modifying the initial path based on the singularity detection results to obtain the target path includes: A spherical region centered on the singular point and with a preset length as its radius is set as the avoidance region. Based on the constraints, at least one offset operation is performed along the normal direction of the initial path to generate a modified path. The system detects whether there are singularities in the modified path. If there are no singularities in the modified path, the modified path is determined as the target path.

10. A path planning system for a painting robot, characterized in that, The system for implementing the spraying robot path planning method according to any one of claims 1-9 includes: The data acquisition module is used to acquire the mesh model of the three-dimensional freeform surface and the model parameters of the spraying robot; A robotic arm for spraying, used to perform spraying tasks; A path planning module, connected to the data acquisition module, is used to generate a target path covering the three-dimensional freeform surface; A motion control module, connected to the path planning module, is used to control the movement of the spraying robot arm according to the target path.

Citation Information

Patent Citations

  • Method for detecting singular region in motion planning stage of robot

    CN113305881A

  • General avoidance method and system for singular point of mechanical arm

    CN113601512A

  • Method and system for avoiding singular area of mechanical arm under different operation requirements

    CN117124320A

  • Motion state determination method, system and equipment based on inverse kinematics of upper limbs of human body and medium

    CN120477755A

  • Method and system for automatically planning curved surface path of grinding robot

    CN120755896A

Cited By

  • Intelligent path planning method and system for mechanical arm nozzle of deicing vehicle

    CN122143053A