A coordinate system calibration method, device and equipment for a mechanical arm polishing disc and a medium
By using a binocular camera and target QR code in conjunction with the tool center point calibration method of the robotic arm, a high-precision and high-efficiency coordinate system calibration of the robotic arm grinding disc was achieved without data communication. This solved the problems of low calibration accuracy and efficiency in existing technologies and simplified production line deployment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI AIRCRAFT MFG
- Filing Date
- 2026-06-16
- Publication Date
- 2026-07-17
AI Technical Summary
Existing methods for calibrating the coordinate system of robotic arm grinding discs cannot achieve high-precision and high-efficiency calibration without data communication, and rely on external equipment or communication integration, making production line deployment difficult.
Using a binocular camera and a target QR code in conjunction with a robotic arm, a coordinate system calibration without data communication is achieved through the tool center point calibration method. This includes trajectory movement, image acquisition, image correction, and tool center point calibration to form a target coordinate system.
It improves the calibration accuracy and efficiency of the coordinate system of the robotic arm's grinding disc without the need for data communication, and simplifies the production line deployment process.
Smart Images

Figure CN122401280A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of equipment calibration, and in particular to a method, apparatus, equipment and medium for calibrating the coordinate system of a robotic arm grinding disc. Background Technology
[0002] In modern manufacturing, rotary grinding heads, as efficient surface finishing tools, are often mounted on the end effectors of industrial robotic arms for precision grinding of complex parts. The advantage of this device lies in its ability to automate path planning and force-controlled machining, thereby improving production efficiency and consistency. However, tool coordinate system calibration of the grinding disc is a crucial step in ensuring machining accuracy. Its core lies in determining the transformation relationship between the origin position and orientation of the grinding disc relative to the coordinate system of the robotic arm's end flange. In existing technologies, the traditional multi-point method calculates the tool coordinate system by having the robotic arm touch a fixed reference point. While this method eliminates the need for external equipment, it relies on manual operation, resulting in low efficiency and significant human error. Furthermore, vision-guided methods are becoming increasingly popular. For example, using monocular or binocular vision systems marked with ArUco for pose estimation has been proposed for robot calibration frameworks to improve non-contact accuracy. Coordinate system calibration methods based on laser sensors and laser tracker-assisted rapid calibration both belong to this type of technical approach.
[0003] Despite advancements in accuracy, these methods still face significant limitations. Traditional multi-point methods are highly operationally dependent, making them difficult to meet the rapid deployment requirements of automated production lines. Laser or vision-assisted methods typically require establishing communication protocols and developing scripts to read end-flange pose data. In production line environments, communication ports may be occupied or interfered with, leading to complex and unstable calibration processes. While recent attempts have yielded collaborative robot calibration algorithms that eliminate the need for external measuring devices, these methods often rely on specific hardware or still require communication integration, failing to completely eliminate the challenges of production line deployment.
[0004] In summary, existing methods for calibrating the coordinate system of a robotic arm grinding disc have limitations. They cannot calibrate the coordinate system of the robotic arm grinding disc without data communication, and both the calibration accuracy and efficiency of the coordinate system are relatively low. Summary of the Invention
[0005] This invention provides a method, apparatus, device, and medium for calibrating the coordinate system of a robotic arm grinding disc. It can solve the problems of existing methods for calibrating the coordinate system of a robotic arm grinding disc, which cannot achieve coordinate system calibration without data communication and have low calibration accuracy and efficiency.
[0006] In a first aspect, embodiments of the present invention provide a coordinate system calibration method for a robotic arm grinding disc, executed by a calibration device comprising: a binocular camera, a robotic arm, a grinding disc, and a target QR code, wherein the grinding disc is disposed at the end of the robotic arm, and the QR code is affixed to the surface of the grinding disc; the method includes: In response to the user's calibration start command, the robotic arm is controlled to perform trajectory movement based on a pre-configured calibration trajectory sequence, and a set of pose images of the target QR code is acquired by a binocular camera during the trajectory movement of the robotic arm. Perform image correction operations on each pose image in the pose image set to obtain the target image set; The target image set is processed by the tool center point calibration method to obtain a target coordinate system that matches the grinding disc.
[0007] Secondly, embodiments of the present invention provide a coordinate system calibration device for a robotic arm grinding disc, which is executed by a calibration device comprising: a binocular camera, a robotic arm, a grinding disc, and a target QR code. The grinding disc is disposed at the end of the robotic arm, and the QR code is affixed to the surface of the grinding disc. The device includes: The image acquisition module is used to respond to the user's calibration start command, control the robotic arm to perform trajectory movement based on a pre-configured calibration trajectory sequence, and acquire the pose image set of the target QR code through a binocular camera during the trajectory movement of the robotic arm; The image correction module is used to perform image correction operations on each pose image in the pose image set to obtain the target image set; The tool center point calibration module is used to process the target image set using the tool center point calibration method to obtain a target coordinate system that matches the grinding disc.
[0008] Thirdly, embodiments of the present invention provide an electronic device, the electronic device comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, which is then executed by the at least one processor to enable the at least one processor to perform a coordinate system calibration method for a robotic arm grinding disc according to any embodiment of the present invention.
[0009] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer instructions, which are used to cause a processor to execute a coordinate system calibration method for a robotic arm grinding disc as described in any embodiment of the present invention.
[0010] The technical solution of this invention, in response to a user's calibration start command, controls the robotic arm to perform trajectory movement based on a pre-configured calibration trajectory sequence through a calibration device. During the robotic arm's trajectory movement, a set of pose images of the target QR code is acquired using a binocular camera. Then, image correction operations are performed on each pose image in the set to obtain a target image set. Finally, the target image set is processed using a tool center point calibration method to obtain a target coordinate system matching the grinding disc. This solves the problems of existing robotic arm grinding disc coordinate system calibration methods, which cannot achieve coordinate system calibration without data communication and have low calibration accuracy and efficiency. This new method enables coordinate system calibration of the robotic arm grinding disc without data communication, improving both the calibration accuracy and efficiency.
[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.
[0013] Figure 1 This is a flowchart of a coordinate system calibration method for a robotic arm grinding disc according to Embodiment 1 of the present invention; Figure 2 This is a flowchart of a coordinate system calibration method for a robotic arm grinding disc according to Embodiment 2 of the present invention; Figure 3 This is a schematic diagram of the coordinate system calibration device for a robotic arm grinding disc according to Embodiment 3 of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device that implements a coordinate system calibration method for a robotic arm grinding disc according to an embodiment of the present invention. Detailed Implementation
[0014] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. 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 should fall within the scope of protection of the present invention.
[0015] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, any variations of the terms "comprising" and "having" are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0016] Example 1 Figure 1 This is a flowchart of a coordinate system calibration method for a robotic arm grinding disc according to Embodiment 1 of the present invention. This embodiment is applicable to situations where the coordinate system of a robotic arm grinding disc is calibrated without data communication. The method can be executed by a coordinate system calibration device for a robotic arm grinding disc. The coordinate system calibration device for a robotic arm grinding disc can be implemented in hardware and / or software. The coordinate system calibration device for a robotic arm grinding disc can be configured in a calibration device with coordinate system calibration function for a robotic arm grinding disc.
[0017] The coordinate system calibration method of the robotic arm grinding disc is performed by a calibration device, which includes a binocular camera, a robotic arm, a grinding disc, and a target QR code. The grinding disc is disposed at the end of the robotic arm, and the QR code is attached to the surface of the grinding disc.
[0018] Furthermore, the robotic arm is an industrial robotic arm device with programmable control capabilities, used to execute preset rotation commands and time waiting commands to drive the grinding disc configured at the end to complete the trajectory movement; the grinding disc is a circular grinding surface, installed on the end flange of the robotic arm, with its coordinate system origin located at the center of the grinding disc surface, the Z-axis perpendicular to the grinding disc surface, and the X-axis and Y-axis located in the plane of the grinding disc surface, suitable for precision grinding of complex parts.
[0019] Furthermore, the target QR code is an ArUco QR code, which is an artificial visual marker based on binary encoding. It consists of a black and white rectangular border and an internal coded area, possessing a unique identifier (ID). This allows the vision system to quickly detect and identify its orientation and marking content, and to estimate its six-degree-of-freedom pose in the camera coordinate system. Furthermore, the target QR code is attached to the surface of the grinding disc, with its center point coinciding with the center of the grinding disc surface. The QR code plane is parallel to the disc surface, thus making the QR code coordinate system directly represent the coordinate system of the robotic arm's grinding disc. Specifically, the QR code coordinate system is defined as follows: the center point is the origin, the Z-axis is perpendicular to the grinding disc surface, and the X and Y axes are along the rectangular sides of the QR code.
[0020] Furthermore, the binocular camera system consists of two cameras, left and right. The intrinsic parameters have been calibrated, distortion correction has been completed, and the relative pose of the two cameras has been calibrated. The coordinate system of the left camera is used as the reference binocular camera coordinate system. The system is deployed on site to cover the movement range of the robotic arm's grinding head, ensuring that the field of view is large enough to capture the entire pose of the target QR code during the rotation of the robotic arm.
[0021] like Figure 1 As shown, the method includes: S110. In response to the user's calibration start command, control the robotic arm to perform trajectory movement based on a pre-configured calibration trajectory sequence, and acquire a set of pose images of the target QR code through a binocular camera during the trajectory movement of the robotic arm.
[0022] The calibration trajectory sequence consists of at least two rotation trajectories, and the endpoint of each rotation trajectory is a calibration point that matches the rotation trajectory.
[0023] For example, the calibration trajectory sequence may include seven rotation trajectories, corresponding to the initial position, a 20° rotation around the positive X-axis, a 20° rotation around the negative X-axis, a 20° rotation around the positive Y-axis, a 20° rotation around the negative Y-axis, a 20° rotation around the positive Z-axis, and a 20° rotation around the negative Z-axis, to form a pose point distribution covering multiple directions and ensure calibration accuracy; wherein, the Z-axis is perpendicular to the grinding disc surface, and the X-axis and Y-axis are along the sides of the QR code rectangle.
[0024] It should be noted that the number of rotation trajectories and the rotation angles of the calibration sequence can be set and modified by relevant personnel according to the actual implementation scenario and calibration accuracy. This embodiment does not limit them.
[0025] Furthermore, in response to the user's calibration start command, the robotic arm is controlled to perform trajectory movement based on a pre-configured calibration trajectory sequence, including: in response to the user's calibration start command, acquiring the rotation trajectory of the starting position in the calibration trajectory sequence as the target rotation trajectory; controlling the robotic arm to perform trajectory movement from a preset initial position based on the target rotation trajectory, moving to a calibration point matching the target rotation trajectory, and remaining stationary at the calibration point for a preset time; after remaining stationary for the preset time, determining whether there is a next segment of rotation trajectory adjacent to the target rotation trajectory in the calibration trajectory sequence; if there is, acquiring the next segment of rotation trajectory as the new target rotation trajectory, and updating the calibration point of the new target rotation trajectory to the new initial position of the robotic arm; returning to execute the operation of controlling the robotic arm to perform trajectory movement from the initial position according to the target rotation trajectory, until there is no next segment of rotation trajectory in the calibration trajectory sequence, and ending the trajectory movement.
[0026] Specifically, the rotation trajectory at the starting position corresponds to the initial posture of the robotic arm. For example, the initial posture can be that the grinding disc faces the binocular camera with the QR code plane approximately perpendicular to the camera's optical axis, in order to minimize the initial tilt and facilitate subsequent image acquisition. Furthermore, the preset time is set by the user based on the binocular camera's image acquisition frequency and image processing speed, and this embodiment does not limit its specific value.
[0027] S120. Perform image correction operation on each pose image in the pose image set to obtain the target image set.
[0028] The process of performing image correction operations on each pose image in the pose image set to obtain a target image set includes: acquiring preset intrinsic parameters and distortion functions of the binocular camera; performing image correction operations on each pose image in the pose image set based on the preset intrinsic parameters and the distortion function to obtain a left image and a right image that match each pose image respectively; determining the matching ability of the left and right images of each pose image according to the target QR code; if the left and right images match, then setting the pose image as the target image; if the left and right images do not match, then discarding the pose image.
[0029] Furthermore, the preset intrinsic parameters include internal geometric parameters such as the focal length of the left and right cameras, the principal point coordinates, and the pixel size, and the distortion function is used to describe the radial and tangential distortion caused by the camera lens.
[0030] Those skilled in the art will understand that the binocular camera consists of two cameras, left and right, which are fixedly installed at a preset baseline distance and simultaneously capture the same scene from slightly different perspectives, obtaining a left image and a right image respectively. Since binocular stereo vision works based on the principle of triangulation, the three-dimensional depth information of a point can be calculated by matching the differences in pixel coordinates of the same spatial point in the left and right images. Therefore, the synchronous acquisition of left and right images is an inherent function of the binocular camera.
[0031] Furthermore, the image correction operation includes: firstly, using the distortion function to perform distortion correction processing on the images at each pose to eliminate image distortion caused by lens distortion; then, performing stereo correction based on the preset intrinsic parameters and the relative pose of the binocular cameras to align the corresponding epipolar lines of the left and right images, facilitating subsequent stereo matching and 3D reconstruction. For example, in this embodiment, the Bouguet correction algorithm or the Hartley correction algorithm can be specifically used to implement stereo correction.
[0032] Optionally, the matching of the left and right images of each pose image is determined based on the target QR code; wherein, the target QR code is an ArUco QR code, which carries the two-dimensional coordinates of the four corner points and identification information as inherent attributes; specifically, the ArUco QR code consists of a black and white rectangular border and an internal coding area, and the four corner points are the four vertices of the rectangular border, whose relative positional relationship is determined when the QR code is generated; the identification information is a unique ID number carried by the internal coding area of the QR code, used to distinguish different QR code marks.
[0033] In this embodiment, during image detection, the visual algorithm locates the pixel coordinates of the four corner points by recognizing the black and white border of the target QR code, and obtains the identification information by decoding the internal region, thereby realizing QR code recognition and pose estimation. Further, the matching judgment includes: detecting the target QR code in the corrected left and right images respectively, obtaining the two-dimensional coordinates and identification information of the four corner points of the target QR code; comparing the QR code identification information detected in the left and right images; if the identification information is consistent, the left and right images are determined to match; if the identification information is inconsistent, or the target QR code is not detected in one of the images, the left and right images are determined to be mismatched.
[0034] Those skilled in the art should understand that the method of processing the pose images captured by the binocular camera to obtain the left and right images, and determining whether the left and right images match based on the attributes of the QR code itself, is a mature existing technology. This embodiment only briefly introduces its principle, and does not elaborate on its specific methods and implementation steps.
[0035] S130. The target image set is processed by the tool center point calibration method to obtain a target coordinate system that matches the grinding disc.
[0036] The process of processing the target image set using the tool center point calibration method to obtain a target coordinate system matching the grinding disc includes: calculating the QR code pose of each pose image in the target image set to obtain each pose point of each pose image and the corresponding QR code pose data; acquiring pre-set rotation transformation data of the end flange coordinate system of the robotic arm; obtaining a set of target transformation equations based on the QR code pose data corresponding to each pose point and the rotation transformation data of the end flange coordinate system according to the tool center point calibration method; and solving the set of target transformation equations using a preset optimization method to obtain the target coordinate system.
[0037] Specifically, the QR code pose calculation includes: based on the left and right images of each target image in the target image set, determining the correspondence between the four corner points of the target QR code in the left and right images using a stereo matching algorithm; using the principle of triangulation, reconstructing the three-dimensional coordinates of the four corner points in the camera coordinate system according to the preset intrinsic parameters, the relative pose of the two cameras, and the corner point disparity; performing plane fitting based on the three-dimensional coordinates, calculating the average coordinates as a temporary origin, centering it, applying singular value decomposition, using the minimum singular value vector as the Z-axis normal vector, and using the fitting center as the robust origin of the target QR code coordinate system; calculating the horizontal and vertical vectors, projecting them onto the plane and normalizing them to obtain the X-axis, adjusting and normalizing them through cross product to obtain the Y-axis, combining the origin and the XYZ axis vectors into a rotation matrix, and finally obtaining the QR code pose data corresponding to each pose point, wherein the QR code pose data includes the rotation matrix and translation vector.
[0038] Furthermore, based on the tool center point calibration method, and using the QR code pose data corresponding to each pose point and the end flange coordinate system rotation transformation data, a set of target transformation equations is obtained, including: establishing transformation relationship equations corresponding to each pose point based on the QR code pose data corresponding to each pose point and the end flange coordinate system rotation transformation data; and simultaneously solving the transformation relationship equations corresponding to each pose point to obtain the set of target transformation equations.
[0039] Specifically, based on the number of pose points in the calibration trajectory sequence, a corresponding number of transformation equations are established, and multiple equations are combined to form an overdetermined system of equations. For example, when the calibration trajectory sequence contains seven rotational trajectories, seven transformation equations are combined and solved using a preset optimization method to reduce the error caused by measurement noise and improve calibration accuracy.
[0040] Furthermore, the optimization method is used to: solve for the unknown tool coordinate system transformation Y, that is, the complete offset and rotation matrix of the target coordinate system relative to the end flange coordinate system of the robotic arm; specifically, the solved Y matrix is converted into a tool coordinate system data format recognizable by the robotic arm, including displacement components in the X / Y / Z directions and rotation angles around the Z / Y / X axes, thereby completing the calibration of the grinding disc tool coordinate system. For example, the origin of the target coordinate system is located at the center of the grinding disc surface, the Z-axis is perpendicular to the disc surface, and the X and Y axes are located in the disc surface plane, completely coinciding with the target QR code coordinate system, thus achieving accurate establishment of the grinding disc processing datum.
[0041] In one specific embodiment of this example, QR code pose calculation is performed on each pose image in the target image set to obtain each pose point and the corresponding QR code pose data. The QR code pose calculation includes the following steps: 1) Plane Fitting and Z-Axis Calculation: Plane fitting is performed using the three-dimensional coordinates of the four corner points of the target QR code. Specifically, the average coordinates of the four corner points are calculated as a temporary origin. After centering the coordinates of each corner point, singular value decomposition is applied. The minimum singular value vector is used as the Z-axis normal vector, which is normalized and its sign is adjusted to ensure that it points to the outside of the camera. The fitting center is used as the robust origin of the target QR code coordinate system.
[0042] 2) X-axis calculation: Assuming the corner point order is top left (0), top right (1), bottom right (2), bottom left (3), calculate the average level vector [(point 1 - point 0) + (point 2 - point 3)] / 2, project it onto the plane (subtract the Z component) and normalize it to the X-axis.
[0043] 3) Y-axis adjustment: Similar to calculating the vertical vector [(point 3 - point 0) + (point 2 - point 1)] / 2, after projection, adjust and normalize using the cross product Y = Z × X.
[0044] 4) Pose synthesis: The origin and XYZ axis vectors are combined into a rotation matrix R to achieve noise-robust pose description and avoid non-orthogonality issues. This yields the QR code pose data corresponding to each pose point, including the rotation matrix R and the translation vector t.
[0045] Specifically, the pre-set rotation transformation data of the end flange coordinate system of the robotic arm is obtained. The rotation transformation data of the end flange coordinate system is a known relative rotation transformation matrix applied by the robotic arm program at each calibration point.
[0046] Based on the tool center point calibration method, and using the QR code pose data corresponding to each pose point and the end flange coordinate system rotation transformation data, a transformation relationship equation corresponding to each pose point is established. Specifically: Let... Let be the transformation matrix of the QR code pose measured by the binocular camera at the i-th pose (i=1,2,…,7), where It is a 3x3 rotation matrix. These are translation vectors. These values are obtained directly through the binocular vision pose calculation process.
[0047] First let Let be the known relative rotation transformation matrix for the i-th pose, where This is the rotation matrix applied by the robotic arm program. For example, for a 20° rotation in the positive X-axis direction, the corresponding... At the initial position, Secondly, let the unknown be fixed and transformed. This represents the transformation from the camera coordinate system to the initial flange pose of the robotic arm. Then, let the unknown TCP transformation... ,in Let T be the rotation matrix of the TCP coordinate system relative to T0. This is the offset vector, which is the core target of the calibration.
[0048] Then establish the transformation relation equations (Equation 1) By simultaneously solving the transformation equations corresponding to all pose points, we obtain the target transformation equation system. In the above equations, Ai is a known quantity, which can be obtained from processing the QR code by the binocular camera; Bi is a known quantity, which can be obtained from the planned rotation angle of the robotic arm path.
[0049] The target coordinate system is obtained by solving the target transformation equations using a preset optimization method. Specifically, the target coordinate system can be obtained by simultaneously solving the seven equations and using the least squares method. That is, the complete offset and rotation matrix of the TCP coordinate system relative to T0, which is used to achieve calibration.
[0050] Based on the above steps, for example, in this embodiment, the final translation and rotation matrix A1 can be set as: The corresponding B1 is: Following the above method, the Ai and Bi values for all 7 points can be obtained. By simultaneously solving all the equations, a system of equations as shown in Equation 1 is established. Solving the equations yields the final TCP matrix Y: The above offset rotation matrix is converted into the target coordinate system data of the robotic arm grinding disc as follows: Those skilled in the art should understand that, given a set of target images of the target QR code under multiple rotation angles, the calculation method for calibrating the coordinate system matching the target QR code using the tool center point calibration method is a mature existing technology. This embodiment only introduces its calculation steps, and does not elaborate on its specific calculation principles and processes.
[0051] The technical solution of this invention involves a calibration device responding to a user's calibration start command, controlling the robotic arm to perform trajectory movement based on a pre-configured calibration trajectory sequence, and acquiring a set of pose images of the target QR code using a binocular camera during the robotic arm's trajectory movement. Then, image correction operations are performed on each pose image in the set to obtain a target image set. Finally, the target image set is processed using a tool center point calibration method to obtain a target coordinate system matching the grinding disc. This enables coordinate system calibration of the robotic arm's grinding disc without data communication, improving the calibration accuracy and efficiency of the robotic arm's grinding disc coordinate system.
[0052] Example 2 Figure 2 This is a flowchart of a coordinate system calibration method for a robotic arm grinding disc provided in Embodiment 2 of the present invention. This embodiment is a refinement based on the above embodiment. Specifically, this embodiment refines the method of acquiring the pose image set of the target QR code by using a binocular camera during the trajectory movement of the robotic arm.
[0053] like Figure 2 As shown, the method includes: S210. In response to the user's calibration start command, control the robotic arm to perform trajectory movement based on a pre-configured calibration trajectory sequence.
[0054] S220. The binocular camera acquires image sequences of the target QR code in real time, and performs continuous frame processing on each real-time target image in the image sequence to determine the consistency of the image of a preset number of consecutive real-time target images.
[0055] The binocular camera maintains real-time acquisition throughout the entire trajectory movement of the robotic arm, acquiring image sequences of the target QR code at a fixed frame rate. Further, the continuous frame processing includes: performing QR code detection on each frame of the real-time target image, extracting the pixel coordinates and identification information of the four corner points of the target QR code; calculating the displacement change of the corner pixel coordinates or the angle change of the QR code coordinate axis direction vector between adjacent frames as a metric for image consistency. If the metric for a consecutive preset number of real-time target images is less than a preset threshold, the images of the consecutive preset number of real-time target images are determined to be consistent; otherwise, they are determined to be inconsistent. For example, the preset number of frames can be set to 10 frames, and the preset threshold can be set to a corner displacement of less than 2 pixels or a vector angle change of less than 0.5° to effectively distinguish between the robotic arm's paused state and its transitional state.
[0056] S230. Based on the image consistency judgment results of each target's real-time images, group the real-time images of each target to obtain each real-time image group.
[0057] In this embodiment, specifically, multiple real-time images of the target that are consistent in appearance and continuous in time are divided into the same real-time image group; real-time images of the target that are inconsistent in appearance or consistent in appearance but discontinuous in time are divided into different real-time image groups or marked separately; for example, when the robotic arm moves from the initial position to the calibration point of the first rotation trajectory and stops, the continuous multiple consistent images captured by the binocular camera are divided into the first real-time image group; when the robotic arm moves from the first calibration point to the second calibration point, the acquired multiple inconsistent images are divided into the transitional real-time image group or marked as the invalid group; when the robotic arm reaches the second calibration point and stops, the acquired continuous multiple consistent images are divided into the second real-time image group.
[0058] S240. Determine whether the number of target real-time images in each real-time image group is greater than a preset number threshold. If the number of target real-time images in the real-time image group is greater than a preset number threshold, execute S250; If the number of target real-time images in the real-time image group is not greater than a preset number threshold, execute step S260.
[0059] S250, Set each target real-time image in the real-time image group as the pose image of the target QR code, and execute S270.
[0060] For example, for a calibration trajectory sequence containing seven calibration points, seven real-time image groups can be obtained and set as pose images, each corresponding to the stable acquisition data of the seven calibration points.
[0061] S260, Discard the real-time image group and execute S270.
[0062] S270. Perform an aggregation operation on each pose image to obtain a pose image set that matches the target QR code.
[0063] S280. Perform image correction operation on each pose image in the pose image set to obtain the target image set.
[0064] S290. The target image set is processed by the tool center point calibration method to obtain a target coordinate system that matches the grinding disc.
[0065] Based on the above steps, for example, The technical solution of this invention involves a calibration device responding to a user's calibration start command, controlling the robotic arm to move along a pre-configured calibration trajectory sequence, and using a binocular camera to capture real-time image sequences of the target QR code. The system performs continuous frame processing on each real-time image in the image sequence, determines the consistency of the image of a preset number of consecutive real-time images, and then groups the real-time images based on the consistency determination results. Next, it determines whether the number of real-time images in each real-time image group exceeds a preset threshold. If the number of real-time images in a real-time image group exceeds the preset threshold, then... Each target real-time image in the real-time image group is set as the pose image of the target QR code. If the number of target real-time images in the real-time image group is not greater than a preset threshold, the real-time image group is discarded. Then, each pose image is aggregated to obtain a pose image set that matches the target QR code. Then, each pose image in the pose image set is image corrected to obtain the target image set. Finally, the target image set is processed by the tool center point calibration method to obtain the target coordinate system that matches the grinding disc. This can realize the coordinate system calibration of the robotic arm grinding disc without data communication, improving the calibration accuracy and efficiency of the robotic arm grinding disc coordinate system.
[0066] Example 3 Figure 3 This is a schematic diagram of the coordinate system calibration device for a robotic arm grinding disc provided in Embodiment 3 of the present invention.
[0067] like Figure 3 As shown, the device includes: The image acquisition module 310 is used to respond to the user's calibration start command, control the robotic arm to perform trajectory movement based on a pre-configured calibration trajectory sequence, and acquire the pose image set of the target QR code through a binocular camera during the trajectory movement of the robotic arm. Image correction module 320 is used to perform image correction operations on each pose image in the pose image set to obtain a target image set; The tool center point calibration module 330 is used to process the target image set by the tool center point calibration method to obtain a target coordinate system that matches the grinding disc.
[0068] The technical solution of this invention involves a calibration device responding to a user's calibration start command, controlling the robotic arm to perform trajectory movement based on a pre-configured calibration trajectory sequence, and acquiring a set of pose images of the target QR code using a binocular camera during the robotic arm's trajectory movement. Then, image correction operations are performed on each pose image in the set to obtain a target image set. Finally, the target image set is processed using a tool center point calibration method to obtain a target coordinate system matching the grinding disc. This enables coordinate system calibration of the robotic arm's grinding disc without data communication, improving the calibration accuracy and efficiency of the robotic arm's grinding disc coordinate system.
[0069] The image acquisition module 310 includes: The trajectory acquisition unit is used to acquire the rotation trajectory of the starting position in the calibration trajectory sequence as the target rotation trajectory in response to the user's calibration start command. The motion unit is used to control the robotic arm to move along a trajectory from a preset initial position based on the target rotation trajectory, move to a calibration point that matches the target rotation trajectory, and remain stationary at the calibration point for a preset time; The trajectory determination unit is used to determine, after a preset time of stillness, whether there is a next rotation trajectory adjacent to the target rotation trajectory in the calibrated trajectory sequence; The position update unit is used to, if it exists, obtain the next segment of rotation trajectory as the new target rotation trajectory, and update the calibration point of the new target rotation trajectory to the new initial position of the robotic arm; The return execution unit is used to return to the operation of controlling the robotic arm to move along the target rotation trajectory from the initial position until there is no next rotation trajectory in the calibrated trajectory sequence, and then the trajectory movement ends.
[0070] Based on the above embodiments, the image acquisition module 310 includes: The consistency judgment unit is used to acquire the image sequence of the target QR code in real time through the binocular camera, and perform continuous frame processing on each real-time target image in the image sequence to judge the image consistency of the target real-time images of a preset number of consecutive images. The grouping unit is used to group the real-time images of each target according to the image consistency judgment result, so as to obtain each real-time image group; The quantity judgment unit is used to determine whether the number of target real-time images in each real-time image group is greater than a preset quantity threshold. An image setting unit is used to set each target real-time image in the real-time image group as the pose image of the target QR code if the number of target real-time images in the real-time image group is greater than a preset number threshold. An image discarding unit is used to discard the real-time image group if the number of target real-time images in the real-time image group is not greater than a preset number threshold. The image aggregation unit is used to perform aggregation operations on each pose image to obtain a pose image set that matches the target QR code.
[0071] Based on the above embodiments, the image correction module 320 includes: A camera attribute acquisition unit is used to acquire the preset intrinsic parameters and distortion function of the stereo camera; The image correction unit is used to perform image correction operations on each pose image in the pose image set based on the preset intrinsic parameters and the distortion function, so as to obtain a left image and a right image that match each pose image respectively. An image matching unit is used to determine the matching degree between the left and right images of each pose image based on the target QR code; The first matching unit is used to set the pose image as the target image if the left image and the right image match. The second matching unit is used to discard the pose image if the left image and the right image do not match.
[0072] Based on the above embodiments, the tool center point calibration module 330 includes: The pose calculation unit is used to perform QR code pose calculation on each pose image in the target image set to obtain each pose point of each pose image and the QR code pose data corresponding to each pose point. The transformation data acquisition unit is used to acquire the pre-set rotation transformation data of the end flange coordinate system of the robotic arm; The tool center point calibration unit is used to obtain the target transformation equation set based on the QR code pose data corresponding to each pose point and the end flange coordinate system rotation transformation data according to the tool center point calibration method. The solution unit is used to solve the target transformation equations using a preset optimization method to obtain the target coordinate system.
[0073] Based on the above embodiments, the tool center point calibration unit includes: The equation establishment unit is used to establish the transformation relationship equations corresponding to each pose point based on the tool center point calibration method, the QR code pose data corresponding to each pose point and the end flange coordinate system rotation transformation data. The equation-simultaneous unit is used to simultaneously solve the transformation relation equations corresponding to each pose point to obtain the target transformation equation set.
[0074] The coordinate system calibration device for a robotic arm grinding disc provided in this embodiment of the invention can execute the coordinate system calibration method for a robotic arm grinding disc provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0075] Example 4 Figure 4 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0076] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0077] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0078] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as a coordinate system calibration method for a robotic arm grinding disc.
[0079] Accordingly, the method includes: In response to the user's calibration start command, the robotic arm is controlled to perform trajectory movement based on a pre-configured calibration trajectory sequence, and a set of pose images of the target QR code is acquired by a binocular camera during the trajectory movement of the robotic arm. Perform image correction operations on each pose image in the pose image set to obtain the target image set; The target image set is processed by the tool center point calibration method to obtain a target coordinate system that matches the grinding disc.
[0080] In some embodiments, a coordinate system calibration method for a robotic arm grinding disc can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the coordinate system calibration method for a robotic arm grinding disc described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform a coordinate system calibration method for a robotic arm grinding disc by any other suitable means (e.g., by means of firmware).
[0081] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0082] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0083] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0084] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0085] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0086] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0087] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
Claims
1. A coordinate system calibration method for a robotic arm grinding disc, performed by a calibration device, the calibration device comprising: A binocular camera, a robotic arm, a polishing disc, and a target QR code, wherein the polishing disc is disposed at the end of the robotic arm, and the QR code is affixed to the surface of the polishing disc, characterized in that it includes: In response to the user's calibration start command, the robotic arm is controlled to perform trajectory movement based on a pre-configured calibration trajectory sequence, and a set of pose images of the target QR code is acquired by a binocular camera during the trajectory movement of the robotic arm. Perform image correction operations on each pose image in the pose image set to obtain the target image set; The target image set is processed by the tool center point calibration method to obtain a target coordinate system that matches the grinding disc.
2. The method according to claim 1, characterized in that, The calibration trajectory sequence consists of at least two rotation trajectories, and the endpoint of each rotation trajectory is a calibration point that matches the rotation trajectory.
3. The method according to any one of claims 1-2, characterized in that, In response to a user's calibration start command, the robotic arm is controlled to perform trajectory movement based on a pre-configured calibration trajectory sequence, including: In response to the user's calibration start command, the rotation trajectory of the starting position in the calibration trajectory sequence is obtained as the target rotation trajectory; The robotic arm is controlled to move from a preset initial position along the target rotation trajectory to a calibration point that matches the target rotation trajectory, and then remain stationary at the calibration point for a preset time. After a preset static time, determine whether there is a next rotation trajectory adjacent to the target rotation trajectory in the calibration trajectory sequence; If it exists, the next segment of the rotation trajectory is obtained as the new target rotation trajectory, and the calibration point of the new target rotation trajectory is updated to the new initial position of the robotic arm; Return to the operation of controlling the robotic arm to move along the target rotation trajectory from the initial position until there is no next rotation trajectory in the calibrated trajectory sequence, and then end the trajectory movement.
4. The method according to claim 1, characterized in that, A set of pose images of the target QR code is acquired by a binocular camera during the trajectory movement of the robotic arm, including: The binocular camera acquires image sequences of the target QR code in real time, and performs continuous frame processing on each real-time target image in the image sequence to determine the consistency of the image of a preset number of consecutive real-time target images. Based on the consistency judgment results of the real-time images of each target, the real-time images of each target are grouped to obtain each real-time image group; Determine whether the number of target real-time images in each real-time image group is greater than a preset number threshold; If the number of target real-time images in the real-time image group is greater than a preset number threshold, then each target real-time image in the real-time image group is set as the pose image of the target QR code. If the number of target real-time images in the real-time image group is not greater than a preset number threshold, then the real-time image group is discarded; The pose images are aggregated to obtain a set of pose images that match the target QR code.
5. The method according to claim 1, characterized in that, Image correction operations are performed on each pose image in the pose image set to obtain the target image set, including: Obtain the preset intrinsic parameters and distortion function of the stereo camera; Based on the preset intrinsic parameters and the distortion function, image correction operations are performed on each pose image in the pose image set to obtain a left image and a right image that match each pose image respectively. Determine the matching of the left and right images of each pose image based on the target QR code; If the left and right images match, then the pose image is set as the target image; If the left and right images do not match, the pose image is discarded.
6. The method according to claim 1, characterized in that, The target image set is processed using the tool center point calibration method to obtain a target coordinate system that matches the grinding disc, including: Perform QR code pose calculation on each pose image in the target image set to obtain each pose point of each pose image and the QR code pose data corresponding to each pose point. Obtain the pre-set rotation transformation data of the end flange coordinate system of the robotic arm; Based on the tool center point calibration method, and using the QR code pose data corresponding to each pose point and the end flange coordinate system rotation transformation data, the target transformation equation set is obtained. The target coordinate system is obtained by solving the target transformation equations using a preset optimization method.
7. The method according to claim 6, characterized in that, Based on the tool center point calibration method, and using the QR code pose data corresponding to each pose point and the end flange coordinate system rotation transformation data, the target transformation equation set is obtained, including: Based on the tool center point calibration method, and based on the QR code pose data corresponding to each pose point and the end flange coordinate system rotation transformation data, the transformation relationship equations corresponding to each pose point are established. By simultaneously solving the transformation equations corresponding to each pose point, we obtain the target transformation equation set.
8. A coordinate system calibration device for a robotic arm grinding disc, performed by a calibration device, the calibration device comprising: A binocular camera, a robotic arm, a polishing disc, and a target QR code, wherein the polishing disc is disposed at the end of the robotic arm, and the QR code is affixed to the surface of the polishing disc, characterized in that it includes: The image acquisition module is used to respond to the user's calibration start command, control the robotic arm to perform trajectory movement based on a pre-configured calibration trajectory sequence, and acquire the pose image set of the target QR code through a binocular camera during the trajectory movement of the robotic arm; The image correction module is used to perform image correction operations on each pose image in the pose image set to obtain the target image set; The tool center point calibration module is used to process the target image set using the tool center point calibration method to obtain a target coordinate system that matches the grinding disc.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform a coordinate system calibration method for a robotic arm grinding disc according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute a coordinate system calibration method for a robotic arm grinding disc according to any one of claims 1-7.