Spraying trajectory planning method and system based on geometric perception and large model assistance

CN122606641BActive Publication Date: 2026-09-22SHANGHAI BALLSNOW INTELLIGENT TECH CO LDT
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611079530.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-21
Publication Date
2026-09-22
Estimated Expiration
2046-07-21

AI Technical Summary

Technical Problem

[0004]为解决现有技术中三维模型至喷涂轨迹自动转换机制缺失、复杂曲面作业下喷枪距离与喷涂方向及轨迹间距自适应规划能力不足、喷涂覆盖率与机器人运动可达性及碰撞风险与姿态连续性等多维约束协同校验困难,以及工艺人员自然语言需求与底层几何规划参数之间结构化映射转换存在技术壁垒等问题,本发明提出一种基于几何感知与大模型辅助的喷涂轨迹规划方法,具体步骤如下:

Benefits of technology

本发明通过主方向识别、曲面分区、多视角射线投影及喷嘴位姿场计算,解决了现有技术中三维模型至喷涂轨迹自动转换机制缺失的问题。该方法能够直接针对复杂曲面自动确定喷枪位置、方向和轨迹连接关系,有效避免了传统方法中依赖人工示教和反复离线调试的繁琐过程,大幅缩短了轨迹规划周期,提高了生产效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122606641B_ABST
    Figure CN122606641B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of intelligent spraying of industrial robots, and particularly relates to a spraying trajectory planning method and system based on geometric perception and large model assistance, comprising: collecting a three-dimensional grid of a workpiece, materials, robot constraints and natural language process requirements; cleaning the grid, obtaining a bounding box, repairing a normal and completing scale normalization, extracting geometric features such as curvature, grooves and occlusions; inputting geometric abstracts, process constraints and semantic requirements into a Transformer large model combined with a process knowledge base, and outputting a standardized structured planning strategy; relying on the strategy to build an adaptive spraying coordinate system, obtaining surface hit points through surface partitioning, solving a nozzle pose field after missing point repair and coverage evaluation, adaptively correcting parameters, re-planning to obtain a compliant trajectory after robot constraint verification; and finally outputting a trajectory file and storing it. The present application can automatically adapt to complex curved surfaces, take into account spraying uniformity and production efficiency, and realize process experience reuse.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent spraying technology for industrial robots, specifically to a spraying trajectory planning method and system based on geometric perception and large model assistance. Background Technology

[0002] In robotic automated spraying operations, trajectory planning is a core technical aspect affecting coating quality, paint utilization, and production efficiency. It directly determines the deposition and distribution of paint on the workpiece surface and also relates to the stability and safety of robot movement. Therefore, trajectory planning is crucial for improving the quality and consistency of product surface coatings, reducing material waste and production costs, ensuring the efficient and stable operation of robot systems, and promoting the intelligent transformation of spraying processes. However, existing spraying trajectory planning methods (such as manually taught trajectories, grid trajectories based on fixed projection planes, offline trajectories based on CAD surface parametric lines, and general-purpose robot offline programming software) typically employ a serial operation mode of "pre-setting the scanning direction, trajectory spacing, nozzle distance, and spray gun posture, followed by repeated trial spraying and manual adjustments by the operator." This mode has the following limitations in practical applications: 1. Fixed scanning strategies have insufficient coverage of abrupt curvature changes, edge regions, and groove regions; 2. The generation of trajectory point positions and spray gun attitudes relies on human experience, and there is a lack of unified calculation for the continuity of spray gun normals, tangents, and Euler angles; 3. The obstructed surfaces and double-sided sprayable areas of complex workpieces need to be manually divided into sections; 4. Process rules, historical experience, and natural language requirements are difficult to automatically translate into trajectory planning constraints; 5. The planning results lack coverage of hotspots, repair of missing points, and closed-loop verification of robot executability.

[0003] Therefore, there is an urgent need for a spraying trajectory planning method that can achieve adaptive dynamic planning and attitude smoothing control of spraying parameters under complex curved surfaces, support the structured automatic conversion of natural language process requirements to underlying geometric parameters, and have multi-dimensional closed-loop verification capabilities for coverage quality and robot executability. Summary of the Invention

[0004] To address the shortcomings of existing technologies, such as the lack of an automatic conversion mechanism from 3D models to spraying trajectories, insufficient adaptive planning capabilities for spray gun distance, spraying direction, and trajectory spacing under complex curved surface operations, difficulties in co-verifying multi-dimensional constraints including spray coverage, robot mobility, collision risk, and posture continuity, and technical barriers to the structured mapping and conversion between the natural language requirements of process engineers and underlying geometric planning parameters, this invention proposes a spraying trajectory planning method based on geometric perception and large model assistance. The specific steps are as follows: S1: Collect the 3D mesh model data of the workpiece to be sprayed, the information on the spraying material, the robot constraints and the natural language process requirements, and complete the standardization of the input data; S2: Clean the three-dimensional mesh model and solve the workpiece bounding box based on the vertex coordinates of the model. Then, complete the normal repair and scale normalization processing. Further extract the surface curvature features, edge features, groove features, surface normal change rate, sprayable area boundary and local occlusion risk based on vertex neighborhood information, and output the standardized workpiece geometric features. S3: Input the standardized data of S1 and the workpiece geometric features of S2 into the Transformer large model, which includes a word embedding layer, a multi-head self-attention layer, a feedforward network layer and a structured decoding layer. The lexical embedding layer encodes the input data into lexical units in the same semantic space; The multi-head self-attention layer receives the encoded lexical units output by the lexical embedding layer, calculates attention weights through queries, key and value vectors, and gives higher weights to rules and parameters that are highly relevant to the current working condition, thus establishing a mapping relationship between semantic requirements and executable process actions. The structured decoding layer generates the structured planning strategy fields item by item during the decoding phase, according to the field name, unit, value range and mandatory constraints. The structured planning strategy fields are validated using rules and geometry to generate the final structured planning strategy. S4: Using the structured planning strategy as a constraint, generate the spraying trajectory. This step involves the following operations: S41 establishes an adaptive spraying equivalent coordinate system and determines the main scanning direction by using the vertex covariance matrix of the three-dimensional mesh model. Based on the spraying equivalent coordinate system, S42 divides the workpiece surface into regions according to the surface features extracted in S2, and generates two-dimensional candidate scan lines and sampling points. S43 uses multi-view ray projection to map the two-dimensional candidate scan lines and sampling points onto the three-dimensional workpiece surface to obtain the surface hit points. S44 repairs missing points in areas lacking surface hit points and performs coverage evaluation and edge compensation on all surface hit points to optimize and obtain corrected effective surface hit points. S45 calculates the nozzle position and attitude field of the effective surface hit point and outputs the initial spraying trajectory. S46 performs adaptive parameter adjustment on the initial spraying trajectory based on the workpiece geometric features and coverage evaluation to obtain an optimized spraying trajectory; S47 performs robot constraint verification on the optimized spraying trajectory, and performs replanning on areas that fail the verification until all trajectory points meet the requirements, generating the final spraying trajectory. S5 outputs the robot trajectory planning file and performs the painting process, while simultaneously writing the trajectory planning file into the process knowledge base for later use.

[0005] This invention also proposes a spraying trajectory planning system based on geometric perception and large model assistance, comprising: The data input and standardization unit receives STL 3D meshes, material parameters, robot constraints, historical recipes, and natural language process requirements, and completes the standardization of coordinate systems, units, fields, model versions, and fixed boundaries of process parameters. The 3D model processing unit reads the STL 3D mesh and performs cleaning, normal repair, scale recognition, and feature extraction. The large model strategy generation unit receives natural language process requirements and historical recipes, and generates structured planning strategies through knowledge base retrieval. The adaptive coordinate system unit establishes the spraying coordinate system and determines the scanning plane based on the principal direction, bounding box, and normal distribution. The candidate trajectory generation unit generates scan lines, ray origins, and candidate nozzle points according to step size, spray width, track spacing, and partitioning strategy; The ray projection and repair unit performs multi-view ray intersection, hit point fusion, missing point interpolation, and edge compensation. The nozzle pose calculation unit calculates the nozzle coordinates and attitude angles based on the surface normal, trajectory tangent, and nozzle height. The constraint verification and replanning unit checks coverage, collision, reachability, attitude continuity, and cycle time, and triggers local replanning. The trajectory output and experience base unit outputs robot trajectory files, visualization results, anomaly reports, and reusable planning records.

[0006] This invention can automatically generate nozzle position, spray gun posture, trajectory segment and export file based on workpiece geometry, spray width, nozzle height, robot constraints and process objectives. It also improves planning efficiency and process reusability by using a large model-assisted strategy generation and geometric constraint verification.

[0007] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention addresses the lack of an automatic conversion mechanism from 3D models to spraying trajectories in existing technologies by employing main direction identification, surface partitioning, multi-view ray projection, and nozzle pose field calculation. This method can directly and automatically determine the position, direction, and trajectory connection of the spray gun on complex curved surfaces, effectively avoiding the tedious process of manual teaching and repeated offline debugging required in traditional methods. This significantly shortens the trajectory planning cycle and improves production efficiency.

[0008] This invention addresses the shortcomings of existing fixed scanning strategies in covering abrupt curvature changes, edges, and grooves. It constructs an adaptive planning model based on the geometric features of the curved surface. This model dynamically adjusts the spray gun distance, spraying direction, and trajectory spacing according to local curvature changes and normal distribution on the workpiece surface, thereby ensuring uniform coating deposition in various areas of complex curved surfaces and solving problems such as localized missed spraying, overspraying, and spray gun distance fluctuations.

[0009] This invention solves the problem in existing technologies of the difficulty in coordinating the verification of paint coverage with robot mobility, collision risk, and posture continuity through a closed-loop planning mechanism formed by coverage evaluation, missing point repair, edge compensation, and robot accessibility verification. This mechanism effectively improves the coverage stability of local edges, grooves, and occluded areas, significantly reduces abrupt posture changes and collision risks, and ensures the operational safety of the robot system.

[0010] This invention combines large-model-assisted strategy generation with geometric constraint verification, solving the technical problem of automatically translating the natural language requirements of process engineers into underlying geometric planning parameters. This approach allows natural language requirements, historical formulas, and enterprise process specifications to be seamlessly integrated into the automated planning process, not only improving the interpretability of trajectory planning parameters but also enabling rapid migration and reuse of planning strategies under different workpieces, materials, and coating targets. Attached Figure Description

[0011] Figure 1 This is a flowchart of the adaptive spraying trajectory planning decision-making process of the present invention; Figure 2 This is an example of the executable spraying trajectory planning effect on a typical workpiece in an embodiment of the present invention, wherein (a) is a trajectory effect diagram of a planar window frame and (b) is a trajectory effect diagram of a box-shaped workpiece. Detailed Implementation

[0012] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.

[0013] like Figure 1 As shown, the spraying trajectory planning method based on geometry perception and large model assistance includes the following specific implementation steps: S1: Obtain the 3D mesh model data, material information, robot constraints, and natural language process requirements of the workpiece to be coated. Obtain the basic data and constraints required for spray trajectory planning. Specifically, obtain the 3D mesh model of the workpiece to be sprayed (such as an STL file), the characteristic parameters of the spraying material (including viscosity, solid content, recommended film thickness range, atomization pressure, flow rate, and drying / curing conditions), the target spraying area, target coverage, spray width, nozzle fixed height, trajectory step length, allowable overlap rate, robot workspace, spray gun posture restrictions, collision safety distance, process cycle requirements, and the natural language process requirements input by the operator.

[0014] Based on the data and constraints obtained above, this invention, after planning and verification, outputs executable spraying trajectory data and evaluation results. The output data includes: nozzle three-dimensional coordinates, spray gun attitude angle, surface normal vector and trajectory tangent vector, trajectory segment connection relationship, partition number, suggested spraying speed, coverage evaluation result, abnormal area marker, and a trajectory file in CSV format that can be imported by the robot.

[0015] S2: Mesh cleaning, normal repair, scale normalization, and feature extraction For the three-dimensional mesh model of step S1 Preprocessing is performed, in which } is the set of vertices. This is a set of triangular faces (the smallest triangular mesh unit consisting of three adjacent vertices). Then, basic cleaning operations such as duplicate face removal, isolated point removal, and hole filling are performed sequentially.

[0016] After basic cleaning, the bounding box of the 3D mesh model of the workpiece to be coated is obtained to determine the overall scale, spatial position, and subsequent normalization scaling factor of the model, and to provide basic geometric reference for main direction identification, trajectory spacing setting, and collision safety boundary. The length, width, and height vectors of the bounding box are calculated using the minimum and maximum coordinate vectors of the vertex set on the x, y, and z axes. The diagonal length and center of the bounding box are further calculated, and the vertex coordinates are normalized. , , , , in, and Let L be the minimum and maximum coordinate vectors of the vertex set on the x, y, and z axes, respectively; L be the length, width, and height vectors of the bounding box; and D be the length of the diagonal of the bounding box. Center of the bounding box; Represents the vertex coordinates. The coordinates of the vertices are normalized to achieve a unified model scale; at the same time, the normalization scaling factor D is recorded so that the normalized coordinates can be back-calculated into the actual physical dimensions required for robot execution during the trajectory derivation stage.

[0017] Because STL meshes may have issues such as reversed normals, inconsistent local normals, and invalid normals caused by zero-area patches during export, repair, or coordinate transformation, failure to repair these issues can lead to incorrect spray gun orientation, misjudgment of ray projection, and attitude jumps. Therefore, normal repair is performed based on the normalized mesh described above. First, for the j-th patch, its center point, model center, and the direction vector from the model center to the patch center are calculated as follows: ; ; ; ; in, Center of the dough , and To form a sheet The three vertices; The centroid of the vertex is the model center, and N is the total number of vertices; This represents the direction vector from the center of the model to the center of the patch. for The normalized outer reference direction vector.

[0018] Subsequently, the normals of the triangular facets are calculated and consistency corrections are performed. Initial facet normals. Defined as a unit vector perpendicular to the plane containing the triangular facet, obtained through a cross product operation based on the vertex order: ; To ensure that all normals point uniformly outward from the model, the following determination rule is used for correction: when At that time, determine the current face normal. It is now correctly oriented towards the outside of the model; when When the normal direction is reversed, a flip operation is performed. .

[0019] in, Indicates the initial face normal. The normalized model center points to the outer reference direction vector of the patch center. The preset directional tolerance threshold is fixed at 0.1 to prevent approximate tangential patches from being misjudged due to numerical errors.

[0020] This invention addresses four types of abnormal normals: invalid normals caused by zero-area patches, reverse normals opposite to the direction of the model's outer side, isolated normals inconsistent with the main direction of adjacent patches, and normals contradicting the target spraying side. The following judgment criteria are established: ; ; ; in, This is the area tolerance threshold; The abnormal normal angle threshold is used to determine whether the included normal angle between adjacent panels or the target spraying side exceeds the allowable range, and is fixed at 90°.

[0021] The correction process employs a hierarchical processing strategy: first, zero-area patches that meet the area determination criteria are removed; second, the reverse normal is flipped according to the aforementioned outward normal rules; and finally, for isolated normals, a breadth-first search (BFS) propagation mechanism based on adjacency relationships combined with a majority voting algorithm is used to smooth isolated normals.

[0022] After the abnormal normal correction is completed, the normal of each vertex is recalculated using an area-weighted method. : , in, This represents the area of ​​adjacent facets. This weighted processing allows the nozzle attitude calculation to preserve surface variations while effectively avoiding nozzle attitude jumps caused by abrupt changes in the normal of a single triangular facet.

[0023] Based on this, the present invention further extracts curvature features, edge features, groove features, surface normal change rate, sprayable area boundary and local occlusion risk, for use in subsequent surface partitioning, trajectory spacing adjustment, spray gun height compensation and risk area densification sampling.

[0024] The curvature characteristics and the rate of change of normal are calculated as follows: ; ; in, For dough The curvature index; For dough The normal rate of change; Represents a piece of dough The set of neighborhood patches; To prevent extremely small constants with a denominator of zero, in subsequent processing, [the following is used]: As the main criterion for surface encryption sampling, As a verification indicator for normal change; Representing a neighborhood patch normal direction of the face, Represents a piece of dough normal to the surface; express The center of the dough Neighboring face The center of the dough; Edge features are determined by both boundary edges and sharp edges. They are used to identify open boundaries, sharp turns, and areas prone to attenuation due to paint coverage. These features also serve as the basis for edge-reinforced scanning, outward expansion compensation lines, and trajectory attitude limiting. The criteria for determining sharp edges are: ; If a mesh edge is shared by only one facet, then the edge is an open boundary; if two adjacent faces satisfy the above formula, then the edge is an acute edge. This represents the acute edge angle threshold, used to determine whether the included angle of the normals of adjacent facets forms an acute edge; it is fixed at 40°. Based on this, it uses... It represents the shortest distance from the patch to the set of boundary edges and sharp edges, used to measure how close the patch is to the edge, and is involved in edge risk scoring, lane spacing reduction, and compensation line generation.

[0025] The groove feature is determined by the changes in local concavity direction and normal direction. It is used to identify concave, narrow slit, and occluded areas that are difficult to cover by ordinary planar scanning, and provides a basis for subsequent nozzle height reduction, multi-angle scanning, and local replanning. The neighborhood shrinkage trend and groove score are as follows: ; ; in, The threshold for determining retraction; This indicates the groove score; the neighborhood shrinkage trend is used to determine whether the centers of adjacent patches shrink inward along the local normal, to distinguish between ordinary curvature changes and actual groove structures. When the preset groove judgment threshold is exceeded, the corresponding area will be marked as a groove narrow slit composite area. The preset threshold is determined by historical process samples or on-site calibration and is used to trigger local scanning angle adjustment, nozzle height compensation, sampling encryption and subsequent coverage verification.

[0026] The sprayable area boundary is determined by the target sprayable area, the sprayable side, and visibility. The sprayable surface is determined as follows: ; in, Candidate spraying direction; This represents the maximum allowable angle threshold between the candidate spraying direction and the normal to the surface patch, fixed at 70°. This applies when the surface patch simultaneously satisfies both ray visibility and robot reachability. Belongs to the sprayable surface collection ; China and Africa The adjacent edges of the facets form the boundaries of the sprayable area.

[0027] The risk of local occlusion is characterized by multi-view ray visibility: ; in, The higher the value, the higher the risk of occlusion. The system performs compensation in a fixed order: reverse view, side view, and zone compensation scan.

[0028] S3: Large-scale model combined with process knowledge base generates planning strategies This step utilizes a large model-assisted strategy generation unit to transform unstructured natural language process requirements, empirical rules, and historical project knowledge into structured strategy parameters that can be directly executed and verified by the geometric planning layer. Instead of directly generating robot trajectory point coordinates, it transforms them into computable trajectory planning constraints, providing an interpretable source and reusable records for subsequent trajectory planning parameters. The specific implementation steps are as follows: (1) Multi-source information input and fusion The input of the large model-assisted policy generation unit receives three types of key information to construct the contextual basis for policy generation: 1) Workpiece and geometry summary, including quantitative data such as bounding box dimensions, principal direction vector, curvature distribution statistics, edge / groove / occlusion risk heat map, and sprayable area number; 2) Process constraint parameters, covering spray width, nozzle fixed height, target coverage, allowable overlap range, material system properties, production cycle requirements and robot kinematic posture limitations; 3) Semantic interaction information, including natural language requirements input by operators (such as "enhance edge coverage"), recipes of similar historical projects, records of past defect causes, and enterprise standard process specifications text.

[0029] (2) Enhanced knowledge retrieval and generation based on Transformer This invention employs a large language model based on the Transformer architecture. Through the collaborative work of a lexical embedding layer, a multi-head self-attention layer, a feedforward network layer, and a structured decoding layer, it achieves a precise mapping from semantics to parameters. Specifically, the lexical embedding layer transforms natural language process requirements, historical recipe fields, geometric summary fields, and rule labels into vector representations of a unified dimension. This allows discrete semantics such as "edge enhancement," "groove compensation," and "reduced track spacing" to enter the same semantic space, providing a numerical input basis for the subsequent multi-head self-attention layer to calculate the correlation between different workpiece parts, defect risks, and trajectory parameters.

[0030] The large-scale model knowledge retrieval scoring uses the following metrics to rank and filter historical formula rules and enterprise process specifications during the knowledge retrieval phase, and the rule entries with the highest scores are used as the Transformer input context and structured decoding constraints: ; in, Encoding vectors for natural language text; Encode vectors for historical recipe rule entries; Indicates semantic similarity; This indicates the degree of matching between workpiece dimensions, curvature grade, and material system; Indicates the matching degree of the rule field; These are the corresponding weighting coefficients.

[0031] The multi-head self-attention layer within the model establishes deep semantic relationships between "workpiece location - defect risk - process action - trajectory parameters." Its working principle is as follows: it receives workpiece location, defect risk, process action, and trajectory parameters encoded as terms in the same semantic space. Attention weights are calculated through queries, key-value vectors, and other methods, giving higher weights to rules and parameters highly relevant to the current working condition, thereby establishing a mapping relationship between semantic requirements and executable process actions. For example, the model can identify the semantic concept of "edge sagging risk" and automatically associate it with specific process actions such as "edge outward expansion scanning," "reducing the upper limit of overlap rate," and "specific attitude angle limitation." The structured decoding layer generates data item by item during the decoding phase, according to field name, unit, value range, and mandatory constraints. It filters incomplete or out-of-bounds fields using a preset structured data template (JSON Schema), rule validator, and geometry validator. Finally, it outputs structured planning strategy fields according to the preset structured data template, avoiding the generation of unexecutable free text. Each field includes a source tag and confidence level, with the source uniformly recorded as "large model retrieval enhancement generation + geometric verification feedback." scan_axis: Recommended scan direction; spray_side: Preferred spray side; partition_rule: Surface partitioning rule; path_spacing_initial: Initial value for path spacing; step_length_initial: Initial value of step length; edge_compensation_factor: Edge encryption factor; groove_scan_angle: The scanning angle of the groove region; nozzle_height_value: Nozzle height setting value; overlap_ratio_limit: The threshold for limiting the overlap ratio; pose_smoothing_weight: Pose smoothing weight; coverage_threshold: Coverage acceptance threshold; collision_safe_distance: Collision safety distance; replanning_rule: The rule that triggers replanning.

[0032] (3) Validation of structured programming strategy To ensure the physical feasibility of the strategy, the structured programming strategy output by the large model undergoes rigorous review by both a rule validator and a geometry validator. Rule validator: Checks field integrity, unit consistency, parameter upper and lower limits, process-disabled items, and logical relationships between fields. For example, it checks whether `path_spacing_initial` falls within [0.4]. 0.9 Within the range, whether the noise_height_value is equal to the spray gun's calibrated height, and whether the edge_compensation_factor matches the target coverage.

[0033] Geometric calibrator: Checks the matching relationship between the strategy and the workpiece bounding box, sprayable area, curvature distribution, robot workspace, and spray gun posture constraints.

[0034] After successful verification, the final structured planning strategy is sent to the adaptive trajectory generation layer to guide the calculation of specific trajectory points. If verification fails, the abnormal field names, failure reason analysis, and suggested parameter boundaries are encapsulated as feedback prompts and returned to the large model for regeneration. The regenerated strategy will then re-enter the rule verification and geometric verification process described above, forming a closed loop until all parameters meet the constraints.

[0035] The technical role of this unit is to transform natural language process requirements, empirical rules, and historical project knowledge into computable trajectory planning constraints, which significantly improves the system's intelligence level and the reliability of parameter generation.

[0036] S4: Using the structured planning strategy output in step S3 as constraints, generate the spraying trajectory, specifically by performing the following operations: S41 establishes an adaptive spraying coordinate system to unify the workpiece geometry, scanning direction, and robot execution coordinates into the same local reference frame. First, the geometric principal directions of the workpiece are calculated based on the vertex covariance matrix of the workpiece's 3D model, which are used to determine candidate spraying scanning directions. ; ; ; Where μ represents the vertex coordinate mean vector, used to characterize the geometric centroid of the workpiece point cloud; N represents the number of vertex coordinates; and C represents the vertex coordinate covariance matrix, used to describe the degree of dispersion of the model in each direction. This represents the eigenvalue corresponding to the k-th principal direction. The larger the eigenvalue, the greater the extension of the model in that direction; For the direction of maximum extension, This is the next direction of extension. The thickness normal principal direction is used as a candidate reference for the axis of the spraying coordinate system. The maximum extension direction usually corresponds to the main scanning direction, the secondary extension direction corresponds to the spread direction of the pass spacing, and the thickness normal principal direction is used to determine the spraying side and the ray projection direction.

[0037] Construct an equivalent coordinate system for spraying and calculate the scores for candidate directions. , Where T is the constructed spraying equivalent coordinate system, The unit principal axis vector of the spraying equivalent coordinate system is determined by the workpiece geometric principal directions, the spraying measurement normal, and the orthogonal constraint of the right-hand coordinate system. It is the center of the bounding box, serving as the origin of the spraying equivalent coordinate system, so that the mesh vertices, scan lines, and nozzle poses can be converted to a unified coordinate system for calculation.

[0038] in, By constraining the three axes of the coordinate system to be mutually orthogonal and satisfying the right-hand coordinate system relationship through the cross product, the orientation of the scanning plane is prevented from being flipped. , in, This indicates the candidate direction score. For long strips or body panels, if the following conditions are met... Then, priority is given to extending along the direction of maximum extension. Generate the main scan line; for an approximately square region, select the direction with the highest candidate direction score as the scan direction. The available scan length or extended matching degree corresponding to the candidate direction. This refers to the curvature fluctuations of the region traversed during scanning along this direction. The TurnCount is a penalty for robot accessibility and occlusion risk, and it represents the expected number of turns or the complexity of the trajectory turnaround. , , , These are the corresponding weighting coefficients.

[0039] S42 performs surface partitioning based on the spraying coordinate system and generates candidate scan lines and sampling points; The workpiece surface is divided into multiple spraying sub-regions based on curvature, boundaries, grooves, occlusion, and normal change rate to separate areas with different geometric risks and spraying compensation requirements. This facilitates the subsequent setting of scanning direction, pass spacing, nozzle height, and replanning rules. The zoning is performed by calculating a comprehensive risk score for each surface patch. The comprehensive risk score is calculated as follows: ; in, , , These are the normalized rates of change of curvature, groove, and normal. This indicates the edge-affected distance threshold, which is fixed at 0.8. ; Indicates the effective spray width at the current position. This indicates the degree of risk of partial occlusion or loss of visibility of a patch. This represents the weighting coefficient; based on the comprehensive risk score and geometric characteristics, the spraying sub-regions are divided according to the following indicators: Flat area: ; Curvature abrupt change region: ; Edge area: ; Recessed area: ; Areas prone to obstruction: ; in, The upper limit threshold for the comprehensive risk score of the smooth zone can be set based on historical process samples or calibration experience, preferably between 0.35 and 0.45. Finally, perform connected component merging on adjacent faces of the same type, and merge those with areas smaller than [the specified area]. Isolated regions with a minimum connected area threshold are merged into the adjacent main region with the highest risk, thus completing the surface partitioning.

[0040] After completing the surface partitioning, the system uses the projection range of each sub-region in the spraying coordinate system as the boundary, and generates equidistant candidate scan lines according to the scanning direction, initial value of trajectory spacing and initial value of step size given by the structured planning strategy; then, two-dimensional candidate sampling points are arranged along the scan lines according to the step size, and they are used as the set of ray origin points for ray projection.

[0041] S43 uses multi-view projection to map two-dimensional candidate scan lines and sampling points onto the three-dimensional workpiece surface to obtain surface hit points; Using two-dimensional candidate sampling points as the ray origin o, the parametric equation r(t) = o + td, t ≥ 0 is used to characterize the ray emitted by the spray gun, where o represents the candidate ray origin, d represents the unit ray direction vector, t represents the non-negative distance parameter along the ray direction, and r(t) represents the three-dimensional spatial position of the ray at parameter t.

[0042] Equation of the intersection point of the ray and the triangular facet Solve the hit relationship, where, , , Let β and γ be the three vertices of the triangular facet, and let β and γ be the coordinate parameters of the centroid within the triangular facet. When β≥0, γ≥0, and β+γ≤1 are satisfied, it is determined that the ray hits the triangular facet, and the intersection point corresponding to the smallest positive t is taken as the surface hit point.

[0043] For double-sided workpieces, thin-walled parts, or workpieces with obstructions, multi-view ray projection is required from both the forward and reverse directions. The hit points are then fused based on the spraying side, surface normal, center distance, and accessibility rules. This invention employs a multi-view hit point fusion scoring method for evaluation, using the following formula: ; in, The direction of the ray is the viewing angle. For the direction of the face, Indicate whether it belongs to the target spraying side. This refers to the distance of the spray gun. This indicates the reference value for the spray gun's calibrated height or desired nozzle height. Robot reachability marking To shield the risk, This represents the weighting coefficient. The system retains the highest-scoring hit point that satisfies the constraints of spray gun distance, incident angle, and accessibility; when both sides meet the target spraying side conditions and the distance between them is greater than the thin-wall threshold, it is split into two spraying sub-regions for separate planning; for distances less than... Merge duplicate points. This represents the distance threshold for merging duplicate hits, fixed at 0.15. This fusion mechanism is used to obtain effective surface points on the target sprayed surface, thereby reducing missed points caused by occlusion and model pose.

[0044] S44 Missing Point Repair, Edge Compensation and Coverage Evaluation Due to the presence of grooves, concave structures, and local curved surface occlusions on the workpiece, some candidate rays may be blocked by the structure or not intersect with the target spraying side, resulting in a lack of effective surface hit points at the corresponding mesh location and the formation of trajectory blanks, thus causing missed spraying defects. Therefore, missing point repair is required. A local neighborhood index is constructed based on adjacent effective surface hit points, and the height or local surface position of the missing point is estimated by distance-weighted interpolation. ; ; Where u represents the two-dimensional coordinates of the missing point in the spraying coordinate system. Let be the two-dimensional coordinates of the k-th effective neighborhood point in the spraying coordinate system; The three-dimensional coordinates or local height value of the kth effective neighboring surface point; These are distance-weighted coefficients. ε is the distance decay exponent, used to control the influence of nearest neighbors on the interpolation results. ε is a small constant to prevent the denominator from being zero. If the nearest valid distance to a missing point exceeds the interpolation distance threshold, the missing point is marked as an invalid point and not interpolated. This is recorded in the missing coverage area report to indicate that the area needs manual review, supplementation of scanning views, or triggering of local replanning. The interpolation distance threshold is determined by the local trajectory scale. ; in, Indicates lane spacing; In addition, a normal angle verification threshold is set after interpolation, which is fixed at 45°. If the angle between the interpolation point and the neighboring normal exceeds this threshold, a manual verification or replanning is prompted, but it is not used as a hard constraint for whether the interpolation is allowed.

[0045] Subsequently, coverage evaluation is calculated for all effective hit points based on the spray pattern model to ensure that the deposition distribution of trajectory points meets the target coverage rate. For any surface hit point q, its coverage can be obtained by superimposing the distance attenuation functions of adjacent nozzle trajectory points: ; in, Let q be the spatial distance from the sampling point q to the i-th trajectory; This represents the spray spread width or coverage attenuation scale corresponding to the i-th trajectory, which is related to the spray width, nozzle height, and spray gun angle. These are the attitude projection coefficient and the visibility coefficient.

[0046] Next, based on the coverage, areas with insufficient coverage, excessive coverage, and fluctuating edges are identified, and feedback is provided to adjust the local trajectory spacing, spray gun height, or compensation line division areas and adjust the local lane spacing.

[0047] Specifically, the coverage area is divided according to the following indicators, and local lane spacing is adjusted accordingly: when When identified as an area with insufficient coverage, the rules are adjusted to... In areas with insufficient coverage, reduce local track spacing and increase track density; when When identified as an overly densely covered area, the rule is adjusted to... Increase local channel spacing and reduce repeated deposition in areas with overly dense coverage; when and When the threshold is exceeded, it is identified as an edge fluctuation region; increase by 0.4. The outer scan line; nozzle height is 0.9. Perform groove compensation; in, The tolerance for under-coverage determination is fixed at 0.12; The over-coverage judgment tolerance is fixed at 0.18; For target coverage or calibrated coverage baseline value; Let be the variance of the coverage of the neighborhood of the sampling point q, used to identify edge coverage fluctuations; This represents the adjusted local track spacing, where Δ represents the original local track spacing. The lane spacing reduction factor for under-covered areas is fixed at 0.20; This is the amplification factor for the inter-channel spacing in the over-coverage area.

[0048] S45 calculates the nozzle position and attitude field of the effective surface hit points after missing point repair, coverage evaluation and edge compensation optimization, and further converts the corrected surface path into end-effector pose commands that can be recognized by the robot controller.

[0049] First, for each valid surface hit point Read or estimate the corresponding surface normal, and calculate the nozzle point based on the nozzle height: Where h represents the nozzle height; n represents the continuous surface normal of the effective surface hit point, by analyzing the surface hit point... normal to adjacent vertices By performing interpolation or weighted averaging, the continuous surface normal n at the hit point can be obtained; Spray gun tool coordinate system spray axis direction: ; The direction of travel is determined by the tangent t of the trajectory formed by adjacent nozzle points: , The trajectory is tangentially projected onto a plane perpendicular to the injection axis to obtain a stable tool coordinate system, constructed through tangential projection and cross product: X-axis component: ; Y-axis component: ; Finally, the tool coordinate system rotation matrix is ​​obtained. They are then converted into quaternion poses that can be recognized by the robot controller.

[0050] To ensure the generated trajectory meets the robot's kinematic performance requirements, the continuity of nozzle height, attitude angle, tangential change, and acceleration between adjacent trajectory points needs to be checked. Quaternions are used to calculate the attitude change angle between two adjacent points. : ; During execution, the upper limit of the attitude change angle is fixed at 8°; the nozzle height change... Not exceeding 0.05 The system ensures that the acceleration and velocity of the overall trajectory do not exceed the upper limit given by the robot controller, thereby guaranteeing the smoothness and safety of the painting process. When the attitude change exceeds the set threshold, the system improves the smoothness of robot execution through local resampling, attitude interpolation, or trajectory segment splitting.

[0051] S46 trajectory parameters adaptively adjusted Due to the diverse geometric features of workpiece surfaces, such as abrupt curvature changes, concave grooves, edge boundaries, and local occlusion, using uniform parameter adjustments can lead to problems such as uneven coating, missed spraying, edge runs, or redundant and inefficient cycle time. Therefore, this invention establishes an adaptive adjustment rule for trajectory parameters, dynamically adjusting trajectory parameters based on geometric features and coverage evaluation. In areas with high curvature, the track spacing is reduced and the sampling density is increased; in edge areas, outward scanning lines or edge compensation lines are added; in grooved areas, a smaller nozzle height and multi-angle scanning are used; in flat areas, the track spacing and speed are increased; and in areas with limited accessibility, the scanning direction is adjusted or the area is divided into multiple sub-regions.

[0052] Specifically, adaptive parameter adjustment is based on baseline parameters. , , , For reference, the indicators are as follows: Areas with greater curvature: local track spacing The range of values ​​is to ; The trajectory step size s is reduced by 20% to 50%, and the sampling density is increased by 25% to 100%. Recessed area: The nozzle height h ranges from 0.85. up to 0.95 ; The edge expansion distance is set to 0.3. Up to 0.5 The groove is scanned at multiple angles from ±15° to ±30°. In flat areas: the trajectory spacing s can be increased by 5% to 20%, and the speed v can be increased by 5% to 15%.

[0053] The spacing between local channels is determined based on the effective spray width and the overlap coefficient: ; in, This represents the effective spray width at the current position. The overlap coefficient is determined by curvature, edge distance, target coverage, and risk level.

[0054] The effective spray width is calculated using the geometric spray width model and calibration corrections: ; ; in, This represents the geometric spray width calculated from the nozzle height and the spray gun angle, where φ is the spray gun angle and ψ is the spray width calculated from the atomization pressure. Fan-shaped air pressure The spray width correction coefficient obtained from the flow rate Q calibration; This is the curvature reduction factor; This is the normalized curvature index for the current position.

[0055] The overlap coefficient is calculated using the following formula: ; in, Represents the amplitude limiting function. The baseline overlap coefficient; The minimum overlap coefficient is fixed at 0.45. The maximum overlap coefficient is fixed at 0.85; the greater the curvature and the closer to the edge, the higher the risk level. The smaller the value, the smaller the lane spacing.

[0056] In addition, risk assessments must be conducted, with different risk levels corresponding to strategies such as maintaining the baseline, moderate encryption, mandatory compensation, and restructuring. The risk level is determined by a comprehensive risk indicator. Division: ; Low risk; Medium risk; High risk; Extremely high risk; By adjusting the above adaptive parameters, the trajectory density adapts to the shape of the workpiece and the spraying risk, ensuring uniform coverage of complex curved surfaces, edges and grooves, while reducing the risks of underspray, overspray, abrupt changes in posture and cycle redundancy, thereby generating a spraying trajectory.

[0057] S47 Robot Constraint Verification and Replanning After trajectory generation, the system performs checks on each trajectory point regarding robot workspace, spray gun distance, upper and lower limits of attitude angles, adjacent point velocities, acceleration, collision safety distance, and cycle time constraints. Specifically, during execution, the system will check the nozzle pose... Input the robot inverse kinematics solver, if there exists at least one set of joint solutions If all joint angles, joint velocities, and joint accelerations are within the upper and lower limits given by the robot model, then the point satisfies the reachability constraint.

[0058] The robot constraint verification adopts the following pass criteria: ; ; ; ; in, Minimum collision distance; For a safe collision distance, it is fixed at 30mm; This is the current spray gun height; The threshold for constraining the spray gun's incident angle or attitude angle; This represents the total trajectory time.

[0059] For regions that fail the validation, perform differentiated replanning operations based on the anomaly type: The nozzle height in collision risk areas will be uniformly increased by 8% to increase safety margin; In areas of abrupt posture change, intermediate transition points are added and quaternion interpolation is used to prevent violent joint movement; Areas with insufficient accessibility are divided into sub-regions or the scanning direction is switched to find alternative paths; Supplement local scan lines in areas with insufficient coverage, reduce the spacing between lines, and increase the spray density; Increase the spacing between lanes in areas that are too densely covered to avoid excessively thick paint film.

[0060] After replanning, perform coverage and reachability checks again until the output conditions are met or a list awaiting manual confirmation is generated.

[0061] The overall trajectory verification pass standard is: ; ; ; ; in, Minimum coverage is fixed at 97%. and These are the upper limits for the percentage of undersprayed and oversprayed areas, respectively. The angle of attitude change between adjacent points. The trajectory planning is considered complete only when all trajectory points satisfy the following conditions: inverse kinematics has a solution, the collision safety distance is met, the spray gun distance and incident angle are compliant, and the velocity and acceleration beat constraints are met.

[0062] The S5 outputs a robot trajectory file and performs painting according to the file, while also writing the trajectory file into the experience library for future reuse.

[0063] To verify the feasibility of the spray trajectory planning method of the present invention, the present invention conducted experimental verification based on the multi-view geometric input, trajectory primitive expansion results and validator statistical results in the local spray trajectory simulation sample library (spray_llm_copilot_research). As shown in Table 1, the 50mm and 100mm neighborhood coverage of the trajectory to the target surface (Cov@50, Cov@100), the structured output efficiency, the anchor point role hit rate and the mis-spraying rate in the no-spray area were used as evaluation indicators.

[0064] Table 1 Experimental verification results

[0065] The results show that, compared to the baseline scheme that directly outputs dense trajectory prompts from a large model, the preferred embodiment of this invention, after trajectory primitive expansion and geometric verification, achieves an improvement of approximately 68.3% in performance at a 50mm neighborhood coverage rate and approximately 33.4% at a 100mm neighborhood coverage rate. Furthermore, in examples including panel local coordinate anchor points and multi-view metadata, the structured output efficiency reaches 100%, with an average of 7.25 expandable areas, an average of 25.75 anchor points, and a maximum anchor point hit rate of 100%. After adding no-spray / exclusion zone rules, the false spray rate under bounded verification caliber decreases from 35.39% to 21.86%, a reduction of 13.53 percentage points. Figure 2 As shown, the present invention can form regular and continuous reciprocating scans, edge compensation, and transition connection trajectories for both the planar window frame task and the box-shaped workpiece task. The above results demonstrate that the present invention, through the closed-loop combination of multi-view semantic understanding, geometric anchor point constraints, trajectory primitive expansion, and no-spray area verification, can significantly outperform the large model baseline that directly outputs trajectory points, and forms an executable trajectory scheme that better conforms to the constraints of the spraying operation.

[0066] This application also includes a system for implementing the above-mentioned spray trajectory planning method based on geometric perception and large model assistance, specifically including: a data input and standardization unit, a three-dimensional model processing unit, a large model strategy generation unit, an adaptive coordinate system unit, a candidate trajectory generation unit, a ray projection and repair unit, a nozzle pose calculation unit, a constraint verification and replanning unit, and a trajectory output and experience base unit.

[0067] The data input and standardization unit receives STL 3D meshes, material parameters, robot constraints, historical recipes, and natural language process requirements, and standardizes coordinate systems, units, fields, model versions, and fixed boundaries of process parameters.

[0068] The 3D model processing unit reads the STL 3D mesh and performs cleaning, normal repair, scale recognition, and feature extraction.

[0069] The large model strategy generation unit receives natural language process requirements and historical recipes, and generates structured planning strategies through knowledge base retrieval.

[0070] The adaptive coordinate system unit establishes the spraying coordinate system and determines the scanning plane based on the principal direction, bounding box, and normal distribution.

[0071] The candidate trajectory generation unit generates scan lines, ray origins, and candidate nozzle points according to step size, spray width, track spacing, and partitioning strategy.

[0072] The ray projection and repair unit performs multi-view ray intersection, hit point fusion, missing point interpolation, and edge compensation.

[0073] The nozzle pose calculation unit calculates the nozzle coordinates and attitude angles based on the surface normal, trajectory tangent, and nozzle height.

[0074] The constraint verification and replanning unit checks coverage, collisions, reachability, attitude continuity, and cadence, and triggers local replanning.

[0075] The trajectory output and experience base unit outputs robot trajectory files, visualization results, anomaly reports, and reusable planning records.

[0076] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the present invention should be included within the protection scope of the present invention.

Claims

1. A spraying trajectory planning method based on geometric perception and large model assistance, characterized in that, Includes the following steps: S1: Collect the 3D mesh model data of the workpiece to be sprayed, the information on the spraying material, the robot constraints and the natural language process requirements, and complete the standardization of the input data; S2: Clean the three-dimensional mesh model and solve the workpiece bounding box based on the vertex coordinates of the model. Then, complete the normal repair and scale normalization processing. Further extract the surface curvature features, edge features, groove features, surface normal change rate, sprayable area boundary and local occlusion risk based on vertex neighborhood information, and output the standardized workpiece geometric features. S3: Input the standardized data of S1 and the workpiece geometric features of S2 into the Transformer large model, which includes a word embedding layer, a multi-head self-attention layer, a feedforward network layer and a structured decoding layer. The lexical embedding layer encodes the input data into lexical units in the same semantic space; The multi-head self-attention layer receives the encoded lexical units output by the lexical embedding layer, calculates attention weights through queries, key and value vectors, and gives higher weights to rules and parameters that are highly relevant to the current working condition, thus establishing a mapping relationship between semantic requirements and executable process actions. The structured decoding layer generates the structured planning strategy fields item by item during the decoding phase, according to the field name, unit, value range and mandatory constraints. The structured planning strategy fields are validated using rules and geometry to generate the final structured planning strategy. S4: Using the structured planning strategy as a constraint, generate the spraying trajectory. This step involves the following operations: S41 establishes an adaptive spraying equivalent coordinate system and determines the main scanning direction by using the vertex covariance matrix of the three-dimensional mesh model. The equivalent coordinate system for spraying is constructed as follows: Calculate the principal direction based on the vertex covariance matrix of the workpiece's 3D model: ; ; ; Where μ represents the mean vector of vertex coordinates; N represents the number of vertex coordinates; C represents the vertex coordinates; C represents the vertex coordinate covariance matrix. This represents the eigenvalue corresponding to the k-th principal direction. ; For the direction of maximum extension, This is the next direction of extension. The thickness normal is the principal direction; Construct an equivalent coordinate system for spraying and calculate the scores for candidate directions. , , , Where T is the equivalent coordinate system for spraying. This represents the unit principal axis vector of the spraying equivalent coordinate system. Center of the enclosure box This indicates the candidate direction score. For long strips or body panels, if the following conditions are met... The main scan line is generated first along the direction of maximum extension; for an approximately square region, the direction with the highest candidate direction score is selected as the scan direction. The available scan length or extended matching degree corresponding to the candidate direction. For curvature fluctuations, The TurnCount is a penalty for robot accessibility and occlusion risk, and it represents the expected number of turns or the complexity of the trajectory turnaround. , , , These are the weighting coefficients; Based on the spraying equivalent coordinate system, S42 divides the workpiece surface into regions according to the surface features extracted in S2, and generates two-dimensional candidate scan lines and sampling points. S43 uses multi-view ray projection to map the two-dimensional candidate scan lines and sampling points onto the three-dimensional workpiece surface to obtain the surface hit points. S44 repairs missing points in areas lacking surface hit points and performs coverage evaluation and edge compensation on all surface hit points to optimize and obtain corrected effective surface hit points. S45 calculates the nozzle position and attitude field of the effective surface hit point and outputs the initial spraying trajectory. S46 performs adaptive parameter adjustment on the initial spraying trajectory based on the workpiece geometric features and coverage evaluation to obtain an optimized spraying trajectory; S47 performs robot constraint verification on the optimized spraying trajectory, and performs replanning on areas that fail the verification until all trajectory points meet the requirements, generating the final spraying trajectory. S5 outputs the robot trajectory planning file and performs the painting process, while simultaneously writing the trajectory planning file into the process knowledge base for later use.

2. The spraying trajectory planning method based on geometric perception and large model assistance according to claim 1, characterized in that, The bounding box of the workpiece is calculated as follows: The minimum and maximum coordinate vectors of the vertex set on the x, y, and z axes are obtained respectively; the length, width, and height vectors of the bounding box are calculated; and then the diagonal length and center of the bounding box are calculated. , , , Scale the vertex coordinates based on the bounding box center: ; in, and Let L be the minimum and maximum coordinate vectors of the vertex set on the x, y, and z axes, respectively; L be the length, width, and height vectors of the bounding box; and D be the length of the diagonal of the bounding box. Center of the bounding box; Represents the vertex coordinates. These are the vertex coordinates after scale normalization; The normal repair is implemented as follows: Calculate the center point of the j-th facet in the mesh and the model center, then calculate and normalize the direction vector from the model center to the facet center; determine whether the facet normal is pointing outwards from the model based on the initial facet normal and the normalized direction vector. when At that time, determine the current face normal. It is now correctly oriented towards the outside of the model; when When the normal direction is reversed, a flip operation is performed. ; in, For the initial face normal, The direction vector from the center of the normalized patch to the center of the model. This is the preset directional tolerance threshold.

3. The spraying trajectory planning method based on geometric perception and large model assistance according to claim 1, characterized in that, The structured planning strategy fields include: recommended scanning direction; preferred spraying side; curved surface partitioning rules; initial value of trajectory spacing; initial value of step length; edge densification coefficient; scanning angle of groove area; nozzle height setting value; overlap rate limit threshold; attitude smoothing weight; coverage acceptance threshold; collision safety distance; and replanning triggering rules.

4. The spraying trajectory planning method based on geometric perception and large model assistance according to claim 1, characterized in that, Step S42 is implemented as follows: The workpiece surface is divided into multiple spraying sub-regions based on the surface curvature characteristics, edge characteristics, groove characteristics, surface normal change rate, sprayable area boundary, and local occlusion risk; a comprehensive risk score is calculated for each surface, and the spraying sub-regions are divided into smooth areas, curvature abrupt change areas, edge areas, groove areas, and occlusion risk areas based on the risk score; adjacent areas of the same type are merged, and areas smaller than [a certain size] are merged. Isolated areas are merged into the adjacent main area with the highest risk, among which, This represents the minimum connected region area threshold.

5. The spraying trajectory planning method based on geometric perception and large model assistance according to claim 1, characterized in that, The multi-view ray projection is specifically implemented as follows: the sampling point is used as the candidate ray origin to determine the ray emitted by the spray gun; Equation of the intersection point of the ray and the triangular facet Solve the hit relationship, where, , , Let β and γ be the three vertices of the triangular facet, and let β and γ be the coordinate parameters of the centroid within the triangular facet. When β≥0, γ≥0, and β+γ≤1, the ray is determined to hit the surface patch, and the intersection point corresponding to the smallest positive t is taken as the surface hit point. For double-sided workpieces, thin-walled parts, and workpieces with occlusion, multi-view ray projection is performed from both the front and back directions. Hit points are fused and scored based on the spraying side, surface normal, center distance, and accessibility rules. The hit point with the highest score that meets the constraints of spray gun distance, incident angle, and accessibility is retained. When both the front and back sides meet the target spraying side conditions and the distance between them is greater than the thin-wall threshold, the area is split into two spraying sub-regions and planned separately. Repeated points with a distance less than the repeated hit point merging distance threshold are merged to obtain effective surface hit points, reducing missed points caused by occlusion and model pose.

6. The spraying trajectory planning method based on geometric perception and large model assistance according to claim 1, characterized in that, The missing point repair is specifically implemented as follows: for the sampled missing area, a local neighborhood index is constructed based on the adjacent valid surface hit points, the position of the missing point is estimated by distance-weighted interpolation, an interpolation distance threshold is set, and missing points exceeding the threshold are not interpolated. The coverage evaluation is obtained by superimposing the distance attenuation function of adjacent nozzle trajectory points to obtain the coverage amount; based on the coverage amount, areas with insufficient coverage, areas with excessive coverage, and areas with edge fluctuations are identified; the local channel spacing is adjusted according to different areas to complete the optimization of effective surface hit points.

7. The spraying trajectory planning method based on geometric perception and large model assistance according to claim 6, characterized in that, Step S45 is implemented as follows: For each effective surface hit point, read the corresponding surface normal n; calculate the nozzle point based on the corresponding surface normal and nozzle height; take -n as the spray gun spray axis direction, and determine the spraying forward direction based on the tangential direction t of the trajectory formed by adjacent nozzle points; project the trajectory tangential direction onto a plane perpendicular to the spray axis to construct the spray gun tool coordinate system; construct the tool coordinate system rotation matrix through tangential projection and cross product. ,in, , , ; in, This represents the X-axis component of the spray gun tool coordinate system. This represents the Y-axis component of the spray gun tool coordinate system. Indicates the direction of the injection axis; converts the rotation matrix into a quaternion pose that can be recognized by the robot controller.

8. The spraying trajectory planning method based on geometric perception and large model assistance according to claim 1, characterized in that, The adaptive adjustment of parameters specifically involves using the reference nozzle height, reference local lane spacing, reference trajectory step size, and reference spraying speed as references, and adjusting the trajectory parameters according to geometric features and coverage evaluation. In high curvature areas, the lane spacing is reduced and the sampling density is increased. Add outward scanning lines or edge compensation lines to edge areas; use low nozzle height and multi-angle scanning in grooved areas; increase trajectory spacing and spraying speed in flat areas; adjust scanning direction or split into multiple sub-areas in areas with limited accessibility.

9. A spraying trajectory planning system based on geometric perception and large model assistance, characterized in that, The system for performing the spray trajectory planning method according to any one of claims 1 to 8, the system comprising: The data input and standardization unit receives STL 3D meshes, material parameters, robot constraints, historical recipes, and natural language process requirements, and completes the standardization of coordinate systems, units, fields, model versions, and fixed boundaries of process parameters. The 3D model processing unit reads the STL 3D mesh and performs cleaning, normal repair, scale recognition, and feature extraction. The large model strategy generation unit receives natural language process requirements and historical recipes, and generates structured planning strategies through knowledge base retrieval. The adaptive coordinate system unit establishes the spraying coordinate system and determines the scanning plane based on the principal direction, bounding box, and normal distribution. The candidate trajectory generation unit generates scan lines, ray origins, and candidate nozzle points according to step size, spray width, track spacing, and partitioning strategy; The ray projection and repair unit performs multi-view ray intersection, hit point fusion, missing point interpolation, and edge compensation. The nozzle pose calculation unit calculates the nozzle coordinates and attitude angles based on the surface normal, trajectory tangent, and nozzle height. The constraint verification and replanning unit checks coverage, collision, reachability, attitude continuity, and cycle time, and triggers local replanning. The trajectory output and experience base unit outputs robot trajectory files, visualization results, anomaly reports, and reusable planning records.

Citation Information

Patent Citations

  • Gluing track optimization method and system for spacecraft coating thickness uniformity

    CN122090013A

  • Spraying mechanical arm trajectory collaborative planning method giving consideration to process and safety constraints

    CN122100180A