A mechanical arm spraying trajectory planning method and system based on point cloud splicing

By mounting a depth camera on the robotic arm to perform point cloud stitching and filtering, an adaptive spraying trajectory is generated, which solves the problems of adaptability and accuracy of robotic arm spraying technology on non-standard targets and realizes efficient and safe spraying path planning.

CN116766199BActive Publication Date: 2026-02-17HANGZHOU DIANZI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310858456.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-13
Publication Date
2026-02-17
Estimated Expiration
2043-07-13

AI Technical Summary

Technical Problem

Existing robotic arm painting technology cannot adaptively adjust to non-standardized targets, and manual teaching methods pose health risks, with painting quality relying on worker experience and having low precision, failing to meet the painting needs of complex workpieces.

Method used

A fixed servo motor equipped with a depth camera is used to capture images from multiple angles. The spraying trajectory is generated by stitching together point clouds. Combined with the RANSAC algorithm and filtering, the spraying path of the robotic arm is planned, bypassing areas that do not need to be sprayed, and constructing a full-coverage path.

Benefits of technology

It improves the efficiency of spray trajectory generation, reduces manual intervention, enhances spray precision and path planning accuracy, adapts to unstructured environments, and reduces the risk to worker health.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116766199B_ABST
    Figure CN116766199B_ABST
Patent Text Reader

Abstract

The application relates to a mechanical arm spraying track planning method and system based on point cloud splicing, which comprises a camera calibration method, a point cloud filtering method, a track planning method and the like; a rudder is used to carry a depth camera to rotate around the Y axis and the Z axis, so that the field of view range of the camera is expanded; according to the feedback angle information of the rudder, a rotation and translation transformation matrix of the point cloud is calculated, and the point cloud is spliced to construct a complete point cloud. A plurality of filtering methods are reasonably planned, the point cloud is filtered, density filling and smoothing are realized, and finally the target point cloud is accurately extracted. In the Z-axis direction, the target point cloud is layered and planned at a specified step, the point cloud order is rearranged, the path point of the movement of the end of the mechanical arm is constructed by using the coordinates of the sampling points of the target point cloud, and the sampling point normal vector is calculated as the end posture. The application uses the rudder to carry the depth camera to construct the spliced point cloud, obtains the sampling points through a plurality of filtering, creates the spraying track that fits the target, and more efficiently guides the mechanical arm to perform visual servo spraying.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Technology Neighborhood

[0002] This invention belongs to the field of point cloud processing and trajectory planning, and relates to a method and system for planning the spraying trajectory of a robotic arm based on point cloud stitching. Background Technology

[0003] Currently, robotic arm painting modes are broadly divided into two types. The first is open-loop robotic painting, which cannot adaptively adjust to non-standardized targets. A single painting production line can only paint a limited number of product models, resulting in poor versatility and an inability to adapt to unstructured, uncertain environments. Furthermore, the robotic arm positions are fixed, requiring multiple robotic arms to work together to paint a single object, making it unsuitable for general painting of differentiated items. The second type is the traditional painting industry. Due to its high variability, uncontrollable environmental factors, and inconsistent painting requirements, this method is still primarily done manually. Painting quality depends heavily on worker experience, leading to high quality control difficulties and low painting precision. Moreover, long-term work in harsh environments is detrimental to the health of workers.

[0004] If the robot is painted by manual teaching, the robot arm end is first guided by a human to achieve the painting trajectory. Then the program remembers the pose information of the path points in the trajectory. Finally, the robot arm is controlled to repeat the trajectory to complete the painting. Although this method can greatly reduce the degree of human involvement and meet the requirements of long-term operation, it will face the following problems: (1) It cannot adapt to non-standard objects and requires repeated teaching; (2) Teaching requires the participation of workers, and the harsh painting environment is harmful to the health of workers; (3) Manual teaching will introduce the subjective experience of workers and lack objective optimal analysis; (4) Complex workpieces are difficult to plan manually, and the generated path quality is low.

[0005] Therefore, this invention proposes a method that uses a fixed servo motor to carry a depth camera to capture depth images from multiple angles, stitches these images together to construct a point cloud of the spraying target, and simultaneously samples and generates the spatial coordinates and normal vectors of path points. Finally, a robotic arm completes the spraying operation. Compared to manually teaching and generating the spraying trajectory, this method can generate the trajectory offline, greatly improving the efficiency of spraying trajectory generation, while also meeting the spraying requirements of a mobile robotic arm. Summary of the Invention

[0006] The purpose of this invention is to address the shortcomings of manually generated spraying trajectories by proposing a robotic arm spraying trajectory planning method and system based on point cloud stitching.

[0007] This invention utilizes a fixed servo motor equipped with a depth camera to achieve multi-angle imaging, thereby expanding the depth camera's field of view. Based on the rotation angles of the servo motor around the X-axis and Z-axis, the transformation matrix of multiple point cloud images is calculated, thus enabling point cloud stitching. Although this point cloud stitching method can currently only be implemented in a fixed position, researchers can extend it based on existing mobile robotic arm solutions to develop a movable servo motor point cloud stitching method.

[0008] To achieve the above objectives, the technical solution of the present invention is as follows:

[0009] On one hand, this invention provides a method for planning the spraying trajectory of a robotic arm based on point cloud stitching, comprising the following steps:

[0010] Step 1: Based on the principle of triangle similarity, the depth camera calibration method is used to calibrate the external parameter rotation matrix R and translation matrix T of the depth camera imaging coordinate system relative to the servo base coordinate system.

[0011] Step 2: Rotate the servo motor-mounted depth camera to capture multiple color depth images that completely cover the target, and stitch the point clouds together to obtain the target point cloud;

[0012] Step 3: Filtering the target point cloud;

[0013] Step 4: Using the servo base coordinate system with the depth camera as the origin, the X-axis is the direction directly in front of the servo at 0°, the Y-axis is the direction of 90° counterclockwise rotation, and the Z-axis is the direction perpendicular to the base. Establish a Cartesian coordinate system and use uniform sampling to discretize the target point cloud after filtering in Step 3. The sampling step size in the Z-axis direction is the forward step size of the robotic arm end in the Z-axis direction during spraying.

[0014] Step 5: Determine whether there are any unused areas inside the target point cloud after Step 4. If so, use color filtering to separate the unused area point cloud inside the target point cloud. At the same time, use statistical filtering on the processed target point cloud and the unused area point cloud to filter out outliers, and then proceed to Step 6; otherwise, proceed directly to Step 6.

[0015] Step Six: Random Sample Consensus (RANSAC) Algorithm for Plane Fitting

[0016] The RANSAC algorithm is used to iterate the target point cloud described in step five to obtain the best fitting plane within the fitting step size, where the fitting step size is the forward step size of the robotic arm end in the Z-axis direction.

[0017] Within the target point cloud step size, calculate the distance from points other than the fitted points to the best-fit plane, and delete points whose distance is greater than a set threshold;

[0018] Step 7: Point cloud path planning;

[0019] After sorting the point cloud processed in step six, the path points of the robotic arm's end effector are constructed, creating a full-coverage path based on the surface of the object to be painted, while bypassing unused areas that do not require painting. The specific method is as follows:

[0020] For the target point cloud processed in step six, if there are unused areas that do not need to be painted, then on the Z-axis, using the two extreme values ​​of the unused area point cloud described in step five as boundaries, the target point cloud is divided into three parts according to the size of the z-value: the largest part, the smallest part, and the middle part. The parts with the largest and smallest z-values ​​in the target point cloud are the first sorted parts, and the middle part is the second sorted part; if there are no unused areas that do not need to be painted, then all parts are considered as the first sorted parts.

[0021] For the first sorting step, within the sampling step, sort by y-value, arrange in ascending order within odd steps, and in descending order within even steps, and alternate the arrangement to construct a grid-like path, thereby achieving full coverage path;

[0022] For the secondary sorting part, the point cloud of the free area is divided into two parts by the median value of the point cloud on the Y-axis. Then, the planning path points of the two parts of the point cloud are reordered according to the first sorting steps.

[0023] Step 8: Fit a plane in the neighborhood of each path point planned in Step 7, and use the normal vector of the fitted plane as the normal vector of the path point. Realize the spraying trajectory based on the path point coordinates and the normal vector.

[0024] In a second aspect, the present invention provides a robotic arm spraying trajectory planning system, comprising:

[0025] The calibration module obtains the external parameters rotation matrix R and translation matrix T of the depth camera imaging coordinate system relative to the servo base coordinate system;

[0026] The target point cloud acquisition module calculates the transformation matrix for point cloud stitching based on the external parameter rotation matrix R and translation matrix T obtained from calibration, and acquires the target point cloud.

[0027] The preprocessing module filters and uniformly samples the target point cloud. Then, if there are empty areas that do not need to be sprayed, color filtering is used to separate the empty area point cloud inside the target point cloud. At the same time, statistical filtering is used on the processed target point cloud and the empty area point cloud to filter out outliers. If there are no empty areas that do not need to be sprayed, no additional processing is performed.

[0028] The point cloud path planning module sorts the point cloud after the RANSAC algorithm plane fitting process to form the path points of the robotic arm end, which is a full-coverage path based on the surface of the object to be sprayed, while bypassing the empty areas that do not need to be sprayed.

[0029] The robotic arm spraying trajectory construction module fits a plane in the neighborhood of each path point planned by the point cloud path planning module, and uses the normal vector of the fitted plane as the normal vector of the path point to realize the spraying trajectory based on the path point coordinates and the normal vector.

[0030] Thirdly, the present invention provides an electronic device including a processor and a memory, the memory storing machine-executable instructions executable by the processor, the processor executing the machine-executable instructions to implement the method.

[0031] Fourthly, the present invention provides a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement the method described thereon.

[0032] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0033] (1) The present invention independently builds a system for coupling a servo motor with a depth camera, controls the servo motor to rotate at a specified angle, introduces the depth camera imaging principle, the time-of-flight principle, the triangle similarity principle, etc., and indirectly obtains the position offset relationship between the camera imaging coordinate system and the servo motor base coordinate system, and then obtains the transformation matrix.

[0034] (2) This invention reads the rotation angle of the servo motor and combines it with the position offset relationship obtained by calibration to calculate the transformation matrix of the depth image relative to the initial coordinate system in real time, thereby realizing the point cloud stitching of multiple depth images and constructing the target point cloud;

[0035] (3) For the point cloud that has been successfully constructed, the present invention adopts a regional planning grid path so that the path can bypass the areas in the target that do not need to be sprayed. Under the premise of completely covering the spraying area, the path is shorter and more in line with the actual spraying needs.

[0036] In summary, this invention can obtain target point clouds based on depth cameras, extract the areas to be sprayed after a series of filtering processes, and finally construct a raster path based on the point cloud of the spraying area. By combining multiple point cloud filtering methods, the amount of point cloud data is reduced while minimizing the loss of point cloud details, and the target point cloud is obtained through sampling. The point cloud is directly sorted to plan the path points of the robotic arm's end effector, making the path more closely resemble the actual object, while reducing the computational load of the algorithm in practical application environments and improving the accuracy and efficiency of the robotic arm's end effector path planning. Attached Figure Description

[0037] 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.

[0038] Figure 1 This is a flowchart of the present invention.

[0039] Figure 2 The servo-coupled depth camera system designed for this invention.

[0040] Figure 3 This is a schematic diagram of camera calibration according to the present invention.

[0041] Figure 4 This is a schematic diagram of the servo motor of the present invention rotating around the Y-axis.

[0042] Figure 5 This is a schematic diagram of the servo motor of the present invention rotating around the X-axis.

[0043] Figure 6 This is a schematic diagram of path planning in this invention without region segmentation of the target point cloud.

[0044] Figure 7 This is a schematic diagram of path planning after the target point cloud is segmented into regions according to the present invention. Detailed Implementation

[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0046] This embodiment uses a two-degree-of-freedom servo motor equipped with a depth camera to form an experimental platform.

[0047] A method for planning the spraying trajectory of a robotic arm based on point cloud stitching, such as... Figure 1 The specific implementation steps include the following:

[0048] Step 1: Based on the principle of triangle similarity, the depth camera calibration method is used to calibrate the external parameters of the depth camera imaging coordinate system relative to the servo rotation coordinate system, namely the rotation matrix R and the translation matrix T.

[0049] The calibration method is as follows:

[0050] Figure 2 The servo-coupled depth camera system designed for this invention.

[0051] Figure 3 In this process, the distance between the camera imaging coordinates (camera_link) and the servo base coordinates (base_link) in the Z-axis direction can be measured by vernier calipers, denoted as z. However, the distances in the X and Y axes are difficult to measure. Therefore, this invention designs a calibration method, such as... Figure 3 In the XOY plane shown, first, position the depth camera perpendicular to a known vertical plane. The X-axis of the camera_link is perpendicular to this vertical plane. At this point, the distance x between the camera_link and the vertical plane can be measured from the depth value returned by the depth camera. Let θ be the angle between the camera_link and the base_link in the XOY plane, and let r be the distance. Then, rotate the servo clockwise around the base_link by an angle θ1. At this point, the distance returned by the depth camera is x1. Based on the principle of similar triangles, the following equation can be derived:

[0052] r[cos(θ-θ1)-cosθ]=x-x1 cosθ1 (1)

[0053] Let the servo motor rotate by an angle of θ2, and the depth camera return distance be x2. Similarly, we can obtain the following formula:

[0054] r[cos(θ-θ2)-cosθ]=x-x2 cosθ2 (2)

[0055] According to equations (1) and (2), we can obtain:

[0056]

[0057] Therefore, the coordinates of camera_link relative to base_link in the XOY plane are (rcosθ, rsinθ), that is, the three-dimensional coordinates of camera_link are (rcosθ, rsinθ, z).

[0058] By aligning the camera imaging coordinate system with the servo motor base coordinate system through a mechanical structure, the extrinsic rotation matrix is:

[0059]

[0060] The extrinsic translation matrix is:

[0061] T = [r cosθ r sinθ z] T (5)

[0062] The required extrinsic parameter matrix is:

[0063]

[0064] Step 2: Rotate the servo motor-mounted depth camera to capture multiple color depth images that completely cover the target, and stitch the point clouds together to obtain a large-scale target point cloud;

[0065] The point cloud stitching is described in detail below:

[0066] Let the angles of rotation of the servo motor around the XYZ axes be θ. x θ y θ z The corresponding rotation matrices are:

[0067]

[0068]

[0069]

[0070] Among them, R x R y R z These are the rotation matrix components for rotation around the X, Y, and Z axes, respectively. Since the servo motor's rotation is external rotation, the rotation matrix is:

[0071] R = R z (θ z )×R y (θ y )×R x (θ x (10)

[0072] Let's assume we first rotate θ about the Y-axis. y ,like Figure 4 The translation in the XOZ plane is calculated as follows:

[0073]

[0074]

[0075] Let the servo motor rotate θ around the Z-axis. z ,like Figure 5 Find its translation in the XOY plane:

[0076]

[0077]

[0078]

[0079] The translation matrix is:

[0080] T = [Δx Δy Δz] T (16)

[0081] The transformation matrix is:

[0082]

[0083] According to equation (17), the point cloud is multiplied by the corresponding transformation matrix to convert it into the same coordinate system, thereby realizing point cloud stitching;

[0084] Step 3: Target point cloud filtering;

[0085] Color filtering is used to extract the boundary point cloud from the target point cloud. Statistical filtering is then applied to the boundary point cloud to remove obvious outliers. Based on the filtered boundary point cloud, the target point cloud is extracted and filtered in layers to obtain the target point cloud surrounded by the boundary point cloud. Voxel filtering is used for downsampling, followed by statistical filtering to further remove noise. Median filtering is used to smooth the point cloud, and moving least squares smoothing filtering is used for upsampling to increase the point cloud density at holes in the point cloud.

[0086] Furthermore, the color filtering involves converting the original RGB color point cloud to the HSV color space. In the HSV color space, a set of HSV thresholds is pre-set to specify the range of colors to be retained. The point cloud is traversed to obtain the point cloud index within the specified HSV threshold range. The corresponding point cloud is filtered out according to the index and used to extract the object point cloud of a specific color. Object segmentation and filtering are then performed in the 3D point cloud.

[0087] Furthermore, the hierarchical extraction filtering is performed on a target point cloud containing boundary point clouds. On the Z-axis, the point cloud is divided into several parts with a specified step size. On the Y-axis, the target point cloud is selected based on the extreme value of the boundary point cloud in the Y-axis direction. No requirements are made on the X-axis. This is to achieve a more precise extraction of the target point cloud surrounded by the boundary point cloud from the target point cloud.

[0088] Step 4: Discretize the target point cloud using uniform sampling. The sampling step size at this time should be the forward step size of the robotic arm end in the Z-axis direction during spraying.

[0089] Step 5: Determine if there are holes, such as windows, inside the target point cloud. If so, use the color filtering described above to filter out the point cloud with holes, and use statistical filtering to filter out outliers. Then proceed to Step 6. Otherwise, proceed directly to Step 6.

[0090] Step 6: Use the Random Sample Consensus (RANSAC) algorithm to iteratively fit the best plane within each step size. The fitting step size in the Z-axis direction is the forward step size of the robotic arm end in the Z-axis direction. Within the target point cloud step size, calculate the distance from the points other than the fitting point to the fitting plane and delete points whose distance is greater than the set threshold.

[0091] Step 7: Point cloud path planning;

[0092] Point cloud information stores the three-dimensional coordinates of points in space. Therefore, sorting the point cloud according to certain rules can form the path points of the robotic arm's end effector, constructing a full-coverage path based on the surface of the object to be painted, while bypassing the empty areas that do not need to be painted. The specific method is as follows:

[0093] For the target point cloud described in step six, if there are unused areas that do not need to be painted, then on the Z-axis, the target point cloud is divided into three parts by the extreme values ​​of the unused area point cloud described in step five in the Z-axis direction. The parts with the largest and smallest z-values ​​are the first sorted parts, and the remaining part is the second sorted part. If there are no unused areas that do not need to be painted, then all are considered as the first sorted parts. For the first sorted parts, within the sampling step size, they are sorted by y-value. In odd steps, they are arranged in ascending order, and in even steps, they are arranged in descending order. Alternating arrangements can construct a grid-like path to achieve full coverage. For the second sorted parts, the point cloud of the second sorted part is divided into two parts by the median value of the unused area point cloud on the Y-axis. Then, the path points of the two parts are reordered according to the first sorting steps.

[0094] Path planning without region segmentation of the target point cloud, such as Figure 6 After dividing the target point cloud into spraying areas and unsprayed areas, the path planning is as follows: Figure 7 Each point represents a path point for the robotic arm, and the straight lines between the points represent the simulated spraying path at the end of the robotic arm.

[0095] Step 8: Fit a plane in the neighborhood of each point, and use the normal vector of the fitted plane as the normal vector of the point. Output the point cloud coordinates and normal vectors as a txt file according to a certain format, and use the txt file to realize the spraying trajectory.

Claims

1. A method for planning the spraying trajectory of a robotic arm based on point cloud stitching, characterized in that, Includes the following steps: Step 1: Based on the principle of triangle similarity, the depth camera calibration method is used to calibrate the external parameter rotation matrix R and translation matrix T of the depth camera imaging coordinate system relative to the servo base coordinate system. Step 2: Rotate the servo motor-mounted depth camera to capture multiple color depth images that completely cover the target, and stitch the point clouds together to obtain the target point cloud; Step 3: Filtering the target point cloud; Step 4: Using the origin of the servo base coordinate system equipped with the depth camera as the origin, the direction directly in front of the servo is the X-axis direction, the direction of rotating 90° counterclockwise is the Y-axis direction, and the direction perpendicular to the base is the Z-axis direction, establish a Cartesian coordinate system. Discretize the target point cloud after filtering in Step 3 using uniform sampling, where the sampling step size in the Z-axis direction is the forward step size of the robotic arm end in the Z-axis direction during spraying. Step 5: Determine whether there are any unused areas inside the target point cloud after Step 4. If so, use color filtering to separate the unused area point cloud inside the target point cloud. At the same time, use statistical filtering on the processed target point cloud and the unused area point cloud to filter out outliers, and then proceed to Step 6; otherwise, proceed directly to Step 6. Step 6: RANSAC algorithm plane fitting; The RANSAC algorithm is used to iterate the target point cloud described in step five to obtain the best fitting plane within the fitting step size, where the fitting step size is the forward step size of the robotic arm end in the Z-axis direction. Within the target point cloud stride, calculate the distance from points other than the fitted points to the best-fit plane, and delete points whose distance is greater than a set threshold; Step 7: Point cloud path planning; After sorting the point cloud processed in step six, the path points of the robotic arm's end effector are constructed, creating a full-coverage path based on the surface of the object to be painted, while bypassing unused areas that do not require painting. The specific method is as follows: For the target point cloud processed in step six, if there are unused areas that do not need to be painted, then on the Z-axis, using the two extreme values ​​of the unused area point cloud described in step five as boundaries, the target point cloud is divided into three parts according to the size of the z-value: the largest part, the smallest part, and the middle part. The parts with the largest and smallest z-values ​​in the target point cloud are the first sorted parts, and the middle part is the second sorted part; if there are no unused areas that do not need to be painted, then all parts are considered as the first sorted parts. For the first sorting step, within the sampling step, sort by y-value, arrange in ascending order within odd steps, and in descending order within even steps, and alternate the arrangement to construct a grid-like path, thereby achieving full coverage path; For the secondary sorting part, the point cloud of the free area is divided into two parts by the median value of the point cloud on the Y-axis. Then, the planning path points of the two parts of the point cloud are reordered according to the first sorting steps. Step 8: Fit a plane in the neighborhood of each path point planned in Step 7, and use the normal vector of the fitted plane as the normal vector of the path point. Realize the spraying trajectory based on the path point coordinates and the normal vector.

2. The method according to claim 1, characterized in that, The specific steps for calibrating the extrinsic parameters of the depth camera mounted on the servo motor in step one are as follows: Based on the depth value returned by the depth camera, obtain the distance x between the depth camera's imaging coordinate system camera_link and the vertical plane; let θ be the angle between camera_link and the servo's base coordinate system base_link in the XOY plane, and let r be the distance; then, the servo rotates clockwise around base_link by an angle θ1. At this time, the depth camera returns a depth value of x1. Based on the principle of triangle similarity, the following formula can be derived: r[cos(θ-θ1)-cosθ]=x-x1cosθ1 (1) Let the angle of the servo motor's next rotation be θ2, and the depth value returned by the depth camera be x2. Similarly, the following formula can be obtained: r[cos(θ-θ2)-cosθ]=x-x2cosθ2 (2) According to equations (1) and (2), we can get: Therefore, the coordinates of camera_link relative to base_link in the XOY plane are (rcosθ, rsinθ), that is, the three-dimensional coordinates of camera_link are (rcosθ, rsinθ, z). By aligning the camera imaging coordinate system with the servo motor base coordinate system through a mechanical structure, the extrinsic rotation matrix is: The translation matrix for camera calibration is: T = [rcosθrsinθz] T (5) The extrinsic parameter matrix for camera calibration is:

3. The method according to claim 1, characterized in that, Step two, point cloud stitching, is performed as follows: Let the angles of rotation of the servo motor around the XYZ axes be θ. x θ y θ z The corresponding rotation matrices are: Among them, R x R y R z These are the rotation matrix components for rotation around the X, Y, and Z axes, respectively. Since the servo motor rotation is external rotation, the rotation matrix for point cloud stitching is: R1 = R z (θ z )×R y (θ y )×R x (θ x (10) Let the rotation about the Y-axis be θ y The translation of the point cloud in the XOZ plane is obtained as follows: Let the servo motor rotate θ around the Z-axis. z The translation of the point cloud in the XOY plane is obtained as follows: The translation matrix for point cloud stitching is: T1=[ΔxΔyΔz] T (16) The transformation matrix for point cloud stitching is: According to equation (17), the point cloud coordinates are multiplied by the corresponding transformation matrix to convert them into the same coordinate system, thus realizing point cloud stitching.

4. The method according to claim 1, characterized in that, Step three specifically involves: Color filtering is used to extract the boundary point cloud from the target point cloud described in step two; Statistical filtering is applied to the boundary point cloud to remove obvious outliers, resulting in a filtered boundary point cloud. Based on the filtered boundary point cloud, the target point cloud described in step two is subjected to hierarchical extraction filtering to obtain the target point cloud surrounded by the boundary point cloud. Voxel filtering is used to downsample the target point cloud surrounded by boundary point clouds. Then, statistical filtering is used to remove noise, median filtering is used to smooth the point cloud, and moving least squares smoothing filtering is used to upsample and increase the point cloud density at the holes in the point cloud.

5. The method according to claim 4, characterized in that, The color filtering described in step three involves converting the original RGB color point cloud to the HSV color space. In the HSV color space, a set of HSV thresholds is pre-set to specify the range of colors to be retained. The target point cloud described in step two is traversed to obtain the point cloud index within the specified HSV threshold range. The corresponding point cloud is filtered out based on the index and used to extract the object point cloud of a specific color. Object segmentation and filtering are then performed in the 3D point cloud.

6. The method according to claim 4, characterized in that, The layered extraction filtering described in step three involves dividing the target point cloud described in step two into multiple layers along the Z-axis with a specified step size, using the boundary point cloud as a reference. The target point cloud is selected along the Y-axis based on the extreme values ​​of the boundary point cloud in the Y-axis direction, while no requirements are made for the X-axis.

7. A spraying trajectory planning system for implementing the method of any one of claims 1-6, characterized in that, include: The calibration module obtains the external parameters rotation matrix R and translation matrix T of the depth camera imaging coordinate system relative to the servo base coordinate system; The target point cloud acquisition module calculates the transformation matrix during point cloud stitching to acquire the target point cloud; The preprocessing module filters and uniformly samples the target point cloud. Then, if there are empty areas that do not need to be sprayed, color filtering is used to separate the empty area point cloud inside the target point cloud. At the same time, statistical filtering is used on the processed target point cloud and the empty area point cloud to filter out outliers. If there are no empty areas that do not need to be sprayed, no additional processing is performed. The point cloud path planning module sorts the point cloud after the RANSAC algorithm plane fitting process to form the path points of the robotic arm end, which is a full-coverage path based on the surface of the object to be sprayed, while bypassing the empty areas that do not need to be sprayed. The robotic arm spraying trajectory construction module fits a plane in the neighborhood of each path point planned by the point cloud path planning module, and uses the normal vector of the fitted plane as the normal vector of the path point to realize the spraying trajectory based on the path point coordinates and the normal vector.

8. An electronic device, characterized in that, The method includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the method of any one of claims 1-6.

9. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-executable instructions that, when invoked and executed by a processor, cause the processor to perform the method described in any one of claims 1-6.

Citation Information

Patent Citations

  • Automobile spraying track generation method based on multiple 3D vision

    CN114299104A

  • Method and device for automatically generating free-form surface spraying path

    CN115685988A