Control method, control device, and electronic device for a robot
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING BO TSING TECH CO LTD
- Filing Date
- 2023-09-28
- Publication Date
- 2026-08-07
AI Technical Summary
[0004]本申请的主要目的在于提供一种机器人的控制方法、控制装置、计算机可读存储介质和电子设备,以至少解决现有技术中机器人的位姿不稳定造成手眼标定算法不准确的问题
[0015]By applying the technical solution of this application, the calibration posture angle and the measured posture angle of the robot are obtained. A first set of coordinate points corresponding to the calibration posture angle of the target position in the visual sensor coordinate system, a second set of coordinate points corresponding to the measured posture angle of the target position in the visual sensor coordinate system, and a third set of coordinate points corresponding to the target position in the welding torch coordinate system are also obtained. A first rotation and translation matrix is calculated based on the first and second coordinate point sets. The displacement direction angle of the visual sensor is calculated based on the first rotation and translation matrix. A second rotation and translation matrix is calculated based on the first and third coordinate point sets. The second rotation and translation matrix is then corrected based on the calibration posture angle, the measured posture angle, and the displacement direction angle to obtain a corrected rotation and translation matrix. This corrected rotation and translation matrix can correct the inaccuracy of the calibration algorithm caused by the robot's unstable posture. Compared with the prior art, which directly uses the calibration posture angle for coordinate transformation, this application corrects the influence of posture deviation on the calibration position. Therefore, it can solve the problem of inaccurate hand-eye calibration algorithms caused by robot posture instability in the prior art, achieving accurate hand-eye calibration.
Smart Images

Figure CN117207189B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robot control, and more specifically, to a robot control method, control device, computer-readable storage medium, and electronic device. Background Technology
[0002] Currently, most hand-eye calibration algorithms used in industry are implemented for industrial robotic arms and cameras, neglecting the application scenarios and feasibility of hand-eye calibration algorithms for crawler robots. Existing technologies primarily address the issue of the "eye" being on the hand in hand-eye calibration systems, converting between different coordinate systems by calibrating the relative positions of the robotic arm, camera, and robotic arm base. However, for crawler robots, the coordinate system of the robotic arm base corresponds to the robot's base. Since the pose relationship before and after calibration is unstable, directly using this calibration method would significantly affect the calibration accuracy due to changes in the crawler's pose. This type of method is not directly applicable to crawler hand-eye systems. While joint calibration schemes based on LiDAR and cameras can determine the absolute position in the world coordinate system, the LiDAR sensor itself is not suitable for complex and confined working environments.
[0003] Therefore, a method is needed to solve the problem of inaccurate hand-eye calibration during multi-posture crawling. Summary of the Invention
[0004] The main objective of this application is to provide a robot control method, control device, computer-readable storage medium, and electronic device, so as to at least solve the problem of inaccurate hand-eye calibration algorithms caused by the unstable posture of robots in the prior art.
[0005] To achieve the above objectives, according to one aspect of this application, a robot control method is provided, the robot including at least a vision sensor and a welding torch, comprising: acquiring a calibration attitude angle and a measured attitude angle of the robot, and acquiring a first set of coordinate points corresponding to the calibration attitude angle in the vision sensor coordinate system, a second set of coordinate points corresponding to the measured attitude angle in the vision sensor coordinate system, and a third set of coordinate points in the welding torch coordinate system, wherein the calibration attitude angle represents the angle between the line connecting the current position of the vision sensor and the welding torch and the line connecting the vision sensor and the desired position of the welding torch, the measured attitude angle represents the angle between the line connecting the current position of the vision sensor and the welding torch and the line connecting the actual position of the vision sensor and the welding torch, the target position represents the position where the robot controls the welding torch to perform welding operations, and the vision sensor coordinate system is based on the vision sensor... A coordinate system is established centered on the welding torch. The welding torch coordinate system is a coordinate system established centered on the welding torch. A first rotation and translation matrix is calculated based on the first set of coordinate points and the second set of coordinate points. The displacement direction angle of the vision sensor is calculated based on the first rotation and translation matrix. The first rotation and translation matrix is a matrix that transfers from the first set of coordinate points to the second set of coordinate points in the vision sensor coordinate system. The displacement direction angle represents the angle of the vision sensor in the displacement direction. A second rotation and translation matrix is calculated based on the first set of coordinate points and the third set of coordinate points. The second rotation and translation matrix is corrected based on the calibration attitude angle, the measurement attitude angle, and the displacement direction angle to obtain a corrected rotation and translation matrix. The robot is controlled to perform welding operations according to the corrected rotation and translation matrix. The second rotation and translation matrix is a matrix that transfers the coordinates of the target position from the vision sensor coordinate system to the welding torch coordinate system.
[0006] Optionally, the first rotation and translation matrix is calculated based on the first set of coordinate points and the second set of coordinate points, including: using the formula Calculate the first center coordinates of the first set of coordinate points and the second center coordinates of the second set of coordinate points, where μ A Represents the first center coordinate, μ B Let N represent the coordinates of the second center point, and let N represent the number of points in the first and second coordinate point sets. This represents the i-th first coordinate in the first set of coordinate points. This represents the i-th second coordinate in the second set of coordinate points; expressed by the formula... The first set of coordinate points and the second set of coordinate points are re-centered, wherein, This represents the first set of coordinate points after re-centering. This represents the second set of coordinate points after re-centering; through the formula Calculate the first covariance matrix between the first set of coordinate points after recentering and the second set of coordinate points after recentering, where H represents the first covariance matrix; using the formula... Perform singular value decomposition on the first covariance matrix, and then... The first rotation matrix is calculated, and then... The first translation matrix is calculated to be based on The first rotation and translation matrix is obtained, where SVD represents singular value decomposition, U represents the left singular vector obtained after performing singular value decomposition on the first covariance matrix, S represents the singular value obtained after performing singular value decomposition on the first covariance matrix, V represents the right singular vector obtained after performing singular value decomposition on the first covariance matrix, and R... AB Let T represent the first rotation matrix. AB Let represent the first translation matrix.
[0007] Optionally, calculating the displacement direction angle of the visual sensor based on the first rotation and translation matrix includes: using the formula Calculate the first translation distance corresponding to the measured attitude angle, where d1 represents the first translation distance, k1 represents the measured attitude angle, and r represents the rotation radius of the vision sensor; determine the components of the first translation distance along each coordinate axis in the vision sensor coordinate system, and use the formula... Calculate the displacement direction angle, where, This represents the absolute value of the first translation distance. This represents the x-axis component of the first translation distance in the visual sensor coordinate system. This represents the y-axis component of the first translation distance in the visual sensor coordinate system. This represents the z-axis component of the first translation distance in the visual sensor coordinate system. This represents the angle between the first translation distance and the x-axis of the visual sensor coordinate system. This represents the angle between the first translation distance and the displacement direction of the y-axis of the visual sensor coordinate system. This represents the displacement direction angle between the first translation distance and the z-axis of the visual sensor coordinate system.
[0008] Optionally, before calculating the first translation distance corresponding to the measured attitude angle, the method further includes: determining the element value of the first translation matrix in the first rotation-translation matrix as the second translation distance between the coordinate point in the first coordinate point set corresponding to the element value and the corresponding coordinate point in the second coordinate point set; using the formula Calculate the rotation radius of the vision sensor, where d represents the second translation distance and k represents the calibration attitude angle.
[0009] Optionally, the visual sensor coordinate system is represented by o-xyz. Determining the components of the first translation distance on each coordinate axis in the visual sensor coordinate system includes: mapping the first translation distance to the xoy plane in the visual sensor coordinate system to obtain a first mapped distance; calculating the distance from the first mapped distance to the x-axis to obtain the y-axis component of the first translation distance in the visual sensor coordinate system; calculating the distance from the first mapped distance to the y-axis to obtain the x-axis component of the first translation distance in the visual sensor coordinate system; and calculating the distance from the first mapped distance to the z-axis to obtain the z-axis component of the first translation distance in the visual sensor coordinate system.
[0010] Optionally, the second rotation and translation matrix is calculated based on the first set of coordinate points and the third set of coordinate points, including: using the formula Calculate the first center coordinates of the first set of coordinate points and the third center coordinates of the third set of coordinate points, where μ A Represents the first center coordinate, μ C Let N represent the coordinates of the third center point, and let N represent the number of points in the first and third coordinate point sets. This represents the i-th first coordinate in the first set of coordinate points. This represents the i-th third coordinate in the set of third coordinate points; expressed by the formula... The first set of coordinate points and the third set of coordinate points are re-centered, wherein, This represents the first set of coordinate points after re-centering. This represents the set of third coordinate points after re-centering; expressed by the formula... Calculate the second covariance matrix between the first set of coordinate points after recentering and the third set of coordinate points after recentering, where H represents the second covariance matrix; using the formula... Singular value decomposition is performed on the second covariance matrix, and then... The second rotation matrix is calculated, and then... The second translation matrix is calculated to be based on The second rotation and translation matrix is obtained, where SVD represents the singular value decomposition operation, U represents the left singular vector obtained after performing singular value decomposition on the second covariance matrix, S represents the singular value obtained after performing singular value decomposition on the second covariance matrix, V represents the right singular vector obtained after performing singular value decomposition on the second covariance matrix, and R... Ac Let T represent the second rotation matrix. Ac This represents the second translation matrix.
[0011] Optionally, the second rotation-translation matrix is corrected based on the calibrated attitude angle, the measured attitude angle, and the displacement direction angle to obtain the corrected rotation-translation matrix, including: according to the formula The second rotation and translation matrix is corrected to obtain the corrected rotation and translation matrix, where B represents the homogeneous coordinate vector of any point A in the vision sensor coordinate system after the corrected coordinate transformation in the welding torch coordinate system, and A represents any point in the vision sensor coordinate system. Let r represent the second rotation-translation matrix, and r represent the rotation radius of the vision sensor. This represents the angle between the first translation distance and the x-axis of the visual sensor coordinate system. This represents the angle between the first translation distance and the displacement direction of the y-axis of the visual sensor coordinate system. The first translation distance represents the displacement direction angle between the first translation distance and the z-axis of the visual sensor coordinate system, k represents the calibration attitude angle, and k1 represents the measurement attitude angle.
[0012] According to another aspect of this application, a control device for a machine is provided. The robot includes at least a vision sensor and a welding torch, comprising: an acquisition unit, configured to acquire a calibration attitude angle and a measured attitude angle of the robot, and to acquire a first set of coordinate points corresponding to the calibration attitude angle in the vision sensor coordinate system, a second set of coordinate points corresponding to the measured attitude angle in the vision sensor coordinate system, and a third set of coordinate points in the welding torch coordinate system, wherein the calibration attitude angle represents the angle between the line connecting the current position of the vision sensor and the welding torch and the line connecting the desired position of the vision sensor and the welding torch; the measured attitude angle represents the angle between the line connecting the current position of the vision sensor and the welding torch and the line connecting the actual position of the vision sensor and the welding torch; the target position represents the position where the robot controls the welding torch to perform welding operations; and the vision sensor coordinate system is established with the vision sensor as the center. The system comprises: a calibration system, wherein the welding torch coordinate system is a coordinate system established with the welding torch as the center; a calculation unit, configured to calculate a first rotation and translation matrix based on the first set of coordinate points and the second set of coordinate points, and to calculate the displacement direction angle of the vision sensor based on the first rotation and translation matrix, wherein the first rotation and translation matrix is a matrix that transfers from the first set of coordinate points to the second set of coordinate points in the vision sensor coordinate system, and the displacement direction angle represents the angle of the vision sensor in the displacement direction; and a control unit, configured to calculate a second rotation and translation matrix based on the first set of coordinate points and the third set of coordinate points, correct the second rotation and translation matrix based on the calibration attitude angle, the measurement attitude angle, and the displacement direction angle to obtain a corrected rotation and translation matrix, and control the robot to perform welding operations according to the corrected rotation and translation matrix, wherein the second rotation and translation matrix is a matrix that transfers the coordinates of the target position from the vision sensor coordinate system to the welding torch coordinate system.
[0013] According to another aspect of this application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform any of the control methods described above.
[0014] According to another aspect of this application, an electronic device is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including methods for performing any of the control methods described herein.
[0015] By applying the technical solution of this application, the calibration posture angle and the measured posture angle of the robot are obtained. A first set of coordinate points corresponding to the calibration posture angle of the target position in the visual sensor coordinate system, a second set of coordinate points corresponding to the measured posture angle of the target position in the visual sensor coordinate system, and a third set of coordinate points corresponding to the target position in the welding torch coordinate system are also obtained. A first rotation and translation matrix is calculated based on the first and second coordinate point sets. The displacement direction angle of the visual sensor is calculated based on the first rotation and translation matrix. A second rotation and translation matrix is calculated based on the first and third coordinate point sets. The second rotation and translation matrix is then corrected based on the calibration posture angle, the measured posture angle, and the displacement direction angle to obtain a corrected rotation and translation matrix. This corrected rotation and translation matrix can correct the inaccuracy of the calibration algorithm caused by the robot's unstable posture. Compared with the prior art, which directly uses the calibration posture angle for coordinate transformation, this application corrects the influence of posture deviation on the calibration position. Therefore, it can solve the problem of inaccurate hand-eye calibration algorithms caused by robot posture instability in the prior art, achieving accurate hand-eye calibration. Attached Figure Description
[0016] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0017] Figure 1 A hardware structure block diagram of a mobile terminal for performing a robot control method according to an embodiment of this application is shown;
[0018] Figure 2 A flowchart illustrating a robot control method provided in an embodiment of this application is shown.
[0019] Figure 3 This illustration shows a schematic diagram of the rotational relationship between a vision sensor and a welding torch in a specific robot control method provided by an embodiment of this application;
[0020] Figure 4 This illustration shows the relationship between the welding torch and the vision sensor during the movement of a specific robot control method provided by an embodiment of this application.
[0021] Figure 5 A schematic diagram illustrating the relationship of rotation radius in a specific robot control method provided by an embodiment of this application is shown.
[0022] Figure 6 This illustration shows a schematic diagram of the relationship between translation distance and coordinate axis components in a specific robot control method provided by an embodiment of this application;
[0023] Figure 7 A structural block diagram of a robot control device provided in an embodiment of this application is shown.
[0024] The above figures include the following reference numerals:
[0025] 102. Processor; 104. Memory; 106. Transmission device; 108. Input / output device. Detailed Implementation
[0026] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0027] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present application.
[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application 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 for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover 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.
[0029] For ease of description, the following explains some of the nouns or terms used in the embodiments of this application:
[0030] Hand-eye calibration: Converting the camera's 3D coordinates to the robot arm's coordinates requires calibrating the positional relationship between the camera and the robot arm. This calibration is called hand-eye calibration.
[0031] As described in the background section, the unstable posture of robots in the prior art causes inaccurate hand-eye calibration algorithms. To solve the problem of inaccurate hand-eye calibration algorithms, embodiments of this application provide a robot control method, control device, computer-readable storage medium, and electronic device.
[0032] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0033] The methods and embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for a robot control method according to an embodiment of the present invention. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0034] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the robot control method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device 106 is used to receive or send data via a network. Specific examples of the aforementioned networks may include wireless networks provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0035] This embodiment provides a control method for a robot that runs on a mobile terminal, computer terminal, or similar computing device. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Also, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0036] Figure 2 This is a flowchart of a robot control method according to an embodiment of this application. Figure 2 As shown, the robot described above includes at least a vision sensor and a welding torch, and the method includes the following steps:
[0037] Step S201: Obtain the calibration attitude angle and the measured attitude angle of the robot, and obtain the first set of coordinate points corresponding to the calibration attitude angle in the visual sensor coordinate system, the second set of coordinate points corresponding to the measured attitude angle in the visual sensor coordinate system, and the third set of coordinate points in the welding torch coordinate system. The calibration attitude angle represents the angle between the line connecting the current position of the visual sensor and the welding torch and the line connecting the desired position of the visual sensor and the welding torch. The measured attitude angle represents the angle between the line connecting the current position of the visual sensor and the welding torch and the line connecting the actual position of the visual sensor and the welding torch. The target position represents the position where the robot controls the welding torch to perform welding operations. The visual sensor coordinate system is a coordinate system established with the visual sensor as the center, and the welding torch coordinate system is a coordinate system established with the welding torch as the center.
[0038] Specifically, the method described in this application is applied to a crawling robot. For the crawling robot, the coordinate system of the robotic arm base corresponds to the base of the crawler. Since the pose relationship before and after calibration is not stable, changes in the pose of the crawler body will greatly affect the calibration accuracy. Therefore, it is necessary to perform joint calibration based on the robot's calibrated attitude angle and the measured attitude angle, combined with a hand-eye calibration algorithm. In hand-eye calibration, the "hand" is equivalent to the welding torch mentioned above, and the "eye" is equivalent to the vision sensor or camera mentioned above. The calibrated attitude angle is the angle corresponding to the position that the robotic arm, i.e., the welding torch, is expected to reach. However, the actual position may not be precisely reached, and the actual attitude angle may not be exactly the same as the calibrated attitude angle, usually with a slight error. The target position can be a weld seam, etc. The first set of coordinate points is the set of coordinate points of the target position under the vision sensor coordinate system at the calibrated attitude angle; the second set of coordinate points is the set of coordinate points of the target position under the vision sensor coordinate system at the measured attitude angle; and the third set of coordinate points is the set of coordinate points of the target position in the welding torch coordinate system. Each point in the first set of coordinate points corresponds to a point in the third set of coordinate points. Similarly, each point in the second set of coordinate points also corresponds to a point in the third set of coordinate points. In other words, each point in the first set of coordinate points, the second set of coordinate points, and the third set of coordinate points corresponds one-to-one. Each of the above point sets usually takes more than three points, that is, it includes at least three coordinate points.
[0039] Step S202: Calculate a first rotation and translation matrix based on the first set of coordinate points and the second set of coordinate points, and calculate the displacement direction angle of the visual sensor based on the first rotation and translation matrix. The first rotation and translation matrix is a matrix that is transferred from the first set of coordinate points to the second set of coordinate points in the visual sensor coordinate system, and the displacement direction angle represents the angle of the visual sensor in the displacement direction.
[0040] Specifically, to correct the error between the calibrated attitude angle and the measured attitude angle, a first rotation and translation matrix is calculated based on the first and second coordinate point sets. The displacement direction angle of the vision sensor is then calculated based on this first rotation and translation matrix. This allows for error correction using the calibrated and measured attitude angles, resulting in a more accurate welding torch position. While the change in position from the calibrated attitude angle to the measured attitude angle is actually in radians, the change is minimal during the actual calculation. Therefore, it is assumed that the displacement direction angle remains consistent, resulting only in translational motion; that is, the camera or vision sensor slides along the same axis.
[0041] Step S203: Calculate the second rotation and translation matrix based on the first coordinate point set and the third coordinate point set. Correct the second rotation and translation matrix based on the calibration attitude angle, the measured attitude angle, and the displacement direction angle to obtain the corrected rotation and translation matrix. Control the robot to perform welding operations according to the corrected rotation and translation matrix. The second rotation and translation matrix is a matrix that transfers the coordinates of the target position from the vision sensor coordinate system to the welding gun coordinate system.
[0042] Specifically, the second rotation and translation matrix converts the coordinates of the target position in the vision sensor coordinate system to the coordinates in the welding torch coordinate system. The calibrated attitude angle corresponds to the position that the welding torch is expected to reach. Therefore, by calculating the second rotation and translation matrix using the first and third coordinate point sets of the calibrated attitude angle, the initial rotation and translation matrix, i.e., the second rotation and translation matrix, can be obtained. Then, the initial rotation and translation matrix is corrected based on the calibrated attitude angle, the measured attitude angle, and the displacement direction angle to obtain the corrected rotation and translation matrix. In this way, the error caused by the robot originally operating according to the second rotation and translation matrix, i.e., the initial rotation and translation matrix, can be corrected, allowing the robot to directly perform coordinate transformation and welding operations according to the corrected rotation and translation matrix.
[0043] This embodiment obtains the robot's calibration posture angle and measured posture angle, and acquires a first set of coordinate points corresponding to the calibration posture angle in the visual sensor coordinate system, a second set of coordinate points corresponding to the measured posture angle in the visual sensor coordinate system, and a third set of coordinate points corresponding to the target position in the welding torch coordinate system. A first rotation and translation matrix is calculated based on the first and second coordinate point sets, and the displacement direction angle of the visual sensor is calculated based on the first rotation and translation matrix. A second rotation and translation matrix is calculated based on the first and third coordinate point sets. The second rotation and translation matrix is then corrected based on the calibration posture angle, measured posture angle, and displacement direction angle to obtain a corrected rotation and translation matrix. This allows the second rotation and translation matrix to correct the inaccuracy of the calibration algorithm caused by the robot's unstable posture. Compared with the prior art, which directly uses the calibration posture angle for coordinate transformation, this application corrects the influence of posture deviation on the calibration position. Therefore, it can solve the problem of inaccurate hand-eye calibration algorithms caused by robot posture instability in the prior art, achieving the goal of accurate hand-eye calibration.
[0044] In the specific implementation process, the above step S202 can be achieved through the following steps: using the formula Calculate the first center coordinates of the first set of coordinate points and the second center coordinates of the second set of coordinate points, where μ A Represents the first center coordinates mentioned above, μ BLet N represent the coordinates of the second center, and let N represent the number of points in the first and second coordinate sets. This represents the i-th first coordinate in the aforementioned set of first coordinate points. This represents the i-th second coordinate in the aforementioned set of second coordinate points; expressed by the formula... The first set of coordinate points and the second set of coordinate points are re-centered, wherein, This represents the set of the first coordinate points after re-centering. This represents the set of the second coordinate points after re-centering; using the formula... Calculate the first covariance matrix between the re-centered first coordinate point set and the re-centered second coordinate point set, where H represents the first covariance matrix; using the formula... Perform singular value decomposition on the first covariance matrix mentioned above, and then... The first rotation matrix is calculated, and then... The first translation matrix is calculated to be based on The first rotation and translation matrix is obtained, where SVD represents the singular value decomposition operation, U represents the left singular vector obtained after performing the singular value decomposition operation on the first covariance matrix, S represents the singular value obtained after performing the singular value decomposition operation on the first covariance matrix, V represents the right singular vector obtained after performing the singular value decomposition operation on the first covariance matrix, and R... AB Let T represent the first rotation matrix mentioned above. AB Let represent the first translation matrix. This method calculates the rotation and translation matrix through the above steps, thus accurately determining the transformation relationship between the first set of coordinate points and the second set of coordinate points.
[0045] Specifically, firstly, centering is performed, that is, the first center coordinates of the first coordinate point set and the second center coordinates of the second coordinate point set are calculated. Then, the point sets are re-centered, that is, the first coordinate point set and the second coordinate point set are re-centered to generate a new point set. and Calculate the covariance matrix H between point sets, obtain the matrix U, S, and V using the SVD (Singular Value Decomposition) method, and calculate the rotation matrix R and translation matrix t between point sets to form the first rotation and translation matrix. .
[0046] To accurately calculate the displacement direction angle, step S202 above can also be achieved through the following steps: Step S2021: Using the formula Calculate the first translation distance corresponding to the measured attitude angle, where d1 represents the first translation distance, k1 represents the measured attitude angle, and r represents the rotation radius of the vision sensor; Step S2022: Determine the components of the first translation distance on each coordinate axis in the vision sensor coordinate system, and use the formula Calculate the displacement direction angles mentioned above, where, This represents the absolute value of the first translation distance mentioned above. This represents the x-axis component of the first translation distance in the aforementioned visual sensor coordinate system. This represents the y-axis component of the first translation distance in the aforementioned visual sensor coordinate system. This represents the z-axis component of the first translation distance in the aforementioned visual sensor coordinate system. This represents the angle between the aforementioned first translation distance and the x-axis of the aforementioned visual sensor coordinate system. This represents the angle between the aforementioned first translation distance and the displacement direction of the y-axis of the aforementioned visual sensor coordinate system. This represents the displacement direction angle between the first translation distance and the z-axis of the visual sensor coordinate system. The method calculates the displacement direction angle using the steps described above, allowing for correction of the rotation and translation matrix based on this angle.
[0047] In the specific implementation process, firstly, the first translation distance of the camera position corresponding to the measured attitude angle is calculated. Then, the components of the first translation distance on the x-axis, y-axis, and z-axis are calculated. Finally, the displacement direction angle can be calculated by the angular relationship between each coordinate axis component and the first translation distance.
[0048] In some optional embodiments, prior to step S2021, the method further includes the following step: determining the element values of the first translation matrix in the first rotation and translation matrix as the second translation distance between the coordinate points in the first coordinate point set corresponding to the element values and the corresponding coordinate points in the second coordinate point set; using the formula The rotation radius of the aforementioned visual sensor is calculated, where d represents the second translation distance and k represents the calibration attitude angle. This method first calculates the rotation radius, and then calculates the first translation distance based on the rotation radius, thus accurately calculating the first translation distance.
[0049] In the specific implementation process, the translation matrix T in the first rotation and translation matrix calculated in the above steps AB The element value in is the second translation distance, which is the translation distance of the camera or vision sensor corresponding to the calibration attitude angle. In this way, the rotation radius can be calculated. Since the rotation radius is the same under the calibration attitude angle and the measured attitude angle, the first translation distance corresponding to the measured attitude angle can be calculated by the rotation radius r and the measured attitude angle k1.
[0050] To calculate the components of the first translation distance along each coordinate axis, the aforementioned visual sensor coordinate system is represented by o-xyz. Step S2022 can be achieved through the following steps: mapping the first translation distance to the xoy plane in the visual sensor coordinate system to obtain the first mapped distance; calculating the distance from the first mapped distance to the x-axis to obtain the y-axis component of the first translation distance in the visual sensor coordinate system; calculating the distance from the first mapped distance to the y-axis to obtain the x-axis component of the first translation distance in the visual sensor coordinate system; and calculating the distance from the first mapped distance to the z-axis to obtain the z-axis component of the first translation distance in the visual sensor coordinate system. This allows for accurate calculation of the components of the first translation distance along each coordinate axis.
[0051] Specifically, in the above coordinate system, according to the mapping relationship, by mapping the first translation distance to the plane of each coordinate axis to calculate the components of the first translation distance on each coordinate axis, the components of the first translation distance on each coordinate axis can be accurately calculated.
[0052] In some optional implementations, the second rotation and translation matrix is calculated based on the first set of coordinate points and the third set of coordinate points, including: using the formula Calculate the first center coordinates of the first coordinate point set and the third center coordinates of the third coordinate point set, where μ A Represents the first center coordinates mentioned above, μ C Let N represent the coordinates of the third center, and let N represent the number of points in the first and third coordinate sets. This represents the i-th first coordinate in the aforementioned set of first coordinate points. This represents the i-th third coordinate in the aforementioned set of third coordinate points; expressed by the formula... The first and third coordinate point sets mentioned above are re-centered, where, This represents the set of the first coordinate points after re-centering. This represents the set of the third coordinate points after re-centering; using the formula... Calculate the second covariance matrix between the first set of coordinate points after recentering and the third set of coordinate points after recentering, where H represents the second covariance matrix; using the formula... Perform singular value decomposition on the second covariance matrix mentioned above, and then... The second rotation matrix is calculated, and then... The second translation matrix is calculated to be based on The second rotation and translation matrix is obtained, where SVD represents the singular value decomposition operation, U represents the left singular vector obtained after performing the singular value decomposition operation on the second covariance matrix, S represents the singular value obtained after performing the singular value decomposition operation on the second covariance matrix, V represents the right singular vector obtained after performing the singular value decomposition operation on the second covariance matrix, and R... Ac Let T represent the second rotation matrix mentioned above. Ac This represents the second translation matrix. The method calculates the second rotation-translation matrix through the above steps, thus obtaining the initial coordinate transformation relationship between the vision sensor and the welding torch.
[0053] In the specific implementation process, the calculation method of the first rotation and translation matrix is the same as that of the first rotation and translation matrix. The second rotation and translation matrix calculates the transformation relationship between the target position, such as the weld seam, in the visual sensor coordinate system and the welding torch coordinate system, that is, the coordinate transformation relationship corresponding to the calibration attitude angle. First, centering is performed, that is, the first center coordinates of the first coordinate point set and the second center coordinates of the second coordinate point set are calculated. Then, the point sets are re-centered, that is, the first coordinate point set and the second coordinate point set are re-centered to generate a new point set. The covariance matrix H between the point sets is calculated. The U, S, and V of the matrix are obtained by the SVD (Singular Value Decomposition) method. The rotation matrix and translation matrix between the point sets are calculated, thus forming the first rotation and translation matrix. .
[0054] To accurately calculate the corrected rotation and translation matrix, step S203 above can be achieved through the following steps: according to the formula The modified rotation and translation matrix is obtained by correcting the second rotation and translation matrix, where B represents the homogeneous coordinate vector of any point A in the vision sensor coordinate system after the modified coordinate transformation, and A represents any point in the aforementioned vision sensor coordinate system. Let r represent the second rotation-translation matrix mentioned above, and let r represent the rotation radius of the aforementioned visual sensor. This represents the angle between the first translation distance and the x-axis of the aforementioned visual sensor coordinate system. This represents the angle between the aforementioned first translation distance and the displacement direction of the y-axis of the aforementioned visual sensor coordinate system. The first translation distance mentioned above represents the displacement direction angle relative to the z-axis of the visual sensor coordinate system, k represents the calibration attitude angle, and k1 represents the measurement attitude angle. This method corrects the rotation and translation matrix based on the displacement direction angle, thus making the position of the welding torch more accurate.
[0055] In the specific implementation, given a point A(x,y,z) in the camera coordinate system, the second rotation and translation matrix RT CHGiven the calibrated attitude value k and the measured attitude value k1 of the attitude sensor, the coordinates of this point in the welding torch coordinate system are: That is, by taking any point A in the vision sensor coordinate system and performing a coordinate transformation, the corresponding homogeneous coordinate vector B in the welding torch coordinate system can correct the error of the measured attitude angle.
[0056] To enable those skilled in the art to better understand the technical solution of this application, the implementation process of the robot control method of this application will be described in detail below with reference to specific embodiments.
[0057] This embodiment relates to a specific robot control method, including the following steps:
[0058] Step S1: Calibrate the rotational relationship between the camera (vision sensor) and the welding torch, such as... Figure 3 As shown, two sets of coordinates, P1 (first coordinate point set) and P2 (third coordinate point set), are obtained under the visual sensor coordinate system C and the crawler's welding gun coordinate system B. The points on the P1 point set and the P2 point set correspond one-to-one.
[0059] Step S2: First, the point set needs to be re-centered. Generate a new set of points Calculate the covariance matrix between point sets. The U, S, and V of the matrix are obtained by the SVD method. It can calculate the rotation matrix between point sets. Finally, through R AB The transition matrix can be obtained. The first rotation and translation matrix is... ;
[0060] Step S3: Since the posture angle of the crawling robot will change slightly during the movement of the welding torch and camera, this change is simplified as follows: Figure 4 In practical applications, the changes in C1-C2-C3-C4-C5 are radian changes. However, because the angular changes are small and to simplify the calculation process, we assume that their displacement directions are consistent and only translational motion occurs. Figure 4 The camera slides on the same axis. The above relationship can be described as the initial calibration coordinates of the B and C3 coordinate systems in step S2. Due to the existence of attitude correction error, the actual relative relationship may become the relative relationship of C4 and B during the attitude correction process of the crawler. If the transformation equation from C3 position to B is still used, an output error will be generated. This error can be corrected by introducing the attitude measurement value of the attitude sensor in this step.
[0061] Step S4: As Figure 5As shown, the initial calibration positions are taken as the postures corresponding to C3 and B. Based on the positions of C3 and C4 in the camera coordinate system obtained in step S2, the corresponding point pairs are acquired, and the rotation and translation matrices are solved to obtain the translation distance d (the second translation distance). Furthermore, since the attitude sensor knows the radian k of the camera and crawler's calibration attitude angle, the rotation radius r from the crawler's attitude point to the camera can be obtained. The conversion formula is as follows: ;
[0062] Step S5: The displacement from C3 to C4 is achieved by transforming the crawler's attitude angle. The transformed attitude angle is k1, which can be calculated using the formula... The displacement value d1 from the original calibration point C1 to any other location is obtained. Figure 6 In the context of |V|, we calculate the components of V along the x, y, and z axes as Vx, Vy, and Vz, respectively. Figure 7 As shown, the camera displacement direction angle ( (β, γ) can be obtained from the following formula: ;
[0063] Step S5: In practical applications, given a point A(x, y, z) in the camera coordinate system, the second rotation and translation matrix RT CH The attitude sensor calibrates the attitude angle k and measures the attitude angle k1. Then, converting these to coordinates in the welding torch coordinate system, i.e., correcting the rotation and translation matrix, is: The robot can be controlled to perform welding operations according to the corrected rotation and translation matrix.
[0064] This application also provides a robot control device. It should be noted that the robot control device of this application can be used to execute the robot control method provided in this application. This device is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0065] The control device for the robot provided in the embodiments of this application will be described below.
[0066] Figure 7 This is a schematic diagram of a robot control device according to an embodiment of this application. Figure 7 As shown, the device includes:
[0067] The acquisition unit 10 is used to acquire the calibration attitude angle and the measured attitude angle of the robot, and to acquire the first set of coordinate points corresponding to the calibration attitude angle in the visual sensor coordinate system, the second set of coordinate points corresponding to the measured attitude angle in the visual sensor coordinate system, and the third set of coordinate points in the welding torch coordinate system. The calibration attitude angle represents the angle between the line connecting the current position of the visual sensor and the welding torch and the line connecting the desired position of the visual sensor and the welding torch. The measured attitude angle represents the angle between the line connecting the current position of the visual sensor and the welding torch and the line connecting the actual position of the visual sensor and the welding torch. The target position represents the position where the robot controls the welding torch to perform welding operations. The visual sensor coordinate system is a coordinate system established with the visual sensor as the center, and the welding torch coordinate system is a coordinate system established with the welding torch as the center.
[0068] Specifically, the aforementioned device of this application is applied to a crawling robot. For the crawling robot, the coordinate system of the robotic arm base corresponds to the base of the crawler. Since the pose relationship before and after calibration is not stable, changes in the pose of the crawler body will greatly affect the calibration accuracy. Therefore, it is necessary to perform joint calibration based on the robot's calibrated attitude angle and measured attitude angle, combined with a hand-eye calibration algorithm. In hand-eye calibration, the "hand" is equivalent to the aforementioned welding torch, and the "eye" is equivalent to the aforementioned vision sensor or camera. The calibrated attitude angle is the angle corresponding to the position that the robotic arm, i.e., the aforementioned welding torch, is expected to reach. However, the actual position may not be precisely reached, and the actual attitude angle may not be exactly the same as the calibrated attitude angle, usually with a slight error. The target position can be a weld seam, etc. The first set of coordinate points is the set of coordinate points of the target position under the vision sensor coordinate system at the calibrated attitude angle; the second set of coordinate points is the set of coordinate points of the target position under the vision sensor coordinate system at the measured attitude angle; and the third set of coordinate points is the set of coordinate points of the target position in the welding torch coordinate system. Each point in the first set of coordinate points corresponds to a point in the third set of coordinate points. Similarly, each point in the second set of coordinate points also corresponds to a point in the third set of coordinate points. In other words, each point in the first set of coordinate points, the second set of coordinate points, and the third set of coordinate points corresponds one-to-one. Each of the above point sets usually takes more than three points, that is, it includes at least three coordinate points.
[0069] The calculation unit 20 is used to calculate a first rotation and translation matrix based on the first set of coordinate points and the second set of coordinate points, and to calculate the displacement direction angle of the visual sensor based on the first rotation and translation matrix. The first rotation and translation matrix is a matrix that is transferred from the first set of coordinate points to the second set of coordinate points in the visual sensor coordinate system, and the displacement direction angle represents the angle of the visual sensor in the displacement direction.
[0070] Specifically, to correct the error between the calibrated attitude angle and the measured attitude angle, a first rotation and translation matrix is calculated based on the first and second coordinate point sets. The displacement direction angle of the vision sensor is then calculated based on this first rotation and translation matrix. This allows for error correction using the calibrated and measured attitude angles, resulting in a more accurate welding torch position. While the change in position from the calibrated attitude angle to the measured attitude angle is actually in radians, the change is minimal during the actual calculation. Therefore, it is assumed that the displacement direction angle remains consistent, resulting only in translational motion; that is, the camera or vision sensor slides along the same axis.
[0071] The control unit 30 is configured to calculate a second rotation and translation matrix based on the first set of coordinate points and the third set of coordinate points, correct the second rotation and translation matrix based on the calibration attitude angle, the measured attitude angle and the displacement direction angle to obtain a corrected rotation and translation matrix, and control the robot to perform welding operations according to the corrected rotation and translation matrix. The second rotation and translation matrix is a matrix that transfers the coordinates of the target position from the vision sensor coordinate system to the welding gun coordinate system.
[0072] Specifically, the second rotation and translation matrix converts the coordinates of the target position in the vision sensor coordinate system to the coordinates in the welding torch coordinate system. The calibrated attitude angle corresponds to the position that the welding torch is expected to reach. Therefore, by calculating the second rotation and translation matrix using the first and third coordinate point sets of the calibrated attitude angle, the initial rotation and translation matrix, i.e., the second rotation and translation matrix, can be obtained. Then, the initial rotation and translation matrix is corrected based on the calibrated attitude angle, the measured attitude angle, and the displacement direction angle to obtain the corrected rotation and translation matrix. In this way, the error caused by the robot originally operating according to the second rotation and translation matrix, i.e., the initial rotation and translation matrix, can be corrected, allowing the robot to directly perform coordinate transformation and welding operations according to the corrected rotation and translation matrix.
[0073] This embodiment obtains the robot's calibration posture angle and measured posture angle, and acquires a first set of coordinate points corresponding to the calibration posture angle in the visual sensor coordinate system, a second set of coordinate points corresponding to the measured posture angle in the visual sensor coordinate system, and a third set of coordinate points corresponding to the target position in the welding torch coordinate system. A first rotation and translation matrix is calculated based on the first and second coordinate point sets, and the displacement direction angle of the visual sensor is calculated based on the first rotation and translation matrix. A second rotation and translation matrix is calculated based on the first and third coordinate point sets. The second rotation and translation matrix is then corrected based on the calibration posture angle, measured posture angle, and displacement direction angle to obtain a corrected rotation and translation matrix. This allows the second rotation and translation matrix to correct the inaccuracy of the calibration algorithm caused by the robot's unstable posture. Compared with existing technologies that directly use the calibration posture angle for coordinate transformation, this application corrects the influence of posture deviation on the calibration position. Therefore, it can solve the problem of inaccurate hand-eye calibration algorithms caused by robot posture instability in existing technologies, achieving accurate hand-eye calibration.
[0074] In the specific implementation process, the computing unit includes a first computing module, a first centralized module, a second computing module, and a third computing module: the first computing module is used to calculate formulas. Calculate the first center coordinates of the first set of coordinate points and the second center coordinates of the second set of coordinate points, where μ... A The above represents the first center coordinates, and the above μ B Let N represent the coordinates of the second center, and let N represent the number of points in the first and second coordinate sets. This represents the i-th first coordinate in the aforementioned set of first coordinate points. This represents the i-th second coordinate in the aforementioned set of second coordinate points; the first centralization module is used to apply the formula... The first set of coordinate points and the second set of coordinate points are re-centered, wherein, This represents the set of the first coordinate points after re-centering. This represents the second set of coordinate points after re-centering; the second calculation module is used to calculate using the formula... Calculate the first covariance matrix between the re-centered first coordinate point set and the re-centered second coordinate point set, where H represents the first covariance matrix; the third calculation module is used to calculate using the formula... Perform singular value decomposition on the first covariance matrix mentioned above, and then... The first rotation matrix is calculated, and then... The first translation matrix is calculated to be based on The first rotation and translation matrix is obtained, where SVD represents the singular value decomposition operation, U represents the left singular vector obtained after performing the singular value decomposition operation on the first covariance matrix, S represents the singular value obtained after performing the singular value decomposition operation on the first covariance matrix, V represents the right singular vector obtained after performing the singular value decomposition operation on the first covariance matrix, and R... AB Let T represent the first rotation matrix mentioned above. AB Let represent the first translation matrix. The device calculates the rotation and translation matrix through the above steps, thus accurately determining the transformation relationship between the first set of coordinate points and the second set of coordinate points.
[0075] Specifically, firstly, centering is performed, that is, the first center coordinates of the first coordinate point set and the second center coordinates of the second coordinate point set are calculated. Then, the point sets are re-centered, that is, the first coordinate point set and the second coordinate point set are re-centered to generate a new point set. and Calculate the covariance matrix H between point sets, obtain the matrix U, S, and V using an SVD (singular value decomposition) device, and calculate the rotation matrix R and translation matrix t between point sets to form the first rotation and translation matrix. .
[0076] To accurately calculate the displacement direction angle, the calculation unit also includes a fourth calculation module and a fifth calculation module. The fourth calculation module is used to calculate the displacement direction angle using the formula... The first translational distance corresponding to the measured attitude angle is calculated, where d1 represents the first translational distance, k1 represents the measured attitude angle, and r represents the rotation radius of the vision sensor; the fifth calculation module is used to determine the components of the first translational distance on each coordinate axis in the vision sensor coordinate system, and uses the formula... Calculate the displacement direction angles mentioned above, where, This represents the absolute value of the first translation distance mentioned above. This represents the x-axis component of the first translation distance in the aforementioned visual sensor coordinate system. This represents the y-axis component of the first translation distance in the aforementioned visual sensor coordinate system. This represents the z-axis component of the first translation distance in the aforementioned visual sensor coordinate system. This represents the angle between the aforementioned first translation distance and the x-axis of the aforementioned visual sensor coordinate system. This represents the angle between the aforementioned first translation distance and the displacement direction of the y-axis of the aforementioned visual sensor coordinate system. This represents the displacement direction angle between the aforementioned first translation distance and the z-axis of the aforementioned visual sensor coordinate system. The device calculates the displacement direction angle through the aforementioned steps, thus allowing for correction of the rotation and translation matrix based on the displacement direction angle.
[0077] In the specific implementation process, firstly, the first translation distance of the camera position corresponding to the measured attitude angle is calculated. Then, the components of the first translation distance on the x-axis, y-axis, and z-axis are calculated. Finally, the displacement direction angle can be calculated by the angular relationship between each coordinate axis component and the first translation distance.
[0078] In some optional embodiments, the calculation unit further includes a first determining module and a sixth calculation module, wherein the first determining module is used to determine the element values of the translation matrix in the first rotation and translation matrix as the second translation distance between the coordinate points in the first set of coordinate points corresponding to the element values and the corresponding coordinate points in the second set of coordinate points; the sixth calculation module is used to calculate the second translation distance between the coordinate points in the first set of coordinate points and the corresponding coordinate points in the second set of coordinate points using the formula... The rotation radius of the aforementioned visual sensor is calculated, where d represents the second translation distance and k represents the calibration attitude angle. The device first calculates the rotation radius, and then calculates the first translation distance based on the rotation radius, thus accurately calculating the first translation distance.
[0079] In the specific implementation process, the translation matrix T in the first rotation and translation matrix calculated in the above steps AB The element value in is the second translation distance, which is the translation distance of the camera or vision sensor corresponding to the calibration attitude angle. In this way, the rotation radius can be calculated. Since the rotation radius is the same under the calibration attitude angle and the measured attitude angle, the first translation distance corresponding to the measured attitude angle can be calculated by the rotation radius r and the measured attitude angle k1.
[0080] To calculate the components of the first translation distance along each coordinate axis, the aforementioned visual sensor coordinate system is represented by o-xyz. The fifth calculation module includes a mapping submodule, a first calculation submodule, a second calculation submodule, and a third calculation submodule. The mapping submodule maps the first translation distance to the xoy plane in the visual sensor coordinate system to obtain the first mapped distance. The first calculation submodule calculates the distance from the first mapped distance to the x-axis to obtain the y-axis component of the first translation distance in the visual sensor coordinate system. The second calculation submodule calculates the distance from the first mapped distance to the y-axis to obtain the x-axis component of the first translation distance in the visual sensor coordinate system. The third calculation submodule calculates the distance from the first mapped distance to the z-axis to obtain the z-axis component of the first translation distance in the visual sensor coordinate system. This allows for accurate calculation of the components of the first translation distance along each coordinate axis.
[0081] Specifically, in the above coordinate system, according to the mapping relationship, by mapping the first translation distance to the plane of each coordinate axis to calculate the components of the first translation distance on each coordinate axis, the components of the first translation distance on each coordinate axis can be accurately calculated.
[0082] In some optional implementations, the control unit includes a sixth computing module, a second centralization module, a seventh computing module, and an eighth computing module, wherein the sixth computing module is used to calculate using formulas. Calculate the first center coordinates of the first coordinate point set and the third center coordinates of the third coordinate point set, where μ... A The above represents the first center coordinates, and the above μ C Let N represent the coordinates of the third center, and let N represent the number of points in the first and third coordinate sets. This represents the i-th first coordinate in the aforementioned set of first coordinate points. This represents the i-th third coordinate in the aforementioned set of third coordinate points; the second centralization module is used to... (The sentence is incomplete and requires more context to translate accurately.) The first and third coordinate point sets mentioned above are re-centered, where, This represents the set of the first coordinate points after re-centering. This represents the set of the third coordinate points after re-centering; the seventh calculation module is used to calculate using the formula... Calculate the second covariance matrix between the first set of coordinate points after recentering and the third set of coordinate points after recentering, where H represents the second covariance matrix; the eighth calculation module is used to calculate using the formula Perform singular value decomposition on the second covariance matrix mentioned above, and then... The second rotation matrix is calculated, and then... The second translation matrix is calculated to be based on The second rotation and translation matrix is obtained, where SVD represents the singular value decomposition operation, U represents the left singular vector obtained after performing the singular value decomposition operation on the second covariance matrix, S represents the singular value obtained after performing the singular value decomposition operation on the second covariance matrix, V represents the right singular vector obtained after performing the singular value decomposition operation on the second covariance matrix, and R... Ac Let T represent the second rotation matrix mentioned above. Ac This represents the second translation matrix. The device calculates the second rotation and translation matrix through the above steps, thus obtaining the initial coordinate transformation relationship between the vision sensor and the welding torch.
[0083] In the specific implementation process, the calculation device is the same as that for the first rotation and translation matrix. The second rotation and translation matrix calculates the transformation relationship between the target position, such as the weld seam, in the visual sensor coordinate system and the welding torch coordinate system, that is, the coordinate transformation relationship corresponding to the calibration attitude angle. First, centering is performed, that is, the first center coordinates of the first coordinate point set and the second center coordinates of the second coordinate point set are calculated. Then, the point sets are re-centered, that is, the first coordinate point set and the second coordinate point set are re-centered to generate a new point set. The covariance matrix H between the point sets is calculated. The U, S, and V of the matrix are obtained through the SVD (Singular Value Decomposition) device. The rotation matrix and translation matrix between the point sets are calculated, thus forming the first rotation and translation matrix. .
[0084] To accurately calculate the corrected rotation and translation matrix, the control unit also includes a correction module, used to calculate the formula... The modified rotation and translation matrix is obtained by correcting the second rotation and translation matrix, where B represents the homogeneous coordinate vector of any point A in the aforementioned vision sensor coordinate system after the modified coordinate transformation, and A represents any point in the aforementioned vision sensor coordinate system. Let r represent the second rotation-translation matrix mentioned above, and let r represent the rotation radius of the aforementioned visual sensor. This represents the angle between the first translation distance and the x-axis of the aforementioned visual sensor coordinate system. This represents the angle between the aforementioned first translation distance and the displacement direction of the y-axis of the aforementioned visual sensor coordinate system. The first translation distance is represented by the displacement direction angle relative to the z-axis of the visual sensor coordinate system, k represents the calibration attitude angle, and k1 represents the measurement attitude angle. This device corrects the rotation and translation matrix based on the displacement direction angle, thus making the welding torch position more accurate.
[0085] In the specific implementation, given a point A(x,y,z) in the camera coordinate system, the second rotation and translation matrix RT CH Given the calibrated attitude value k and the measured attitude value k1 of the attitude sensor, the coordinates of this point in the welding torch coordinate system are: That is, by taking any point A in the vision sensor coordinate system and performing a coordinate transformation, the corresponding homogeneous coordinate vector B in the welding torch coordinate system can correct the error of the measured attitude angle.
[0086] The control device for the robot includes a processor and a memory. The acquisition unit, calculation unit, and control unit are all stored as program units in the memory, and the processor executes these program units to achieve the corresponding functions. All of the above modules reside in the same processor; alternatively, the modules may be located in different processors in any combination.
[0087] The processor contains a kernel, which retrieves the corresponding program unit from memory. One or more kernels can be configured; adjusting kernel parameters can address inaccuracies in hand-eye calibration algorithms.
[0088] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0089] This invention provides a computer-readable storage medium including a stored program, wherein the program, when running, controls the device containing the computer-readable storage medium to execute the robot control method.
[0090] Specifically, the robot control methods include:
[0091] Step S201: Obtain the calibration attitude angle and the measured attitude angle of the robot, and obtain the first set of coordinate points corresponding to the calibration attitude angle in the visual sensor coordinate system, the second set of coordinate points corresponding to the measured attitude angle in the visual sensor coordinate system, and the third set of coordinate points in the welding torch coordinate system. The calibration attitude angle represents the angle between the line connecting the current position of the visual sensor and the welding torch and the line connecting the desired position of the visual sensor and the welding torch. The measured attitude angle represents the angle between the line connecting the current position of the visual sensor and the welding torch and the line connecting the actual position of the visual sensor and the welding torch. The target position represents the position where the robot controls the welding torch to perform welding operations. The visual sensor coordinate system is a coordinate system established with the visual sensor as the center, and the welding torch coordinate system is a coordinate system established with the welding torch as the center.
[0092] Specifically, the method described in this application is applied to a crawling robot. For the crawling robot, the coordinate system of the robotic arm base corresponds to the base of the crawler. Since the pose relationship before and after calibration is not stable, changes in the pose of the crawler body will greatly affect the calibration accuracy. Therefore, it is necessary to perform joint calibration based on the robot's calibrated attitude angle and the measured attitude angle, combined with a hand-eye calibration algorithm. In hand-eye calibration, the "hand" is equivalent to the welding torch mentioned above, and the "eye" is equivalent to the vision sensor or camera mentioned above. The calibrated attitude angle is the angle corresponding to the position that the robotic arm, i.e., the welding torch, is expected to reach. However, the actual position may not be precisely reached, and the actual attitude angle may not be exactly the same as the calibrated attitude angle, usually with a slight error. The target position can be a weld seam, etc. The first set of coordinate points is the set of coordinate points of the target position under the vision sensor coordinate system at the calibrated attitude angle; the second set of coordinate points is the set of coordinate points of the target position under the vision sensor coordinate system at the measured attitude angle; and the third set of coordinate points is the set of coordinate points of the target position in the welding torch coordinate system. Each point in the first set of coordinate points corresponds to a point in the third set of coordinate points. Similarly, each point in the second set of coordinate points also corresponds to a point in the third set of coordinate points. In other words, each point in the first set of coordinate points, the second set of coordinate points, and the third set of coordinate points corresponds one-to-one. Each of the above point sets usually takes more than three points, that is, it includes at least three coordinate points.
[0093] Step S202: Calculate a first rotation and translation matrix based on the first set of coordinate points and the second set of coordinate points, and calculate the displacement direction angle of the visual sensor based on the first rotation and translation matrix. The first rotation and translation matrix is a matrix that is transferred from the first coordinate to the second coordinate in the visual sensor coordinate system, and the displacement direction angle represents the angle of the visual sensor in the displacement direction.
[0094] Specifically, to correct the error between the calibrated attitude angle and the measured attitude angle, a first rotation and translation matrix is calculated based on the first and second coordinate point sets. The displacement direction angle of the vision sensor is then calculated based on this first rotation and translation matrix. This allows for error correction using the calibrated and measured attitude angles, resulting in a more accurate welding torch position. While the change in position from the calibrated attitude angle to the measured attitude angle is actually in radians, the change is minimal during the actual calculation. Therefore, it is assumed that the displacement direction angle remains consistent, resulting only in translational motion; that is, the camera or vision sensor slides along the same axis.
[0095] Step S203: Calculate the second rotation and translation matrix based on the first coordinate point set and the third coordinate point set. Correct the second rotation and translation matrix based on the calibration attitude angle, the measured attitude angle, and the displacement direction angle to obtain the corrected rotation and translation matrix. Control the robot to perform welding operations according to the corrected rotation and translation matrix. The second rotation and translation matrix is a matrix that transfers the coordinates of the target position from the vision sensor coordinate system to the welding gun coordinate system.
[0096] Specifically, the second rotation and translation matrix converts the coordinates of the target position in the vision sensor coordinate system to the coordinates in the welding torch coordinate system. The calibrated attitude angle corresponds to the position that the welding torch is expected to reach. Therefore, by calculating the second rotation and translation matrix using the first and third coordinate point sets of the calibrated attitude angle, the initial rotation and translation matrix, i.e., the second rotation and translation matrix, can be obtained. Then, the initial rotation and translation matrix is corrected based on the calibrated attitude angle, the measured attitude angle, and the displacement direction angle to obtain the corrected rotation and translation matrix. In this way, the error caused by the robot originally operating according to the second rotation and translation matrix, i.e., the initial rotation and translation matrix, can be corrected, allowing the robot to directly perform coordinate transformation and welding operations according to the corrected rotation and translation matrix.
[0097] This invention provides a device including a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs at least the following steps:
[0098] Step S201: Obtain the calibration attitude angle and the measured attitude angle of the robot, and obtain the first set of coordinate points corresponding to the calibration attitude angle in the visual sensor coordinate system, the second set of coordinate points corresponding to the measured attitude angle in the visual sensor coordinate system, and the third set of coordinate points in the welding torch coordinate system. The calibration attitude angle represents the angle between the line connecting the current position of the visual sensor and the welding torch and the line connecting the desired position of the visual sensor and the welding torch. The measured attitude angle represents the angle between the line connecting the current position of the visual sensor and the welding torch and the line connecting the actual position of the visual sensor and the welding torch. The target position represents the position where the robot controls the welding torch to perform welding operations. The visual sensor coordinate system is a coordinate system established with the visual sensor as the center, and the welding torch coordinate system is a coordinate system established with the welding torch as the center.
[0099] Step S202: Calculate a first rotation and translation matrix based on the first set of coordinate points and the second set of coordinate points, and calculate the displacement direction angle of the visual sensor based on the first rotation and translation matrix. The first rotation and translation matrix is a matrix that is transferred from the first coordinate to the second coordinate in the visual sensor coordinate system, and the displacement direction angle represents the angle of the visual sensor in the displacement direction.
[0100] Step S203: Calculate the second rotation and translation matrix based on the first coordinate point set and the third coordinate point set. Correct the second rotation and translation matrix based on the calibration attitude angle, the measured attitude angle, and the displacement direction angle to obtain the corrected rotation and translation matrix. Control the robot to perform welding operations according to the corrected rotation and translation matrix. The second rotation and translation matrix is a matrix that transfers the coordinates of the target position from the vision sensor coordinate system to the welding gun coordinate system.
[0101] The devices mentioned in this article can be servers, PCs, tablets, mobile phones, etc.
[0102] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having at least the following method steps:
[0103] Step S201: Obtain the calibration attitude angle and the measured attitude angle of the robot, and obtain the first set of coordinate points corresponding to the calibration attitude angle in the visual sensor coordinate system, the second set of coordinate points corresponding to the measured attitude angle in the visual sensor coordinate system, and the third set of coordinate points in the welding torch coordinate system. The calibration attitude angle represents the angle between the line connecting the current position of the visual sensor and the welding torch and the line connecting the desired position of the visual sensor and the welding torch. The measured attitude angle represents the angle between the line connecting the current position of the visual sensor and the welding torch and the line connecting the actual position of the visual sensor and the welding torch. The target position represents the position where the robot controls the welding torch to perform welding operations. The visual sensor coordinate system is a coordinate system established with the visual sensor as the center, and the welding torch coordinate system is a coordinate system established with the welding torch as the center.
[0104] Step S202: Calculate a first rotation and translation matrix based on the first set of coordinate points and the second set of coordinate points, and calculate the displacement direction angle of the visual sensor based on the first rotation and translation matrix. The first rotation and translation matrix is a matrix that is transferred from the first coordinate to the second coordinate in the visual sensor coordinate system, and the displacement direction angle represents the angle of the visual sensor in the displacement direction.
[0105] Step S203: Calculate the second rotation and translation matrix based on the first coordinate point set and the third coordinate point set. Correct the second rotation and translation matrix based on the calibration attitude angle, the measured attitude angle, and the displacement direction angle to obtain the corrected rotation and translation matrix. Control the robot to perform welding operations according to the corrected rotation and translation matrix. The second rotation and translation matrix is a matrix that transfers the coordinates of the target position from the vision sensor coordinate system to the welding gun coordinate system.
[0106] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0107] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0108] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0109] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0110] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0111] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0112] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0113] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0114] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0115] As can be seen from the above description, the embodiments of this application achieve the following technical effects:
[0116] 1) In the robot control method of this application, the calibration posture angle and the measured posture angle of the robot are obtained, and the first set of coordinate points corresponding to the calibration posture angle of the target position in the visual sensor coordinate system, the second set of coordinate points corresponding to the measured posture angle of the target position in the visual sensor coordinate system, and the third set of coordinate points of the target position in the welding torch coordinate system are obtained. A first rotation and translation matrix is calculated based on the first and second coordinate point sets, and the displacement direction angle of the visual sensor is calculated based on the first rotation and translation matrix. A second rotation and translation matrix is calculated based on the first and third coordinate point sets. The second rotation and translation matrix is corrected based on the calibration posture angle, the measured posture angle, and the displacement direction angle to obtain a corrected rotation and translation matrix. In this way, the inaccuracy of the calibration algorithm caused by the instability of the robot's pose can be corrected by the second rotation and translation matrix. Compared with the existing technology that directly uses the calibration posture angle for coordinate transformation, this application corrects the influence of posture deviation on the calibration position. Therefore, it can solve the problem of inaccuracy of the hand-eye calibration algorithm caused by the instability of the robot's pose in the existing technology, and achieve the purpose of accurate hand-eye calibration.
[0117] 2) In the robot control device of this application, the calibration posture angle and the measured posture angle of the robot are obtained, and the first set of coordinate points corresponding to the calibration posture angle of the target position in the visual sensor coordinate system, the second set of coordinate points corresponding to the measured posture angle of the target position in the visual sensor coordinate system, and the third set of coordinate points of the target position in the welding torch coordinate system are obtained. A first rotation and translation matrix is calculated based on the first and second coordinate point sets, and the displacement direction angle of the visual sensor is calculated based on the first rotation and translation matrix. A second rotation and translation matrix is calculated based on the first and third coordinate point sets. The second rotation and translation matrix is corrected based on the calibration posture angle, the measured posture angle, and the displacement direction angle to obtain a corrected rotation and translation matrix. In this way, the inaccuracy of the calibration algorithm caused by the instability of the robot's posture can be corrected by the second rotation and translation matrix. Compared with the prior art, which directly uses the calibration posture angle for coordinate transformation, this application corrects the influence of posture deviation on the calibration position. Therefore, it can solve the problem of inaccurate hand-eye calibration algorithm caused by the instability of robot posture in the prior art, and achieve the purpose of accurate hand-eye calibration.
[0118] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for controlling a robot, characterized in that, The robot includes at least a vision sensor and a welding torch, including: The calibration attitude angle and the measured attitude angle of the robot are obtained, and the first set of coordinate points corresponding to the calibration attitude angle of the target position in the visual sensor coordinate system, the second set of coordinate points corresponding to the measured attitude angle of the target position in the visual sensor coordinate system, and the third set of coordinate points of the target position in the welding torch coordinate system are obtained. The calibration attitude angle represents the angle between the line connecting the optical center position of the visual sensor and the tool center position of the welding torch in the current working posture of the robot, and the line connecting the desired calibration position of the optical center of the visual sensor and the desired calibration position of the tool center point of the welding torch, preset during the calibration phase. The measured attitude angle represents the angle between the line connecting the optical center position of the visual sensor and the tool center position of the welding torch in the current working posture of the robot, and the line connecting the actual working position of the optical center of the visual sensor and the actual working position of the tool center point of the welding torch during the actual welding operation of the robot. The target position represents the position where the robot controls the welding torch to perform the welding operation. The visual sensor coordinate system is a coordinate system established with the visual sensor as the center, and the welding torch coordinate system is a coordinate system established with the welding torch as the center. A first rotation and translation matrix is calculated based on the first set of coordinate points and the second set of coordinate points, and the displacement direction angle of the visual sensor is calculated based on the first rotation and translation matrix. The first rotation and translation matrix is a matrix that transfers from the first set of coordinate points to the second set of coordinate points in the visual sensor coordinate system, and the displacement direction angle represents the angle of the visual sensor in the displacement direction. A second rotation and translation matrix is calculated based on the first set of coordinate points and the third set of coordinate points. The second rotation and translation matrix is then corrected based on the calibration attitude angle, the measured attitude angle, and the displacement direction angle to obtain a corrected rotation and translation matrix. The robot is then controlled to perform welding operations according to the corrected rotation and translation matrix. The second rotation and translation matrix is a matrix that transfers the coordinates of the target position from the vision sensor coordinate system to the welding torch coordinate system.
2. The control method according to claim 1, characterized in that, The first rotation and translation matrix is calculated based on the first set of coordinate points and the second set of coordinate points, including: Through formula Calculate the first center coordinates of the first set of coordinate points and the second center coordinates of the second set of coordinate points, where μ A Represents the first center coordinate, μ B Let N represent the coordinates of the second center point, and let N represent the number of points in the first and second coordinate point sets. This represents the i-th first coordinate in the first set of coordinate points. This represents the i-th second coordinate in the set of second coordinate points; Through formula The first set of coordinate points and the second set of coordinate points are re-centered, wherein, This represents the first set of coordinate points after re-centering. This represents the second set of coordinate points after re-centering; Through formula Calculate the first covariance matrix between the first set of coordinate points after recentering and the second set of coordinate points after recentering, where H represents the first covariance matrix; Through formula Perform singular value decomposition on the first covariance matrix, and then... The first rotation matrix is calculated, and then... The first translation matrix is calculated to be based on The first rotation and translation matrix is obtained, where SVD represents singular value decomposition, U represents the left singular vector obtained after performing singular value decomposition on the first covariance matrix, S represents the singular value obtained after performing singular value decomposition on the first covariance matrix, V represents the right singular vector obtained after performing singular value decomposition on the first covariance matrix, and R... AB Let T represent the first rotation matrix. AB Let represent the first translation matrix.
3. The control method according to claim 2, characterized in that, Calculating the displacement direction angle of the visual sensor based on the first rotation and translation matrix includes: Through formula Calculate the first translation distance corresponding to the measured attitude angle, where d1 represents the first translation distance, k1 represents the measured attitude angle, and r represents the rotation radius of the vision sensor; The components of the first translation distance on each coordinate axis in the visual sensor coordinate system are determined, and then expressed using the formula... Calculate the displacement direction angle, where, This represents the absolute value of the first translation distance. This represents the x-axis component of the first translation distance in the visual sensor coordinate system. This represents the y-axis component of the first translation distance in the visual sensor coordinate system. This represents the z-axis component of the first translation distance in the visual sensor coordinate system. This represents the angle between the first translation distance and the x-axis of the visual sensor coordinate system. This represents the angle between the first translation distance and the displacement direction of the y-axis of the visual sensor coordinate system. This represents the displacement direction angle between the first translation distance and the z-axis of the visual sensor coordinate system.
4. The control method according to claim 3, characterized in that, Before calculating the first translation distance corresponding to the measured attitude angle, the method further includes: The magnitude of the translation vector corresponding to the first translation matrix in the first rotation and translation matrix is determined as the second translation distance between the coordinate points in the first coordinate point set and the corresponding coordinate points in the second coordinate point set. Through formula Calculate the rotation radius of the vision sensor, where d represents the second translation distance and k represents the calibration attitude angle.
5. The control method according to claim 3, characterized in that, The visual sensor coordinate system is represented by o-xyz. Determining the components of the first translation distance along each coordinate axis in the visual sensor coordinate system includes: The first translation distance is mapped onto the xoy plane in the visual sensor coordinate system to obtain the first mapping distance; Calculate the distance from the first mapping distance to the x-axis to obtain the y-axis component of the first translation distance in the visual sensor coordinate system; Calculate the distance from the first mapping distance to the y-axis to obtain the x-axis component of the first translation distance in the visual sensor coordinate system; Calculate the distance from the first mapping distance to the z-axis to obtain the z-axis component of the first translation distance in the visual sensor coordinate system.
6. The control method according to claim 1, characterized in that, The second rotation and translation matrix is calculated based on the first set of coordinate points and the third set of coordinate points, including: Through formula Calculate the first center coordinates of the first set of coordinate points and the third center coordinates of the third set of coordinate points, where μ A Represents the first center coordinate, μ C Let N represent the coordinates of the third center point, and let N represent the number of points in the first and third coordinate point sets. This represents the i-th first coordinate in the first set of coordinate points. This represents the i-th third coordinate in the set of third coordinate points; Through formula The first set of coordinate points and the third set of coordinate points are re-centered, wherein, This represents the first set of coordinate points after re-centering. This represents the third set of coordinate points after re-centering; Through formula Calculate the second covariance matrix between the first set of coordinate points after recentering and the third set of coordinate points after recentering, where H represents the second covariance matrix; Through formula Singular value decomposition is performed on the second covariance matrix, and then... The second rotation matrix is calculated, and then... The second translation matrix is calculated to be based on The second rotation and translation matrix is obtained, where SVD represents the singular value decomposition operation, U represents the left singular vector obtained after performing singular value decomposition on the second covariance matrix, S represents the singular value obtained after performing singular value decomposition on the second covariance matrix, V represents the right singular vector obtained after performing singular value decomposition on the second covariance matrix, and R... Ac Let T represent the second rotation matrix. Ac This represents the second translation matrix.
7. The control method according to claim 6, characterized in that, The second rotation-translation matrix is corrected based on the calibrated attitude angle, the measured attitude angle, and the displacement direction angle to obtain the corrected rotation-translation matrix, including: According to the formula The second rotation and translation matrix is corrected to obtain the corrected rotation and translation matrix, where B represents the homogeneous coordinate vector of any point A in the vision sensor coordinate system after the corrected coordinate transformation in the welding torch coordinate system, and A represents any point in the vision sensor coordinate system. Let r represent the second rotation-translation matrix, and r represent the rotation radius of the vision sensor. This represents the angle between the first translation distance and the x-axis of the visual sensor coordinate system. This represents the angle between the first translation distance and the displacement direction of the y-axis of the visual sensor coordinate system. The first translation distance represents the displacement direction angle between the first translation distance and the z-axis of the visual sensor coordinate system, k represents the calibration attitude angle, and k1 represents the measurement attitude angle.
8. A control device for a robot, characterized in that, The robot includes at least a vision sensor and a welding torch, including: The acquisition unit is used to acquire the calibration attitude angle and the measured attitude angle of the robot, and to acquire the first set of coordinate points corresponding to the calibration attitude angle in the visual sensor coordinate system, the second set of coordinate points corresponding to the measured attitude angle in the visual sensor coordinate system, and the third set of coordinate points corresponding to the target position in the welding torch coordinate system. The calibration attitude angle represents the line connecting the optical center position of the visual sensor and the tool center position of the welding torch in the robot's current working pose, and the line connecting the optical center position of the visual sensor and the tool center position of the welding torch, preset during the calibration phase. The angle between the lines connecting the expected calibration positions is defined as follows: the measured attitude angle represents the angle between the line connecting the optical center position of the vision sensor and the tool center position of the welding torch under the current working posture of the robot, and the line connecting the actual working position of the optical center of the vision sensor and the actual working position of the tool center position of the welding torch during the actual welding operation of the robot; the target position represents the position where the robot controls the welding torch to perform the welding operation; the vision sensor coordinate system is a coordinate system established with the vision sensor as the center; and the welding torch coordinate system is a coordinate system established with the welding torch as the center. The calculation unit is used to calculate a first rotation and translation matrix based on the first set of coordinate points and the second set of coordinate points, and to calculate the displacement direction angle of the vision sensor based on the first rotation and translation matrix. The first rotation and translation matrix is a matrix that transfers from the first set of coordinate points to the second set of coordinate points in the vision sensor coordinate system, and the displacement direction angle represents the angle of the vision sensor in the displacement direction. The control unit is configured to calculate a second rotation and translation matrix based on the first set of coordinate points and the third set of coordinate points, correct the second rotation and translation matrix based on the calibration attitude angle, the measured attitude angle and the displacement direction angle to obtain a corrected rotation and translation matrix, and control the robot to perform welding operations according to the corrected rotation and translation matrix. The second rotation and translation matrix is a matrix that transfers the coordinates of the target position from the vision sensor coordinate system to the welding gun coordinate system.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform the control method according to any one of claims 1 to 7.
10. An electronic device, characterized in that, include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including a control method for performing any one of claims 1 to 7.
Citation Information
Patent Citations
Welding seam three-dimensional reconstruction method and device, equipment and storage medium
CN111489436A