Visual calibration method, device, equipment and medium
By establishing a transformation matrix between the reference coordinate system and the image coordinate system in industrial robots, and combining the transformation matrix between vision sensors and end tools, the problem of inconsistent coordinate systems in visual calibration of multi-degree of freedom industrial robots is solved, and the end tool of the robot arm is realized The accurate movement improves the accuracy and reliability of the material pick-up and discharge process.
Patent Information
- Application Number
- CN202310500735.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-05
- Publication Date
- 2024-11-05
AI Technical Summary
In the prior art, multi-degree-of-freedom industrial robots have problems with inconsistent coordinate systems during visual calibration, which leads to the inability to accurately move the end tool to the pick-up and discharge position, affecting the accuracy and reliability of processing and manufacturing.
By obtaining the conversion matrix between the reference coordinate system and the image coordinate system, combining the conversion matrix between the visual sensor and the end tool, a mapping relationship between the end tool in different coordinate systems is established to ensure that the end tool of the robot arm can accurately move to pick up and drop the material Location.
It improves the accuracy and reliability of the material pick-up and discharge process, and enhances the efficiency and stability of intelligent manufacturing.
Smart Images

Figure CN118893616A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of production lines, and in particular to a method, device, equipment and medium for visual calibration of a robotic arm with visual functions. Background Art
[0002] Industrial robots are multi-jointed manipulators or multi-degree-of-freedom machines widely used in industry. They rely on their own power and control capabilities to perform various industrial processing and manufacturing functions. They are widely used in various industries, including electronics, logistics, and chemicals.
[0003] For industrial robots with multiple degrees of freedom (such as robotic arms), in order to ensure the reliability and stability of the industrial robots during operation, it is necessary to perform visual calibration on the industrial robots with visual functions. Summary of the Invention
[0004] To overcome the problems existing in the related art, the present disclosure provides a visual calibration method, device, equipment and medium for a robotic arm with visual function.
[0005] According to a first aspect of an embodiment of the present disclosure, a visual calibration method for a robotic arm with a visual function is provided. The robotic arm includes a visual sensor and a plurality of end tools. The visual sensor and the plurality of end tools are disposed along a first rotation axis and distributed circumferentially along the first rotation axis. The visual calibration method includes:
[0006] Obtaining a first conversion matrix between a reference coordinate system and an image coordinate system, wherein the image coordinate system is a coordinate system in an image captured by the visual sensor, and the reference coordinate system is a coordinate system established based on a working environment of the robotic arm;
[0007] For each of the end tools, controlling the vision sensor and the end tool to rotate about the first rotation axis, and establishing a second transformation matrix between the vision sensor and the end tool in the reference coordinate system, wherein the second transformation matrix is used to represent a positional relationship between the vision sensor and the end tool;
[0008] A calibration result is obtained based on the first transformation matrix and the second transformation matrix, and the calibration result is used to characterize the mapping relationship between the first target position of the end tool in the reference coordinate system and the second target position of the end tool in the image coordinate system, wherein the first target position is the working position to which the end tool needs to move in the working environment, and the second target position is the position mapped to the working position in the image captured by the visual sensor.
[0009] Optionally, obtaining a second transformation matrix between the visual sensor and the end tool in the reference coordinate system includes:
[0010] Controlling the robotic arm to move to a photographing position, and obtaining a first reference coordinate of the robotic arm in the reference coordinate system and a first image coordinate in the image coordinate system;
[0011] And repeat the following first calibration process at least three times:
[0012] Controlling the end tool to move to a material picking position, obtaining a second reference coordinate of the robotic arm in the reference coordinate system, and controlling the end tool to pick up a target material;
[0013] Controlling the end tool to translate to a moving reference position, controlling the end tool to place the target material at each moving reference position and controlling the visual sensor to rotate to a shooting position to obtain a second image coordinate in the image coordinate system;
[0014] Wherein, when the first calibration process is repeated at least three times, the moving reference position of each first calibration process is different, and the moving reference position corresponds to the second image coordinates one by one.
[0015] Optionally, the robotic arm further includes a second rotation axis, and the vision sensor and the plurality of end tools rotate together around the second rotation axis. The obtaining of a second transformation matrix between the vision sensor and the end tool in the reference coordinate system includes:
[0016] Repeat the following second calibration process at least three times:
[0017] Controlling the end tool to move to the material picking position and pick up the target material;
[0018] Controlling the end tool to rotate around the second rotation axis to a preset rotation point to obtain a third reference coordinate in the reference coordinate system;
[0019] Controlling the end tool to place the target material and controlling the visual sensor to rotate to the shooting position to obtain a third image coordinate in the image coordinate system;
[0020] Wherein, when the second calibration process is repeated at least three times, the preset rotation point of the second calibration process is different each time, and the preset rotation point corresponds to the third image coordinate in a one-to-one manner.
[0021] Optionally, obtaining a second transformation matrix between the visual sensor and the end tool in the reference coordinate system includes:
[0022] Establishing a first sub-matrix according to the first reference coordinates, the second reference coordinates, the first image coordinates, and the second image coordinates obtained in the first calibration process;
[0023] Establishing a second sub-matrix according to the third reference coordinates and the third image coordinates obtained in the second calibration process;
[0024] The second transformation matrix is obtained according to the first sub-matrix and the second sub-matrix.
[0025] Optionally, obtaining a first transformation matrix between the reference coordinate system and the image coordinate system includes:
[0026] Acquire mobile calibration images captured by the visual sensor at at least three preset mobile positions;
[0027] A mobile calibration data set is obtained based on the first position information of the at least three preset mobile positions in the reference coordinate system and the at least three mobile calibration images. The mobile calibration data set is used to determine the mobile mapping matrix between the reference coordinate system and the image coordinate system.
[0028] Optionally, obtaining a first transformation matrix between the reference coordinate system and the image coordinate system further includes:
[0029] Acquire rotation calibration images captured by the visual sensor at at least three preset rotation positions;
[0030] A rotation calibration data set is obtained based on the second position information of the at least three preset rotation positions in the reference coordinate system and the at least three rotation calibration images. The rotation calibration data set is used to determine the rotation mapping matrix between the reference coordinate system and the image coordinate system.
[0031] Optionally, the first rotation matrix is determined according to the movement mapping matrix and the rotation mapping matrix.
[0032] Optionally, the robotic arm further includes a second rotation axis, and the visual sensor and the plurality of end tools rotate together around the second rotation axis;
[0033] The visual calibration method further includes:
[0034] Controlling the visual sensor to rotate around the second rotation axis to obtain at least three rotation calibration images;
[0035] The rotation center of the robotic arm in the image coordinate system is obtained according to at least three of the rotation calibration images.
[0036] Optionally, after obtaining the rotation center of the robotic arm, the visual calibration method further includes:
[0037] Acquire the test coordinates of a preset test point in the image coordinate system and the central reference coordinates of the geometric center of the calibration reference object in the image coordinate system;
[0038] Obtaining a test rotation matrix based on the test coordinates and the central reference coordinates;
[0039] Based on the test rotation matrix, the test motion coordinates of the end tool in the reference coordinate system are obtained.
[0040] Optionally, obtaining the test motion coordinates of the end tool in the reference coordinate system based on the test rotation matrix includes:
[0041] According to a second aspect of the present disclosure, a visual calibration device is provided, comprising:
[0042] a first acquisition module, which obtains a first conversion matrix between a reference coordinate system and an image coordinate system, wherein the image coordinate system is a coordinate system in an image captured by the visual sensor, and the reference coordinate system is a coordinate system established based on a working environment of the robotic arm;
[0043] A second acquisition module is configured to control the visual sensor and the end tool to rotate around a first rotation axis for each end tool, and obtain a second transformation matrix between the visual sensor and the end tool in the reference coordinate system;
[0044] The third acquisition module obtains a calibration result based on the first transformation matrix and the second transformation matrix, and the calibration result is used to characterize the mapping relationship between the first target position of the end tool in the reference coordinate system and the second target position of the end tool in the image coordinate system, wherein the first target position is the working position to which the end tool needs to move in the working environment, and the second target position is the position mapped to the working position in the image captured by the visual sensor.
[0045] According to a third aspect of the present disclosure, a visual calibration device is provided, comprising:
[0046] a processor, a memory for storing executable instructions for the processor;
[0047] Wherein, the processor is configured to execute the visual calibration method as described in the first aspect.
[0048] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of a visual calibration device, the visual calibration device is enabled to perform the visual calibration method as described in the first aspect.
[0049] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: the visual calibration method in the present disclosure is applied to a robotic arm having a visual sensor and multiple end tools. Since the visual sensor and the multiple end tools are distributed circumferentially along the first rotation axis, the visual sensor and the end tool are not in the same coordinate system. In order to ensure that the end tool of the robotic arm can accurately move to the material picking and placing position according to the image taken by the visual sensor in different coordinate systems, it is necessary to calibrate the positional relationship between the visual sensor and the end tool, and obtain the calibration result in combination with the first transformation matrix between the reference coordinate system established based on the working environment of the robotic arm and the image coordinate system, so as to ensure that the end tool of the robotic arm can accurately move to the material picking and placing position, improve the accuracy and reliability of the material picking and placing process, and facilitate the realization of intelligent manufacturing.
[0050] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0052] Figure 1 is a schematic diagram of a robotic arm with vision function according to an exemplary embodiment.
[0053] Figure 2 is a schematic diagram of a robotic arm with vision function according to an exemplary embodiment.
[0054] Figure 3 The figure is a flowchart of a visual calibration method according to an exemplary embodiment.
[0055] Figure 4 The figure is a flowchart of a visual calibration method according to an exemplary embodiment.
[0056] Figure 5 The figure is a flowchart of a visual calibration method according to an exemplary embodiment.
[0057] Figure 6 is a schematic diagram of nine-point calibration according to an exemplary embodiment.
[0058] Figure 7is a schematic diagram of a visual calibration device according to an exemplary embodiment.
[0059] Figure 8 is a block diagram of a visual calibration device according to an exemplary embodiment. DETAILED DESCRIPTION
[0060] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
[0061] Before describing the technical content of this disclosure, the application scenarios of this disclosure are first explained. The robotic arm with vision function in this disclosure is used in the process of picking up and placing mobile terminals for testing. It is used to pick up and place mobile terminals to be tested and mobile terminals that have completed testing. During the testing process, the mobile terminal needs to be placed in a test cabinet for testing. Each test cabinet includes multiple layers of test drawers (for example, two layers of drawers), and each test drawer includes multiple test acupuncture points (for example, two acupuncture points). The robotic arm with vision function needs to first use its vision function to determine whether a mobile terminal is placed at each acupuncture point, and then determine how to rotate the multiple end tools on the robotic arm. For example, if the vision function determines that there is no mobile terminal placed on a certain acupuncture point, the end tool that absorbs or clamps the mobile terminal can be controlled to place the mobile terminal to be tested on the acupuncture point; for another example, if the vision function determines that there is a mobile terminal placed on a certain acupuncture point, the idle end tool can be controlled to rotate to the acupuncture point, and then remove the mobile terminal on the acupuncture point. During this process, it is necessary to capture images through the visual sensor on the robotic arm, and then determine how the end tool on the robotic arm should move based on the position of the workpiece in the image and the relationship between the image coordinate system and the reference coordinate system in which the robotic arm works.
[0062] The visual calibration method discussed in this disclosure is also known as a hand-eye calibration algorithm. In the field of intelligent robots (such as robotic arms), the intelligent robot can control its actuators (such as grippers) based on data collected by visual sensors, thereby achieving operations such as grasping a target object. During this process, the intelligent robot needs to know the mapping relationship between the coordinate system of the end tool (such as the gripper of the robotic arm) and the coordinate system of the visual system's sensor (such as a camera mounted on the robotic arm). The algorithm that determines this mapping relationship is known as the hand-eye calibration algorithm.
[0063] The visual calibration method for a robotic arm with visual functions disclosed herein is applied to a robotic arm equipped with a visual sensor and multiple end tools. The visual sensor and the multiple end tools are arranged around the same first rotation axis. During the material handling process, the rotation of the visual sensor and the end tools needs to be controlled to achieve image capture, material handling by an idle end tool, and material handling by an end tool carrying a mobile terminal. Because the visual sensor and the end tool are located at different positions on the same first rotation axis and in different coordinate systems, the coordinate systems of the visual sensor and the end tool need to be converted during the calibration process of the robotic arm, thereby improving the accuracy of controlling the movement of the end tool based on the images captured by the visual sensor.
[0064] In order to solve the above problems, the present disclosure proposes a visual calibration method, device, equipment and medium for a robotic arm with visual function. The visual calibration method in the present disclosure is applied to a robotic arm with a visual sensor and multiple end tools. Since the visual sensor and the multiple end tools are distributed circumferentially along the first rotation axis, the visual sensor and the end tool are not in the same coordinate system. In order to ensure that the end tool of the robotic arm can accurately move to the picking and placing position according to the image taken by the visual sensor in different coordinate systems, it is necessary to calibrate the positional relationship between the visual sensor and the end tool, and obtain the calibration result in combination with the first transformation matrix between the reference coordinate system established based on the working environment of the robotic arm and the image coordinate system, so as to ensure that the end tool of the robotic arm can accurately move to the picking and placing position, improve the accuracy and reliability of the picking and placing process, and facilitate the realization of intelligent manufacturing.
[0065] According to an exemplary embodiment of the present disclosure, Figure 1 As shown, a robot arm 100 with visual function is shown. The robot arm 100 includes a visual sensor 10 and multiple end tools 20. The visual sensor 10 is, for example, a camera. The visual sensor 10 can collect image information, so that the robot arm 100 has a visual function. The end tool 20 can be, for example, a vacuum suction cup, a clamping claw, etc. The end tool 20 can provide a force on the target material. That is, the visual sensor 10 obtains image information, and the robot arm 100 acts according to the image information to adjust the relative position between the end tool 20 and the target material to transport the target material, thereby achieving the effect of intelligent manufacturing. The target material can be, for example, a mobile terminal that needs to be tested (such as a mobile phone, a laptop computer, and other smart devices). Continue to refer to Figure 1In the robot arm 100 with vision function, the vision sensor 10 and multiple end tools 20 of the robot arm 100 are set on the same first rotation axis 30. The vision sensor 10 and multiple end tools 20 are distributed along the circumference of the first rotation axis 30, utilizing the 360° space, making the overall structure of the robot arm 100 more compact, occupying less space, and having high single-time handling efficiency, and the end tools 20 are not easily interfered with in the working area.
[0066] The embodiment of the present disclosure provides a visual calibration method applied to the above-mentioned robotic arm, so that the above-mentioned robotic arm can be accurately positioned. Figure 3 As shown, the visual calibration method includes the following steps:
[0067] Step S110 : obtaining a first conversion matrix between a reference coordinate system and an image coordinate system, where the image coordinate system is a coordinate system in an image captured by a visual sensor, and the reference coordinate system is a coordinate system established based on a working environment of the robotic arm.
[0068] In this step, refer to Figure 1 The reference coordinate system (also known as the world coordinate system) is a Cartesian coordinate system, including two perpendicular x w 、y w and z w The three coordinate axes, the reference coordinate system is a coordinate system established based on the working environment of the robot arm, which can be used (x w ,y w , z w ) represents the positions of the vision sensor, end-tool, and calibration reference object in three-dimensional space. The image coordinate system is the coordinate system in the calibration image captured by the vision sensor. The image coordinate system is a planar rectangular coordinate system consisting of two perpendicular x and y axes. The position of the calibration reference object in the two-dimensional image can be represented by (x, y).
[0069] The reference coordinate system and the image coordinate system have a first conversion matrix, and the first conversion matrix can represent the mapping relationship between the position of the visual sensor in the reference coordinate system and the image coordinate system.
[0070] In one example, when a robotic arm with vision function moves, a target point is selected in the image coordinate system, and the coordinates of the target point in the reference coordinate system can be obtained through the first transformation matrix, so that the robotic arm moves according to the position in the reference coordinate system.
[0071] Step S120: For each end tool, control the visual sensor and the end tool to rotate around the first rotation axis, and establish a second transformation matrix between the visual sensor and the end tool in the reference coordinate system, wherein the second transformation matrix is used to characterize the positional relationship between the visual sensor and the end tool.
[0072] In this step, it's important to note that the vision sensor and end-tool are arranged around a first rotation axis, resulting in different coordinate systems for the vision sensor and the end-tool. To facilitate explanation of the technical solutions disclosed herein, the vision sensor's coordinate system is defined as the camera coordinate system, and the end-tool's coordinate system is defined as the tool coordinate system. Due to the differences in their structural dimensions, controlling only the rotation of the vision sensor and end-tool around the first rotation axis may result in positioning deviations between the end-tool and the target material, making it impossible to accurately pick up the target material, potentially causing damage to the robotic arm and the material.
[0073] Therefore, for each end tool, a second transformation matrix between the visual sensor and the end tool can be established in the reference coordinate system. The second transformation matrix is used to characterize the positional relationship between the visual sensor and the end tool. On the one hand, it can compensate for the X position of the end tool when the visual sensor switches to the end tool. w and Y w On the other hand, the robot arm can be controlled to switch any end tool to Figure 1 The position of the visual sensor shown (also known as the photo-taking position) can reduce unnecessary movements of the robotic arm and improve work efficiency.
[0074] Step S130: Obtain a calibration result based on the first transformation matrix and the second transformation matrix. The calibration result is used to characterize the mapping relationship between the first target position of the end tool in the reference coordinate system and the second target position of the end tool in the image coordinate system, wherein the first target position is the working position to which the end tool needs to move in the working environment, and the second target position is the position mapped in the image captured by the visual sensor.
[0075] In this step, the reference coordinate system (camera coordinate system) and the image coordinate system can be transformed through the first transformation matrix, and the camera coordinate system and the fixture coordinate system can be transformed through the second transformation matrix. That is to say, the mapping relationship between the fixture coordinate system and the image coordinate system, that is, the calibration result, can be determined based on the first transformation matrix and the second transformation matrix.
[0076] The end tool has a first target position in the reference coordinate system. This first target position is the working position to which the end tool must move in the work environment. The working position, also known as the position of the target material in three-dimensional space, can be represented by the reference coordinate system. The working position of the end tool (also known as the first target position) is mapped to the second target position in the image coordinate system, which can also be represented by the image coordinate system.
[0077] From the above, it can be determined that after obtaining the calibration result and the second target position in the image coordinate system, the first target position in the reference coordinate system can be obtained by reverse calculation, and then the movement of the robotic arm can be controlled according to the first target position.
[0078] In the embodiment of the present disclosure, since the visual sensor and multiple end tools are distributed circumferentially along the first rotation axis, the visual sensor and the end tool are not in the same coordinate system. In order to ensure that the end tool of the robot arm can accurately move to the material picking and placing position according to the image taken by the visual sensor in different coordinate systems, it is necessary to calibrate the positional relationship between the visual sensor and the end tool, and obtain the calibration result in combination with the first transformation matrix between the reference coordinate system established based on the working environment of the robot arm and the image coordinate system, so as to ensure that the end tool of the robot arm can accurately move to the material picking and placing position, improve the accuracy and reliability of the material picking and placing process, and facilitate the realization of intelligent manufacturing.
[0079] In an exemplary embodiment, this embodiment further illustrates step S120 in the above embodiment, and may include the following steps:
[0080] Step S121: Control the robotic arm to move to a photographing position, and obtain the first reference coordinates of the robotic arm in the reference coordinate system and the first image coordinates in the image coordinate system.
[0081] In this step, refer to Figure 1 , you can control the robotic arm to move to the photo-taking position and obtain the first reference coordinates of the robotic arm in the reference coordinate system and the first image coordinates in the image coordinate system. The first reference coordinates and the first image coordinates are fixed values in space and can be used as reference point coordinates in subsequent steps.
[0082] Step S122, repeat the following first calibration process at least three times: control the end tool to move to the material picking position, obtain the second reference coordinates of the robot arm in the reference coordinate system, and control the end tool to pick up the target material; control the end tool to translate to the moving reference position, control the end tool to place the target material at each moving reference position and control the visual sensor to rotate to the shooting position to obtain the second image coordinates in the image coordinate system.
[0083] In this step, refer to Figure 2 , the end tool 20 can be controlled to move to the material picking position, the second reference coordinate of the robot arm 100 in the reference coordinate system can be recorded, and the end tool 20 can be controlled to pick up the target material, which can be used as a reference object in the subsequent process. Figure 2 , control the end tool 20 to move to the moving reference position, and control the end tool 20 to place the target material at each moving reference position. Then, refer to Figure 1, the visual sensor 10 can be switched to the shooting position, and the visual sensor 10 shoots the target material to generate a two-dimensional image. The target material has a feature point (Mark), and the coordinates of the feature point in the image coordinate system can be obtained and recorded as the second image coordinates.
[0084] In one example, a nine-point calibration method can be used to perform the first calibration process. For example, nine moving reference positions can be selected, the end tool can be controlled to move to each moving reference position to place the target material, and the visual sensor can be controlled to capture the target material to obtain multiple second image coordinates of multiple feature points.
[0085] In some embodiments, step S120 may further include the following steps:
[0086] Step S123, repeat the following second calibration process at least three times: control the end tool to move to the material picking position and pick up the target material; control the end tool to rotate around the second rotation axis to the preset rotation point to obtain the third reference coordinate in the reference coordinate system; control the end tool to put down the target material and control the visual sensor to rotate to the shooting position to obtain the third image coordinate in the image coordinate system.
[0087] In this step, refer to Figure 2 The robot arm 100 further includes a second rotation axis 40, around which the visual sensor 10, the first rotation axis 30 and the plurality of end tools 20 rotate together. The radial direction of the second rotation axis 40 is aligned with the vertical coordinate axis of the reference coordinate system ( Figure 2 As shown in w ) direction. By driving the end tool 20 to rotate by the second rotation axis 40, the end tool 20 can be moved to a preset rotation point. The preset rotation point can be, for example, the reference point when using the nine-point calibration in the aforementioned embodiment, but is not limited to any specific details.
[0088] Reference Figure 2 , the end tool 20 can be controlled to move to the material picking position to pick up the target material, and the picked target material has a feature point (Mark). Then, the visual sensor 10 can be switched to the shooting position (refer to Figure 1 ), shoot the target material to generate a two-dimensional image, obtain the coordinates of the feature points in the image coordinate system, and record them as the third image coordinates.
[0089] For example, the second calibration process may be performed using a three-point calibration or a five-point calibration method, that is, the second calibration process is repeated three or five times.
[0090] In some embodiments, the obtaining step S120 may include the following steps:
[0091] Step S124 : establishing a first sub-matrix according to the first reference coordinates, the second reference coordinates, the first image coordinates, and the second image coordinates obtained in the first calibration process.
[0092] In this step, the vector relationship between the first reference coordinate and each second reference coordinate, as well as the connection relationship between the first image coordinate and each second image coordinate, can be obtained, thereby establishing a first sub-matrix. Since the first reference coordinate and the second reference coordinate, as well as the first image coordinate and the second image coordinate, are in a translation relationship, the first sub-matrix is a translation matrix.
[0093] Step S125 : establishing a second sub-matrix according to the third reference coordinates and the third image coordinates obtained in the second calibration process.
[0094] In this step, a mapping relationship between a plurality of third reference coordinates and a plurality of third image coordinates can be obtained to establish a second sub-matrix. The third reference coordinates and the third image coordinates are determined by rotation, so the second sub-matrix is a rotation matrix.
[0095] Step S126: Obtain a second conversion matrix according to the first sub-matrix and the second sub-matrix.
[0096] In this step, from a purely mathematical perspective, when two coordinate systems are converted to each other, the coordinate transformation can be decomposed into a rotational motion and a translational motion, where the first sub-matrix is a translational transformation matrix that enables the coordinate system to perform translational motion, and the second sub-matrix is a rotational transformation matrix that enables the coordinate system to perform rotational motion. The second rotation matrix can be obtained through the first sub-matrix and the second sub-matrix.
[0097] In an exemplary embodiment, this embodiment further illustrates step S110 in the above embodiment. Step S110 may include the following steps:
[0098] Step S111: Acquire mobile calibration images captured by the visual sensor at at least three preset mobile positions.
[0099] In this step, the visual sensor moves horizontally to move between multiple preset positions.
[0100] Step S112: Obtain a motion calibration data set based on first position information of at least three preset motion positions in the reference coordinate system and at least three motion calibration images. The motion calibration data set is used to determine a motion mapping matrix between the reference coordinate system and the image coordinate system.
[0101] In this step, the first position information is the position of the vision sensor in the reference coordinate system. Each moving calibration image contains a calibration reference object, and the position of the calibration reference object remains unchanged. By obtaining the coordinates of the vision sensor in the reference coordinate system and the image coordinates of the calibration reference object in the moving calibration image, a moving calibration data set is obtained. The moving calibration data can be used to determine the moving mapping matrix.
[0102] In one example, referring to Figure 1 , the x-axis and y-axis of the coordinate system of the mobile calibration image can be set to be respectively aligned with the x-axis and y-axis of the reference coordinate system. w axis, y w The axes are parallel and the distance between the vision sensor and the calibration reference is always the same to simplify the collection of mobile calibration data. w and y w The set of simultaneous equations can be used to obtain the matrix corresponding to the radiation transformation, that is, the movement mapping relationship.
[0103] Reference Figure 5 , shows the setting of 9 preset moving positions, that is, 9-point calibration, the coordinates of each preset moving position in the reference coordinate system are known, such as the visual sensor can be controlled along Figure 6 Move in the direction of the arrow shown in the figure, and move in sequence directly above the multiple preset moving positions ( Figure 1 As shown in w For example, when the visual sensor takes a picture directly above the preset moving position of label 1, the coordinates (x w ,y x ), together with the coordinates (x, y) of the preset moving position labeled 1 in the image coordinate system, form a set of moving calibration data. When the vision sensor moves to directly above the preset moving position labeled 2 to take a picture, another set of moving calibration data is obtained. Similarly, multiple sets of moving calibration data are obtained to form a moving calibration data set.
[0104] In some optional embodiments, only three preset moving positions may be set, referring to Figure 5 For example, set three preset moving positions numbered 1, 3, and 8.
[0105] In some embodiments, step S110: obtaining a first transformation matrix between the reference coordinate system and the image coordinate system may further include the following steps:
[0106] Step S113: Obtain rotation calibration images captured by the visual sensor at at least three preset rotation positions.
[0107] In this step, refer to Figure 1, the visual sensor and multiple end tools can be controlled to rotate around the second rotation axis, so that the visual sensor can capture rotation calibration images at at least three preset rotation positions.
[0108] For example, rotation calibration images captured at 3, 4, 5 or more preset rotation positions may be acquired.
[0109] Step S114: Obtain a rotation calibration data set based on the second position information of at least three preset rotation positions in the reference coordinate system and at least three rotation calibration images. The rotation calibration data set is used to determine a rotation mapping matrix between the reference coordinate system and the image coordinate system.
[0110] In this step, the second position information is the position of the vision sensor in the reference coordinate system. Each rotational calibration image contains a calibration reference object, and its position in the reference coordinate system remains unchanged. However, as the vision sensor is moved in the reference coordinate system, the position of the calibration reference object in the image coordinate system also changes, and a corresponding relationship exists. By obtaining the coordinates of the vision sensor in the reference coordinate system and the image coordinates of the calibration reference object in the moving calibration image, a moving calibration data set can be obtained.
[0111] After obtaining the movement mapping matrix and the rotation mapping matrix, the first rotation matrix can be determined by the following steps:
[0112] The first rotation matrix determines the motion mapping relationship between the image coordinate system and the reference coordinate system. For example, once the coordinates of a point in the image coordinate system are known, the coordinates of that point in the reference coordinate system can be derived using the first rotation matrix. In other words, once the visual sensor identifies a target material through imaging and determines its position in the image coordinate system, the robotic arm can transform the target material's image into the reference coordinate system and then move to the target material's location.
[0113] like Figure 4 FIG. 4 shows a flowchart for obtaining the calibration result, which includes the following steps:
[0114] Step S201, start.
[0115] Step S202: Obtain the position of the visual sensor in the reference coordinate system when capturing the calibration image.
[0116] In this step, the acquired position of the visual sensor may include a plurality of preset movement positions and a plurality of preset rotation positions.
[0117] Step S203: obtaining a motion calibration data set according to at least three preset motion positions to determine a motion mapping matrix between the reference coordinate system and the image coordinate system.
[0118] This step is implemented in the same manner and on the same principle as step S112 in the aforementioned embodiment and will not be described in detail.
[0119] Step S204 : obtaining a rotation calibration data set according to at least three preset rotation positions to determine a rotation mapping matrix between the reference coordinate system and the image coordinate system.
[0120] This step is implemented in the same manner and on the same principle as step S1114 in the aforementioned embodiment and will not be described in detail.
[0121] Step S205: Obtain a first conversion matrix according to the movement mapping matrix and the rotation mapping matrix.
[0122] Step S206, Int i=0.
[0123] In this step, i represents the number of the end tool, and i is a positive integer, such as 1, 2, 3...
[0124] Step S207: Determine whether i is less than n.
[0125] In this step, n is the number of end-tools installed on the robot arm. For example, if the robot arm is equipped with three end-tools, then n is 3.
[0126] If i is less than 3, execute step S208; if i is greater than or equal to 3, execute step S211.
[0127] Step S208: Control the end tool numbered i to move to the material taking position.
[0128] The implementation method and principle of this step are the same as those of step S121 in the aforementioned embodiment, and will not be repeated here.
[0129] Step S209: Obtain a second transformation matrix M between the visual sensor and the end tool in the reference coordinate system.
[0130] This step is implemented in the same manner and on the same principle as step S120 in the aforementioned embodiment and will not be described in detail.
[0131] Step S210, i+1.
[0132] Step S211: Obtain a calibration result according to the first conversion matrix and the second conversion matrix.
[0133] This step is implemented in the same manner as step S130 in the aforementioned embodiment and will not be described in detail.
[0134] Step S212, end.
[0135] In an exemplary embodiment, after obtaining the calibration result, that is, after establishing the mapping relationship between the end tool in the reference coordinate system and the image coordinate system, the visual calibration method further includes the following steps:
[0136] Reference Figure 1 and Figure 2 The robotic arm further includes a second rotation axis, and the visual sensor and the plurality of end tools rotate together around the second rotation axis. The visual calibration method may further include the following steps:
[0137] Step S310: Obtain the rotation center of the robotic arm according to at least three calibration images.
[0138] In one embodiment, for example, the visual sensor is controlled to rotate around the second rotation axis to obtain at least three rotation calibration images, and the rotation center of the robotic arm in the image coordinate system is obtained based on the at least three rotation calibration images.
[0139] In the above steps, a feature point can be found on the rotation calibration image, and the visual sensor can be controlled to rotate around the second rotation axis to obtain multiple points. After mapping these points to the reference coordinate system, the center coordinates and rotation radius are calculated, and these points are fitted into a circle to obtain the center coordinates (that is, the center of rotation).
[0140] In some embodiments, after obtaining the rotation center, the visual calibration method may further include the following steps:
[0141] Step S320: Acquire the test coordinates of the preset test point in the image coordinate system and the central reference coordinates of the geometric center of the calibration reference object in the image coordinate system.
[0142] In this step, for example, the visual sensor can be controlled to take pictures at the material picking position, the device to be tested is randomly placed at the material picking position, and feature points are selected on the device to be tested as preset test points. The preset test points have test coordinates, and multiple preset test points can determine the placement posture of the device to be tested.
[0143] Step S330: Obtain a test rotation matrix based on the test coordinates and the central reference coordinates.
[0144] In this step, in the image coordinate system, there is a vector rA' between the rotation center of the robotic arm (defined as r) and the test coordinate A', there is a vector rA between the rotation center r of the robotic arm and the center reference coordinate A of the geometric center of the calibration reference object, and there is an angle θ between the vector rA and the vector rA'. According to the angle θ, the test coordinate A' and the center reference coordinate A, the affine transformation relationship between the center reference coordinate A and the test coordinate A' can be obtained, that is, the test rotation matrix.
[0145] Step S340: Based on the test rotation matrix, obtain the test motion coordinates of the end tool in the reference coordinate system.
[0146] In some embodiments, the test motion coordinates of the end tool can be determined as follows.
[0147] Step S341: The product of the test coordinates, the test rotation matrix, the second conversion matrix and the movement mapping matrix is used as the test motion coordinates of the end tool.
[0148] In this step, the test motion coordinate t of the end tool can be calculated using the following formula:
[0149] t=C*T*R*M
[0150] In the above formula, C - test coordinates, T - mobile mapping matrix, R - test rotation matrix, M - second transformation matrix.
[0151] Among them, the test coordinate C is the test coordinate of the preset test point in the image coordinate system, and the position of the test coordinate C in the image coordinate system can be expressed as (x, y); the mobile mapping matrix T is used to determine the translation motion mapping relationship between the image coordinate system and the reference coordinate system; the test rotation matrix R is used to determine the mapping relationship between the test coordinate and the calibration reference coordinate; the second transformation matrix M is used to determine the mapping relationship between the coordinate system of the visual sensor and the coordinate system of each end tool.
[0152] like Figure 7 As shown, an embodiment of the present disclosure provides a visual calibration device, which is used to execute the visual calibration method provided by the above embodiment of the present disclosure. The visual calibration device includes:
[0153] A first acquisition module 410 obtains a first conversion matrix between a reference coordinate system and an image coordinate system, wherein the image coordinate system is a coordinate system in an image captured by the visual sensor, and the reference coordinate system is a coordinate system established based on a working environment of the robotic arm;
[0154] The second acquisition module 420 is configured to control the visual sensor and the end tool to rotate around the first rotation axis for each end tool, and obtain a second transformation matrix between the visual sensor and the end tool in the reference coordinate system;
[0155] The third acquisition module 430 obtains a calibration result based on the first transformation matrix and the second transformation matrix, and the calibration result is used to characterize the mapping relationship between the first target position of the end tool in the reference coordinate system and the second target position of the end tool in the image coordinate system, wherein the first target position is the working position to which the end tool needs to move in the working environment, and the second target position is the position mapped by the working position in the image captured by the visual sensor.
[0156] The present disclosure also provides a visual calibration device, such as Figure 8 The figure shows a block diagram of a visual calibration device, which includes a memory for storing executable instructions of a processor, and the processor is configured to execute the visual calibration method described in each embodiment of the above formula.
[0157] The visual calibration device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0158] The processing component 802 generally controls the overall operation of the visual calibration device 800, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 802 may include one or more modules to facilitate interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
[0159] The memory 804 is configured to store various types of data to support the operation of the visual calibration device 800. Examples of such data include instructions for any application or method operating on the visual calibration device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0160] The power component 806 provides power to the various components of the visual calibration device 800. The power component 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 800.
[0161] The multimedia component 808 includes a screen that provides an output interface between the visual calibration device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the visual calibration device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
[0162] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), which is configured to receive external audio signals when the visual calibration device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0163] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.
[0164] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the visual calibration device 800. For example, the sensor assembly 814 can detect the open / closed state of the visual calibration device 800, the relative positioning of components, such as the display and keypad of the visual calibration device 800, and the sensor assembly 814 can also detect changes in the position of the visual calibration device 800 or a component of the visual calibration device 800, the presence or absence of user contact with the visual calibration device 800, the orientation or acceleration / deceleration of the visual calibration device 800, and temperature changes of the visual calibration device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0165] The communication component 816 is configured to facilitate wired or wireless communication between the visual calibration device 800 and other devices. The visual calibration device 800 can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G or 5G, or a combination thereof.
[0166] In an exemplary embodiment, the communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0167] In an exemplary embodiment, the visual calibration device 800 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above method.
[0168] In an exemplary embodiment of the present disclosure, a non-transitory computer-readable storage medium is provided, such as a memory 804 including instructions, which can be executed by a processor 820 of a visual calibration device 800 to perform the above-described method. For example, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. When the instructions in the storage medium are executed by the processor of the visual calibration device, the visual calibration device is enabled to perform the visual calibration method provided in the above-described embodiment.
[0169] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0170] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A visual calibration method for a robotic arm with visual function, characterized in that: The robot arm includes a visual sensor and a plurality of end tools, the visual sensor and the plurality of end tools are arranged on the same first rotation axis, and the visual sensor and the plurality of end tools are distributed along the circumference of the first rotation axis, and the visual calibration method includes: Obtaining a first conversion matrix between a reference coordinate system and an image coordinate system, wherein the image coordinate system is a coordinate system in an image captured by the visual sensor, and the reference coordinate system is a coordinate system established based on a working environment of the robotic arm; For each of the end tools, control the visual sensor and the end tool to rotate around the first rotation axis, and establish a second transformation matrix between the visual sensor and the end tool in the reference coordinate system, wherein the second transformation matrix is used to characterize the positional relationship between the visual sensor and the end tool; A calibration result is obtained based on the first transformation matrix and the second transformation matrix, and the calibration result is used to characterize the mapping relationship between the first target position of the end tool in the reference coordinate system and the second target position of the end tool in the image coordinate system, wherein the first target position is the working position to which the end tool needs to move in the working environment, and the second target position is the position mapped by the working position in the image taken by the visual sensor.
2. The visual calibration method according to claim 1, characterized in that: The obtaining of a second transformation matrix between the visual sensor and the end tool in the reference coordinate system includes: Controlling the robotic arm to move to a photographing position, and acquiring a first reference coordinate of the robotic arm in the reference coordinate system and a first image coordinate in the image coordinate system; And repeat the following first calibration process at least three times: Control the end tool to move to a material picking position, obtain a second reference coordinate of the robot arm in the reference coordinate system, and control the end tool to pick up a target material; Control the end tool to translate to a moving reference position, control the end tool to place the target material at each moving reference position and control the visual sensor to rotate to a shooting position to obtain a second image coordinate in the image coordinate system; Wherein, when the first calibration process is repeated at least three times, the moving reference position of each first calibration process is different, and the moving reference position corresponds to the second image coordinates one by one.
3. The visual calibration method according to claim 2, characterized in that: The robot arm further includes a second rotation axis, and the visual sensor and the plurality of end tools rotate together around the second rotation axis. The obtaining of a second transformation matrix between the visual sensor and the end tool in the reference coordinate system includes: Repeat the following second calibration process at least three times: Controlling the end tool to move to the material picking position and pick up the target material; Controlling the end tool to rotate around the second rotation axis to a preset rotation point to obtain a third reference coordinate in the reference coordinate system; Controlling the end tool to put down the target material and controlling the visual sensor to rotate to the shooting position to obtain a third image coordinate in the image coordinate system; Wherein, when the second calibration process is repeated at least three times, the preset rotation point of the second calibration process is different each time, and the preset rotation point corresponds to the third image coordinates one by one.
4. The visual calibration method according to claim 3, characterized in that: The obtaining of a second transformation matrix between the visual sensor and the end tool in the reference coordinate system includes: Establishing a first sub-matrix according to the first reference coordinates, the second reference coordinates, the first image coordinates, and the second image coordinates obtained in the first calibration process; Establishing a second sub-matrix according to the third reference coordinates and the third image coordinates obtained in the second calibration process; The second conversion matrix is obtained according to the first sub-matrix and the second sub-matrix.
5. The visual calibration method according to any one of claims 1 to 4, characterized in that: The obtaining of a first transformation matrix between the reference coordinate system and the image coordinate system comprises: Acquire mobile calibration images respectively taken by the visual sensor at at least three preset mobile positions; A mobile calibration data set is obtained according to the first position information of the at least three preset mobile positions in the reference coordinate system and the at least three mobile calibration images. The mobile calibration data set is used to determine the mobile mapping matrix between the reference coordinate system and the image coordinate system.
6. The visual calibration method according to claim 5, characterized in that: The obtaining of the first conversion matrix between the reference coordinate system and the image coordinate system further includes: Acquire rotation calibration images respectively taken by the visual sensor at at least three preset rotation positions; A rotation calibration data set is obtained according to the second position information of the at least three preset rotation positions in the reference coordinate system and the at least three rotation calibration images. The rotation calibration data set is used to determine the rotation mapping matrix between the reference coordinate system and the image coordinate system.
7. The visual calibration method according to claim 6, characterized in that: The first rotation matrix is determined according to the movement mapping matrix and the rotation mapping matrix.
8. The visual calibration method according to claim 6, characterized in that: The robot arm further includes a second rotation axis, and the visual sensor and the plurality of end tools rotate together around the second rotation axis; The visual calibration method further comprises: Controlling the visual sensor to rotate around the second rotation axis to obtain at least three rotation calibration images; According to at least three of the rotation calibration images, the rotation center of the robotic arm in the image coordinate system is obtained.
9. The visual calibration method according to claim 8, characterized in that: After obtaining the rotation center of the robotic arm, the visual calibration method further includes: Acquire the test coordinates of a preset test point in the image coordinate system and the central reference coordinates of the geometric center of the calibration reference object in the image coordinate system; Based on the test coordinates and the central reference coordinates, obtaining a test rotation matrix; Based on the test rotation matrix, the test motion coordinates of the end tool in the reference coordinate system are obtained.
10. The visual calibration method according to claim 9, characterized in that: Based on the test rotation matrix, obtaining the test motion coordinates of the end tool in the reference coordinate system includes: The product of the test coordinates, the test rotation matrix, the second transformation matrix and the movement mapping matrix is used as the test motion coordinates of the end tool.
11. A visual calibration device, characterized in that: The visual calibration device comprises: A first acquisition module is configured to obtain a first conversion matrix between a reference coordinate system and an image coordinate system, wherein the image coordinate system is a coordinate system in an image captured by the visual sensor, and the reference coordinate system is a coordinate system established based on a working environment of the robotic arm; A second acquisition module is configured to control the visual sensor and the end tool to rotate around a first rotation axis for each end tool, and obtain a second transformation matrix between the visual sensor and the end tool in the reference coordinate system; A third acquisition module obtains a calibration result according to the first transformation matrix and the second transformation matrix, wherein the calibration result is used to characterize a mapping relationship between a first target position of the end tool in the reference coordinate system and a second target position of the end tool in the image coordinate system, wherein the first target position is a working position to which the end tool needs to move in the working environment, and the second target position is a position mapped to the working position in the image taken by the visual sensor.
12. A visual calibration device, characterized in that: include: a processor, a memory for storing executable instructions of the processor; Wherein, the processor is configured to execute the visual calibration method as described in any one of claims 1-10.
13. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of a visual calibration device, the visual calibration device is enabled to execute the visual calibration method as described in any one of claims 1 to 10.
