Bathtub hole positioning method and system based on depth camera

Through the collaborative operation of the depth camera and the robot, high-precision and rapid positioning of the bathtub holes is achieved, solving the problems of large positioning errors and low efficiency in bathtub manufacturing, and is suitable for complex curved surface environments.

CN120707620APending Publication Date: 2025-09-26GUANGDONG UNIV OF TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510734557.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-04
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

In bathtub manufacturing, the plasticity of acrylic materials causes uneven deformation of the bathtub surface. Existing positioning methods have problems such as large positioning errors, low efficiency, and high labor costs, making it difficult to ensure processing accuracy on complex curved surfaces.

Method used

A bathtub hole positioning method based on a depth camera is adopted. The camera coordinate system is calibrated to the robot tool coordinate system through hand-eye calibration. The tool coordinate system is calibrated with the four-point method. The robot posture is adjusted using the depth camera image data, the hole center is directly calculated, and the tool is made perpendicular to the hole plane.

Benefits of technology

It improves the positioning accuracy and efficiency of the bathtub hole, simplifies the calibration process, reduces errors, is suitable for curved surface environments, and reduces labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120707620A_ABST
    Figure CN120707620A_ABST
Patent Text Reader

Abstract

The invention discloses a bathtub hole positioning method based on a depth camera, and the method comprises the steps: S1, installing the depth camera on a robot, and calibrating a camera coordinate system into a tool coordinate system of the robot through a hand-eye calibration experiment; s2, a tool is installed on the robot, the tool is calibrated through a four-point method, and the posture of the tool coordinate system is modified according to the posture of the camera coordinate system; s3, correcting the depth camera according to the position of the camera and the currently acquired image, and enabling the plane of the camera to be parallel to the measured plane; s4, the hole center is calculated, the robot is controlled, the view center of the camera is aligned with the hole center, and the pose of the camera coordinate system is recorded; and S5, switching the tool coordinate system into a tool coordinate system, and moving to the pose recorded in S4. According to the method, the camera coordinate system is calibrated into the tool coordinate system of the robot by ingeniously applying the hand-eye calibration principle, errors caused by calibration of the tool coordinate system through a traditional six-point method are avoided, and time consumed by calibration through the method is greatly shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a bathtub hole positioning method and system, and in particular to a bathtub hole positioning method and system based on a depth camera. Background Art

[0002] In the bathtub manufacturing industry, acrylic material is widely used in the manufacture of bathtubs due to its good plasticity. However, due to the vacuum forming process of bathtubs, unpredictable deformation of the bathtub surface is likely to occur, resulting in large deviations in the same hole position of the same model of bathtub, which seriously affects the accurate positioning and processing of the holes.

[0003] At present, the hole making of bathtubs mainly relies on manual operation or traditional CNC equipment. These methods are difficult to ensure processing accuracy on complex curved surfaces, and there are problems such as large positioning errors, low efficiency, and high labor costs. Summary of the Invention

[0004] The object of the present invention is to address the above-mentioned problems and provide a bathtub hole positioning method and system based on a depth camera that is accurate in positioning, convenient in processing, and quick in processing.

[0005] The purpose of the present invention can be achieved by adopting the following technical solutions:

[0006] A bathtub hole positioning method and system based on a depth camera, comprising the following steps:

[0007] S1. Install the depth camera on the robot's execution end and use the hand-eye calibration experiment to calibrate the camera coordinate system to the robot's tool coordinate system;

[0008] S2. Install the tool on the robot's actuator, operate the robot's teach pendant to perform four-point calibration on the tool, and modify the pose of the tool coordinate system calibrated by the four-point method according to the pose of the camera coordinate system;

[0009] S3, control the robot to move, move the depth camera to the top of the measured hole, and align the depth camera according to the current position of the depth camera and the currently acquired image so that the depth camera plane is parallel to the measured plane;

[0010] S4. After the depth camera is aligned, the hole center is calculated and the robot's actuator is controlled to move above the hole center so that the depth camera's field of view is aligned with the hole center, and the position of the camera coordinate system is recorded.

[0011] S5. Switch the tool coordinate system to the tool coordinate system and move to the position recorded in S4. At this time, the tool is aligned with the center of the hole and perpendicular to the hole plane.

[0012] Furthermore, the specific content of step S1 is:

[0013] S11. Install the depth camera, place the calibration plate, and switch the tool coordinate system to the original tool coordinate system on the robot teach pendant, that is, use the flange center as the tool coordinate system;

[0014] S12, controlling the execution end of the robot to collect multiple pictures at different postures around the calibration plate, and recording the tool coordinate system posture of the robot when taking pictures;

[0015] S13, inputting the pose data and image data into the relevant functions of the OpenCV vision library to calculate the homogeneous transformation matrix between the camera coordinate system and the tool coordinate system, that is, the hand-eye matrix;

[0016] S14. Calculate the six pose values ​​of the camera coordinate system according to the homogeneous transformation matrix of the hand-eye matrix: x, y, z, rx, ry, rz;

[0017] S15. Input the six values ​​of S14 into the robot teaching pendant to obtain the first tool coordinate system of the robot, that is, the camera coordinate system.

[0018] Furthermore, the specific content of step S2 is:

[0019] S21. Install the tool, take a center and fix it in place, and use the "four-point method" on the robot teaching pendant to calibrate the tool coordinate system to obtain the second tool coordinate system, that is, the tool coordinate system;

[0020] S22. Assign the posture values ​​rx, ry, and rz of the first tool coordinate system to the second tool coordinate system.

[0021] Furthermore, the specific content of step S3 is:

[0022] S31, operate the teaching pendant to switch to the first tool coordinate system, i.e., the camera coordinate system, and then control the robot to move the depth camera to the top of the measured hole;

[0023] S32. Turn on the depth camera, select at least 3 points on the plane of the measured hole in the camera field of view, fit a plane and obtain its normal vector

[0024] S33. The vector of the z-axis of the camera coordinate system is Using the Rodrigues formula, as shown in formula (1), we can calculate the vector Rotate to Vector The rotation matrix R;

[0025] R=I+sinθ*K+(1-cosθ)*K (1)

[0026] Among them, I is the 3*3 identity matrix, K is The antisymmetric matrix of is shown in formula (3), and for arrive The rotation axis of is shown in equation (2), and θ is arrive The rotation angle of is shown in formula (4).

[0027]

[0028]

[0029] S34, calculate the corresponding 4×4 homogeneous transformation matrix M based on the 6 pose values ​​of the current camera coordinate system c2b , as shown in formula (5);

[0030] Among them, M c2b The 3×3 rotation matrix part R c2b and 3×1 translation part T c2b composition.

[0031]

[0032] S35, take out M c2b The rotation matrix part R c2b , multiply the S33 step on the right to get the rotation matrix R, and get the new rotation matrix: R c2b =R c2b *R;

[0033] S36, Update M c2b , and calculate the new pose of the camera coordinate system based on the new homogeneous transformation matrix;

[0034] S37. Control the robot to move to the new posture obtained in step S36. At this time, the depth camera plane is parallel to the measured plane.

[0035] Furthermore, the specific content of step S4 is:

[0036] S41. A label paper is attached to the hole being tested. The label paper is composed of a 3×3 black and white checkerboard pattern, and the size of each small grid is 11×11 mm.

[0037] S42, photographing a color image and a depth image, calling a function of the OpenCV vision library based on the color image to identify corner points, and calculating pixel coordinates of the center corner point, i.e., the center of the hole;

[0038] S43, extracting the corresponding depth value from the depth map according to the pixel coordinates of the central corner point;

[0039] S44. Call the library function of the depth camera to reversely project the pixel coordinates of the central corner point into three-dimensional coordinates in the camera coordinate system, and return this coordinate value, which is the coordinate value of the hole center in the camera coordinate system;

[0040] S45, calculating a new pose in which the center of the depth camera coincides with the center of the hole based on the pose of the current camera coordinate system and the coordinate value of the hole center calculated in step S44, and then controlling the robot to move based on the new pose;

[0041] S46. After controlling the robot to move to the new posture calculated in step S45, record the posture data.

[0042] Furthermore, the specific content of step S5 is:

[0043] S51, operating the teaching pendant to switch the tool coordinate system of the robot to the second tool coordinate system, i.e., the tool coordinate system;

[0044] S52. Operate the teach pendant to move the robot to the position data recorded in S46. At this time, the tool will be aligned with the center of the hole and perpendicular to the hole plane.

[0045] A bathtub hole positioning system based on a depth camera includes a robot, a teach pendant for controlling the robot's movements, a tool mounted on the robot's execution end for machining the bathtub hole, a depth camera mounted on the robot's execution end for collecting image data, and a bathtub located below the tool and mounted on a positioning device.

[0046] As a preferred solution, the depth camera is an Intel RealSense D405 camera.

[0047] As a preferred solution, the depth camera is installed on the execution end of the robot away from the tool.

[0048] As a preferred solution, the fitting points are the circle of red dots in the camera's field of view.

[0049] As a preferred solution, the depth camera center is the green cross in the camera's field of view.

[0050] As a preferred solution, the label paper is composed of a 3×3 black and white checkerboard calibration plate with a size of 11mm×11mm, which can be glued to the measured hole, and the center of its corner point is the center of the measured hole.

[0051] The implementation of the present invention has the following beneficial effects:

[0052] 1. By cleverly applying the principle of eye-on-hand calibration, the camera coordinate system is calibrated into a tool coordinate system of the robot, avoiding the error caused by the traditional six-point method of calibrating the tool coordinate system, and the time spent on calibration using this method is also greatly reduced.

[0053] 2. The camera coordinate system is also calibrated as a tool coordinate system for the robot. This allows the robot's position and posture to be adjusted directly based on the image data captured by the depth camera and the data in the current camera coordinate system, allowing the robot and depth camera to be cleverly integrated. We also assign the posture value of the camera coordinate system directly to the tool coordinate system. This ensures that as long as the camera is aligned, the tool will be perpendicular to the plane of the measured hole, eliminating the need to recalculate the normal vector of the measured hole plane, simplifying the process and improving positioning efficiency.

[0054] 3. When aligning the depth camera, the normal vector of the measured hole plane is calculated based on the points on the measured hole plane taken from the depth camera's field of view. These points can be determined by the user and are suitable for use in environments such as curved surfaces.

[0055] 4. The hole center recognition method used calculates the center by identifying the checkerboard grid on the label paper. The checkerboard corners are easy to identify, and the relevant library functions have already been implemented. In addition, this label paper can be applied to irregularly shaped holes or holes on curved surfaces, and the recognition effect is accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0057] Figure 1 This is a workflow diagram of the bathtub hole positioning method based on a depth camera of the present invention;

[0058] Figure 2 Schematic diagram of the structure of the bathtub hole positioning system based on the depth camera of the present invention;

[0059] Figure 3 Schematic diagram of the operation process of the eye-on-hand hand-eye calibration experiment of the present invention;

[0060] Figure 4 This is a schematic diagram of the operation process of calibrating the tool coordinate system using the four-point method of the present invention;

[0061] Figure 5 is a schematic diagram of the depth camera of the present invention before being straightened;

[0062] Figure 6 yes Figure 5 Schematic diagram of the depth camera field of view; the red dots are the fitting points taken on the plane of the measured hole;

[0063] Figure 7 This is a schematic diagram of the camera of the present invention after being straightened;

[0064] Figure 8 yes Figure 7 Schematic diagram of the depth camera's field of view; the red dots are the fitting points taken before alignment;

[0065] Figure 9 Schematic diagram of the depth camera's field of view before the hole center is calculated in the present invention; wherein the cross is the center of the depth camera's field of view;

[0066] Figure 10 This is a diagram of the camera's field of view after the hole center is calculated in the present invention;

[0067] Figure 11 1 is a schematic diagram of the situation after the robot tool coordinate system is switched to the tool coordinate system and before the tool is offset in an embodiment of the present invention;

[0068] Figure 12 This is a diagram of the situation after the tool is offset after the robot tool coordinate system is switched to the tool coordinate system in the embodiment of the present invention; wherein the tool center is aligned with the hole center, and the tool is perpendicular to the plane of the measured hole. DETAILED DESCRIPTION

[0069] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0070] Example

[0071] Reference Figures 1 to 12 , this embodiment relates to a bathtub hole positioning method, comprising the following steps:

[0072] S1. Install the depth camera 1 on the execution end of the robot 10, and use the hand-eye calibration experiment to calibrate the camera coordinate system to the tool coordinate system of the robot 10; specifically, step S1 includes the following contents: S11: Install the depth camera 1, place the calibration plate 2, and switch the tool coordinate system to the original tool coordinate system on the robot teach pendant 3, that is, use the center of the flange as the tool coordinate system; S12: Control the execution end of the robot 10 to collect multiple pictures at different postures around the calibration plate 2, and record the tool coordinate system posture of the robot 10 when taking pictures; S13: Pass the posture data and picture data to the relevant functions of the OpenCV vision library to calculate the homogeneous transformation matrix between the camera coordinate system and the tool coordinate system, that is, the hand-eye matrix; S14: Calculate the 6 posture values ​​of the camera coordinate system according to the homogeneous transformation matrix of the hand-eye matrix: x, y, z, rx, ry, rz; S15: Input the 6 values ​​of S14 into the robot teach pendant 3 to obtain the first tool coordinate system of the robot 10, that is, the camera coordinate system. The robot 10 is a six-axis robot. The depth camera 1 is connected to a host computer.

[0073] S2. Install the tool 4 on the execution end of the robot 10, operate the robot teach pendant 3 to calibrate the tool 4 using the four-point method, and modify the posture of the tool coordinate system calibrated by the four-point method according to the posture of the camera coordinate system; Specifically, step S2 includes the following: S21: Install the tool 4, take a center 5 and fix it in place, use the "four-point method" to calibrate the tool coordinate system on the robot teach pendant 3, and obtain the second tool coordinate system, that is, the tool coordinate system. S22: Assign the posture values ​​rx, ry, and rz of the first tool coordinate system to the second tool coordinate system

[0074] S3, control the robot 10 to move, move the depth camera 1 to the top of the measured hole, and align the depth camera 1 according to the current position of the depth camera 1 and the currently acquired image so that the plane of the depth camera 1 is parallel to the measured plane 101; specifically, step S2 includes the following contents:

[0075] S31, operate the robot teaching pendant 3, switch to the first tool coordinate system, i.e., the camera coordinate system, and then control the robot 10 to move the depth camera 1 to the top of the measured hole;

[0076] S32, turn on the depth camera 1, select at least 3 points on the plane of the measured hole in the camera field of view 103 displayed on the host computer, fit a plane 102 and obtain its normal vector

[0077] S33. The vector of the z-axis of the camera coordinate system is Using the Rodrigues formula, as shown in formula (1), we can calculate the vector Rotate to Vector The rotation matrix R;

[0078] R=I+sinθ*K+(1-cosθ)*K (1)

[0079] Among them, I is the 3*3 identity matrix, K is The antisymmetric matrix of is shown in formula (3), and for arrive The rotation axis of is shown in equation (2), and θ is arrive The rotation angle of is shown in formula (4).

[0080]

[0081]

[0082] S34, calculate the corresponding 4×4 homogeneous transformation matrix M based on the 6 pose values ​​of the current camera coordinate system c2b , as shown in formula (5);

[0083] Among them, M c2b The 3×3 rotation matrix part R c2b and 3×1 translation part T c2b composition.

[0084]

[0085] S35, take out M c2b The rotation matrix part R c2b , multiply the S33 step on the right to get the rotation matrix R, and get the new rotation matrix: R c2b =R c2b *R;

[0086] S36, Update M c2b , and calculate the new pose of the camera coordinate system based on the new homogeneous transformation matrix;

[0087] S37 , controlling the robot 10 to move to the new posture obtained in step S36 , where the plane of the depth camera 1 is parallel to the measured plane 101 .

[0088] S4. After aligning the depth camera 1, calculate the hole center, and control the execution end of the robot 10 to move to the top of the hole center, so that the depth camera field of view center 11 is aligned with the hole center, and record the position of the camera coordinate system; Specifically, the content of step S4 is: S41: A label paper 6 is attached to the measured hole. This label paper 6 is composed of a 3×3 black and white checkerboard, and the size of each small grid is 11×11mm; S42: Take a color image and a depth image, call the function of the OpenCV vision library according to the color image to identify the corner point, and calculate the pixel coordinate value of the center corner point, that is, the hole center; S43: Then according to The pixel coordinates of the central corner point are extracted from the depth map to obtain the corresponding depth value; S44: the library function of the depth camera 1 is called to back-project the pixel coordinates of the central corner point into three-dimensional coordinates in the camera coordinate system, and the coordinate value is returned, which is the coordinate value of the hole center in the camera coordinate system; S45: according to the posture of the current camera coordinate system and the coordinate value of the hole center calculated in step S44, a new posture is calculated in which the center of the depth camera 1 coincides with the hole center, and then the robot 10 is controlled to move according to the new posture; S46: after controlling the robot 10 to move to the new posture calculated in step S45, this posture data is recorded.

[0089] S5. Switch the tool coordinate system to the tool coordinate system and move to the position recorded in S4. At this point, tool 4 is aligned with the hole center and perpendicular to the hole plane. Specifically, step S5 includes the following: S51: Operate the teach pendant to switch the robot 10's tool coordinate system to the second tool coordinate system, i.e., the tool coordinate system; S52: Operate the teach pendant to move the robot 10 to the position recorded in S46. At this point, tool 4 is aligned with the hole center and perpendicular to the hole plane.

[0090] This method has the following advantages: 1. It cleverly applies the principle of eye-on-hand calibration to calibrate the camera coordinate system into a tool coordinate system of the robot 10, avoiding the error caused by the traditional six-point method of calibrating the tool coordinate system, and the time spent on calibration using this method is also greatly reduced.

[0091] 2. The camera coordinate system is also calibrated as a tool coordinate system for the robot 10. The robot 10's position and posture can be adjusted directly based on the image data captured by the depth camera 1 and the data in the current camera coordinate system, allowing the robot 10 and the depth camera 1 to be cleverly integrated. We also assign the posture value of the camera coordinate system directly to the tool coordinate system. This ensures that as long as the camera is aligned, the tool 4 will be perpendicular to the plane of the measured hole, eliminating the need to recalculate the normal vector of the measured hole plane, simplifying the process and improving positioning efficiency.

[0092] 3. When aligning the depth camera 1, the normal vector of the measured hole plane is calculated based on the points on the measured hole plane taken from the field of view of the depth camera 1. These points can be determined by the user and are suitable for use in environments such as curved surfaces.

[0093] 4. The hole center recognition method used calculates the center by identifying the checkerboard grid on the label paper. The checkerboard corners are easy to identify, and the relevant library functions have already been implemented. In addition, this label paper can be applied to irregularly shaped holes or holes on curved surfaces, and the recognition effect is accurate.

[0094] The depth camera 1 is an Intel RealSense D405 camera. The fitting plane 102 is the circle of red dots in the camera's field of view. The center of the depth camera 1 is the cross in the camera's field of view.

[0095] The label paper is composed of a 3×3 black and white checkerboard calibration plate 2 with a size of 11mm×11mm, which can be glued to the measured hole, and the center of its corner point is the center of the measured hole.

[0096] This embodiment also provides a bathtub hole positioning system based on a depth camera 1, comprising a robot 10, a teach pendant 3 for controlling the movements of the robot 10, a tool 4 mounted on the robot 10's execution end for machining the bathtub hole, a depth camera 1 mounted on the robot 10's execution end for collecting image data, and a bathtub 7 positioned below the tool 4 and mounted on a positioning device. The depth camera 1 is mounted on the robot 10's execution end, away from the tool 4. The bathtub 7 is fixedly mounted on a mounting bracket 8. A rotating shaft 9 is provided on the robot 10's execution end for driving the tool 4.

[0097] The above disclosure is only a preferred embodiment of the present invention and certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims

1. A bathtub hole positioning method based on a depth camera, characterized in that: The following steps are involved: S1. Install the depth camera on the robot's execution end and use the hand-eye calibration experiment to calibrate the camera coordinate system to the robot's tool coordinate system; S2. Install the tool on the robot's actuator, operate the robot's teach pendant to perform four-point calibration on the tool, and modify the pose of the tool coordinate system calibrated by the four-point method according to the pose of the camera coordinate system; S3, control the robot to move, move the depth camera to the top of the measured hole, and align the depth camera according to the current position of the depth camera and the currently acquired image so that the depth camera plane is parallel to the measured plane; S4. After the depth camera is aligned, the hole center is calculated and the robot's actuator is controlled to move above the hole center so that the depth camera's field of view is aligned with the hole center, and the position of the camera coordinate system is recorded. S5. Switch the tool coordinate system to the tool coordinate system and move to the position recorded in S4. At this time, the tool is aligned with the center of the hole and perpendicular to the hole plane.

2. The bathtub hole positioning method based on a depth camera according to claim 1, characterized in that: The specific content of step S1 is: S11. Install the depth camera, place the calibration plate, and switch the tool coordinate system to the original tool coordinate system on the robot teach pendant, that is, use the flange center as the tool coordinate system; S12, controlling the execution end of the robot to collect multiple pictures at different postures around the calibration plate, and recording the tool coordinate system posture of the robot when taking pictures; S13, inputting the pose data and image data into the relevant functions of the OpenCV vision library to calculate the homogeneous transformation matrix between the camera coordinate system and the tool coordinate system, that is, the hand-eye matrix; S14. Calculate the six pose values ​​of the camera coordinate system according to the homogeneous transformation matrix of the hand-eye matrix: x, y, z, rx, ry, rz; S15. Input the six values ​​of S14 into the robot teaching pendant to obtain the first tool coordinate system of the robot, that is, the camera coordinate system.

3. The bathtub hole positioning method based on a depth camera according to claim 1, characterized in that: The specific content of step S2 is: S21. Install the tool, fix it with a center, and calibrate the tool coordinate system using the "four-point method" on the robot teach pendant to obtain the second tool coordinate system, i.e., the tool coordinate system. S22. Assign the posture values ​​rx, ry, and rz of the first tool coordinate system to the second tool coordinate system.

4. The bathtub hole positioning method based on a depth camera according to claim 1, characterized in that: The specific content of step S3 is: S31, operate the teaching pendant to switch to the first tool coordinate system, i.e., the camera coordinate system, and then control the robot to move the depth camera to the top of the measured hole; S32. Turn on the depth camera, select at least 3 points on the plane of the measured hole in the camera field of view, fit a plane and obtain its normal vector S33. The vector of the z-axis of the camera coordinate system is Using the Rodrigues formula, as shown in formula (1), we can calculate the vector Rotate to Vector The rotation matrix R; R=I+sinθ*K+(1-cosθ)*K (1) Among them, I is the 3*3 identity matrix, K is The antisymmetric matrix of is shown in formula (3), and for arrive The rotation axis of is shown in equation (2), and θ is arrive The rotation angle of is shown in formula (4). S34, calculate the corresponding 4×4 homogeneous transformation matrix M based on the 6 pose values ​​of the current camera coordinate system c2b , as shown in formula (5); Among them, M c2b The 3×3 rotation matrix part R c2b and 3×1 translation part T c2b composition. S35, take out M c2b The rotation matrix part R c2b , multiply the S33 step on the right to get the rotation matrix R, and get the new rotation matrix: R c2b =R c2b *R; S36, Update M c2b , and calculate the new pose of the camera coordinate system based on the new homogeneous transformation matrix; S37. Control the robot to move to the new posture obtained in step S36. At this time, the depth camera plane is parallel to the measured plane.

5. The bathtub hole positioning method based on a depth camera according to claim 1, characterized in that: The specific content of step S4 is: S41. A label paper is attached to the hole being tested. The label paper is composed of a 3×3 black and white checkerboard pattern, and the size of each small grid is 11×11 mm. S42, photographing a color image and a depth image, calling a function of the OpenCV vision library based on the color image to identify corner points, and calculating pixel coordinates of the center corner point, i.e., the center of the hole; S43, extracting the corresponding depth value from the depth map according to the pixel coordinates of the central corner point; S44. Call the library function of the depth camera to reversely project the pixel coordinates of the central corner point into three-dimensional coordinates in the camera coordinate system, and return this coordinate value, which is the coordinate value of the hole center in the camera coordinate system; S45, calculating a new pose in which the center of the depth camera coincides with the center of the hole based on the pose of the current camera coordinate system and the coordinate value of the hole center calculated in step S44, and then controlling the robot to move based on the new pose; S46. After controlling the robot to move to the new posture calculated in step S45, record the posture data.

6. The bathtub hole positioning method based on a depth camera according to claim 1, characterized in that: The specific content of step S5 is: S51, operating the teaching pendant to switch the tool coordinate system of the robot to the second tool coordinate system, i.e., the tool coordinate system; S52. Operate the teach pendant to move the robot to the position data recorded in S46. At this time, the tool will be aligned with the center of the hole and perpendicular to the hole plane.

7. The bathtub hole positioning method based on a depth camera according to claim 1, characterized in that: The fitting plane in step S32 is a circle of red dots around the camera's field of view.

8. The bathtub hole positioning method based on a depth camera according to claim 1, characterized in that: The depth camera center is the cross in the camera's field of view.

9. A positioning system for a bathtub hole positioning method based on a depth camera according to claim 1, characterized in that: It includes a robot, a teaching pendant for controlling the robot's movements, a tool installed on the robot's execution end and used to process the bathtub hole, a depth camera installed on the robot's execution end and used to collect image data, and a bathtub located below the tool and installed on a positioning device.

10. The positioning system of the bathtub hole positioning method based on a depth camera according to claim 8, characterized in that: The depth camera is an Intel RealSense D405 camera.

11. The positioning system of the bathtub hole positioning method based on a depth camera according to claim 8, characterized in that: The depth camera is installed on the execution end of the robot away from the tool.