Robot control method, device, storage medium and electronic equipment
By combining a vision camera and an adjustable device with a clamping structure, the robot can achieve rapid and high-precision automatic recovery of its zero position. This solves the problems of reduced accuracy and complex recovery process after zero position loss, thereby improving production efficiency and operational continuity.
Patent Information
- Application Number
- CN202610689766.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-18
- Publication Date
- 2026-07-10
Smart Images

Figure CN122353598A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robot control, and more specifically, to a robot control method, apparatus, storage medium, and electronic device. Background Technology
[0002] In the field of modern industrial automation, the widespread use of robots has greatly improved production efficiency and operational accuracy. However, after prolonged operation or exposure to external forces, the joint zero position of a robot may shift, preventing it from accurately returning to its predetermined starting position or work point, severely impacting its performance. Existing robot zero-position recovery methods, such as those relying on hardware sensor calibration or readjustment by disassembling the end effector, are not only complex and time-consuming but also prone to introducing new errors. Especially after workpiece movement, the robot needs to reposition its work point, a process that often requires complex coordinate transformation calculations or reprogramming, significantly reducing production flexibility and efficiency.
[0003] In related technologies, the reduction in accuracy and the complexity of the recovery process after a robot loses its zero position have become pressing problems that need to be solved. Zero-position offset can lead to cumulative errors when the robot performs precision operations, affecting the processing quality and stability of the product. The complex recovery process not only requires operation by specialized technicians but may also fail to achieve the expected accuracy due to mechanical repositioning errors caused by disassembly and assembly. Furthermore, the movement of workpieces on the production line requires the robot to quickly adapt to environmental changes and reposition its work points, but existing technologies often fall short of this requirement, limiting the application of robotic automation systems in dynamic working environments.
[0004] There is currently no effective solution to the above problems. Summary of the Invention
[0005] This invention provides a robot control method, device, storage medium, and electronic device to at least solve the technical problems of reduced accuracy and complex recovery process after robot zero position loss in related technologies.
[0006] According to one aspect of the present invention, a robot control method is provided, comprising: acquiring a reference pose record of a vision camera on a robot, wherein the reference pose record includes reference coordinate values of the vision camera in a vision calibration board coordinate system and a reference spatial pose of the vision camera in a base coordinate system, the reference coordinate values and the reference spatial pose being obtained based on the robot's factory calibration pose information, the vision camera being connected to the robot's end effector via a clamping structure and an adjustable device, the clamping structure being used to fix the adjustable device to the end effector, and the adjustable device being used to adjust the position of the vision camera in a horizontal and vertical direction; acquiring a current pose record of the vision camera, wherein the current pose record includes the current coordinate values of the vision camera in the vision calibration board coordinate system and the current spatial pose of the vision camera in the base coordinate system; if the error between the reference pose record and the current pose record is greater than a first error threshold, controlling the robot to move in a direction that reduces the error until the error is less than or equal to a second error threshold, wherein the second error threshold is less than or equal to the first error threshold; and if the error is less than or equal to the second error threshold, resetting the robot's zero position based on the reference spatial pose.
[0007] According to another aspect of the present invention, a robot control device is also provided, comprising: a vision camera for acquiring image information and identifying the position of a vision calibration plate, wherein the vision calibration plate is fixed to a workpiece and serves as a reference for acquiring the image information and establishing a vision calibration plate coordinate system; an adjustable device for adjusting the position of the vision camera in the horizontal and vertical directions; and a clamping structure for fixing the adjustable device to the end effector of the robot.
[0008] According to another aspect of the present invention, a robot control device is also provided, comprising: a reference pose recording acquisition module, configured to acquire a reference pose record of a vision camera on a robot, wherein the reference pose record includes reference coordinate values of the vision camera in the vision calibration plate coordinate system, and a reference spatial pose of the vision camera in the base coordinate system, the reference coordinate values and the reference spatial pose being obtained based on the robot's factory calibration pose information, the vision camera being connected to the robot's end effector via a clamping structure and an adjustable device, the clamping structure being used to fix the adjustable device to the end effector, and the adjustable device being used to adjust the position of the vision camera in the horizontal and vertical directions; The current pose recording acquisition module is used to acquire the current pose record of the vision camera, wherein the current pose record includes the current coordinate value of the vision camera in the vision calibration board coordinate system and the current spatial pose of the vision camera in the base coordinate system; the robot control module is used to control the robot to move in the direction of decreasing error when the error between the reference pose record and the current pose record is greater than a first error threshold, until the error is less than or equal to a second error threshold, wherein the second error threshold is less than or equal to the first error threshold; the zero position reset module is used to reset the robot's zero position based on the reference spatial pose when the error is less than or equal to the second error threshold.
[0009] According to another aspect of the present invention, a non-volatile storage medium is also provided, which stores a plurality of instructions adapted for a robot control method to be loaded by a processor and executed at any one of them.
[0010] According to another aspect of the present invention, an electronic device is also provided, including one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement any one of the robot control methods.
[0011] According to another aspect of the present invention, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps of any of the robot control methods.
[0012] In this embodiment of the invention, a reference pose record of the visual camera on the robot is obtained. This reference pose record includes the reference coordinate values of the visual camera in the visual calibration board coordinate system and the reference spatial pose of the visual camera in the base coordinate system. The reference coordinate values and reference spatial pose are obtained based on the robot's factory calibration pose information. The visual camera is connected to the robot's end effector via a clamping structure and an adjustable device. The clamping structure is used to fix the adjustable device to the end effector, and the adjustable device is used to adjust the position of the visual camera in the horizontal and vertical directions. The current pose record of the visual camera is also obtained. This current pose record includes the current coordinate values of the visual camera in the visual calibration board coordinate system and the current spatial pose of the visual camera in the base coordinate system. The reference pose record and the current pose record are then compared. If the error between the pose records is greater than the first error threshold, the robot is controlled to move in the direction of error reduction until the error is less than or equal to the second error threshold, wherein the second error threshold is less than or equal to the first error threshold. If the error is less than or equal to the second error threshold, the robot's zero position is reset based on the reference space pose. This achieves pose comparison and guidance in the visual calibration board coordinate system through the visual camera, combined with the clamping structure and adjustable device to fix the camera and accurately position it. This enables the robot's zero position to be quickly and accurately restored automatically without manual intervention or disassembly and assembly of the end effector. This achieves the technical effect of improving the robot's zero position restoration efficiency and operation continuity, and solves the technical problems of reduced accuracy and complex recovery process after the robot's zero position is lost in related technologies. Attached Figure Description
[0013] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0014] Figure 1 This is a schematic diagram of the structure of a robot control device according to an embodiment of the present invention;
[0015] Figure 2 This is a schematic diagram of an optional clamping structure and an adjustable slider according to an embodiment of the present invention;
[0016] Figure 3 This is a schematic diagram of an optional adjustable connecting rod and camera mounting plate structure according to an embodiment of the present invention;
[0017] Figure 4 This is a schematic diagram of an optional visual calibration plate structure according to an embodiment of the present invention;
[0018] Figure 5 This is a flowchart of a robot control method according to an embodiment of the present invention;
[0019] Figure 6 This is a schematic diagram of an optional zero-position recovery scenario according to an embodiment of the present invention;
[0020] Figure 7 This is a schematic diagram of an optional point restoration scenario according to an embodiment of the present invention;
[0021] Figure 8 This is an optional zero-position recovery flowchart according to an embodiment of the present invention;
[0022] Figure 9 This is an optional zero-position recovery flowchart according to an embodiment of the present invention;
[0023] Figure 10 This is a schematic diagram of a robot control device according to an embodiment of the present invention. Detailed Implementation
[0024] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0025] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0026] According to embodiments of the present invention, an apparatus embodiment for implementing the above-described robot control method is also provided. This robot control apparatus can be applied to the robot control method of any one of the above embodiments. Figure 1 This is a schematic diagram of the structure of a robot control device according to an embodiment of the present invention, such as... Figure 1 As shown, the aforementioned robot control device includes: a vision camera 10, an adjustable device 14, and a gripping structure 16, wherein,
[0027] The vision camera 10 is used to acquire image information and identify the position of the vision calibration plate. The vision calibration plate is fixed to the workpiece and is used as a reference for image information acquisition to establish the vision calibration plate coordinate system.
[0028] Adjustable device 14 is used to adjust the position of the vision camera in the horizontal and vertical directions;
[0029] The clamping structure 16 secures the adjustable device 14 to the robot's end effector.
[0030] The robot control device in this embodiment employs a clamping mechanical structure to firmly fix the robot's end effector, thereby avoiding reassembly errors that might result from disassembling the end effector. This mechanical structure enables precise restoration of the robot's zero position without disassembling the tooling, ensuring high precision and efficiency in the restoration process. Simultaneously, the application of a vision camera further enhances the tool's functionality. Through image acquisition and computer vision algorithms, the robot can identify and track the positions of the workpiece and calibration plate in the working environment in real time, achieving precise zero-position restoration and point adjustment.
[0031] The innovative design of this robot control device eliminates the need for the robot to return to the factory for zero-position restoration, significantly saving manpower and resources. Traditional robot zero-position restoration methods typically require sending the robot back to the factory for professional calibration and maintenance, a cumbersome and time-consuming process. However, with this device, the robot can quickly and accurately restore its zero position on-site through the combined action of vision and mechanical structure, without disassembling the end effector or performing complex reassemblies.
[0032] Combining the advantages of both vision and mechanics, the robot control equipment in this implementation can not only efficiently restore the zero position but also flexibly handle workpiece movement. By converting the robot's previous working point to the vision calibration plate coordinate system and fixing the vision calibration plate to the workpiece, the robot can still reposition itself in the calibration plate coordinate system using visual information after the workpiece has been displaced, thus restoring the workpiece's original position. This process allows the robot to quickly and accurately restore the working point without readjusting the program points, even when the workpiece has been moved, saving time spent on readjusting the program points.
[0033] It should be noted that the innovation of the device in this embodiment lies in its integration of the advantages of vision technology and mechanical structure. This not only reduces reliance on hardware sensors but also avoids error accumulation common in related technologies. The vision camera provides flexible environmental adaptability, while the mechanical structure ensures high-precision recovery operations. The combination of these two features enables the robot to maintain efficient and accurate positioning capabilities in dynamically changing working environments. Therefore, this robot control device not only promotes the development of robot zero-position recovery technology but also provides a practical solution for high-precision workpiece operation and rapid adjustment in real-world applications. Figure 1 As shown, it consists of two parts: a clamping adjustable mechanical connection structure and a vision camera. Mounted at the robot's end effector, it can quickly restore the robot's zero position and working position based on visual information using zero-position recovery algorithms and visual point-position recovery algorithms.
[0034] In one alternative embodiment, the adjustable device 14 includes: an adjustable slider 141 for adjusting the position of the vision camera in the horizontal direction; and an adjustable connecting rod 142 connected to the adjustable slider for adjusting the position of the vision camera in the vertical direction.
[0035] Optional, Figure 2 This is a schematic diagram of an optional clamping structure and an adjustable slider according to an embodiment of the present invention. This clamping structure allows the mechanism to be mounted to the end effector of the robot without disassembling the robot's end effector. The adjustable slider can be adjusted laterally to position the camera appropriately. Figure 3 This is a schematic diagram of an optional adjustable connecting rod and camera mounting plate structure according to an embodiment of the present invention. The adjustable connecting rod is mounted on an adjustable slider and its position can be adjusted longitudinally to allow the vision camera to be adjusted to a suitable position. The two rods can fully ensure the stability of the structure and avoid introducing errors during zero-position recovery and point-position recovery. The camera mounting plate is used to mount the camera.
[0036] Optional, Figure 4 This is a schematic diagram of an optional visual calibration plate structure according to an embodiment of the present invention. The camera acquires visual information and processes it through a visual algorithm to establish a coordinate system on the visual calibration plate. This coordinate system is only related to the visual information. Through the visual information, the camera can also identify the high-precision Cartesian pose of the camera in the calibration plate coordinate system.
[0037] According to an embodiment of the present invention, a method embodiment for robot control is provided. 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. Furthermore, 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.
[0038] Figure 5 This is a flowchart of a robot control method according to an embodiment of the present invention, such as... Figure 5 As shown, the method includes the following steps:
[0039] Step S102: Obtain the reference pose record of the vision camera on the robot. The reference pose record includes the reference coordinate value of the vision camera in the vision calibration plate coordinate system and the reference spatial pose of the vision camera in the base coordinate system. The reference coordinate value and the reference spatial pose are obtained based on the robot's factory calibration pose information. The vision camera is connected to the robot's end effector through a clamping structure and an adjustable device. The clamping structure is used to fix the adjustable device to the end effector. The adjustable device is used to adjust the position of the vision camera in the horizontal and vertical directions.
[0040] Optionally, the initial position and orientation of the vision camera are recorded during normal robot operation. The reference pose record includes the reference coordinates of the vision camera in the vision calibration board coordinate system and its reference spatial pose in the base coordinate system; this is the baseline data before the robot loses its zero position. This data is obtained through precise calibration based on the factory calibration pose information of the robot before its first loss of zero position, reflecting the precise relationship between the vision camera and the positions of each joint of the robot. The vision camera is connected to the robot's end effector via a clamping structure and an adjustable device. The clamping structure ensures a secure connection between the vision camera and the end effector, while the adjustable device allows the user to adjust the position of the vision camera without disassembling the end effector to obtain the optimal image acquisition angle.
[0041] Step S104: Obtain the current pose record of the visual camera, wherein the current pose record includes the current coordinate value of the visual camera in the visual calibration board coordinate system and the current spatial pose of the visual camera in the base coordinate system.
[0042] Optionally, the current pose record refers to the position and orientation of the vision camera after the robot may have drifted from its zero position due to maintenance, collision, or prolonged operation. This information also needs to be recorded in both the vision calibration board coordinate system and the robot's base coordinate system to compare with the reference pose record and assess the degree of robot zero-position loss. The current coordinate values and current spatial pose reflect the specific position and orientation of the vision camera relative to the vision calibration board and the robot base in its current state, serving as the basis for judging and correcting errors. A visual recognition algorithm can be used to calculate and update the real-time spatial pose of the vision camera in the base coordinate system based on the image information acquired by the vision camera, thus obtaining the current spatial pose of the vision camera in the base coordinate system.
[0043] Step S106: If the error between the reference pose record and the current pose record is greater than the first error threshold, control the robot to move in the direction of error reduction until the error is less than or equal to the second error threshold, wherein the second error threshold is less than or equal to the first error threshold.
[0044] Optionally, a control strategy can be implemented to adjust the robot's motion to restore it to a near-zero position based on the magnitude of the error between the reference pose and the current pose. When the error exceeds a preset first error threshold, the robot control system guides the robot to move along a path that reduces the error. This path planning is based on visual information and the robot's kinematics model, ensuring that the robot gradually reduces the gap with the initial set pose during movement. The second error threshold can be a smaller preset error value. When this threshold is reached or lowered, the robot can be considered to have recovered to a near-zero position, providing a basis for subsequent precise adjustments or operations.
[0045] In one optional embodiment, when the error includes position error and pose error, if the error between the reference pose record and the current pose record is greater than a first error threshold, the robot is controlled to move in the direction of decreasing error until the error is less than or equal to a second error threshold. This includes: acquiring the position error between the reference coordinate value and the current coordinate value, and the pose error between the reference spatial pose and the current spatial pose; if the position error is greater than the first position error threshold, the robot is controlled to move in the direction of decreasing position error until the position error is less than or equal to the second position error threshold, wherein the second position error threshold is less than or equal to the first position error threshold; if the pose error is greater than the first pose error threshold, the robot is controlled to move in the direction of decreasing position error until the pose error is less than or equal to the second pose error threshold, wherein the second pose error threshold is less than or equal to the first pose error threshold.
[0046] Optionally, firstly, the positional error between the reference coordinates and the current coordinates of the vision camera, and the pose error between the reference spatial pose and the current spatial pose, are calculated. The positional error reflects the translational deviation of the robot's end effector in space, while the pose error expresses the rotational error of the robot's end effector relative to its ideal position. When the positional error exceeds a set first positional error threshold, the control strategy guides the robot to perform translational motion to reduce the deviation between the current coordinates and the reference coordinates. This process involves adjusting the displacement of the robot's end effector in the X, Y, and Z axes until the positional error drops below a second positional error threshold, which sufficiently ensures the recovery of the robot's positional accuracy. Similarly, when the pose error exceeds a set first pose error threshold, the robot is controlled to perform rotational adjustments to reduce the deviation between the current spatial pose and the reference spatial pose. This includes adjusting the rotational angles of the robot's end effector around the X, Y, and Z axes until the pose error drops below the second pose error threshold, ensuring high-precision recovery of the robot's posture. Setting the second error threshold to be less than or equal to the first error threshold means that the error control process aims for finer adjustments until the error reaches a higher precision standard. This multi-stage error control strategy not only improves the accuracy of the recovery process but also ensures that the robot can operate stably and accurately in dynamic environments.
[0047] Through these methods, the robot can precisely control the position and posture errors of the vision camera, achieving high-precision zero-position recovery. This process not only improves the accuracy and efficiency of the robot's operations in automated production, but also significantly reduces the need for human intervention and recalibration, lowers maintenance costs, and enhances the adaptability and reliability of the robot system.
[0048] Optionally, before the robot loses its zero position, since the manufacturer has already performed factory calibration and its zero position is accurate, the coordinates of camera {C} in the vision calibration board coordinate system {W} at this moment are recorded. b Coordinates under} and the robot's spatial pose at this time This serves as the input parameter for subsequent zero-position recovery. Figure 6 This is a schematic diagram of an optional zero-position recovery scenario according to an embodiment of the present invention. In this case, the robot has lost its zero position due to maintenance or other reasons. Therefore, the coordinates of the camera {C} in the visual calibration board coordinate system {W} can still be obtained by taking a picture with the camera. b The coordinates below, i.e., the current coordinates. The desired outcome is that the camera adjusts its position based on the current coordinates. with reference coordinate values The error δ between the reference and current coordinates continuously guides the robot's movement until the error is reduced to a threshold range. The position and pose errors between the reference and current coordinates can be obtained, but are not limited to, through the following methods:
[0049] First, calculate ;
[0050] ;
[0051] When position error The first position error threshold is not met. Attitude error The set first attitude error threshold is not met. At that time, the visual guidance of the robotic arm's motion mode is triggered to reduce errors. until , All are less than the corresponding threshold.
[0052] Step S108: If the error is less than or equal to the second error threshold, reset the robot's zero position based on the reference space pose.
[0053] Optionally, when the robot moves to a position where the error between its position and the reference pose reaches or falls below a second error threshold, the robot will perform a zero-position reset operation. This step involves comparing the robot's actual joint positions with the factory-calibrated pose information, adjusting the robot's joint parameters to precisely align it with the reference spatial pose, thereby restoring the robot to its zero position. For example, based on the previously recorded robot reference spatial pose... Reset the robot to its zero position, thus aligning the robot's spatial pose in the actual robot controller. The robot's zero-position recovery is now complete. Resetting the zero position is a crucial step in ensuring the robot's accuracy and reliability in subsequent operations. This operation allows the robot to quickly and accurately return to its normal working state even in the event of a slight shift in its zero position, achieving efficient job recovery. This process avoids the inconvenience and errors associated with frequent disassembly and reassembly of the end effector in related technologies, improving the robot's adaptability and stability in automated production environments.
[0054] Through the above steps S102 to S108, the pose comparison and guidance of the visual camera in the coordinate system of the visual calibration plate can be achieved. Combined with the clamping structure and adjustable device to fix the camera and accurately position it, the robot's zero position can be quickly and automatically restored without manual intervention or disassembly and assembly of the end effector. This achieves the technical effect of improving the robot's zero position restoration efficiency and operation continuity, and solves the technical problems of reduced accuracy and complex restoration process after the robot loses its zero position in related technologies.
[0055] In an optional embodiment, the method further includes: acquiring a work point on the workpiece, an initial spatial pose of the work point in a base coordinate system, and an initial spatial pose of the vision calibration plate in the base coordinate system, wherein the vision calibration plate is fixed on the workpiece; obtaining an initial coordinate value of the work point in the vision calibration plate coordinate system based on the initial spatial pose of the work point in the base coordinate system and the initial spatial pose of the vision calibration plate in the base coordinate system; when the workpiece is detected to have moved to a specified position, obtaining a target spatial pose based on the adjusted spatial pose of the moved vision calibration plate in the base coordinate system and the initial coordinate value of the work point in the vision calibration plate coordinate system, wherein the target spatial pose is the adjusted spatial pose of the moved work point in the base coordinate system; and controlling the robot to move towards the target spatial pose.
[0056] Optionally, in the initial state, the robot needs to identify and store the spatial coordinate information of specific work points on the workpiece. The initial spatial pose of the work point in the base coordinate system includes the point's position information in three-dimensional space and its orientation information relative to the robot's base, which is key data for subsequent point recovery. The vision calibration board is fixed to the workpiece, and its initial spatial pose in the base coordinate system provides a stable reference frame for the vision camera to capture and process the work point information on the workpiece. By recognizing the vision calibration board through the vision camera, a vision calibration board coordinate system can be established, thereby enabling coordinate system transformation and work point localization. Based on the initial spatial pose of the work point in the base coordinate system and the initial spatial pose of the vision calibration board in the base coordinate system, a coordinate system transformation algorithm is used to transform the coordinate information of the work point from the base coordinate system to the vision calibration board coordinate system. The purpose of this is to ensure that the work point can still be located based on the vision calibration board after the workpiece moves, avoiding the tedious process of re-teaching the point. When the workpiece is detected to have been moved to the designated position, the position of the vision calibration board is re-identified using a vision camera, and the adjusted spatial pose of the vision calibration board in the base coordinate system is obtained. Combined with the previously stored initial coordinate values of the work point in the vision calibration board coordinate system, the target spatial pose of the work point in the base coordinate system is calculated through coordinate inverse transformation. This is a crucial step for the robot to restore the work point position after workpiece movement, ensuring that the robot can continue working in its correct position unaffected by workpiece movement. Finally, based on the calculated target spatial pose, the robot is guided to adjust the position and orientation of its end effector until the robot achieves precise alignment of the work point after movement. This process is achieved by controlling the robot to perform translation and rotation operations in Cartesian space until the robot reaches the target spatial pose, completing the position restoration and ensuring the continuity and accuracy requirements of the robot's operation.
[0057] The above steps not only solve the problem of robot zero-position recovery, but also provide a complete work point recovery solution. Even when the workpiece position is uncertain, the robot can still automatically identify and adjust to the correct work point, which greatly improves the flexibility and efficiency of automated production lines and reduces work interruptions and time waste caused by workpiece movement.
[0058] Optional, Figure 7 This is a schematic diagram of an optional point restoration scenario according to an embodiment of the present invention, such as... Figure 7 As shown {W b The calibration plate coordinate system is fixed on the workpiece. The robot's working point is P. A P B P C P D The initial spatial pose of the work point under the robot base (i.e., the base coordinate system) {B} is known and denoted as . The initial spatial pose of the visual calibration board under the base If the work point can be identified using a visual algorithm, then the initial coordinates of the work point in the visual calibration board coordinate system can be determined. This allows for the calculation and transformation of all calibration points into the vision calibration board coordinate system. The workpiece is moved to a designated position, and the moved vision calibration board is identified. The algorithm then identifies the adjusted spatial pose of the moved vision calibration board on the base. ,because If this is known, then the moved working point can be directly transferred to the base {B} to complete the point restoration.
[0059] In one optional embodiment, when the workpiece is detected to have moved to a designated position, the target spatial pose is obtained based on the adjusted spatial pose of the moved vision calibration board in the base coordinate system and the initial coordinate value of the work point in the vision calibration board coordinate system. This includes: when the workpiece is detected to have moved to a designated position, using a coordinate system transformation algorithm to determine the initial coordinate value of the work point in the vision calibration board coordinate system and the coordinate relationship between the initial coordinate value and the moved vision calibration board coordinate system; and based on the coordinate relationship, converting the initial spatial pose of the work point in the base coordinate system into the target spatial pose in the base coordinate system.
[0060] Optionally, firstly, it is detected whether the workpiece has moved to the designated new position. This detection can be based on the vision camera capturing the new position of the vision calibration board and monitoring the change in the workpiece's position in the base coordinate system before and after movement. After confirming the workpiece movement, a coordinate system transformation algorithm is used to determine the initial coordinate values of the work point in the vision calibration board coordinate system and the coordinate relationship between them and the new coordinate system in which the vision calibration board is located after the workpiece movement. This algorithm, based on robot kinematics and geometric transformation theory, can accurately calculate the transformation matrix or rotation and translation vector between the two coordinate systems, thereby establishing the connection between the work point in different coordinate systems. Based on the coordinate relationship determined above, the initial spatial pose of the work point in the base coordinate system is converted into the target spatial pose in the corresponding base coordinate system after the workpiece movement. In other words, through inverse coordinate system transformation, the position information of the work point in the vision calibration board coordinate system is mapped back to the base coordinate system, thereby obtaining the precise position and attitude information of the new work point that the robot needs to reach. This calculation ensures that the robot can accurately locate and adjust to the correct work point even after the workpiece position changes, without needing to reprogram or manually adjust the point information in the robot program.
[0061] By implementing the above steps, the robot can automatically calculate the target spatial pose of the work point in the new coordinate system after the workpiece has moved to a new position, and adjust its motion path accordingly to accurately restore the work point. This method not only significantly improves the flexibility and response speed of robot operations in automated factories, but also effectively avoids work interruptions caused by workpiece movement, improving production efficiency and work accuracy. Furthermore, since the entire process relies primarily on visual information and mathematical algorithms, rather than physical contact or human intervention, it also boasts high reliability and repeatability, making it suitable for various types of robot and workpiece positioning scenarios.
[0062] In one optional embodiment, controlling the robot to move toward the target spatial pose includes: calculating the pose error between the robot's current spatial pose and the target spatial pose; and, based on the pose error, controlling the robot to perform translation and rotation operations in Cartesian space until the robot reaches the target spatial pose.
[0063] Optionally, firstly, the pose error between the robot's current actual spatial pose and the calculated target spatial pose is calculated. This error includes the positional deviation (i.e., the difference in X, Y, Z coordinates) and attitude deviation (i.e., the difference in rotation angles around the X, Y, Z axes) between the current pose and the target pose. The pose error calculation is based on the robot's current sensor data and mathematical model, and can quantify the distance and angular differences between the robot and the target pose, providing a basis for the next pose adjustment. Based on the calculated pose error, the robot control system generates corresponding control commands to guide the robot to perform a series of translation and rotation operations in Cartesian space. Translation operations are used to adjust the robot's position in space, so that its X, Y, Z coordinates gradually approach the target spatial pose; rotation operations are used to adjust the robot's attitude, so that its rotation angles around the X, Y, Z axes gradually reach the requirements of the target pose. During this process, the robot control system continuously monitors the changes in pose error and adjusts the control strategy accordingly to ensure that the error continues to decrease until the robot reaches the target spatial pose. The entire control process continues until the pose error between the robot's current spatial pose and the target spatial pose is reduced to an acceptable range, i.e., meeting the preset error threshold. Once the pose error reaches this standard, the system will stop adjusting, considering that the robot has successfully returned to the work point and can continue to perform subsequent production operations. This process ensures that the robot's movements are both precise and efficient, avoiding the additional time and energy costs caused by over-adjustment.
[0064] By implementing the above control strategy, the robot can automatically adjust its pose to the new target work point after the workpiece position changes, without manual intervention or reprogramming, greatly improving the flexibility and intelligence of robot operations. This method based on pose error calculation and real-time control is not only suitable for restoring static work points, but also adaptable to workpiece movement in dynamic working environments, providing robots with an efficient and accurate means of restoring work points on automated production lines.
[0065] Based on the above embodiments and optional embodiments, the present invention proposes an optional implementation of a robot control method, which includes two parts: zero-point recovery and position recovery. This method can be applied to the robot control device in any of the foregoing embodiments, and includes:
[0066] Figure 8 This is an optional zero-position recovery flowchart according to an embodiment of the present invention, such as... Figure 8 As shown, the main process of the zero-position recovery scheme is as follows:
[0067] S11, Recording the robot's reference pose before losing its zero position: Before losing its zero position, the robot's zero position is accurate because it has already undergone factory calibration. At this point, record the coordinates of the camera {C} in the vision calibration board coordinate system {W}. b Reference coordinates under} and the robot's reference space pose at this time This serves as the input parameter for the subsequent zero-position recovery algorithm. The visual calibration board coordinate system and reference pose are as follows: Figure 6 As shown.
[0068] S12, Visual guidance of the robot's movement until the camera returns to the reference pose: If the robot has lost its zero position due to maintenance or other reasons, then taking a picture with the camera can still obtain the coordinates of the camera {C} in the visual calibration board coordinate system {W} at this time. b The coordinates below, i.e., the current coordinates. The desired outcome is that the camera adjusts its position based on the current coordinates. with reference coordinate values The error δ continuously guides the robot's movement until the error is reduced to a threshold range, where the error includes position error. and attitude error The specific process for obtaining position error and attitude error is the same as in the aforementioned embodiments, and will not be repeated here. When position error The set position error threshold is not met. Attitude error The set attitude error threshold is not met. At that time, the visual guidance of the robotic arm's motion mode is triggered to reduce errors. until , All are less than the threshold.
[0069] S13, Correct robot zero position: Based on the previously recorded robot reference space pose. Reset the robot to its zero position, thus aligning the robot's spatial pose in the actual robot controller. The robot has now completed its zero-position recovery.
[0070] Figure 9 This is an optional zero-position recovery flowchart according to an embodiment of the present invention. Position recovery refers to the point on a workpiece where the robot's working position is located, allowing the robot to complete its work trajectory. These points are usually stationary relative to the workpiece. Therefore, if we want to achieve the function of automatically restoring the working position after the workpiece moves so as to quickly resume the work program, a position recovery scheme is needed. For example... Figure 9 As shown, the specific process for point restoration is as follows:
[0071] S21, Fix the vision calibration plate on the workpiece, such as Figure 7 As shown {Wb The calibration plate coordinate system is fixed on the workpiece.
[0072] S22, transform the work point on the workpiece to the coordinate system of the vision calibration board, and the robot's work point is P. A P B P C P D The initial spatial pose of the work point under the robot base (i.e., the base coordinate system) {B} is known and denoted as . The initial spatial pose of the visual calibration board under the base If the work point can be identified using a visual algorithm, then the initial coordinates of the work point in the visual calibration board coordinate system can be determined. This allows us to calculate that all calibration points have been transformed into the visual calibration board coordinate system.
[0073] S23, move the workpiece and drive the robot to identify the calibration plate, that is, move the workpiece to the designated position and identify the moved visual calibration plate.
[0074] S24, calculate the pose of the vision calibration board relative to the robot to complete the point-to-point restoration. The adjusted spatial pose of the moved vision calibration board under the base is identified using a recognition algorithm. ,because If this is known, then the moved working point can be directly transferred to the base {B} to complete the point restoration.
[0075] It should be noted that the joint zero-position and working point accuracy of a six-axis robot were restored through actual operation, resulting in the joint zero-position restoration accuracy shown in Table 1 and the working point accuracy shown in Table 2. This embodiment's method is applicable to any robot with more than 6 degrees of freedom. Extensive experimental data has verified that the robot's zero-position restoration error can be controlled within approximately 0.01°. The posture points are described using fixed xyz angles, and extensive experimental data has verified that the robot's working point restoration accuracy is maintained within approximately 0.01mm. This demonstrates that the method of this embodiment can restore the robot's zero-position and working point with high precision. The device combines vision technology with a mechanical structure, employing a clamping mechanical structure to fix the robot's end effector, avoiding reassembly errors caused by disassembling the end effector and ensuring high-precision zero-position restoration and working point adjustment. The robot does not need to be returned to the factory for calibration and can quickly restore its zero position on-site, saving significant time and costs. Furthermore, the device, through vision technology and coordinate system transformation, can flexibly handle workpiece displacement, ensuring the robot can quickly restore its working point and avoiding reprogramming. The combination of vision technology and mechanical structure not only enhances the accuracy and reliability of the system, but also improves environmental adaptability, enabling the robot to maintain stable operation in dynamically changing working environments. At the same time, it simplifies the operation process, reduces human intervention, and improves production efficiency.
[0076] Table 1
[0077]
[0078] Table 2
[0079]
[0080] This embodiment also provides a robot control device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the terms "module" and "device" can refer to a combination of software and / or hardware that performs a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, hardware implementations, or a combination of software and hardware, are also possible and contemplated.
[0081] According to an embodiment of the present invention, an embodiment of an apparatus for implementing the above-described robot control method is also provided. Figure 10 This is a schematic diagram of the structure of a robot control device according to an embodiment of the present invention, such as... Figure 10 As shown, the above-mentioned robot control device includes: a reference pose recording and acquisition module 1000, a current pose recording and acquisition module 1002, a robot control module 1004, and a zero-position reset module 1006, wherein:
[0082] The reference pose recording acquisition module 1000 is used to acquire the reference pose record of the vision camera on the robot. The reference pose record includes the reference coordinate value of the vision camera in the vision calibration plate coordinate system and the reference spatial pose of the vision camera in the base coordinate system. The reference coordinate value and the reference spatial pose are obtained based on the robot's factory calibration pose information. The vision camera is connected to the robot's end effector through a clamping structure and an adjustable device. The clamping structure is used to fix the adjustable device to the end effector. The adjustable device is used to adjust the position of the vision camera in the horizontal and vertical directions.
[0083] The current pose recording acquisition module 1002 is connected to the reference pose recording acquisition module 1000 and is used to acquire the current pose record of the visual camera. The current pose record includes the current coordinate value of the visual camera in the visual calibration board coordinate system and the current spatial pose of the visual camera in the base coordinate system.
[0084] The robot control module 1004 is connected to the current pose record acquisition module 1002. It is used to control the robot to move in the direction of reducing error when the error between the reference pose record and the current pose record is greater than a first error threshold, until the error is less than or equal to a second error threshold, wherein the second error threshold is less than or equal to the first error threshold.
[0085] The zero-position reset module 1006 is connected to the current pose recording and acquisition module 1002 and is used to reset the robot's zero position based on the reference space pose when the error is less than or equal to the second error threshold.
[0086] It should be noted that the above modules can be implemented by software or hardware. For example, for the latter, it can be implemented in the following ways: the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0087] It should be noted that the aforementioned reference pose recording acquisition module 1000, current pose recording acquisition module 1002, robot control module 1004, and zero-position reset module 1006 correspond to steps S102 to S108 in the embodiments. The instances and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in the above embodiments. It should be noted that the above modules, as part of the device, can run on a computer terminal.
[0088] It should be noted that the optional or preferred implementation methods of this embodiment can be found in the relevant descriptions in the embodiments, and will not be repeated here.
[0089] The robot control device described above may also include a processor and a memory. The reference pose recording and acquisition module 1000, the current pose recording and acquisition module 1002, the robot control module 1004, the zero position reset module 1006, etc. are all stored in the memory as program modules. The processor executes the program modules stored in the memory to realize the corresponding functions.
[0090] The processor contains a core that retrieves the corresponding program modules from memory. One or more cores may be configured. Memory may include non-persistent 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. Memory includes at least one memory chip.
[0091] According to an embodiment of this application, an embodiment of a non-volatile storage medium is also provided. Optionally, in this embodiment, the non-volatile storage medium includes a stored program, wherein, when the program is running, it controls the device where the non-volatile storage medium is located to execute any of the robot control methods described above.
[0092] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals, and the non-volatile storage medium includes stored programs.
[0093] Optionally, a program that controls the device containing the non-volatile storage medium to execute any of the robot control method steps described above during program execution.
[0094] According to an embodiment of this application, an embodiment of a processor is also provided. Optionally, in this embodiment, the processor is used to run a program, wherein the program executes any of the robot control methods described above.
[0095] According to an embodiment of this application, an embodiment of a computer program product is also provided, which, when executed on a data processing device, is adapted to execute a program that initializes the robot control method steps described above.
[0096] This invention provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements the robot control method steps described above.
[0097] The order of the above embodiments of the present invention is merely for description and does not represent the superiority or inferiority of the embodiments.
[0098] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0099] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of modules described above can be a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between modules, and may be electrical or other forms.
[0100] The modules described above as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple modules. Some or all of the modules can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0101] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0102] If the aforementioned integrated modules are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable non-volatile storage medium. Based on this understanding, the technical solution of this invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a non-volatile storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned non-volatile storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0103] The above are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A robot control method, characterized in that, include: The reference pose record of the vision camera on the robot is obtained. The reference pose record includes the reference coordinate value of the vision camera in the vision calibration plate coordinate system and the reference spatial pose of the vision camera in the base coordinate system. The reference coordinate value and the reference spatial pose are obtained based on the factory calibration pose information of the robot. The vision camera is connected to the end effector of the robot through a clamping structure and an adjustable device. The clamping structure is used to fix the adjustable device to the end effector. The adjustable device is used to adjust the position of the vision camera in the horizontal and vertical directions. The current pose record of the visual camera is obtained, wherein the current pose record includes the current coordinate value of the visual camera in the visual calibration plate coordinate system, and the current spatial pose of the visual camera in the base coordinate system. If the error between the reference pose record and the current pose record is greater than a first error threshold, the robot is controlled to move in the direction of reducing the error until the error is less than or equal to a second error threshold, wherein the second error threshold is less than or equal to the first error threshold. If the error is less than or equal to the second error threshold, the robot's zero position is reset based on the reference spatial pose.
2. The method according to claim 1, characterized in that, When the error includes position error and pose error, and when the error between the reference pose record and the current pose record is greater than a first error threshold, controlling the robot to move in the direction of error reduction until the error is less than or equal to a second error threshold includes: The position error between the reference coordinate value and the current coordinate value, and the pose error between the reference spatial pose and the current spatial pose are obtained; If the position error is greater than a first position error threshold, the robot is controlled to move in the direction of decreasing position error until the position error is less than or equal to a second position error threshold, wherein the second position error threshold is less than or equal to the first position error threshold. If the pose error is greater than the first pose error threshold, the robot is controlled to move in the direction of decreasing position error until the pose error is less than or equal to the second pose error threshold, wherein the second pose error threshold is less than or equal to the first pose error threshold.
3. The method according to claim 1, characterized in that, The method further includes: The work point on the workpiece is obtained, the initial spatial pose of the work point in the base coordinate system, and the initial spatial pose of the vision calibration plate in the base coordinate system, wherein the vision calibration plate is fixed on the workpiece. Based on the initial spatial pose of the work point in the base coordinate system and the initial spatial pose of the vision calibration board in the base coordinate system, the initial coordinate values of the work point in the vision calibration board coordinate system are obtained. When the workpiece is detected to have moved to a designated position, the target spatial pose is obtained based on the adjusted spatial pose of the vision calibration plate in the base coordinate system after the movement, and the initial coordinate value of the work point in the coordinate system of the vision calibration plate. The target spatial pose is the adjusted spatial pose of the work point in the base coordinate system after the movement. Control the robot to move toward the target spatial pose direction.
4. The method according to claim 3, characterized in that, When the workpiece is detected to have moved to a designated position, the target spatial pose is obtained based on the adjusted spatial pose of the vision calibration plate in the base coordinate system after the movement, and the initial coordinate values of the work point in the vision calibration plate coordinate system. This includes: When the workpiece is detected to have moved to the designated position, a coordinate system transformation algorithm is used to determine the initial coordinate value of the work point in the vision calibration plate coordinate system and the coordinate relationship between the work point and the vision calibration plate coordinate system after the movement. Based on the coordinate relationship, the initial spatial pose of the work point in the base coordinate system is converted into the target spatial pose in the base coordinate system.
5. The method according to claim 3, characterized in that, Controlling the robot to move toward the target spatial pose includes: Calculate the pose error between the robot's current spatial pose and the target spatial pose; Based on the pose error, the robot is controlled to perform translation and rotation operations in Cartesian space until the robot reaches the target spatial pose.
6. A robot control device, characterized in that, include: A vision camera is used to acquire image information and identify the position of a vision calibration plate, wherein the vision calibration plate is fixed to the workpiece and is used as a reference for acquiring the image information to establish a vision calibration plate coordinate system; Adjustable device for adjusting the position of the vision camera in the horizontal and vertical directions; The clamping structure secures the adjustable device to the robot's end effector.
7. The robot control device according to claim 6, characterized in that, The adjustable device includes: An adjustable slider is used to adjust the position of the vision camera along the horizontal direction; An adjustable connecting rod, connected to the adjustable slider, is used to adjust the position of the vision camera in the vertical direction.
8. A robot control device, characterized in that, include: A reference pose recording acquisition module is used to acquire the reference pose record of the vision camera on the robot. The reference pose record includes the reference coordinate value of the vision camera in the vision calibration plate coordinate system and the reference spatial pose of the vision camera in the base coordinate system. The reference coordinate value and the reference spatial pose are obtained based on the factory calibration pose information of the robot. The vision camera is connected to the end effector of the robot through a clamping structure and an adjustable device. The clamping structure is used to fix the adjustable device to the end effector. The adjustable device is used to adjust the position of the vision camera in the horizontal and vertical directions. The current pose recording acquisition module is used to acquire the current pose record of the visual camera, wherein the current pose record includes the current coordinate value of the visual camera in the visual calibration plate coordinate system, and the current spatial pose of the visual camera in the base coordinate system. A robot control module is configured to control the robot to move in the direction of decreasing error when the error between the reference pose record and the current pose record is greater than a first error threshold, until the error is less than or equal to a second error threshold, wherein the second error threshold is less than or equal to the first error threshold. The zero-position reset module is used to reset the robot's zero position based on the reference spatial pose when the error is less than or equal to the second error threshold.
9. A non-volatile storage medium, characterized in that, The non-volatile storage medium stores multiple instructions, which are adapted to be loaded by a processor and executed by the robot control method according to any one of claims 1 to 5.
10. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the robot control method according to any one of claims 1 to 5.
