Glue application guide track generation method and system based on three-dimensional height map

By using a method for generating adhesive application guidance trajectories based on 3D height maps, the problem of poor workpiece adaptability in robotic adhesive application technology is solved. This method enables the generation of adhesive application trajectories that match the workpiece surface and improves stability. It is applicable to automated adhesive application of complex workpieces such as shoe soles, seals, and automotive parts.

CN123160837APending Publication Date: 2026-11-24SHENZHEN JIEENSHI INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611420031.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-14
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing robotic adhesive application technologies struggle to adapt to changes in workpiece size, shape, and surface structure, causing the adhesive application trajectory to deviate from the target area, affecting the uniformity of adhesive layer thickness and the stability of the application. Furthermore, existing 3D vision methods suffer from inaccurate workpiece area recognition, path fragmentation, and abrupt changes in posture.

Method used

The adhesive application guidance trajectory generation method based on 3D height map obtains the 3D data of the workpiece, performs region segmentation and boundary extraction in combination with the reference plane, generates multi-layer adhesive application paths, and performs 3D trajectory generation and robot coordinate transformation to ensure path continuity and posture stability.

Benefits of technology

It enables the generation of adhesive application trajectories that match the workpiece surface, improving the stability and automation adaptability of the adhesive application process. It is applicable to workpieces of different sizes, shapes and surface structures, and reduces the need for manual adjustments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123160837A_ABST
    Figure CN123160837A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for generating adhesive application guidance trajectories based on a 3D height map. The method acquires a 3D height map, region mask, and reference plane information of the target workpiece. It segments the workpiece region based on the directed distance of height points relative to the reference plane and determines the adhesive application reference path through boundary sampling and a local search window. Multi-layer adhesive application paths are generated based on physical distance offsets, and a 2D trajectory set is formed by combining degradation judgment, starting point alignment, and path smoothing. Furthermore, 3D position and orientation information is generated based on the neighborhood height information of path points, path tangency, and nozzle tilt angle. The robot's adhesive application trajectory is output through a rigid transformation between the camera coordinate system and the robot coordinate system. This invention can improve the trajectory generation stability of workpieces with complex curved surfaces, grooves, and holes, achieve automatic adaptation of the adhesive application path position and posture, and improve the robot's adhesive application accuracy and production flexibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of three-dimensional machine vision, robot trajectory planning, and automatic glue application technology, specifically to a method and system for generating glue application guidance trajectories based on three-dimensional height maps. Background Technology

[0002] With the development of intelligent manufacturing technology, robotic automatic glue application technology has been widely applied in the assembly and manufacturing processes of shoe soles, seals, automotive parts, electronic device housings, and various structural components. Compared with traditional manual glue application methods, robotic glue application can improve production efficiency and reduce the impact of human operation differences on glue path consistency. However, in actual production processes, different workpieces vary greatly in size, shape, and surface structure, especially for workpieces with curved surfaces, steps, grooves, and local height variations. How to automatically generate a glue application trajectory that matches the actual surface of the workpiece remains a key technical problem in the robotic glue application process.

[0003] Current robotic adhesive application methods typically rely on manual teaching or pre-established fixed trajectory templates. This involves manually operating the robot to record the adhesive application path, which is then applied to the production of similar workpieces. When the workpiece position shifts, its size changes, or its surface morphology differs, the original trajectory is prone to deviating from the target adhesive application area. This necessitates re-teaching the robot manually, resulting in long production adjustment cycles and poor automation adaptability.

[0004] To improve the flexibility of robotic adhesive application, existing technologies increasingly employ 2D or 3D vision methods to identify workpieces and generate application paths based on the identification results. However, path generation methods based on 2D images typically only obtain the workpiece's planar contour information and cannot accurately reflect changes in the workpiece's surface height. When the workpiece has curved surfaces, inclined surfaces, or local height variations, the 2D path is difficult to directly convert into a 3D adhesive application trajectory that meets process requirements, easily causing changes in the distance between the nozzle and the workpiece surface, affecting the uniformity of the adhesive layer thickness. Furthermore, if the nozzle direction is directly calculated based on a single height point or local gradient, it is easily affected by grooves, holes, edge pixel mixing, and anomalies, causing sudden posture changes during robot movement and reducing application stability.

[0005] Existing 3D vision-based methods for generating adhesive application paths can utilize point cloud data to obtain workpiece contours, but they still have certain shortcomings. For example, some methods use absolute height thresholds for workpiece region segmentation, which can easily lead to inaccurate workpiece region identification when the worktable is tilted or the reference height changes; some methods generate indented paths through fixed-pixel erosion, which is affected by image resolution, making it difficult to guarantee the consistency of the actual physical adhesive path spacing, and path fragmentation, topological changes, and path degradation are prone to occur during continuous erosion; in addition, if the translation parameters are incorrectly applied to the direction vector during robot coordinate transformation, it can also lead to errors in robot posture calculation.

[0006] Therefore, there is an urgent need to propose a new adhesive coating guide trajectory generation technology that can complete workpiece area stable identification, boundary adaptive extraction, physical scale path planning, three-dimensional surface following, and robot coordinate output based on the same three-dimensional height data, so that the generated adhesive coating trajectory can simultaneously meet the requirements of position continuity, posture continuity, and process stability. Summary of the Invention

[0007] To address the aforementioned problems, this invention provides a method and system for generating adhesive application guidance trajectories based on three-dimensional height maps, which can effectively overcome the shortcomings of existing technologies.

[0008] This invention is achieved through the following technical solution: a method for generating adhesive application guidance trajectory based on a three-dimensional height map, comprising: The three-dimensional data acquisition step is used to acquire a three-dimensional height map of the target workpiece, a region mask that defines the area where the target workpiece is located, reference plane information, and a rigid transformation relationship between the camera coordinate system and the robot coordinate system; The workpiece region segmentation step, connected to the three-dimensional data acquisition step, is used to calculate the directed distance of each height point relative to the reference plane based on the effective height points in the three-dimensional height map, and to filter the target workpiece height region based on the directed distance and a preset distance range. The filtered region is then subjected to connected region processing and morphological processing to obtain the outer boundary of the target workpiece. The glue application reference path generation step is connected to the workpiece region segmentation step. It is used to resample the arc length along the outer boundary of the target workpiece and establish a search window based on the local boundary direction at each sampling position. The glue application reference path points are determined through the three-dimensional height distribution within the search window to generate a two-dimensional glue application reference path. The multi-layer adhesive path generation step is connected to the adhesive reference path generation step. It is used to generate multi-layer offset paths according to the two-dimensional adhesive reference path according to a preset physical offset distance, and to determine whether to continue generating inner circle paths according to the topological state, number of path points and degradation state of the offset results, so as to form a two-dimensional adhesive path set including outer circle paths and inner circle paths. The three-dimensional trajectory generation step, connected to the multi-layer adhesive path generation step, is used to obtain the height information of the corresponding area of ​​each path point in the two-dimensional adhesive path set, determine the path tangent based on adjacent path points, and generate the corresponding three-dimensional position and direction information by combining the local surface information of the workpiece and the preset nozzle tilt angle. The robot trajectory output step, connected to the three-dimensional trajectory generation step, is used to perform rotation and translation transformations on the three-dimensional position, and only perform rotation transformations on the direction information, converting the adhesive application trajectory in the camera coordinate system into the robot adhesive application trajectory in the robot coordinate system, and outputting it according to the path hierarchy and path order.

[0009] As a preferred technical solution, the three-dimensional height map includes a single-channel height map or a multi-channel three-dimensional map containing spatial coordinate information; when a single-channel height map is used, the corresponding spatial coordinates are determined according to the image pixel position, horizontal resolution, vertical resolution and height value, and invalid height points, non-limited height points and data outside the region mask are removed.

[0010] As a preferred technical solution, the workpiece region segmentation step includes retaining only the height region located between the near-end threshold and the far-end threshold based on the distance relationship between each effective height point and the reference plane, and determining the target workpiece region by filtering the area of ​​the connected region.

[0011] As a preferred technical solution, the morphological treatment includes selecting corrosion treatment, expansion treatment, corrosion followed by expansion treatment, or multi-stage combined treatment according to the type of surface defects of the workpiece, in order to eliminate isolated noise, connect fractured areas, and improve the continuity of workpiece boundaries.

[0012] As a preferred technical solution, the glue application reference path generation step further includes calculating the convex hull based on the outer boundary of the target workpiece, determining the main direction of the workpiece through the maximum distance point pair, and determining the path start point and end region identification direction based on the main direction of the workpiece.

[0013] As a preferred technical solution, the search window is a rectangular window associated with the local direction of the outer boundary. The height data is interpolated within the rectangular window, and the corresponding glue application reference path point is determined based on the height statistics of different location areas.

[0014] As a preferred technical solution, in the multi-layer adhesive path generation step, polygon offset processing is performed on the two-dimensional adhesive base path. When the offset result is empty, multiple non-preset areas are generated, the number of path points is less than the preset number, or self-intersection degradation occurs, the generation of the inner circle path is stopped.

[0015] As a preferred technical solution, in the three-dimensional trajectory generation step, multiple effective height values ​​in the neighborhood of the path point are sorted, and height data is selected according to a preset ratio to calculate a robust height value, so as to reduce the impact of grooves, holes and abnormal height points on the three-dimensional trajectory generation.

[0016] As a preferred technical solution, a path compensation step is also included, which is used to receive the lateral compensation, longitudinal compensation and height compensation parameters of the path points, and save the compensation relationship according to the stability sequence number of the path points. The two-dimensional position compensation is used to recalculate the three-dimensional height, and the height compensation is used to adjust the spatial position after the three-dimensional trajectory is generated.

[0017] The present invention provides a system for generating adhesive application guidance trajectories based on a three-dimensional height map, comprising: The 3D data acquisition module is used to acquire the 3D height map, region mask, and reference plane information of the target workpiece; The planar constraint segmentation module, connected to the three-dimensional data acquisition module, is used to obtain the target workpiece region based on the directed distance between the height point and the reference plane. The boundary path generation module, connected to the plane constraint segmentation module, is used to generate a glue application reference path through boundary sampling and a local search window. A layered path planning module, connected to the boundary path generation module, is used to generate multi-layer adhesive application paths based on physical distance offsets. A 3D attitude generation module, connected to the hierarchical path planning module, is used to generate a 3D trajectory attitude based on height information, path tangency, and nozzle tilt angle. The coordinate transformation output module is connected to the three-dimensional posture generation module and is used to convert the three-dimensional trajectory into a robot coordinate system trajectory and output it to the robot control device.

[0018] The beneficial effects of the present invention are as follows: 1. The present invention obtains a three-dimensional height map of the target workpiece and establishes a height constraint relationship in combination with a reference plane. The workpiece region is segmented by calculating the directed distance from the height point to the reference plane. Compared with the traditional segmentation method based on an absolute height threshold, the present invention can reduce the impact of workbench tilt, installation error and reference height change on the workpiece recognition result and improve the stability of workpiece region extraction in complex production environments.

[0019] 2. After obtaining the outer boundary of the workpiece, the present invention determines the glue application reference path by resampling the arc length at equal intervals and constructing a search window based on the local boundary direction. This makes the path generation no longer simply dependent on the two-dimensional contour boundary, but combines local three-dimensional height information to determine the actual glue application position. This can reduce the path offset caused by holes, grooves, edge burrs and image quantization errors, and improve the matching accuracy between the glue application trajectory and the workpiece surface.

[0020] 3. This invention uses a multi-level path offset method based on physical distance constraints to generate outer and inner ring paths. The path generation process is controlled by offset result degradation judgment, topology state judgment, and path point number judgment. Compared with the traditional pixel erosion method, it can maintain a more stable actual physical distance between multiple rings of adhesive paths, while avoiding path fragmentation and invalid path generation, thus improving the adhesive path planning capability for complex contour workpieces.

[0021] 4. This invention addresses the three-dimensional height information corresponding to two-dimensional path points by performing robust statistics on height data within the neighborhood of the path point, rather than directly using the height value of a single point. This reduces the impact of grooves, holes, and abnormal height points on the height calculation results, making the generated three-dimensional trajectory more continuous and stable.

[0022] 5. This invention generates the robot's adhesive application direction based on the tangential relationship between path points, local surface information of the workpiece, and the preset tilt angle of the nozzle. Furthermore, it smooths the direction data to make the robot's posture changes between adjacent path points smoother, avoids sudden posture changes during robot operation, and improves the stability of the adhesive application process.

[0023] 6. In the process of robot coordinate transformation, the present invention performs rotation and translation transformation on the three-dimensional position, while only performing rotation transformation on the orientation information, so that the position data and orientation data satisfy the mathematical relationship of rigid coordinate transformation, avoid robot posture deviation caused by incorrect transformation, and improve the accuracy of robot trajectory output.

[0024] 7. The present invention further sets up a path compensation mechanism, which records the compensation information corresponding to the path points through stable sequence numbers, so that the horizontal compensation, vertical compensation and height compensation can be associated with the corresponding trajectory points, and the path hierarchy and point sequence are kept consistent when recalculating the trajectory, thereby improving the editability and traceability during the production and debugging process.

[0025] 8. This invention integrates workpiece segmentation, path generation, 3D surface following, posture calculation, and robot output into a complete data processing chain, enabling the robot to automatically generate adhesive application trajectories based on the actual workpiece state without relying on manually pre-made trajectory templates. This improves production flexibility and automation levels, and is suitable for intelligent adhesive application of workpieces of different sizes, shapes, and surface structures. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 This is a schematic diagram of the overall process of generating an adhesive application guide trajectory based on a three-dimensional height map according to the present invention; Figure 2 This is a schematic diagram of the module structure and data flow of the adhesive application guide trajectory generation system of the present invention; Figure 3 This is a schematic diagram of the target workpiece region segmentation process based on reference plane constraints according to the present invention; Figure 4 This is a schematic diagram of the equidistant resampling of the outer boundary of the target workpiece and the positioning of the adhesive application reference path by the local directional search window in this invention; Figure 5 This is a schematic diagram illustrating the generation of multi-layer adhesive application paths based on multi-level path offset, the execution of degradation termination judgment, and the alignment of the starting points of different path layers in this invention. Figure 6 This is a schematic diagram illustrating the generation of corresponding three-dimensional positions and nozzle directions based on two-dimensional path points according to the present invention. Figure 7 This is a schematic diagram of trajectory transformation based on stable sequence compensation and rigid transformation from camera coordinate system to robot coordinate system according to the present invention; Figure 8 This is a schematic diagram illustrating the data processing relationship between the adhesive path guiding mode and the single-point testing mode of the present invention; Figure 9 This diagram illustrates the deployment relationship and data interaction between the core algorithm library and production tools of this invention. Detailed Implementation

[0028] All features disclosed in this specification, or all steps in all disclosed methods or processes, may be combined in any way, except for mutually exclusive features and / or steps.

[0029] Any feature disclosed in this specification (including any appended claims, abstract, and drawings) may be replaced by other equivalent or similar features for a similar purpose, unless specifically stated otherwise. That is, unless specifically stated otherwise, each feature is merely one example of a series of equivalent or similar features.

[0030] like Figures 1-9 As shown, this embodiment provides a method for generating adhesive application guidance trajectories based on 3D height maps. This method is used in the automatic adhesive application process of industrial robots to automatically generate the adhesive application motion trajectory required by the robot based on the actual 3D surface information of the target workpiece. This embodiment obtains the height information of the target workpiece surface through 3D imaging and sequentially performs workpiece region recognition, outer boundary extraction, adhesive application path planning, 3D position and posture generation, and robot coordinate transformation, enabling the robot to automatically adjust the adhesive application trajectory according to different workpiece shapes, size changes, and surface height changes.

[0031] In this embodiment, the target workpiece can be a shoe sole, seal, shell, sheet metal, electronic device frame, or other structural component that requires adhesive application along its outer or inner boundary. Unlike traditional methods that rely on manual teaching to fix the trajectory, this embodiment does not require pre-recording of the robot's motion path. Instead, it generates an adhesive application trajectory in real time based on the currently collected 3D height data, matching the actual surface of the workpiece.

[0032] In the specific implementation process, the three-dimensional height map data of the target workpiece is first acquired using a three-dimensional imaging device. The three-dimensional height map can be a single-channel millimeter height map or a multi-channel three-dimensional map containing three-dimensional spatial coordinate information.

[0033] When using a single-channel millimeter heightmap, each pixel position in the heightmap corresponds to a height value. Combined with the horizontal and vertical resolutions obtained from camera calibration, the two-dimensional image coordinates are converted into spatial coordinates. The spatial coordinates corresponding to the r-th row and c-th column position can be determined based on the pixel position, horizontal resolution, vertical resolution, height value, and the origin of the coordinate system.

[0034] When using a multi-channel 3D map containing 3D coordinate information, each sampling point directly contains the corresponding X, Y, and Z spatial coordinate information. For data points where a valid height cannot be obtained, such as non-finite height values, preset invalid height values, or data points located outside the area mask, they are marked as invalid data and will not participate in subsequent workpiece segmentation, path generation, and 3D trajectory calculation.

[0035] While acquiring the 3D height map, a region mask is also acquired to define the area where the target workpiece is located. This region mask is used to limit the processing area where the target workpiece may be present, preventing the workbench background area, fixture area, or other irrelevant areas from participating in the calculation, thereby improving data processing efficiency and the accuracy of target workpiece identification.

[0036] Furthermore, reference plane information for height determination is obtained. This reference plane can be a pre-calibrated fixed parameter, or it can be obtained through real-time fitting of the currently acquired 3D height map.

[0037] When using real-time fitting to obtain the reference plane, it is preferable to select a reference area at a location separate from the target workpiece area. Plane fitting is performed using effective height points within the selected area, and the reference plane's suitability is determined based on the fitting residual and the number of effective points. If the fitting error exceeds a preset range or the number of effective points is insufficient, the current reference plane is deemed invalid, and the generation of the robot's production trajectory is prohibited.

[0038] After obtaining the 3D height map, region mask, and reference plane, constraint segmentation based on the reference plane is performed on the effective height points within the region mask area.

[0039] Specifically, for each effective height point within the region mask, the directed distance from that height point to the reference plane is calculated. This directed distance represents the degree of height deviation of the height point relative to the reference plane.

[0040] Set the near-end threshold plane_seg_near and the far-end threshold plane_seg_far, retaining only those that satisfy: plane_seg_near≤δ≤plane_seg_far The elevation point of the condition, where δ represents the directed distance from the effective elevation point to the reference plane.

[0041] Using the above method, data points located within the actual height range of the target workpiece are filtered out, and candidate masks for the workpiece are generated.

[0042] Compared to the traditional method of segmentation based solely on absolute height values, this embodiment employs a distance constraint method relative to a reference plane. Therefore, even if the worktable is tilted, has installation errors, or its overall height changes, the stability of workpiece area recognition can be maintained.

[0043] After obtaining the candidate masks for the workpiece, connected component analysis is performed on the candidate regions. Specifically, based on the area, spatial location, and continuity of each connected region, multiple candidate regions are filtered to retain the target workpiece regions that meet the preset conditions.

[0044] For small isolated areas caused by random noise, abnormal reflections, or local missing parts generated during the 3D acquisition process, they are removed by filtering through the area of ​​connected regions, thereby reducing the impact of invalid regions on subsequent boundary extraction.

[0045] Furthermore, morphological processing is performed based on the surface condition of the target workpiece.

[0046] In practical applications, different types of workpieces may have varying degrees of edge breakage, internal holes, edge burrs, or local adhesion. Therefore, this embodiment selects different morphological treatment methods according to the type of surface defects of the workpiece.

[0047] For example, when there are isolated noise points in the candidate region, an opening operation method of first erosion and then expansion can be used to remove small noise areas; when there are holes or fractures inside the candidate region, a closing operation method of first expansion and then erosion can be used to connect the fractured areas and fill local defects; when there are adhesion areas at the edge of the workpiece, a multi-stage treatment method of fixed core corrosion, configurable expansion and re-corrosion can be used to improve the region boundary.

[0048] In particular, the structural parameters in morphological processing are preferably calculated based on the actual physical dimensions, rather than directly using a fixed number of pixels, so that the same processing parameters can be applied to 3D height maps of different resolutions.

[0049] After completing the above processing, the outer boundary of the target workpiece is extracted from the final workpiece area. To avoid inconsistent boundary point density caused by changes in heightmap resolution, the boundary points are filtered based on the actual physical distance, removing redundant boundary points with excessively small spacing, making the obtained outer boundary data more suitable for subsequent path planning processing.

[0050] Furthermore, in order to determine the directional reference during the adhesive application path generation process, this embodiment also calculates the main direction of the workpiece based on the outer boundary of the target workpiece.

[0051] Specifically, firstly, the corresponding convex hull is calculated based on the extracted outer boundary. Then, the rotating caliper algorithm is used to determine the two boundary points with the largest distance in the convex hull. Based on the distance difference between these two boundary points in the horizontal and vertical directions of the height map, the main direction of the target workpiece is determined.

[0052] When the longitudinal distance between two boundary points is greater than the lateral distance, the longitudinal direction is taken as the main direction of the target workpiece; when the lateral distance is greater than the longitudinal distance, the lateral direction is taken as the main direction of the target workpiece.

[0053] The main direction is not only used for selecting the starting point of the subsequent adhesive application path, but also for determining the end region of the target workpiece, and as the data search direction when reconstructing the missing region.

[0054] Through the above method, this embodiment can automatically determine the reference direction for path planning based on the geometric characteristics of the workpiece itself without relying on manual direction setting, thereby improving the automatic adaptability of workpieces of different shapes.

[0055] After obtaining the adhesive application reference path, a multi-layer adhesive application path is further generated based on the adhesive application reference path.

[0056] Specifically, the aforementioned two-dimensional adhesive application reference path is converted into polygonal data suitable for path offset calculation. Since the actual adhesive application process usually requires forming one or more loops of adhesive along the edge of the workpiece, it is necessary to generate an outer loop path and at least one inner loop path based on the adhesive application reference path according to process requirements.

[0057] This embodiment uses a polygon offset method based on physical distance constraints to generate the inner ring path. Specifically, the adhesive application reference path is subjected to a first offset process according to a preset offset distance to obtain a first-layer shrinkage path; subsequently, subsequent offset processes are performed according to a preset inter-layer distance to form a multi-layer two-dimensional adhesive application path set.

[0058] The offset distance for the first layer can be determined based on the process distance between the workpiece edge and the first adhesive path. The offset distances between subsequent layers can be set individually based on the adhesive path width, adhesive flow characteristics, and actual assembly requirements. By using the actual physical distance as the offset parameter, the spacing between different levels of adhesive paths is not affected by changes in the height map resolution.

[0059] During the multi-level path generation process, the validity of each offset result is determined.

[0060] Specifically, when the current offset result is empty, that is, when it is impossible to form a valid closed region or a valid path, the subsequent offset is stopped; when the current offset result generates multiple independent regions due to the narrow local area or complex contour structure of the workpiece, and multiple regions do not meet the preset topological relationship requirements, the generation of new inner circle paths is stopped; when the number of any candidate path points is less than the preset minimum number of points, or when the path exhibits self-intersection, breakage, severe deformation, or other degradation, the subsequent offset process is also terminated.

[0061] By using the above-mentioned offset degradation judgment mechanism, the problems of path fragmentation, local disappearance and abnormal topology caused by continuous erosion can be avoided when generating shrinkage paths using the traditional fixed pixel erosion method, making the generated glue path more in line with the robot's execution requirements.

[0062] After generating multiple paths, path points in each path layer are resampled.

[0063] Specifically, the sampling position is re-determined based on the distance between target physical points corresponding to each layer of the path, so that the distance between adjacent path points in each layer of the path remains within a reasonable range. For situations where there are a large number of dense path points in a local area, the actual physical distance between adjacent path points is detected. When the distance between adjacent points is less than a preset threshold, some redundant points are deleted to reduce the data load in the robot motion control process.

[0064] Furthermore, the starting point of each path is processed accordingly.

[0065] Specifically, for the outer ring path, the starting position of the path is determined based on the main direction of the target workpiece calculated above, so that the outer ring path can start execution in a unified direction.

[0066] For the inner circle path, obtain the starting point position of the previous level path, and search for the path point in the current inner circle path that is closest to the starting point of the previous level. Rotate the path point to the beginning of the current path data, so that the paths of different levels maintain the same directional relationship.

[0067] By using the above-mentioned starting point alignment method, the unnecessary movement generated when the robot switches between different adhesive layers can be reduced, thereby improving the adhesive application efficiency.

[0068] After completing path sampling and starting point adjustment, smoothing processing is performed on the paths at each level.

[0069] Specifically, for closed paths, a cyclic neighborhood smoothing method is used to optimize the path points. Taking the current path point as the center, a preset number of neighboring path points are obtained before and after the current path point. The smoothed path position is obtained by weighting the neighboring path points according to their positional relationships.

[0070] In another embodiment, a robust curve fitting method can be used to smooth the path to reduce path fluctuations caused by 3D sampling errors, boundary discretization, and abrupt changes in local contours.

[0071] Through the above processing, the final generated set of two-dimensional adhesive application paths has a stable path hierarchy, continuous movement direction, and adhesive path spacing that meets the actual process requirements.

[0072] After obtaining the set of two-dimensional adhesive application paths, a three-dimensional trajectory generation process is further performed to convert the two-dimensional paths into the three-dimensional spatial trajectories required for the robot's actual execution.

[0073] Specifically, for each path point in the set of two-dimensional adhesive application paths, a local height search region centered on that path point is established in the three-dimensional height map, and the effective height data within that region is obtained.

[0074] Since the actual workpiece surface may have local grooves, holes, abnormal reflections, or height acquisition noise, directly reading a single height point as the robot's movement height can easily cause the generated trajectory to deviate from the actual workpiece surface. Therefore, this embodiment adopts a robust height calculation method based on neighborhood height data.

[0075] Specifically, multiple valid height values ​​collected within the neighborhood of a path point are sorted, and a portion of the height data is selected for statistical calculation according to a preset ratio.

[0076] In one implementation, the neighborhood height values ​​are arranged in descending order, and the average value of the height data within a preset proportion range is calculated as the robust height value corresponding to the current path point.

[0077] In other implementations, the path point height can be obtained by selecting the median, truncated mean, or robust residual calculation method based on the local plane, according to the workpiece material characteristics, height map noise, and the number of local effective points.

[0078] By employing the robust height calculation method described above, the impact of low-height anomalies on trajectory generation can be reduced. For example, when the path passes through an area with a groove structure, since the height of the groove area is significantly lower than the surrounding effective surface, using neighborhood height statistics can prevent the robot nozzle from suddenly dropping; when the path passes through a hole area, it can also prevent abnormal height changes caused by hole data.

[0079] After determining the height of the path point, the corresponding three-dimensional spatial position is generated based on the two-dimensional path coordinates and the height value.

[0080] Specifically, based on the horizontal and vertical resolutions corresponding to the 3D height map, the planar coordinates in the 2D path are converted into spatial coordinates, and combined with the robust height value, the 3D position point in the camera coordinate system is obtained.

[0081] For different level paths, the above height extraction process can be performed separately to obtain the complete 3D trajectory corresponding to each level path.

[0082] Furthermore, the direction of nozzle movement is determined based on the positional relationship between the path points.

[0083] Specifically, the tangential direction of the path is calculated based on the positional difference between the current path point and the adjacent path points. Subsequently, a transverse direction corresponding to the tangential direction of the path is established on a local surface of the workpiece, and the basic direction vector is determined by combining the local normal information of the workpiece surface.

[0084] The nozzle tilt angle is set according to the actual glue application process requirements, and the directional constraint corresponding to the nozzle tilt angle is added to the basic directional vector so that the generated directional vector satisfies the process angle requirements between the nozzle and the workpiece surface.

[0085] After completing the direction calculation, the direction vector is normalized to obtain the nozzle target direction corresponding to the current path point.

[0086] To improve the continuity of robot posture changes, this embodiment further smooths the directional changes between adjacent path points.

[0087] Specifically, a circular weighted average is performed on the direction vectors corresponding to the current path point and multiple adjacent path points, and the calculation results are renormalized to reduce abrupt attitude changes caused by local surface variations.

[0088] Simultaneously, a sliding window smoothing process is applied to the pathpoint heights. For example, a five-point moving average can be used to process the heights of consecutive pathpoints, making height changes more stable during robot movement.

[0089] In one implementation, the generated three-dimensional position can be compensated along the nozzle direction according to the actual glue circuit process requirements.

[0090] Specifically, when the robot control point corresponds to the center position of the nozzle, while the actual glue application point is located at the end of the nozzle, the three-dimensional position is adjusted along the nozzle direction according to the preset process distance so that the output position corresponds to the actual glue application point.

[0091] Through the above processing, the set of two-dimensional adhesive application paths is transformed into a set of robot motion trajectory points containing three-dimensional position and three-dimensional orientation information, providing a data foundation for subsequent coordinate transformation and robot execution.

[0092] After obtaining the set of adhesive application trajectory points containing three-dimensional position and three-dimensional orientation information, further path compensation processing is performed according to the production process requirements to adapt to the processing errors, assembly errors or process adjustment requirements between different workpiece batches.

[0093] Specifically, this embodiment sets up a path point compensation mechanism. The operator can input the lateral compensation amount, longitudinal compensation amount, and height compensation amount for a specified path point, and bind and store each compensation parameter with the stable sequence number of the corresponding path point.

[0094] The stable sequence number is used to uniquely identify a specified trajectory point in the path hierarchy, so that the compensation data will not lose its corresponding relationship due to path recalculation, resampling or path smoothing.

[0095] When performing compensation calculations, the compensation type is determined first.

[0096] When the input compensation is either lateral or longitudinal, it is applied first to the two-dimensional path position, that is, the position coordinates of the corresponding path point in the two-dimensional path set are adjusted according to the compensation amount. Subsequently, the three-dimensional height data of the corresponding area is re-queried based on the adjusted two-dimensional position, and the height extraction and direction calculation processes are re-executed to obtain the compensated three-dimensional spatial trajectory.

[0097] When the input compensation is height compensation, after the three-dimensional position calculation is completed, the corresponding height compensation is superimposed on the current three-dimensional position coordinates, thereby enabling the robot to make fine adjustments in the height direction.

[0098] The above compensation method ensures a consistent data relationship between 2D path adjustment, 3D height calculation, and robot output trajectory, avoiding the inconsistency between path data, displayed data, and actual output data caused by simply modifying robot coordinates when manually modifying the trajectory in the traditional way.

[0099] Furthermore, after completing the 3D trajectory generation and compensation processing, coordinate transformation between the camera coordinate system and the robot coordinate system is performed.

[0100] Specifically, in this embodiment, a rigid transformation relationship between the camera coordinate system and the robot coordinate system is established in advance. The rigid transformation relationship includes the rotation matrix R and the translation vector t.

[0101] For a 3D position point Pc in the camera coordinate system, a complete transformation is performed using a rotation matrix and a translation vector to obtain a position point Pr in the robot coordinate system. The transformation process includes both rotation and translation changes.

[0102] For the direction vector Dc in the camera coordinate system, since the direction vector represents spatial direction relationships and does not contain spatial position attributes, only a rotation matrix is ​​used for transformation, without adding a translation vector.

[0103] By using the above-mentioned method of separating position and orientation transformation, the coordinate transformation process conforms to the mathematical relationship of rigid transformation, avoiding the problem of incorrect translation of the orientation vector in traditional processing methods, which leads to errors in robot posture calculation.

[0104] Furthermore, the rigid transformation relationship between the camera coordinate system and the robot coordinate system can be obtained by calculation using multiple calibration points.

[0105] Specifically, in one implementation, at least three non-collinear camera coordinate calibration points are selected, and the corresponding robot coordinate system calibration points are obtained. The rotation matrix and translation vector are calculated through the correspondence of point sets.

[0106] In the calculation process, the point sets in the two coordinate systems are first decentered to obtain the point set data after removing the translation effect; then the covariance matrix between the corresponding points is established, and the optimal rotation matrix is ​​solved by singular value decomposition (SVD).

[0107] After obtaining the rotation matrix, a reflection correction process is performed on the rotation matrix to ensure that it meets the orthogonality requirement. Then, the translation vector is calculated based on the positional relationship of the center sets of points in the two coordinate systems, thereby obtaining the complete rigid transformation relationship.

[0108] During coordinate transformation, if the number of input calibration points is insufficient, the calibration points cannot correspond, the calculated rotation matrix does not meet the orthogonality requirement, or the transformation error exceeds the preset threshold, the current rigid transformation relationship is deemed invalid, and the output of the production trajectory to the robot control terminal is prohibited.

[0109] After completing the robot coordinate transformation, the final trajectory data is organized and output.

[0110] Specifically, the generated robot adhesive application trajectory is arranged according to the path hierarchy and path order. Each trajectory point includes at least the three-dimensional position coordinates in the robot coordinate system, the direction vector or robot posture parameters, the path hierarchy information, and the internal stability sequence information of the path.

[0111] In addition, the output data also includes the current number of laps, the number of path points per lap, the total number of path points, and algorithm running status information.

[0112] To facilitate subsequent production debugging and trajectory tracking, this embodiment not only saves the final robot trajectory data, but also synchronously saves intermediate calculation results, including: Target workpiece outer boundary data; Two-dimensional adhesive application path data; 3D trajectory data in the camera coordinate system; Visualized data on nozzle orientation; The trajectory data after compensation.

[0113] By saving the aforementioned intermediate data, the operator can display, inspect, edit, and recalculate the trajectory generation process.

[0114] Furthermore, this embodiment provides two operating modes, including a glue path guiding mode and a single-point testing mode.

[0115] In the glue path guidance mode, the system fully executes the processes of 3D data acquisition, reference plane constraint segmentation, outer boundary extraction, path generation, multi-layer glue path planning, 3D position and attitude calculation, and robot coordinate transformation, and finally outputs the complete robot glue application trajectory.

[0116] In single-point testing mode, the system does not execute the complete adhesive path generation process, but instead acquires a single 3D point and its corresponding orientation information within a specified area and performs coordinate transformation processing.

[0117] The single-point testing mode is mainly used in the production debugging stage, such as to check whether the three-dimensional height reading is accurate, whether the camera-robot coordinate transformation is correct, whether the nozzle direction calculation meets the process requirements, and whether the compensation direction is correct.

[0118] To prevent erroneous trajectories from entering the production environment during system operation, this embodiment further incorporates an anomaly detection mechanism.

[0119] Specifically, the system will return a trajectory generation failure status and prohibit the sending of robot-generated trajectories when any of the following conditions occur: The input 3D height map is empty; Invalid reference plane data; The effective target workpiece area does not exist; Insufficient number of outer boundary points; The path degrades after offset and no valid outer path exists; Invalid pathpoint height data; The length of the direction vector is less than a preset threshold. The rigid transformation relationship between the camera and the robot is invalid. The number of output trajectory points exceeds the robot interface capacity.

[0120] The above-mentioned anomaly detection mechanism can prevent the robot from performing incorrect actions due to abnormal input data or algorithm calculation errors.

[0121] Furthermore, to avoid retaining old trajectory data after partial calculation failures, this embodiment clears the current path data, direction data, and robot output array at the beginning of each trajectory calculation.

[0122] Once all steps are successfully completed, the final trajectory result is updated once by writing a lock or using an equivalent atomic update method, ensuring that the robot always obtains complete and valid trajectory data.

[0123] Furthermore, the method described above in this embodiment can be deployed in an industrial computer, robot controller, edge computing device, or a data processing platform composed of multiple processing devices.

[0124] In one deployment method, the core algorithm is encapsulated as an independent algorithm library to perform core functions such as 3D data processing, workpiece region segmentation, boundary sampling, multi-layer path generation, 3D trajectory calculation, and coordinate transformation.

[0125] Meanwhile, the production tools are used as the application layer to complete data input, reference plane configuration, detection area setting, parameter adjustment, model saving, result display, path editing, status judgment, and robot interface output.

[0126] The core algorithm library and production tools use a unified data structure for data interaction, enabling them to share the same path data format and trajectory calculation logic.

[0127] Although the core algorithm library and production tools may be located in different software engineering directories or different operating environments, they jointly complete the process of generating adhesive guidance trajectories based on 3D height maps, which are different deployment forms of the same technical solution.

[0128] In actual operation, path planning and 3D point calculation can be performed by CPU, GPU or other types of processors. Polygon offset calculation, connected component analysis, spatial interpolation and path smoothing algorithms can be replaced according to the actual hardware environment, as long as the technical relationship of plane constraint segmentation based on 3D height map, path positioning based on local search window, hierarchical path generation based on physical distance, 3D direction generation based on surface height and position direction separation coordinate transformation is maintained.

[0129] Through the above implementation methods, this invention uses a three-dimensional height map as a unified data foundation to form a complete closed-loop processing flow for workpiece identification, glue application path planning, three-dimensional surface following, robot posture generation, and coordinate transformation output. This enables the robot to automatically generate a glue application trajectory based on the actual workpiece state without relying on manual point-by-point teaching, thereby improving the robot's adaptability, stability, and automation level during the glue application process.

[0130] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions conceived without inventive effort should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope defined in the claims.

Claims

1. A method for generating a glue application guide trajectory based on a three-dimensional height map, characterized by, include: The three-dimensional data acquisition step is used to acquire a three-dimensional height map of the target workpiece, a region mask that defines the area where the target workpiece is located, reference plane information, and a rigid transformation relationship between the camera coordinate system and the robot coordinate system; The workpiece region segmentation step, connected to the three-dimensional data acquisition step, is used to calculate the directed distance of each height point relative to the reference plane based on the effective height points in the three-dimensional height map, and to filter the target workpiece height region based on the directed distance and a preset distance range. The filtered region is then subjected to connected region processing and morphological processing to obtain the outer boundary of the target workpiece. The glue application reference path generation step is connected to the workpiece region segmentation step. It is used to resample the arc length along the outer boundary of the target workpiece and establish a search window based on the local boundary direction at each sampling position. The glue application reference path points are determined through the three-dimensional height distribution within the search window to generate a two-dimensional glue application reference path. The multi-layer adhesive path generation step is connected to the adhesive reference path generation step. It is used to generate multi-layer offset paths according to the two-dimensional adhesive reference path according to a preset physical offset distance, and to determine whether to continue generating inner circle paths according to the topological state, number of path points and degradation state of the offset results, so as to form a two-dimensional adhesive path set including outer circle paths and inner circle paths. The three-dimensional trajectory generation step, connected to the multi-layer adhesive path generation step, is used to obtain the height information of the corresponding area of ​​each path point in the two-dimensional adhesive path set, determine the path tangent based on adjacent path points, and generate the corresponding three-dimensional position and direction information by combining the local surface information of the workpiece and the preset nozzle tilt angle. The robot trajectory output step, connected to the three-dimensional trajectory generation step, is used to perform rotation and translation transformations on the three-dimensional position, and only perform rotation transformations on the direction information, converting the adhesive application trajectory in the camera coordinate system into the robot adhesive application trajectory in the robot coordinate system, and outputting it according to the path hierarchy and path order.

2. The method of claim 1, wherein: The three-dimensional height map includes a single-channel height map or a multi-channel three-dimensional map containing spatial coordinate information. When a single-channel height map is used, the corresponding spatial coordinates are determined based on the image pixel position, horizontal resolution, vertical resolution, and height value, and invalid height points, non-limited height points, and data outside the region mask are removed.

3. The method of claim 1, wherein: The workpiece region segmentation step includes retaining only the height region located between the near-end threshold and the far-end threshold based on the distance relationship from each effective height point to the reference plane, and determining the target workpiece region by filtering the area of ​​the connected regions.

4. The method of claim 1, wherein: The morphological treatment includes selecting corrosion treatment, expansion treatment, corrosion followed by expansion treatment, or multi-stage combined treatment according to the type of surface defects of the workpiece, in order to eliminate isolated noise, connect fractured areas, and improve the continuity of workpiece boundaries.

5. The method of claim 1, wherein: The glue application reference path generation step also includes calculating the convex hull based on the outer boundary of the target workpiece, determining the main direction of the workpiece through the maximum distance point pair, and determining the path start point and end region identification direction based on the main direction of the workpiece.

6. The method for generating adhesive application guidance trajectory based on a three-dimensional height map according to claim 1, characterized in that: The search window is a rectangular window associated with the local direction of the outer boundary. The height data is interpolated within the rectangular window, and the corresponding glue application reference path point is determined based on the height statistics of different location areas.

7. The method for generating adhesive application guidance trajectory based on a three-dimensional height map according to claim 1, characterized in that: In the multi-layer adhesive path generation step, polygon offset processing is performed on the two-dimensional adhesive base path. When the offset result is empty, multiple non-preset regions are generated, the number of path points is less than the preset number, or self-intersection degradation occurs, the generation of the inner circle path is stopped.

8. The method for generating adhesive application guidance trajectory based on a three-dimensional height map according to claim 1, characterized in that: In the three-dimensional trajectory generation step, multiple effective height values ​​in the neighborhood of the path point are sorted, and height data is selected according to a preset ratio to calculate a robust height value, so as to reduce the impact of grooves, holes and abnormal height points on the three-dimensional trajectory generation.

9. The method for generating adhesive application guidance trajectory based on a three-dimensional height map according to claim 1, characterized in that: It also includes a path compensation step, which receives the lateral compensation, longitudinal compensation and height compensation parameters of the path points, and saves the compensation relationship according to the stability index of the path points. The two-dimensional position compensation is used to recalculate the three-dimensional height, and the height compensation is used to adjust the spatial position after the three-dimensional trajectory is generated.

10. A system for generating adhesive application guidance trajectories based on three-dimensional height maps, characterized in that, include: The 3D data acquisition module is used to acquire the 3D height map, region mask, and reference plane information of the target workpiece; The planar constraint segmentation module, connected to the three-dimensional data acquisition module, is used to obtain the target workpiece region based on the directed distance between the height point and the reference plane. The boundary path generation module, connected to the plane constraint segmentation module, is used to generate a glue application reference path through boundary sampling and a local search window. A layered path planning module, connected to the boundary path generation module, is used to generate multi-layer adhesive application paths based on physical distance offsets. A 3D attitude generation module, connected to the hierarchical path planning module, is used to generate a 3D trajectory attitude based on height information, path tangency, and nozzle tilt angle. The coordinate transformation output module is connected to the three-dimensional posture generation module and is used to convert the three-dimensional trajectory into a robot coordinate system trajectory and output it to the robot control device.