Method for testing the angular positioning accuracy of a robot and a robot system
By combining image and point cloud data with a 2D recognition board and a 3D vision camera, a plane equation is constructed to calculate the robot's positioning angle, solving the problem of difficulty in quantifying robot positioning accuracy in existing technologies, and realizing automated and highly accurate positioning accuracy testing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- AUBO (BEIJING) ROBOTICS TECH CO LTD
- Filing Date
- 2022-07-12
- Publication Date
- 2026-07-03
Smart Images

Figure CN115345936B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robot inspection technology, specifically to a method for testing the angular positioning accuracy of a robot and a robot system. Background Technology
[0002] In the fields of computer vision and robot perception, ensuring accurate robot positioning is crucial for achieving automated production. Scenarios such as robot handling, cutting, and grinding all require precise robot positioning; therefore, detecting robot positioning accuracy has become an important part of the automated production process. However, existing positioning accuracy detection methods generally rely on fuzzy estimations, making it difficult to quantitatively measure positioning accuracy, resulting in low accuracy in positioning accuracy testing. Summary of the Invention
[0003] To address the aforementioned technical problems, this invention provides a method for testing the angular positioning accuracy of a robot, which enables fully automated testing, thereby avoiding the introduction of human error and improving the reliability of test data and the accuracy of test results.
[0004] The technical solution adopted in this invention is as follows:
[0005] A method for testing the angular positioning accuracy of a robot includes a two-dimensional recognition board on the robot under test. The testing method comprises the following steps: acquiring image data and point cloud data of the scene where the robot under test is located using a camera; recognizing the two-dimensional recognition board; determining the coordinate data of the two-dimensional recognition board based on the image data and the point cloud data; determining the positioning angle data of the robot under test based on the coordinate data; controlling the robot under test to change the scene to obtain a positioning angle dataset of the robot under test; and estimating the angular positioning accuracy of the robot under test based on the positioning angle dataset.
[0006] According to an embodiment of the present invention, determining the positioning angle data of the robot under test based on the coordinate data specifically includes the following steps: determining the plane equation of the two-dimensional recognition plate based on the coordinate data; and obtaining the positioning angle data of the robot under test based on the coordinate data and the plane equation.
[0007] According to an embodiment of the present invention, the two-dimensional recognition board is provided with multiple ArUco codes. The step of determining the plane equation of the two-dimensional recognition board based on the coordinate data specifically includes the following steps: constructing the plane equation of the two-dimensional recognition board; obtaining the coordinate dataset of all vertex corners of all the ArUco codes; and determining the parameters of the plane equation based on the coordinate dataset.
[0008] According to one embodiment of the present invention, determining the parameters of the plane equation based on the coordinate dataset includes: determining the parameters of the plane equation based on the coordinate dataset using the RANSAC algorithm or the least squares method.
[0009] According to an embodiment of the present invention, obtaining the positioning angle data of the robot under test based on the coordinate data and the plane equation specifically includes the following steps: determining the coordinates of the two-dimensional recognition plate based on the coordinate data; determining the test direction vector of the two-dimensional recognition plate based on the plane equation; using the positive Z-axis unit vector of the camera coordinate system as the reference direction vector of the two-dimensional recognition plate; and obtaining the positioning angle data of the robot under test based on the reference direction vector and the test direction vector.
[0010] According to one embodiment of the present invention, the identification of the two-dimensional identification board specifically includes the following steps: determining whether the image data contains all the ArUco codes of the two-dimensional identification board.
[0011] According to an embodiment of the present invention, determining the coordinate data of the two-dimensional recognition board based on the image data and the point cloud data specifically includes the following steps: determining a two-dimensional number for each vertex of each ArUco code, wherein each ArUco code includes 4 vertexes; obtaining a three-dimensional number for each vertex of each ArUco code based on the two-dimensional number; and obtaining the coordinate data of each vertex of each ArUco code by indexing it in the point cloud data based on the three-dimensional number.
[0012] According to one embodiment of the present invention, the two-dimensional number is the pixel number of each vertex of each ArUco-encoded point in the image data, the three-dimensional number is the point cloud number of each vertex of each ArUco-encoded point in the point cloud data, and the pixel number in the image data corresponds one-to-one with the point cloud number in the point cloud data.
[0013] According to one embodiment of the present invention, determining the angular positioning accuracy of the robot under test based on the positioning angle dataset specifically includes the following steps: calculating the variance of the positioning angle dataset; and determining the angular positioning accuracy of the robot under test based on the variance.
[0014] A robot system includes a camera, a robot body, a control device, and a control program stored on the control device and running on it. When the control device executes the control program, it implements the robot angle positioning accuracy testing method described in the above embodiments.
[0015] The beneficial effects of this invention are as follows:
[0016] 1) This invention can achieve fully automated testing, thereby avoiding the introduction of human error and improving the reliability of test data and the accuracy of test results;
[0017] 2) This invention can perform robot angle positioning accuracy testing based on statistical algorithms, has strong adaptability, and the testing accuracy can be improved as the number of statistical samples increases. Attached Figure Description
[0018] Figure 1 This is a schematic diagram of the structure of a two-dimensional recognition plate according to an embodiment of the present invention;
[0019] Figure 2 This is a flowchart of a method for testing the angular positioning accuracy of a robot according to an embodiment of the present invention;
[0020] Figure 3 This is a schematic diagram of the layout of a test platform according to an embodiment of the present invention;
[0021] Figure 4 This is a block diagram of the control device in the robot system according to an embodiment of the present invention;
[0022] Figure 5 This is a schematic diagram of the layout of a robot system according to an embodiment of the present invention. Detailed Implementation
[0023] 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 skilled in the art without creative effort are within the scope of protection of the present invention.
[0024] It should be noted that this invention is based on the following understanding: A two-dimensional recognition board is set on the robot under test, for example, at the end of the robot's robotic arm. The position and orientation of the robot under test are tested by detecting the position and orientation of this two-dimensional recognition board, thereby calculating the angular positioning accuracy of the robot under test. The two-dimensional recognition board may include multiple ArUco codes and multiple black squares, for example... Figure 1 As shown, it includes 4 ArUco codes and 5 black squares. The following will combine... Figure 2 The present invention describes a method for testing the angular positioning accuracy of a robot.
[0025] like Figure 2 As shown, the robot angle positioning accuracy testing method of the present invention includes the following steps:
[0026] S1 acquires image data and point cloud data of the scene where the robot under test is located through a camera.
[0027] Specifically, a testing platform can be built to acquire image data and point cloud data of the scene where the robot under test is located. For example, Figure 3 As shown, the testing platform may include a camera placement area a and a testing area b. Testing area b may include a first testing area b1 and a second testing area b2. When the robot under test is located in testing area b, for example, in the first testing area b1, the scene where the robot is located, i.e., the first testing area b1, can be acquired via a 3D vision camera, including image data and point cloud data. The image data can be 2D images, and the point cloud data can be 3D point cloud data.
[0028] S2, recognizes the two-dimensional recognition board.
[0029] Specifically, it can be determined whether the image data contains all the ArUco codes of the 2D recognition board. More specifically, refer to... Figure 1 It is known that the two-dimensional recognition board may include 4 ArUco codes. Therefore, if the number of ArUco codes recognized in the image data is equal to the total number of ArUco codes in the two-dimensional recognition board, i.e., 4 ArUco codes, the recognition can be determined to be successful, and the process can proceed to the next step S3. In addition, if the number of ArUco codes recognized in the image data is less than the total number of ArUco codes in the two-dimensional recognition board, the recognition can be determined to be unsuccessful, and step S6 can be executed, i.e., the robot under test is controlled to change the scene, thereby re-acquiring the image data and point cloud data of the scene where the robot under test is located, i.e., step S1 is executed.
[0030] S3 determines the coordinate data of the 2D recognition board based on image data and point cloud data.
[0031] Specifically, a two-dimensional number can be first determined for each vertex of each ArUco code, where each ArUco code includes four vertices. Then, a three-dimensional number can be obtained for each vertex of each ArUco code based on the two-dimensional number. Furthermore, the coordinate data of each vertex of each ArUco code can be obtained by indexing the three-dimensional number in the point cloud data. More specifically, refer to... Figure 1 It is known that each ArUco code includes 4 vertices, and each two-dimensional recognition board may include 16 vertices.
[0032] The two-dimensional number can be the pixel number of each vertex of each ArUco code in the image data, and the three-dimensional number can be the point cloud number of each vertex of each ArUco code in the point cloud data. Furthermore, there is a one-to-one correspondence between the pixel numbers in the image data and the point cloud numbers in the point cloud data. It should be noted that not only is there a one-to-one correspondence between the pixel numbers of each vertex in the image data and the point cloud numbers of each vertex in the point cloud data, but rather a one-to-one correspondence between the number of every pixel in the image data and the number of every point in the point cloud data. This correspondence is established in real-time when the image data and point cloud data are acquired. Therefore, the three-dimensional number of each vertex of each ArUco code can be obtained from the two-dimensional number through this correspondence.
[0033] It should be further explained that in point cloud data, i.e., 3D point cloud data, each point includes a 3D identifier and 3D coordinates. These 3D identifiers and coordinates can form a set of data. Therefore, when the 3D identifier is obtained, the corresponding coordinate data, i.e., the 3D coordinates, can be indexed in the point cloud data. The indexing process involves using the current 3D identifier as an index to traverse each set of data, i.e., (3D identifier, 3D coordinates) data, thereby obtaining the 3D coordinates associated with the current 3D identifier.
[0034] S4, determine the positioning angle data of the robot under test based on the coordinate data.
[0035] Specifically, the plane equation of the two-dimensional recognition plate can be determined first based on the coordinate data, and then the positioning angle data of the robot under test can be obtained based on the coordinate data and the plane equation.
[0036] In one embodiment of the present invention, the plane equation of the two-dimensional recognition board can be determined by a plane fitting method. Specifically, the plane equation of the two-dimensional recognition board can be constructed first, and the coordinate dataset of all vertex corners of all ArUco codes in the two-dimensional recognition board can be obtained. Then, the parameters of the plane equation can be determined by the least squares method based on the coordinate dataset.
[0037] The plane equation of the constructed two-dimensional recognition plate is as follows:
[0038] Ax + By + Cz = D
[0039] Where A, B, C, and D are the parameters of the plane equation, and (x, y, z) are the vertex coordinates.
[0040] Furthermore, it can be assumed that all vertices of all ArUco-encoded points lie on the plane equation, and the measurement error of the vertices coordinate data is [missing information]. ε Therefore, the i-th vertex P can be obtained. i =(x i ,y i ,z iThe coordinate data of ) is:
[0041]
[0042]
[0043]
[0044] ε~N(0,σ)
[0045] in, They represent point P respectively. i The true values of the X, Y, and Z axis components, where ε represents the measurement error, which comes from the 3D vision camera and follows a Gaussian distribution with an expectation of 0.
[0046] Furthermore, the coordinate data of all the vertices encoded by ArUco can be substituted into the plane equations using the least squares method, resulting in the following system of equations:
[0047] x1A+y1B+z1C-D=0
[0048]
[0049] x 4M A+y 4M B+z 4M CD=0
[0050] Where 4M represents the total number of vertices in the two-dimensional recognition board.
[0051] Furthermore, the above system of equations can be transformed into the following matrix:
[0052]
[0053] Furthermore, we can let:
[0054]
[0055] Therefore, the parameters [A, B, C, D] of the plane equation are... T The least squares estimation result is H T The eigenvectors corresponding to the smallest eigenvalues of H can be used to determine the parameters of the plane equation.
[0056] In another embodiment of the present invention, a statistical algorithm can be used to determine the plane equation of the two-dimensional recognition board. Specifically, the plane equation of the two-dimensional recognition board can be constructed first, and the coordinate dataset of all vertex corners of all ArUco codes in the two-dimensional recognition board can be obtained. Then, the RANSAC algorithm can be used to determine the parameters of the plane equation based on the coordinate dataset.
[0057] More specifically, three points can be randomly selected from the coordinate dataset, and the parameters of the plane equation can be determined based on the three randomly selected points using a plane fitting method to obtain the first plane equation. Then, the distances between other points in the coordinate dataset and the first plane equation can be calculated, and the obtained distances can be collected into a set to form the first distance set. Then, the expectation of the first distance set can be calculated.
[0058] Furthermore, the process of calculating the expected value of the first distance set can be repeated. For example, the calculation can be repeated for K rounds to obtain K expected values of the distance sets, and the K expected values of the distance sets can be collected into a set to form an expected value set.
[0059] Furthermore, the expectation with the smallest value can be selected from the expectation set, and the plane equation corresponding to the expectation can be selected as the reference plane equation. Then, the distance from all points in the coordinate dataset to the reference plane equation can be calculated.
[0060] Furthermore, it can be determined whether the distance from each point in the coordinate dataset to the reference plane equation is greater than a set threshold. If so, the point is removed from the coordinate dataset; otherwise, the point is collected into a set to form a filtered coordinate dataset.
[0061] Furthermore, the plane equation of the two-dimensional recognition board can be determined using the plane fitting method based on the filtered coordinate dataset.
[0062] In one embodiment of the present invention, the process of obtaining the positioning angle data of the robot under test based on coordinate data and plane equation may further include the following steps: determining the coordinates of the two-dimensional recognition plate based on the coordinate data; determining the test direction vector of the two-dimensional recognition plate based on the plane equation; using the positive Z-axis unit vector of the camera coordinate system as the reference direction vector of the two-dimensional recognition plate; and obtaining the positioning angle data of the robot under test based on the reference direction vector and the test direction vector.
[0063] Specifically, refer to Figure 1 The top left corner e of the first ArUco code in the 2D recognition board can be taken as the origin of the coordinates of the 2D recognition board, that is, the coordinates of the 2D recognition board. Then, the plane where the 2D recognition board is located can be determined according to the plane equation. The normal direction of the plane where the 2D recognition board is located can be taken as the Z-axis of the coordinate system of the 2D recognition board. Furthermore, the positive unit vector of the Z-axis of the coordinate system of the 2D recognition board can be taken as the test direction vector of the 2D recognition board.
[0064] Furthermore, the positive Z-axis unit vector of the camera, i.e. the 3D vision camera coordinate system, can be used as the reference direction vector of the two-dimensional recognition board. Then, the angle between the reference direction vector and the test direction vector can be calculated, which is the positioning angle data of the robot under test.
[0065] S5 controls the robot under test to change the scene in order to obtain the positioning angle dataset of the robot under test.
[0066] Specifically, the scene of the robot under test can be changed, for example, it can be moved to the second test area b2 and the above steps S1-S5 can be repeated to obtain the positioning angle data of the robot under test in the second test area b2. Thus, the positioning angle dataset of the robot under test can be constructed based on the positioning angle data of the robot under test in different test areas.
[0067] S6, Estimate the angular positioning accuracy of the robot under test based on the positioning angle dataset.
[0068] Specifically, the variance of the positioning angle dataset can be calculated, and then the angular positioning accuracy of the robot under test can be determined based on the variance.
[0069] More specifically, the positioning angle dataset can be set as S, and the variance of the positioning angle dataset can be calculated using the following formula:
[0070] Let the positioning angle dataset S = {s0,...,s} N-1};
[0071] Further expectations
[0072] Further increase the standard deviation
[0073] Further increase variance
[0074] Where N is the number of repeated tests on the robot under test, the standard deviation is the unbiased estimate of the overall robot angle positioning accuracy test, and the variance is the specific value of the robot angle positioning accuracy test.
[0075] The beneficial effects of this invention are as follows:
[0076] 1) This invention can achieve fully automated testing, thereby avoiding the introduction of human error and improving the reliability of test data and the accuracy of test results;
[0077] 2) This invention can perform robot angle positioning accuracy testing based on statistical algorithms, has strong adaptability, and the testing accuracy can be improved as the number of statistical samples increases.
[0078] Corresponding to the unusual protection method for robots in the above embodiments, this invention also proposes a robot system.
[0079] The robot system of this invention includes a camera, a robot body, a control device, and a control program stored and running on the control device. When the control device executes the control program, it can implement the robot angle positioning accuracy testing method of the above embodiment.
[0080] Specifically, such as Figure 4 As shown, the control device in the robot system of this embodiment may include an acquisition module 10, a motion control module 20, and a calculation and processing module 30. The acquisition module 10 acquires image data and point cloud data of the scene in which the robot under test is located using a camera. The motion control module 20 controls the robot under test to change scenes. The calculation and processing module 30 identifies a two-dimensional recognition board and determines its coordinate data based on the image data and point cloud data. It also determines the positioning angle data of the robot under test based on the coordinate data. Furthermore, the calculation and processing module 30 calculates the positioning angle data of the robot under test in different scenes to obtain a positioning angle dataset, thereby estimating the angular positioning accuracy of the robot under test based on the positioning angle dataset.
[0081] Specifically, a test platform can be constructed based on the acquisition module 10, the motion control module 20, and the calculation and processing module 30. For example... Figure 5 As shown, the test platform may include a camera placement area a, a test area b, a control area c, and a scheduling area d. Test area b may include a first test area b1 and a second test area b2. Camera placement area a can be used to set up a camera, such as a 3D vision camera. Control area c can be used to place a computing processing module 30, i.e., an industrial control computer. Scheduling area d can be used to place a motion control module 20, i.e., a robot scheduling device. Furthermore, it should be noted that the camera placed in camera placement area a, such as a 3D vision camera, can be a 3D vision camera with a working field of view of 1000mm*700mm (at 1240mm) and a working distance of 1-2m. Camera placement area a can also be equipped with camera accessories and camera adapter plates for fixing the 3D vision camera and ensuring that the position and orientation of the 3D vision camera remain unchanged relative to the fixed surface.
[0082] More specifically, refer to Figure 5The computing and processing module 30, i.e., the industrial control computer, can be connected to a camera, such as a 3D vision camera, and can be used to control the camera, such as the 3D vision camera starting to scan and acquiring the scan results, i.e., the image data and point cloud data of the scene where the robot under test is located. In addition, the computing and processing module 30, i.e., the industrial control computer, can also be connected to the motion control module 20, i.e. the robot scheduling device, via a wireless network to receive the work scheduling information of the motion control module 20, i.e. the robot scheduling device, and to send task status information to the motion control module 20, i.e. the robot scheduling device. The work scheduling information includes scene change information for the robot under test. For example, if the motion control module 20, i.e., the robot scheduling device, controls the robot under test to change from the first test area b1 to the second test area b2, the scene change information can be sent to the computing processing module 30, i.e., the industrial control computer, so that the computing processing module 30, i.e., the industrial control computer, can control the camera, such as a 3D vision camera, to start scanning and calculate the angle positioning accuracy of the robot under test based on the scanning results, i.e., the image data and point cloud data of the scene where the robot under test is located. The task status information includes the computing processing progress of the computing processing module 30, i.e., the industrial control computer. For example, if the computing processing module 30, i.e., the industrial control computer, completes one round of angle positioning accuracy testing of the robot under test, it can send the current computing processing progress to the motion control module 20, i.e., the robot scheduling device, so that the motion control module 20, i.e., the robot scheduling device, can control the robot under test to change scenes.
[0083] This enables fully automated testing, avoiding the introduction of human error and improving the reliability of test data and the accuracy of test results. In addition, it can automatically collect data samples, providing support for data analysis and reducing statistical errors in positioning accuracy.
[0084] In one embodiment of the present invention, a camera, such as a 3D vision camera, can acquire image data and point cloud data of the scene where the robot under test is located, i.e., the first test area b1, when the robot under test is located in test area b, for example, in the first test area b1. The image data can be a 2D image, and the point cloud data can be 3D point cloud data.
[0085] In one embodiment of the present invention, the calculation processing module 30 may be specifically used to determine whether the image data contains all the ArUco codes of the two-dimensional recognition plate. More specifically, refer to Figure 1It is known that the 2D recognition board can include 4 ArUco codes. Therefore, if the number of ArUco codes recognized in the image data is equal to the total number of ArUco codes in the 2D recognition board, i.e., 4 ArUco codes, the recognition can be determined as successful, and the next step can be executed, i.e., determining the coordinate data of the 2D recognition board based on the image data and point cloud data. In addition, if the number of ArUco codes recognized in the image data is less than the total number of ArUco codes in the 2D recognition board, the recognition can be determined as failed, and the robot under test can be controlled to change the scene, thereby re-acquiring the image data and point cloud data of the scene where the robot under test is located.
[0086] In one embodiment of the present invention, the calculation processing module 30 may further be used to determine the two-dimensional number of each vertex of each ArUco code, wherein each ArUco code includes four vertexes. Then, the three-dimensional number of each vertex of each ArUco code can be obtained based on the two-dimensional number, and the coordinate data of each vertex of each ArUco code can be obtained by indexing in the point cloud data based on the three-dimensional number. More specifically, refer to... Figure 1 It is known that each ArUco code includes 4 vertices, and each two-dimensional recognition board may include 16 vertices.
[0087] The two-dimensional number can be the pixel number of each vertex of each ArUco code in the image data, and the three-dimensional number can be the point cloud number of each vertex of each ArUco code in the point cloud data. Furthermore, there is a one-to-one correspondence between the pixel numbers in the image data and the point cloud numbers in the point cloud data. It should be noted that not only is there a one-to-one correspondence between the pixel numbers of each vertex in the image data and the point cloud numbers of each vertex in the point cloud data, but rather a one-to-one correspondence between the number of every pixel in the image data and the number of every point in the point cloud data. This correspondence is established in real-time when the image data and point cloud data are acquired. Therefore, the three-dimensional number of each vertex of each ArUco code can be obtained from the two-dimensional number through this correspondence.
[0088] It should be further explained that in point cloud data, i.e., 3D point cloud data, each point includes a 3D identifier and 3D coordinates. These 3D identifiers and coordinates can form a set of data. Therefore, when the 3D identifier is obtained, the corresponding coordinate data, i.e., the 3D coordinates, can be indexed in the point cloud data. The indexing process involves using the current 3D identifier as an index to traverse each set of data, i.e., (3D identifier, 3D coordinates) data, thereby obtaining the 3D coordinates associated with the current 3D identifier.
[0089] In one embodiment of the present invention, the computation processing module 30 may be specifically used to determine the plane equation of the two-dimensional recognition board using a plane fitting method. Specifically, the plane equation of the two-dimensional recognition board may be constructed first, and the coordinate dataset of all vertex corners of all ArUco codes in the two-dimensional recognition board may be obtained. Then, the parameters of the plane equation may be determined based on the coordinate dataset using the least squares method.
[0090] The plane equation of the constructed two-dimensional recognition plate is as follows:
[0091] Ax + By + Cz = D
[0092] Where A, B, C, and D are the parameters of the plane equation, and (x, y, z) are the vertex coordinates.
[0093] Furthermore, we can assume that all vertices of all ArUco-encoded vertices lie on the plane equation, and that the measurement error of the vertex coordinate data is ε. Therefore, we can obtain the i-th vertex P. i =(x i ,y i ,z i The coordinate data of ) is:
[0094]
[0095]
[0096]
[0097] ε~N(0,σ)
[0098] in, They represent point P respectively. i The true values of the X, Y, and Z axis components, where ε represents the measurement error, which comes from the 3D vision camera and follows a Gaussian distribution with an expectation of 0.
[0099] Furthermore, the coordinate data of all the vertices encoded by ArUco can be substituted into the plane equations using the least squares method, resulting in the following system of equations:
[0100] x1A+y1B+z1C-D=0
[0101]
[0102] x 4M A+y 4M B+z 4M CD=0
[0103] Where 4M represents the total number of vertices in the two-dimensional recognition board.
[0104] Furthermore, the above system of equations can be transformed into the following matrix:
[0105]
[0106] Furthermore, we can let:
[0107]
[0108] Therefore, the parameters [A, B, C, D] of the plane equation are... T The least squares estimation result is H T The eigenvectors corresponding to the smallest eigenvalues of H can be used to determine the parameters of the plane equation.
[0109] In another embodiment of the present invention, the computation processing module 30 may be specifically used to determine the plane equation of the two-dimensional recognition board using a statistical algorithm. Specifically, the plane equation of the two-dimensional recognition board may be constructed first, and the coordinate dataset of all vertex corners of all ArUco codes in the two-dimensional recognition board may be obtained. Then, the RANSAC algorithm may be used to determine the parameters of the plane equation based on the coordinate dataset.
[0110] More specifically, three points can be randomly selected from the coordinate dataset, and the parameters of the plane equation can be determined based on the three randomly selected points using a plane fitting method to obtain the first plane equation. Then, the distances between other points in the coordinate dataset and the first plane equation can be calculated, and the obtained distances can be collected into a set to form the first distance set. Then, the expectation of the first distance set can be calculated.
[0111] Furthermore, the process of calculating the expected value of the first distance set can be repeated. For example, the calculation can be repeated for K rounds to obtain K expected values of the distance sets, and the K expected values of the distance sets can be collected into a set to form an expected value set.
[0112] Furthermore, the expectation with the smallest value can be selected from the expectation set, and the plane equation corresponding to the expectation can be selected as the reference plane equation. Then, the distance from all points in the coordinate dataset to the reference plane equation can be calculated.
[0113] Furthermore, it can be determined whether the distance from each point in the coordinate dataset to the reference plane equation is greater than a set threshold. If so, the point is removed from the coordinate dataset; otherwise, the point is collected into a set to form a filtered coordinate dataset.
[0114] Furthermore, the plane equation of the two-dimensional recognition board can be determined using the plane fitting method based on the filtered coordinate dataset.
[0115] In one embodiment of the present invention, the calculation processing module 30 can be specifically used to determine the coordinates of the two-dimensional recognition board according to the coordinate data, and can determine the test direction vector of the two-dimensional recognition board according to the plane equation. In addition, the positive Z-axis unit vector of the camera coordinate system can be used as the reference direction vector of the two-dimensional recognition board. Then, the positioning angle data of the robot under test can be obtained according to the reference direction vector and the test direction vector.
[0116] More specifically, refer to Figure 1 The top left corner e of the first ArUco code in the 2D recognition board can be taken as the origin of the coordinates of the 2D recognition board, that is, the coordinates of the 2D recognition board. Then, the plane where the 2D recognition board is located can be determined according to the plane equation. The normal direction of the plane where the 2D recognition board is located can be taken as the Z-axis of the coordinate system of the 2D recognition board. Furthermore, the positive unit vector of the Z-axis of the coordinate system of the 2D recognition board can be taken as the test direction vector of the 2D recognition board.
[0117] Furthermore, the positive Z-axis unit vector of the camera, i.e. the 3D vision camera coordinate system, can be used as the reference direction vector of the two-dimensional recognition board. Then, the angle between the reference direction vector and the test direction vector can be calculated, which is the positioning angle data of the robot under test.
[0118] In one embodiment of the present invention, the motion control module 20 can be specifically used to control the robot under test to change the scene, for example, to move to the second test area b2, and control the actions of the acquisition module 10 and the calculation and processing module 30 to obtain the positioning angle data of the robot under test in the second test area b2, so that the positioning angle dataset of the robot under test can be constructed based on the positioning angle data of the robot under test in different test areas.
[0119] In one embodiment of the present invention, the calculation processing module 30 can be specifically used to calculate the variance of the positioning angle dataset, and then the angle positioning accuracy of the robot under test can be determined based on the variance.
[0120] More specifically, the positioning angle dataset can be set as S, and the variance of the positioning angle dataset can be calculated using the following formula:
[0121] Let the positioning angle dataset S = {s0,...,s} N-1};
[0122] Further expectations
[0123] Further increase the standard deviation
[0124] Further increase variance
[0125] Where N is the number of repeated tests on the robot under test, the standard deviation is the unbiased estimate of the overall robot angle positioning accuracy test, and the variance is the specific value of the robot angle positioning accuracy test.
[0126] The beneficial effects of this invention are as follows:
[0127] 1) This invention can achieve fully automated testing, thereby avoiding the introduction of human error and improving the reliability of test data and the accuracy of test results;
[0128] 2) This invention can perform robot angle positioning accuracy testing based on statistical algorithms, has strong adaptability, and the testing accuracy can be improved as the number of statistical samples increases.
[0129] In the description of this invention, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. "A plurality of" means two or more, unless otherwise explicitly specified.
[0130] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0131] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can mean that the first feature is in direct contact with the second feature, or that the first feature is in indirect contact with the second feature through an intermediate medium. Furthermore, "above," "over," and "on top" of the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply that the first feature is at a lower horizontal level than the second feature.
[0132] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
Claims
1. A method for testing the angular positioning accuracy of a robot, characterized in that, The robot under test is equipped with a two-dimensional recognition plate, and the testing method includes the following steps: Image data and point cloud data of the scene where the robot under test is located are acquired using a camera; Identify the two-dimensional recognition plate; The coordinate data of the two-dimensional recognition board are determined based on the image data and the point cloud data; The positioning angle data of the robot under test is determined based on the coordinate data; Control the robot under test to change the scene in order to obtain the positioning angle dataset of the robot under test; The angular positioning accuracy of the robot under test is estimated based on the positioning angle dataset. The step of determining the positioning angle data of the robot under test based on the coordinate data specifically includes the following steps: determining the plane equation of the two-dimensional recognition plate based on the coordinate data; and obtaining the positioning angle data of the robot under test based on the coordinate data and the plane equation. The two-dimensional recognition board has multiple ArUco codes. Determining the plane equation of the two-dimensional recognition board based on the coordinate data specifically includes the following steps: constructing the plane equation of the two-dimensional recognition board; obtaining the coordinate dataset of all vertex angles of all the ArUco codes; and determining the parameters of the plane equation based on the coordinate dataset. The process of obtaining the positioning angle data of the robot under test based on the coordinate data and the plane equation specifically includes the following steps: determining the coordinates of the two-dimensional recognition plate based on the coordinate data; determining the test direction vector of the two-dimensional recognition plate based on the plane equation; using the positive Z-axis unit vector of the camera coordinate system as the reference direction vector of the two-dimensional recognition plate; and obtaining the positioning angle data of the robot under test based on the reference direction vector and the test direction vector. The step of determining the coordinate data of the two-dimensional recognition board based on the image data and the point cloud data specifically includes the following steps: determining the two-dimensional number of each vertex of each ArUco code, wherein each ArUco code includes 4 vertexes; obtaining the three-dimensional number of each vertex of each ArUco code based on the two-dimensional number; and obtaining the coordinate data of each vertex of each ArUco code by indexing it in the point cloud data based on the three-dimensional number.
2. The method for testing the robot angle positioning accuracy according to claim 1, characterized in that, in, Determining the parameters of the plane equation based on the coordinate dataset includes: The parameters of the plane equation are determined using the RANSAC algorithm or the least squares method based on the coordinate dataset.
3. The method for testing the robot angle positioning accuracy according to claim 2, characterized in that, The identification of the two-dimensional identification board specifically includes the following steps: Determine whether the image data contains all of the ArUco codes of the two-dimensional recognition plate.
4. The method for testing the robot angle positioning accuracy according to claim 3, characterized in that, in, The two-dimensional number is the pixel number of each vertex of each ArUco code in the image data, and the three-dimensional number is the point cloud number of each vertex of each ArUco code in the point cloud data, and the pixel number in the image data corresponds one-to-one with the point cloud number in the point cloud data.
5. The method for testing the robot angle positioning accuracy according to claim 4, characterized in that, The step of determining the angular positioning accuracy of the robot under test based on the positioning angle dataset specifically includes the following steps: Calculate the variance of the positioning angle dataset; The angular positioning accuracy of the robot under test is determined based on the variance.
6. A robot system, comprising a camera, a robot body, a control device, and a control program stored in the control device and running on the control device, characterized in that, When the control device executes the control program, it implements the method for testing the robot angle positioning accuracy according to any one of claims 1-5.