Motion mechanism control method and device, electronic equipment and storage medium

By calculating the rotation angle difference between the current image position and the reference image position in the image acquisition device, combining the calibration matrix and the oblique cutting matrix, the accurate movement problem of the moving mechanism in the non-orthogonal xy axis is solved, and the Control errors to improve the accuracy of crawling objects.

CN118876055AActive Publication Date: 2024-11-01HANGZHOU HIKROBOT TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410978189.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-11-01
Estimated Expiration
2044-07-19

AI Technical Summary

Technical Problem

When the moving mechanism contains non-orthogonal xy axis, it is difficult to accurately move to the position of the object based on rigid body movement, resulting in large errors when grabbing the object.

Method used

By obtaining the rotation angle difference between the current image position and the reference image position in the image acquisition device, combining the calibration matrix and the oblique cutting matrix, the translation deviation of the motion mechanism from the first physical position to the second physical position is calculated and as follows This deviation is controlled to ensure more accurate movement under the physical coordinate system.

Benefits of technology

When the two coordinate axes of the physical coordinate system are not orthogonal, the translation deviation between the first physical position corresponding to the reference image position and the second physical position corresponding to the current image position can be accurately determined, thereby reducing the control motion Errors when the mechanism moves, improving the accuracy of the object being captured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118876055A_ABST
    Figure CN118876055A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a motion mechanism control method and device, electronic equipment and a storage medium, and relates to the technical field of robots, and the specific scheme is as follows: obtaining a current image pose of an object to be grabbed by a motion mechanism in an image collected by image collection equipment; determining a rotation angle difference between the current image pose and a reference image pose of the object; according to the current image pose, the reference image pose, the calibration matrix, the beveling matrix and the rotation angle difference, determining a translation deviation of the movement mechanism moving from a first physical position of the reference image pose in the physical coordinate system to a second physical position of the current image pose in the physical coordinate system, the calibration matrix represents a transformation relation between a pixel coordinate system and a physical coordinate system, and the beveling matrix represents a transformation relation between the physical coordinate system and an orthogonal coordinate system; and controlling the movement mechanism to move according to the translation deviation. By applying the scheme provided by the embodiment of the invention, the error when the movement mechanism is controlled to move can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of robotics technology, and in particular to a motion mechanism control method, device, electronic device and storage medium. Background Art

[0002] With the maturity of robotics technology, more and more motion mechanisms such as robotic arms and manipulators have been introduced into industrial production scenarios. Based on the visual positioning results, these motion mechanisms move to the location of objects such as workpieces, grab the objects, and install or place them at the specified location.

[0003] In order to ensure that the motion mechanism can accurately grasp the above-mentioned object, in the related art, after obtaining the image pose of the object in the image captured by the image acquisition device, the pose of the object in the physical coordinate system of the motion mechanism is determined based on the image pose as the running pose of the motion mechanism. Then, on the premise that the motion mechanism moves in accordance with the rigid body, the motion mechanism is controlled to move from the current pose to the above-mentioned running pose.

[0004] However, when the xy axes included in the motion mechanism are not orthogonal, it is difficult for the motion mechanism to perform rigid body motion. Therefore, there are often large errors when controlling the movement of the motion mechanism using the above method, making it difficult to accurately move to the location of the object, and thus difficult to accurately grasp the object. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide a motion mechanism control method, device, electronic device and storage medium to reduce the error when controlling the movement of the motion mechanism. The specific technical solution is as follows:

[0006] According to one aspect of an embodiment of the present application, a motion mechanism control method is provided, the method comprising:

[0007] Obtaining the current image pose of the object to be grasped by the motion mechanism in the image captured by the image acquisition device;

[0008] determining a rotation angle difference between the current image pose and a reference image pose of the object;

[0009] Determine a translation deviation of the motion mechanism from a first physical position to a second physical position according to the current image pose, the reference image pose, a calibration matrix, a skew matrix, and the rotation angle difference, wherein the calibration matrix represents a transformation relationship between a pixel coordinate system of the image acquisition device and a physical coordinate system of the motion mechanism, the skew matrix represents a transformation relationship between the physical coordinate system and an orthogonal coordinate system, the first physical position is a position corresponding to the reference image pose in the physical coordinate system, and the second physical position is a position corresponding to the current image pose in the physical coordinate system;

[0010] According to the translation deviation, the motion mechanism is controlled to move from the first physical position to the second physical position.

[0011] In one embodiment of the present application, determining the translation deviation of the motion mechanism from the first physical position to the second physical position according to the current image pose, the reference image pose, the calibration matrix, the skew matrix and the rotation angle difference includes:

[0012] Determining a first physical position according to the calibration matrix and the position information in the reference image pose;

[0013] Determining a second physical position according to the calibration matrix, the skew matrix, the rotation angle difference and the position information in the current image pose;

[0014] A difference between the first physical position and the second physical position is calculated as a translation deviation of the motion mechanism moving from the first physical position to the second physical position.

[0015] In one embodiment of the present application, determining the second physical position according to the calibration matrix, the skew matrix, the rotation angle difference and the position information in the current image pose includes:

[0016] The second physical location is determined by the following expression:

[0017]

[0018] in, is the inverse matrix of the shear matrix, δ is the shear angle, is the rotation transformation matrix, Δθ is the rotation angle difference, M HAE is the calibration matrix, (x cur ,y cur ) is the coordinate of the position information in the current image pose in the pixel coordinate system.

[0019] In one embodiment of the present application, the oblique cutting matrix is ​​obtained in the following manner:

[0020] Obtaining a calibration result of hand-eye calibration of the physical coordinate system and the pixel coordinate system;

[0021] According to the calibration result, generating a bevel angle of the physical coordinate system relative to the orthogonal coordinate system;

[0022] Based on the obtained skew angles, the skew matrix is ​​constructed.

[0023] In one embodiment of the present application, if the motion mechanism is a two-axis separation mechanism, the calibration result includes a single-axis calibration matrix corresponding to each single axis, wherein the single-axis calibration matrix corresponding to each single axis represents the transformation relationship between the orthogonal coordinate system corresponding to the single axis and the pixel coordinate system, and the orthogonal coordinate system corresponding to each single axis is: an orthogonal coordinate system constructed with the single axis as the coordinate axis; generating the oblique angle of the physical coordinate system relative to the orthogonal coordinate system according to the calibration result includes: obtaining the coordinates of the position information in the reference image posture in the orthogonal coordinate systems corresponding to the two single axes according to the two single-axis calibration matrices; generating the rotation angle between the two orthogonal coordinate systems corresponding to the single axes based on the obtained coordinates; determining the oblique angle of the physical coordinate system relative to the orthogonal coordinate system according to the rotation angle;

[0024] or

[0025] If the motion mechanism is a two-axis integrated mechanism, the calibration result is the calibration matrix; generating the bevel angle of the physical coordinate system relative to the orthogonal coordinate system based on the calibration result includes: using the first coefficient in the calibration matrix to determine the x-axis scaling coefficient, wherein the first coefficient represents the scaling and rotation relationship between the pixel coordinate system and the physical coordinate system in the x-axis direction; using the second coefficient in the calibration matrix to determine the y-axis scaling coefficient, wherein the second coefficient represents the scaling, rotation and bevel relationship between the pixel coordinate system and the physical coordinate system in the y-axis direction; generating the bevel angle of the physical coordinate system relative to the orthogonal coordinate system based on the first coefficient, the second coefficient, the x-axis scaling coefficient and the y-axis scaling coefficient.

[0026] In one embodiment of the present application, generating the rotation angle between the two orthogonal coordinate systems corresponding to the single axis based on the obtained coordinates includes: generating the rotation angle between the two orthogonal coordinate systems corresponding to the single axis according to the following expression: Wherein, α is the rotation angle between the orthogonal coordinate systems corresponding to the two single axes, (x1, y1) and (x2, y2) are the coordinates of the position information in the reference image pose in the orthogonal coordinate systems corresponding to the two single axes respectively;

[0027] or

[0028] Generating the bevel angle of the physical coordinate system relative to the orthogonal coordinate system according to the first coefficient, the second coefficient, the x-axis scaling coefficient, and the y-axis scaling coefficient includes: generating the bevel angle of the physical coordinate system relative to the orthogonal coordinate system according to the following expression: Wherein, δ is the bevel angle, D2 is the second coefficient, D1 is the first coefficient, sx is the x-axis scaling coefficient, and sy is the y-axis scaling coefficient.

[0029] In one embodiment of the present application, if the motion mechanism is a two-axis separation mechanism, the calibration matrix is ​​obtained in the following manner:

[0030] Obtain a single-axis calibration matrix obtained by performing hand-eye calibration on two single axes in the motion mechanism, wherein the single-axis calibration matrix corresponding to each single axis represents the transformation relationship between the orthogonal coordinate system corresponding to the single axis and the pixel coordinate system, and the orthogonal coordinate system corresponding to each single axis is: an orthogonal coordinate system constructed with the single axis as the coordinate axis, and when performing hand-eye calibration on each single axis, the calibration data is collected while the single axis is moved and the other single axis is fixed; according to the two single-axis calibration matrices, the coordinates of the position information in the reference image posture in the orthogonal coordinate systems corresponding to the two single axes are obtained; based on the obtained coordinates, a rotation angle between the orthogonal coordinate systems corresponding to the two single axes is generated; based on the rotation angle, an angle between the two single axes is obtained; based on the angle, a basis on the two single axes is generated, and the calibration matrix is ​​determined using the generated basis and the obtained single-axis calibration matrix;

[0031] or

[0032] If the motion mechanism is a two-axis integrated mechanism, the calibration matrix is ​​obtained in the following manner:

[0033] Obtain image coordinates when the reference object corresponding to the motion mechanism is located at different positions and physical coordinates of the reference object corresponding to the motion mechanism, wherein the different positions are not collinear; construct a calibration matrix based on the obtained image coordinates and physical coordinates, wherein the image coordinates are: the coordinates of the reference object in the image captured by the image acquisition device.

[0034] According to another aspect of an embodiment of the present application, a motion mechanism control device is provided, the device comprising:

[0035] An image pose acquisition module, used to obtain the current image pose of the object to be grasped by the motion mechanism in the image captured by the image acquisition device;

[0036] an angle difference determination module, for determining a rotation angle difference between the current image pose and a reference image pose of the object;

[0037] a translation deviation determination module, for determining the translation deviation of the motion mechanism moving from the first physical position to the second physical position according to the current image pose, the reference image pose, a calibration matrix, a skew matrix and the rotation angle difference, wherein the calibration matrix represents the transformation relationship between the pixel coordinate system of the image acquisition device and the physical coordinate system of the motion mechanism, the skew matrix represents the transformation relationship between the physical coordinate system and the orthogonal coordinate system, the first physical position is the position corresponding to the reference image pose in the physical coordinate system, and the second physical position is the position corresponding to the current image pose in the physical coordinate system;

[0038] The motion mechanism control module is used to control the motion mechanism to move from the first physical position to the second physical position according to the translation deviation.

[0039] In one embodiment of the present application, the translation deviation determination module includes: a first physical position determination unit, used to determine the first physical position according to the calibration matrix and the position information in the reference image pose; a second physical position determination unit, used to determine the second physical position according to the calibration matrix, the skew matrix, the rotation angle difference and the position information in the current image pose; a difference calculation unit, used to calculate the difference between the first physical position and the second physical position as the translation deviation of the motion mechanism moving from the first physical position to the second physical position;

[0040] In one embodiment of the present application, the second physical location determining unit is specifically configured to determine the second physical location according to the following expression: in, is the inverse matrix of the shear matrix, δ is the shear angle, is the rotation transformation matrix, Δθ is the rotation angle difference, M HAE is the calibration matrix, (x cur ,y cur ) is the coordinate of the position information in the current image pose in the pixel coordinate system;

[0041] In one embodiment of the present application, the bevel matrix is ​​obtained in the following manner: obtaining a calibration result of hand-eye calibration of the physical coordinate system and the pixel coordinate system; generating a bevel angle of the physical coordinate system relative to the orthogonal coordinate system according to the calibration result; and constructing the bevel matrix based on the obtained bevel angle;

[0042] In one embodiment of the present application, if the motion mechanism is a two-axis separate mechanism, the calibration result includes a single-axis calibration matrix corresponding to each single axis, wherein the single-axis calibration matrix corresponding to each single axis represents the transformation relationship between the orthogonal coordinate system corresponding to the single axis and the pixel coordinate system, and the orthogonal coordinate system corresponding to each single axis is: an orthogonal coordinate system constructed with the single axis as the coordinate axis; generating the oblique angle of the physical coordinate system relative to the orthogonal coordinate system according to the calibration result includes: obtaining the coordinates of the position information in the reference image posture in the orthogonal coordinate systems corresponding to the two single axes according to the two single-axis calibration matrices; generating a rotation angle between the two orthogonal coordinate systems corresponding to the two single axes based on the obtained coordinates; and determining the physical coordinate system relative to the orthogonal coordinate system according to the rotation angle. The bevel angle of the orthogonal coordinate system; or, if the motion mechanism is a two-axis integrated mechanism, the calibration result is the calibration matrix; the generating the bevel angle of the physical coordinate system relative to the orthogonal coordinate system according to the calibration result comprises: using the first coefficient in the calibration matrix to determine the x-axis scaling coefficient, wherein the first coefficient represents the scaling and rotation relationship between the pixel coordinate system and the physical coordinate system in the x-axis direction; using the second coefficient in the calibration matrix to determine the y-axis scaling coefficient, wherein the second coefficient represents the scaling, rotation and bevel relationship between the pixel coordinate system and the physical coordinate system in the y-axis direction; generating the bevel angle of the physical coordinate system relative to the orthogonal coordinate system according to the first coefficient, the second coefficient, the x-axis scaling coefficient and the y-axis scaling coefficient;

[0043] In one embodiment of the present application, generating the rotation angle between the two orthogonal coordinate systems corresponding to the single axis based on the obtained coordinates includes: generating the rotation angle between the two orthogonal coordinate systems corresponding to the single axis according to the following expression: Wherein, α is the rotation angle between the orthogonal coordinate systems corresponding to the two single axes, (x1, y1) and (x2, y2) are the coordinates of the position information in the reference image pose in the orthogonal coordinate systems corresponding to the two single axes respectively; or, generating the oblique angle of the physical coordinate system relative to the orthogonal coordinate system according to the first coefficient, the second coefficient, the x-axis scaling coefficient and the y-axis scaling coefficient, comprises: generating the oblique angle of the physical coordinate system relative to the orthogonal coordinate system according to the following expression: Wherein, δ is the bevel angle, D2 is the second coefficient, D1 is the first coefficient, sx is the x-axis scaling coefficient, and sy is the y-axis scaling coefficient;

[0044] In one embodiment of the present application, if the motion mechanism is a two-axis separated mechanism, the calibration matrix is ​​obtained in the following manner: obtain a single-axis calibration matrix obtained by performing hand-eye calibration on two single axes in the motion mechanism, wherein the single-axis calibration matrix corresponding to each single axis represents the transformation relationship between the orthogonal coordinate system corresponding to the single axis and the pixel coordinate system, and the orthogonal coordinate system corresponding to each single axis is: an orthogonal coordinate system constructed with the single axis as the coordinate axis, and when performing hand-eye calibration on each single axis, calibration data is collected while moving the single axis and fixing the other single axis; according to the two single-axis calibration matrices, the coordinates of the position information in the reference image posture in the orthogonal coordinate systems corresponding to the two single axes are obtained; based on the obtained , generate the rotation angle between the orthogonal coordinate systems corresponding to the two single axes; based on the rotation angle, obtain the angle between the two single axes; based on the angle, generate the bases on the two single axes, and use the generated bases and the obtained single-axis calibration matrix to determine the calibration matrix; or, if the motion mechanism is a two-axis integrated mechanism, obtain the calibration matrix in the following manner: obtain the image coordinates when the reference object corresponding to the motion mechanism is located at different positions and the physical coordinates of the reference object corresponding to the motion mechanism, wherein the different positions are not collinear; construct a calibration matrix based on the obtained image coordinates and physical coordinates, wherein the image coordinates are: the coordinates of the reference object in the image captured by the image acquisition device.

[0045] According to another aspect of the embodiments of the present application, there is provided an electronic device, including:

[0046] Memory, used to store computer programs;

[0047] The processor is used to implement any of the above-mentioned motion mechanism control methods when executing the program stored in the memory.

[0048] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any of the above-mentioned motion mechanism control methods is implemented.

[0049] According to another aspect of the embodiments of the present application, there is provided a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the above-mentioned motion mechanism control methods.

[0050] Beneficial effects of the embodiments of the present application:

[0051] As can be seen from the above, in the solution provided in the embodiment of the present application, the current image posture, the reference image posture, the calibration matrix, the bevel matrix and the rotation angle difference are used to determine the translation deviation of the motion mechanism from the first physical position to the second physical position. Since the bevel matrix represents the transformation relationship between the physical coordinate system and the orthogonal coordinates, when the two coordinate axes of the physical coordinate system are not orthogonal, the translation deviation between the first physical position corresponding to the reference image posture and the second physical position corresponding to the current image posture in the physical coordinate system can be accurately determined. In this way, according to the translation deviation in the more accurate physical coordinate system, the motion mechanism can be more accurately controlled to move from the first physical position to the second physical position, thereby reducing the error in controlling the movement of the motion mechanism.

[0052] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0054] Figure 1a A schematic diagram of a non-orthogonal coordinate system and an orthogonal coordinate system provided in an embodiment of the present application;

[0055] Figure 1b A schematic diagram of a two-axis separation mechanism provided in an embodiment of the present application;

[0056] Figure 1c A schematic diagram of a two-axis integrated mechanism provided for the motion mechanism of the embodiment of the present application;

[0057] Figure 2 A schematic diagram of a flow chart of a motion mechanism control method provided in an embodiment of the present application;

[0058] Figure 3 A schematic diagram of a process for obtaining a bevel matrix provided in an embodiment of the present application;

[0059] Figure 4 A schematic diagram of another non-orthogonal coordinate system and an orthogonal coordinate system provided in an embodiment of the present application;

[0060] Figure 5 A flow chart of a method for obtaining a calibration matrix provided in an embodiment of the present application;

[0061] Figure 6 A schematic diagram of the structure of a motion mechanism control device provided in an embodiment of the present application;

[0062] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0063] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.

[0064] The following is a description of the background technology of the embodiments of the present application.

[0065] See also Figure 1a A schematic diagram of a non-orthogonal coordinate system and an orthogonal coordinate system is provided. Figure 1a The xoy' coordinate system in is a non-orthogonal coordinate system. The xoy coordinate system is an orthogonal coordinate system established with the x-axis of the xoy' coordinate system. The origin o and the x-axis of the xoy coordinate system and the xoy' coordinate system coincide. Assume that the angle between the two axes of the xoy' coordinate system is r. In the xoy' coordinate system, is the x-axis unit vector, is the y'-axis unit vector, and the modulus of the two unit vectors is 1,

[0066] Then, in the non-orthogonal xoy' coordinate system, The coordinates of point F can be expressed as The coordinates of point G can be expressed as

[0067] In the orthogonal xoy coordinate system, the coordinates of point F can be expressed as The coordinates of point G can be expressed as

[0068] In this way, it can be concluded that in the non-orthogonal xoy' coordinate system, the coordinate deviation from point F to point G is: In the orthogonal xoy coordinate system, the coordinate deviation from point F to point G is:

[0069] Obviously, and are not the same, that is, the coordinate deviation from point F to point G in the orthogonal xoy coordinate system is different from the coordinate deviation in the non-orthogonal xoy' coordinate system. In other words, when the xy axes of the motion mechanism are non-orthogonal, if the motion mechanism is controlled to move based on the premise of rigid body motion, there will often be large errors in controlling the movement of the motion mechanism, and the error will be greater when the bevel angle is large. Therefore, it is difficult to accurately move to the location of the object based on the rigid body motion transformation, and it is difficult to accurately grasp the object.

[0070] The execution subject of the embodiment of the present application is described below.

[0071] The solution provided in the embodiment of the present application can be applied to electronic devices such as desktop computers, laptop computers, tablet computers, and servers, and the above electronic devices can control the mechanical arm to move, or the execution subject of the solution provided in the embodiment of the present application can also be a mechanical arm. For ease of description, the execution subject of the motion mechanism control method provided in the embodiment of the present application is collectively referred to as a control device.

[0072] The concepts involved in the embodiments of the present application are explained below.

[0073] 1. Bevel Angle

[0074] The bevel angle is the angle between an axis in a non-orthogonal coordinate system and the corresponding axis in an orthogonal coordinate system. Figure 1a For example, the bevel angle may be the angle between the y-axis and the y'-axis.

[0075] 2. Bevel Matrix

[0076] The skew matrix represents the transformation relationship between the physical coordinate system and the orthogonal coordinate system, wherein the transformation relationship between the physical coordinate system and the orthogonal coordinate system may include translation transformation, rotation transformation, rigid body transformation, non-uniform scaling transformation, skew transformation, and the like.

[0077] 3. Calibration Matrix

[0078] The calibration matrix represents the transformation relationship between the pixel coordinate system of the image acquisition device and the physical coordinate system of the motion mechanism.

[0079] 4. The motion mechanism is a two-axis separate mechanism and the motion mechanism is a two-axis integrated mechanism

[0080] (1) The motion mechanism is a two-axis separate mechanism

[0081] The structure in the motion mechanism that moves along the x-axis direction of the physical coordinate system is separated from the structure in the motion mechanism that moves along the y-axis direction of the physical coordinate system. The motion mechanism can carry the object to move in the x-axis direction, and can carry the end effector and camera in the motion mechanism for grasping the object to move in the y-axis direction. For example, see Figure 1b The provided motion mechanism is a schematic diagram of a two-axis separation mechanism. The black square on the right represents the first movable structure of the motion mechanism. The first movable structure can be constrained by the first motion rod and carry the object to be grasped on the left side of the first movable structure to move along the positive and negative directions of the x-axis. The black square on the upper side represents the second movable structure of the motion mechanism. The second movable structure can be constrained by the second motion rod and carry the end effector and the image acquisition device to move along the positive and negative directions of the y-axis.

[0082] (2) The motion mechanism is a two-axis integrated mechanism

[0083] The structure in the motion mechanism that moves along the x-axis direction of the physical coordinate system is integrated with the structure in the motion mechanism that moves along the y-axis direction of the physical coordinate system, and the end effector in the motion mechanism for grasping the object can move in the x-axis direction as well as in the y-axis direction. Figure 1c The provided motion mechanism is a schematic diagram of a two-axis integrated mechanism. The image acquisition device can be installed at a fixed position in the scene. The black square on the right represents the third movable structure of the motion mechanism, and the third movable structure can be constrained by the third motion rod, and the fourth movable structure and the fourth motion rod on the left side of the third movable structure can be moved along the positive and negative directions of the x-axis. The black square on the left represents the fourth movable structure of the motion mechanism, and the fourth movable structure can be constrained by the fourth motion rod, and the end effector can be moved along the positive and negative directions of the y-axis.

[0084] The motion mechanism control method provided in the embodiment of the present application is described below in conjunction with specific embodiments.

[0085] In one embodiment of the present application, see Figure 2 A flow chart of a motion mechanism control method is provided, the method comprising the following steps S201-S204.

[0086] Step S201: obtaining the current image pose of the object to be grasped by the motion mechanism in the image captured by the image acquisition device.

[0087] Among them, the image acquisition device can be installed at a fixed position in the surrounding environment where the motion mechanism is located. The image acquisition device can also be installed on a robotic arm. For example, in the case where the motion mechanism is a two-axis separated mechanism, the image acquisition device can be installed on the x-axis of the motion mechanism, and the y-axis of the motion mechanism is used to move and grasp the object. The object to be grasped by the motion mechanism can be a workpiece to be grasped. The current image pose is the image pose of the object to be grasped in the pixel coordinate system. The pose in the pixel coordinate system is obtained based on the image captured by the image acquisition device. The motion mechanism needs to move from the physical position corresponding to the reference image pose to the physical position corresponding to the current image pose to grasp the object.

[0088] The following describes the method of obtaining the current image pose in step S201.

[0089] In one implementation, after the image acquisition device captures an image of the current posture of the object to be captured, the control device performs target recognition on the image of the object to be captured based on a preset template of the object to be captured, identifies the position and angle of the target object in the image, and uses the obtained position and angle as the current image posture of the object to be captured.

[0090] Step S202: Determine the rotation angle difference between the current image pose and the reference image pose of the object.

[0091] The reference image pose is the image pose in the pixel coordinate system when the object is in the reference pose.

[0092] The following describes a method for obtaining the reference image pose of the object.

[0093] Specifically, the motion mechanism can be controlled to grab an object placed in a reference posture, and then the installed image acquisition device obtains an image of the object grabbed by the motion mechanism, and then the posture of the object on the motion mechanism in the image is identified to obtain the reference image posture.

[0094] The following describes the method of determining the rotation angle difference in step S202.

[0095] In one implementation, the control device can calculate the difference between the angle information in the current image pose and the angle information in the reference image pose as the rotation angle difference.

[0096] Step S203: Determine the translation deviation of the motion mechanism from the first physical position to the second physical position according to the current image posture, the reference image posture, the calibration matrix, the skew matrix and the rotation angle difference.

[0097] The first physical position is the position corresponding to the reference image pose in the physical coordinate system, and the second physical position is the position corresponding to the current image pose in the physical coordinate system. The physical coordinate system is the coordinate system that the motion mechanism refers to when it moves. When the xy axes of the motion mechanism are not orthogonal, the x-axis and y-axis of the physical coordinate system are also not orthogonal. In addition, the x-axis and y-axis directions of the physical coordinate system can be the same as Figure 1b and Figure 1c The first motion rod, the second motion rod, the third motion rod and the fourth motion rod have the same direction. In the case where the motion mechanism is a multi-axis robot arm, the multi-axis robot arm can also perform compound motion to achieve motion along the x-axis and y-axis directions.

[0098] The following is an explanation of the method of determining the translation deviation in step S203.

[0099] In one implementation, the control device determines a first physical position based on a calibration matrix and position information in a reference image pose; determines a second physical position based on the calibration matrix, a skew matrix, a rotation angle difference, and position information in a current image pose; and calculates a difference between the first physical position and the second physical position as a translation deviation of the motion mechanism moving from the first physical position to the second physical position.

[0100] Specifically, the control device multiplies the calibration matrix by the position coordinates in the reference image pose to obtain the first physical position coordinates. For example, the calibration matrix Then the first physical position coordinates obtained are

[0101] Among them, (x base ,y base ) is the coordinate of the position information in the reference image pose in the pixel coordinate system.

[0102] Then, the control device determines the second physical position according to the following expression:

[0103]

[0104] in, is the inverse matrix of the shear matrix, δ is the shear angle, is the rotation transformation matrix, Δθ is the rotation angle difference, M HAE is the calibration matrix, (x cur ,y cur ) is the coordinate of the position information in the current image pose in the pixel coordinate system.

[0105] In this way, the difference between the first physical position and the second physical position is obtained as:

[0106]

[0107] Among them, (x offset ,y offset ) is the translation deviation, x offset is the translation deviation in the x-axis direction in the physical coordinate system, y offset is the translation deviation in the y-axis direction in the physical coordinate system.

[0108] It can be seen that the second physical position can be determined more accurately according to the above expression, thereby improving the accuracy of the determined translation deviation.

[0109] In this way, based on the calibration matrix, the bevel matrix, the rotation angle difference and the position information in the current image posture, the second position information can be determined more accurately, and then the difference between the first physical position and the second physical position can be accurately determined, and the accurate translation deviation from the first physical position to the second physical position can be obtained, thereby improving the accuracy of controlling the movement of the motion mechanism.

[0110] The method of obtaining the bevel angle, the bevel matrix and the calibration matrix is ​​described in the following embodiments and will not be described in detail here.

[0111] Step S204: controlling the motion mechanism to move from the first physical position to the second physical position according to the translation deviation.

[0112] Specifically, the control device can control the operating mechanism to move from the first physical position to the second physical position by the distance of the translation deviation. For example, when the translation deviation includes an x-axis deviation and a y-axis deviation, the control device controls the operating mechanism to move in the x-axis direction by the distance of the x-axis deviation and in the y-axis direction by the distance of the y-axis deviation.

[0113] As can be seen from the above, in the solution provided in the embodiment of the present application, the current image posture, the reference image posture, the calibration matrix, the bevel matrix and the rotation angle difference are used to determine the translation deviation of the motion mechanism from the first physical position to the second physical position. Since the bevel matrix represents the transformation relationship between the physical coordinate system and the orthogonal coordinates, when the two coordinate axes of the physical coordinate system are not orthogonal, the translation deviation between the first physical position corresponding to the reference image posture and the second physical position corresponding to the current image posture in the physical coordinate system can be accurately determined. In this way, according to the translation deviation in the more accurate physical coordinate system, the motion mechanism can be more accurately controlled to move from the first physical position to the second physical position, thereby reducing the error in controlling the movement of the motion mechanism.

[0114] In this way, even when the two axes of the motion mechanism are not orthogonal, the motion mechanism can be accurately controlled to move. For a motion mechanism whose xy axes are orthogonal in theory, it is difficult to ensure that the xy axes of the motion mechanism are completely orthogonal in actual use. Therefore, the solution provided in the embodiment of the present application can also be used to control the motion mechanism to move, thereby reducing the error when controlling the motion mechanism to move.

[0115] The following describes how to obtain the skew matrix.

[0116] In one embodiment of the present application, see Figure 3 A schematic flow chart of a method for obtaining a skew matrix is ​​provided. The method includes the following steps S301-S303.

[0117] Step S301: obtaining the calibration result of hand-eye calibration of the physical coordinate system and the pixel coordinate system.

[0118] Specifically, after completing the hand-eye calibration of the physical coordinate system and the pixel coordinate system, a calibration coordinate pair including the physical coordinates in the calibrated physical coordinate system and the image coordinates in the pixel coordinate system can be obtained, and the calibration result can be solved according to the calibration coordinate pair. For example, the calibration result can be calculated by the least squares method or the like.

[0119] However, when the motion mechanism has a different two-axis structure, the method of performing hand-eye calibration and the calibration results obtained are different. The method of obtaining the calibration matrix and the calibration results obtained are explained in the following embodiments and are not described in detail here.

[0120] Step S302: Generate a bevel angle of the physical coordinate system relative to the orthogonal coordinate system according to the calibration result.

[0121] The implementation of step S302 is described in the following embodiments and will not be described in detail here.

[0122] Step S303: construct a bevel matrix based on the obtained bevel angle.

[0123] Specifically, a bevel matrix can be constructed according to a preset bevel matrix and the obtained bevel angle. For example, the obtained bevel matrix is:

[0124] In this way, the bevel angle used to construct the bevel matrix is ​​generated according to the calibration result, so that the bevel angle can be obtained using the existing calibration result, which is convenient for obtaining the bevel matrix and improving the calculation efficiency. In addition, the bevel angle obtained based on the calibration result is more accurate, which can avoid the error caused by the measurement, improve the accuracy of the obtained bevel angle, improve the accuracy of the determined translation deviation, and reduce the error when controlling the movement of the motion mechanism.

[0125] The calibration result obtained in step S301 is described below.

[0126] In the first case, when the motion mechanism is a two-axis separated mechanism, the calibration result obtained is the single-axis calibration matrix corresponding to each single axis. Among them, the single-axis calibration matrix corresponding to each single axis represents the transformation relationship between the orthogonal coordinate system corresponding to the single axis and the pixel coordinate system, and the orthogonal coordinate system corresponding to each single axis is: an orthogonal coordinate system constructed with the single axis as the coordinate axis. For example, if the first axis of the two axes of the motion mechanism is calibrated, the calibration result M1 is obtained, and if the second axis of the two axes of the motion mechanism is calibrated, the calibration result M2 is obtained. M1 and M2 represent two single-axis calibration matrices respectively. Among them, M1 represents the transformation relationship between the first orthogonal coordinate system established based on the first axis and the pixel coordinate system, and M2 represents the transformation relationship between the second orthogonal coordinate system established based on the second axis and the pixel coordinate system.

[0127] In the second case, when the motion mechanism is a two-axis integrated mechanism, the calibration result obtained is a calibration matrix.

[0128] The following describes the method of generating the bevel angle in step S302 when the motion mechanism is a two-axis separation mechanism.

[0129] In one implementation, the coordinates of the position information in the reference image posture in the two orthogonal coordinate systems corresponding to the two single axes are obtained according to two single-axis calibration matrices; based on the obtained coordinates, the rotation angle between the two orthogonal coordinate systems corresponding to the two single axes is generated; according to the rotation angle, the oblique angle of the physical coordinate system relative to the orthogonal coordinate system is determined.

[0130] Among them, the position information in the reference image pose is the movement of the object carried by the motion mechanism.

[0131] Specifically, the single-axis calibration matrix obtained by left-multiplying the position information in the reference image pose can be respectively obtained to obtain the coordinates of the position information in the two reference image poses in the orthogonal coordinate systems corresponding to the two single axes.

[0132] For example, see Figure 4 A schematic diagram of another non-orthogonal coordinate system and an orthogonal coordinate system is provided. Figure 4 In the figure, xoy is a non-orthogonal coordinate system, xoy' is an orthogonal coordinate system corresponding to the x-axis in the non-orthogonal coordinate system, and x'oy is an orthogonal coordinate system corresponding to the y-axis in the non-orthogonal coordinate system.

[0133] If the two single-axis calibration matrices obtained are: the single-axis calibration matrix of the xoy' coordinate system and the xoy coordinate system is M1, and the single-axis calibration matrix of the x'oy coordinate system and the xoy coordinate system is and M2. The position information in the reference image pose is P(x base ,y base ).

[0134] Then, the coordinates of the position information in the reference image pose in the two orthogonal coordinate systems corresponding to the single axis are: In the xoy' coordinate system, In the x'oy coordinate system,

[0135] Then the rotation angle between the two orthogonal coordinate systems corresponding to a single axis is generated according to the following expression: Among them, α is the rotation angle between the orthogonal coordinate systems corresponding to the two single axes, (x1, y1) and (x2, y2) are the coordinates of the position information in the reference image pose in the two orthogonal coordinate systems corresponding to the single axes.

[0136] The following is an explanation of the expression for the rotation angle.

[0137] According to the rotation transformation, it can be determined that the coordinate rotation transformation can be performed between the two orthogonal coordinate systems of the xoy' coordinate system and the x'oy coordinate system according to the following expression:

[0138]

[0139] Substitute the obtained (x1, y1) and (x2, y2) into the above expression and transform the above expression:

[0140]

[0141] Further simplifying the above formula, we get the following expression:

[0142]

[0143] According to the above expression, the expression for obtaining α can be determined as It can be seen that when the motion mechanism is a two-axis separate mechanism, the rotation angle between the orthogonal coordinate systems can be accurately obtained, and then the accurate bevel angle can be obtained, which further improves the accuracy of determining the translation deviation and reduces the error when controlling the movement of the motion mechanism.

[0144] After obtaining the rotation angle α between the two orthogonal coordinate systems corresponding to the single axis, we can get the angle between the x-axis and the y-axis of the xoy coordinate system to be α+90°, and then we can deduce that the bevel angle is the angle between the x-axis and the y-axis minus the angle between the x-axis and the y'axis of xoy', that is, the bevel angle δ is α+90°-90°.

[0145] The following describes the method of generating the bevel angle in step S302 when the motion mechanism is a two-axis integrated mechanism.

[0146] In one implementation, the x-axis scaling coefficient is determined using the first coefficient in the calibration matrix; the y-axis scaling coefficient is determined using the second coefficient in the calibration matrix; and the skew angle of the physical coordinate system relative to the orthogonal coordinate system is generated based on the first coefficient, the second coefficient, the x-axis scaling coefficient and the y-axis scaling coefficient.

[0147] The first coefficient represents the scaling and rotation relationship between the pixel coordinate system and the physical coordinate system in the x-axis direction, and the second coefficient represents the scaling, rotation and skew relationship between the pixel coordinate system and the physical coordinate system in the y-axis direction.

[0148] The method for obtaining the x-axis scaling coefficient and the y-axis scaling coefficient, and the concepts of the first coefficient and the second coefficient are explained in the following embodiments and will not be described in detail here.

[0149] Specifically, the oblique angle of the physical coordinate system relative to the orthogonal coordinate system is generated according to the following expression:

[0150]

[0151] Wherein, δ is the bevel angle, D2 is the second coefficient, D1 is the first coefficient, sx is the x-axis scaling coefficient, and sy is the y-axis scaling coefficient.

[0152] The expression of the bevel angle is explained below.

[0153] When the motion mechanism is a two-axis integrated mechanism, the relationship between the pixel coordinate system and the physical coordinate system is an affine transformation, and the affine transformation includes translation transformation, rotation transformation, rigid body transformation, non-uniform scaling transformation and skew transformation.

[0154] Among them, the expression of the translation transformation matrix is:

[0155]

[0156] The expression of the rotation transformation matrix is:

[0157]

[0158] The expression of the non-uniform scaling transformation matrix is:

[0159]

[0160] The expression of the shear transformation matrix is:

[0161]

[0162] When two coordinate systems have translation transformation, rotation transformation, non-uniform scaling transformation and skew transformation, it is called affine transformation. Affine transformation can be regarded as a combination of non-singular transformation and translation transformation. The affine transformation matrix can be expressed as:

[0163]

[0164] Simplifying the above formula, we can get the following expression:

[0165]

[0166] In fact, when the motion mechanism is a two-axis integrated mechanism, there is an affine transformation between the pixel coordinate system and the physical coordinate system, and the obtained calibration matrix is ​​the affine transformation matrix. If the calibration matrix M is expressed according to the following expression: HAE :

[0167]

[0168] Among them, Mij is the element in the i-th row and j-th column of the calibration matrix.

[0169] Then we can get the following M HAE =M offine The expression is:

[0170]

[0171] Furthermore, it can be seen that M 11 and M 21 Characterizing the scaling and rotation relationship between the pixel coordinate system and the x-axis direction in the physical coordinate system, the first coefficient may include M 11 and M 21 . M 12 and M 22 Characterizing the scaling, rotation, and shearing relationship between the pixel coordinate system and the physical coordinate system in the y-axis direction, the second coefficient may include M 12 and M 22 Then, the x-axis scaling factor and the y-axis scaling factor can be determined according to the following expressions:

[0172]

[0173] According to M HAE =M offine The expression can be obtained:

[0174]

[0175] Therefore, the bevel angle can be obtained as follows:

[0176]

[0177] Similarly, the bevel angle can be obtained according to the following expression:

[0178]

[0179] θ+δ can also be expressed by the following expression:

[0180]

[0181] Then, the bevel angle can also be obtained according to the following expression:

[0182]

[0183] It can be seen that when the motion mechanism is a two-axis integrated mechanism, the rotation angle between the orthogonal coordinate systems can be accurately obtained, and then the accurate bevel angle can be obtained, which further improves the accuracy of determining the translation deviation and reduces the error when controlling the movement of the motion mechanism.

[0184] In this way, the bevel angle is generated respectively for the two cases where the motion mechanism is a two-axis integrated mechanism and the motion mechanism is a two-axis separated mechanism. Different methods are used to generate the bevel angle for different cases, thereby further improving the accuracy of generating the bevel angle, improving the accuracy of determining the translation deviation, and reducing the error when controlling the movement of the motion mechanism.

[0185] The method of obtaining the calibration matrix is ​​described below.

[0186] In one embodiment of the present application, when the motion mechanism is a two-axis separation mechanism, the calibration matrix is ​​obtained in the following manner.

[0187] See also Figure 5 A flow chart of a method for obtaining a calibration matrix is ​​provided, the method comprising the following steps S501-S505.

[0188] Step S501: Obtaining single-axis calibration matrices obtained by performing hand-eye calibration on two single axes in the motion mechanism.

[0189] Among them, the single-axis calibration matrix corresponding to each single axis represents the transformation relationship between the orthogonal coordinate system corresponding to the single axis and the pixel coordinate system. The orthogonal coordinate system corresponding to each single axis is: an orthogonal coordinate system constructed with the single axis as the coordinate axis. When performing hand-eye calibration on each single axis, the calibration data is collected while the single axis is moved and the other single axis is fixed. The calibration data includes multiple sets of calibration coordinate pairs of image coordinates in the pixel coordinate system and physical coordinates in the physical coordinate system. The image coordinates and physical coordinates in the calibration coordinate pair are coordinates collected synchronously after the motion mechanism moves.

[0190] Specifically, assuming that the two single axes in the motion mechanism are the x-axis and the y-axis, when the x-axis is calibrated by hand and eye, the x-axis of the motion mechanism can be controlled to move at least twice. After each movement of the x-axis of the motion mechanism, the image acquisition device acquires the image of the reference object on the motion mechanism, identifies the image coordinates of the reference object on the motion mechanism in the pixel coordinate system, and records the physical coordinates of the reference object on the motion mechanism at this time. The obtained image coordinates and the physical coordinates corresponding to the image coordinates are used as the calibration data of the x-axis. Similarly, the calibration data of the y-axis is obtained in the above manner.

[0191] Then, according to the calibration data of the x-axis, a single-axis calibration matrix of the x-axis is generated, and according to the calibration data of the y-axis, a single-axis calibration matrix of the y-axis is generated.

[0192] Step S502: According to the two single-axis calibration matrices, the coordinates of the position information in the reference image posture in the orthogonal coordinate systems corresponding to the two single axes are obtained.

[0193] The implementation method of step S502 is the same as the method of generating the bevel angle in step S302 described above, in which the coordinates of the position information in the reference image posture in the two orthogonal coordinate systems corresponding to the single axes are obtained, and will not be described in detail here.

[0194] Step S503: Based on the obtained coordinates, generate a rotation angle between two orthogonal coordinate systems corresponding to a single axis.

[0195] The implementation of step S503 is the same as the above-mentioned method of generating the bevel angle in step S302, in which the rotation angle between two orthogonal coordinate systems corresponding to a single axis is generated based on the obtained coordinates, and will not be described in detail here.

[0196] Step S504: based on the rotation angle, obtain the angle between the two single axes.

[0197] Specifically, Figure 4 For example, after obtaining the rotation angle α, it can be obtained that the angle between the x-axis and the y-axis of the xoy coordinate system is α+90°.

[0198] Step S505: Based on the included angle, two bases on a single axis are generated, and a calibration matrix is ​​determined using the generated bases.

[0199] Among them, the two bases on the single axis are unit vectors in the two single axis directions respectively.

[0200] For example, Figure 4 For example, xoy' is the orthogonal coordinate system corresponding to the x-axis in the non-orthogonal coordinate system, at an angle of: In the case of , the generated x-axis basis can be:

[0201]

[0202] The generated y-axis basis can be:

[0203]

[0204] Then, for the coordinates between the xoy' coordinate system and the xoy coordinate system, there is the following coordinate transformation relationship:

[0205]

[0206] Among them, P xoy’ (x xoy’ ,y xoy’ ) represents the coordinates in the xoy' coordinate system, P xoy (x xoy ,y xoy ) represents the coordinates in the xoy coordinate system.

[0207] Assume that the uniaxial calibration moment corresponding to the x-axis is M1, and there exists a coordinate P in any pixel coordinate system i (x i ,y i ), then P xoy’ (x xoy’ ,y xoy’ )=M1*P i (x i’ ,y i ).

[0208] Then we can get the following expression:

[0209]

[0210] Get the transformation relationship expression between the coordinates in the pixel coordinate system and the coordinates in the xoy coordinate system:

[0211]

[0212] Then, in the above expression It can be used as a calibration matrix.

[0213] In one embodiment of the present application, when the motion mechanism is a two-axis integrated mechanism, the calibration matrix is ​​obtained in the following manner: the image coordinates of the reference object corresponding to the motion mechanism when it is located at different positions and the physical coordinates of the reference object corresponding to the motion mechanism are obtained, and the calibration matrix is ​​constructed based on the obtained image coordinates and physical coordinates.

[0214] Among them, different positions are not collinear. That is, at least three of the different positions are not on the same straight line. Image coordinates are: the coordinates of the reference object in the image captured by the image acquisition device. The reference object can be an object captured by the motion mechanism, a mark set on the motion mechanism, or a calibration plate.

[0215] The image coordinates of the reference object corresponding to the moving mechanism and the physical coordinates of the reference object corresponding to the moving mechanism are obtained by synchronously collecting the image coordinates and physical coordinates of the reference object of the moving mechanism at a position after the moving mechanism moves to the position, and the obtained image coordinates and physical coordinates are the calibration coordinate pair at the position.

[0216] For example, after controlling the movement to a position, the image acquisition device acquires the image of the reference object of the motion mechanism, then identifies the image coordinates of the reference object, and records the physical coordinates of the reference object as a calibration coordinate pair. Then, after controlling the movement to another position, the image coordinates and physical coordinates are acquired again as calibration coordinate pairs. This is done until at least three sets of calibration coordinate pairs that are not on the same straight line and correspond to different positions are obtained. Then, the calibration matrix between the image coordinates and the physical coordinates is solved based on the calibration coordinate pairs.

[0217] It can be seen that by generating calibration matrices in different ways for the two cases where the motion mechanism is a two-axis integrated mechanism and the motion mechanism is a two-axis separated mechanism, the calibration matrix can be accurately obtained, thereby improving the accuracy of the determined translation deviation and reducing the error in controlling the movement of the motion mechanism.

[0218] Corresponding to the above-mentioned motion mechanism control method, an embodiment of the present application provides a motion mechanism control device.

[0219] See also Figure 6 A schematic diagram of the structure of a motion mechanism control device is provided, the device comprising:

[0220] An image pose acquisition module 601 is used to obtain the current image pose of the object to be grasped by the motion mechanism in the image captured by the image acquisition device;

[0221] An angle difference determination module 602, for determining a rotation angle difference between a current image pose and a reference image pose of the object;

[0222] The translation deviation determination module 603 is used to determine the translation deviation of the motion mechanism moving from the first physical position to the second physical position according to the current image posture, the reference image posture, the calibration matrix, the skew matrix and the rotation angle difference, wherein the calibration matrix represents the transformation relationship between the pixel coordinate system of the image acquisition device and the physical coordinate system of the motion mechanism, the skew matrix represents the transformation relationship between the physical coordinate system and the orthogonal coordinate system, the first physical position is the position corresponding to the reference image posture in the physical coordinate system, and the second physical position is the position corresponding to the current image posture in the physical coordinate system;

[0223] The motion mechanism control module 604 is used to control the motion mechanism to move from the first physical position to the second physical position according to the translation deviation.

[0224] As can be seen from the above, in the solution provided in the embodiment of the present application, the current image posture, the reference image posture, the calibration matrix, the bevel matrix and the rotation angle difference are used to determine the translation deviation of the motion mechanism from the first physical position to the second physical position. Since the bevel matrix represents the transformation relationship between the physical coordinate system and the orthogonal coordinates, when the two coordinate axes of the physical coordinate system are not orthogonal, the translation deviation between the first physical position corresponding to the reference image posture and the second physical position corresponding to the current image posture in the physical coordinate system can be accurately determined. In this way, according to the translation deviation in the more accurate physical coordinate system, the motion mechanism can be more accurately controlled to move from the first physical position to the second physical position, thereby reducing the error in controlling the movement of the motion mechanism.

[0225] In one embodiment of the present application, a translation deviation determination module includes: a first physical position determination unit, used to determine the first physical position based on the calibration matrix and the position information in the reference image pose; a second physical position determination unit, used to determine the second physical position based on the calibration matrix, the bevel matrix, the rotation angle difference and the position information in the current image pose; a difference calculation unit, used to calculate the difference between the first physical position and the second physical position as the translation deviation of the motion mechanism moving from the first physical position to the second physical position.

[0226] In this way, based on the calibration matrix, the bevel matrix, the rotation angle difference and the position information in the current image posture, the second position information can be determined more accurately, and then the difference between the first physical position and the second physical position can be accurately determined, and the accurate translation deviation from the first physical position to the second physical position can be obtained, thereby improving the accuracy of controlling the movement of the motion mechanism.

[0227] In one embodiment of the present application, the second physical location determining unit is specifically configured to determine the second physical location according to the following expression: in, is the inverse matrix of the shear matrix, δ is the shear angle, is the rotation transformation matrix, Δθ is the rotation angle difference, M HAE is the calibration matrix, (x cur ,y cur ) is the coordinate of the position information in the current image pose in the pixel coordinate system.

[0228] It can be seen that the second physical position can be determined more accurately according to the above expression, thereby improving the accuracy of the determined translation deviation.

[0229] In one embodiment of the present application, the bevel matrix is ​​obtained in the following manner: obtain the calibration results of hand-eye calibration of the physical coordinate system and the pixel coordinate system; generate the bevel angle of the physical coordinate system relative to the orthogonal coordinate system based on the calibration results; and construct the bevel matrix based on the obtained bevel angle.

[0230] In this way, the bevel angle used to construct the bevel matrix is ​​generated according to the calibration result, so that the bevel angle can be obtained using the existing calibration result, which is convenient for obtaining the bevel matrix and improving the calculation efficiency. In addition, the bevel angle obtained based on the calibration result is more accurate, which can avoid the error caused by the measurement, improve the accuracy of the obtained bevel angle, improve the accuracy of the determined translation deviation, and reduce the error when controlling the movement of the motion mechanism.

[0231] In one embodiment of the present application, if the motion mechanism is a two-axis separate mechanism, the calibration result includes a single-axis calibration matrix corresponding to each single axis, wherein the single-axis calibration matrix corresponding to each single axis represents the transformation relationship between the orthogonal coordinate system corresponding to the single axis and the pixel coordinate system, and the orthogonal coordinate system corresponding to each single axis is: an orthogonal coordinate system constructed with the single axis as the coordinate axis; based on the calibration result, a bevel angle of the physical coordinate system relative to the orthogonal coordinate system is generated, including: according to two single-axis calibration matrices, obtaining the coordinates of the position information in the reference image posture in the orthogonal coordinate systems corresponding to the two single axes respectively; based on the obtained coordinates, generating a rotation angle between the two orthogonal coordinate systems corresponding to the single axes; and determining the physical coordinate system according to the rotation angle. The bevel angle of the coordinate system relative to the orthogonal coordinate system; or, if the motion mechanism is a two-axis integrated mechanism, the calibration result is a calibration matrix; based on the calibration result, the bevel angle of the physical coordinate system relative to the orthogonal coordinate system is generated, including: using the first coefficient in the calibration matrix to determine the x-axis scaling coefficient, wherein the first coefficient represents the scaling and rotation relationship between the pixel coordinate system and the physical coordinate system in the x-axis direction; using the second coefficient in the calibration matrix to determine the y-axis scaling coefficient, wherein the second coefficient represents the scaling, rotation and bevel relationship between the pixel coordinate system and the physical coordinate system in the y-axis direction; based on the first coefficient, the second coefficient, the x-axis scaling coefficient and the y-axis scaling coefficient, the bevel angle of the physical coordinate system relative to the orthogonal coordinate system is generated.

[0232] In this way, the bevel angle is generated respectively for the two cases where the motion mechanism is a two-axis integrated mechanism and the motion mechanism is a two-axis separated mechanism. Different methods are used to generate the bevel angle for different cases, thereby further improving the accuracy of generating the bevel angle, improving the accuracy of determining the translation deviation, and reducing the error when controlling the movement of the motion mechanism.

[0233] In one embodiment of the present application, generating a rotation angle between two orthogonal coordinate systems corresponding to a single axis based on the obtained coordinates includes: generating a rotation angle between two orthogonal coordinate systems corresponding to a single axis according to the following expression: Wherein, α is the rotation angle between the orthogonal coordinate systems corresponding to the two single axes, (x1, y1) and (x2, y2) are the coordinates of the position information in the reference image pose in the orthogonal coordinate systems corresponding to the two single axes respectively; or, according to the first coefficient, the second coefficient, the x-axis scaling coefficient and the y-axis scaling coefficient, the bevel angle of the physical coordinate system relative to the orthogonal coordinate system is generated, including: generating the bevel angle of the physical coordinate system relative to the orthogonal coordinate system according to the following expression: Wherein, δ is the bevel angle, D2 is the second coefficient, D1 is the first coefficient, sx is the x-axis scaling coefficient, and sy is the y-axis scaling coefficient.

[0234] It can be seen that when the motion mechanism is a two-axis separated mechanism, the rotation angle between the orthogonal coordinate systems can be accurately obtained, and then the accurate bevel angle can be obtained, which further improves the accuracy of determining the translation deviation and reduces the error when controlling the movement of the motion mechanism. When the motion mechanism is a two-axis integrated mechanism, the rotation angle between the orthogonal coordinate systems can be accurately obtained, and then the accurate bevel angle can be obtained, which further improves the accuracy of determining the translation deviation and reduces the error when controlling the movement of the motion mechanism.

[0235] In one embodiment of the present application, if the motion mechanism is a two-axis separated mechanism, a calibration matrix is ​​obtained in the following manner: a single-axis calibration matrix is ​​obtained by performing hand-eye calibration on two single axes in the motion mechanism, wherein the single-axis calibration matrix corresponding to each single axis represents the transformation relationship between the orthogonal coordinate system corresponding to the single axis and the pixel coordinate system, and the orthogonal coordinate system corresponding to each single axis is: an orthogonal coordinate system constructed with the single axis as the coordinate axis, and when performing hand-eye calibration on each single axis, calibration data is collected while moving the single axis and fixing the other single axis; according to the two single-axis calibration matrices, the coordinates of the position information in the reference image posture in the orthogonal coordinate systems corresponding to the two single axes are obtained; based on the Based on the obtained coordinates, generate a rotation angle between the orthogonal coordinate systems corresponding to the two single axes; based on the rotation angle, obtain the angle between the two single axes; based on the angle, generate a basis on the two single axes, and use the generated basis and the obtained single-axis calibration matrix to determine the calibration matrix; or, if the motion mechanism is a two-axis integrated mechanism, obtain the calibration matrix in the following manner: obtain the image coordinates when the reference object corresponding to the motion mechanism is located at different positions and the physical coordinates of the reference object corresponding to the motion mechanism, wherein the different positions are not collinear; construct a calibration matrix based on the obtained image coordinates and physical coordinates, wherein the image coordinates are: the coordinates of the reference object in the image captured by the image acquisition device.

[0236] It can be seen that by generating calibration matrices in different ways for the two cases where the motion mechanism is a two-axis integrated mechanism and the motion mechanism is a two-axis separated mechanism, the calibration matrix can be accurately obtained, thereby improving the accuracy of the determined translation deviation and reducing the error in controlling the movement of the motion mechanism.

[0237] The present application also provides an electronic device, such as Figure 7 As shown, including:

[0238] Memory 701, used for storing computer programs;

[0239] The processor 702 is used to implement any motion mechanism control method in the above embodiments when executing the program stored in the memory 701.

[0240] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0241] The communication interface is used for communication between the above electronic device and other devices.

[0242] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0243] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0244] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned motion mechanism control methods are implemented.

[0245] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any motion mechanism control method in the above embodiments.

[0246] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a solid-state hard disk (SSD), etc.

[0247] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0248] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for methods, devices, electronic devices, storage media, and computer program products, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0249] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A motion mechanism control method, characterized in that: The method comprises: Obtaining the current image pose of the object to be grasped by the motion mechanism in the image captured by the image acquisition device; determining a rotation angle difference between the current image pose and a reference image pose of the object; Determine a translation deviation of the motion mechanism from a first physical position to a second physical position according to the current image pose, the reference image pose, a calibration matrix, a skew matrix, and the rotation angle difference, wherein the calibration matrix represents a transformation relationship between a pixel coordinate system of the image acquisition device and a physical coordinate system of the motion mechanism, the skew matrix represents a transformation relationship between the physical coordinate system and an orthogonal coordinate system, the first physical position is a position corresponding to the reference image pose in the physical coordinate system, and the second physical position is a position corresponding to the current image pose in the physical coordinate system; According to the translation deviation, the motion mechanism is controlled to move from the first physical position to the second physical position.

2. The method according to claim 1, characterized in that The determining, according to the current image pose, the reference image pose, the calibration matrix, the skew matrix and the rotation angle difference, a translation deviation of the motion mechanism moving from the first physical position to the second physical position comprises: Determining a first physical position according to the calibration matrix and the position information in the reference image pose; Determining a second physical position according to the calibration matrix, the skew matrix, the rotation angle difference and the position information in the current image pose; A difference between the first physical position and the second physical position is calculated as a translation deviation of the motion mechanism moving from the first physical position to the second physical position.

3. The method according to claim 2, characterized in that The determining of the second physical position according to the calibration matrix, the skew matrix, the rotation angle difference and the position information in the current image pose comprises: The second physical location is determined by the following expression: in, is the inverse matrix of the shear matrix, δ is the shear angle, is the rotation transformation matrix, Δθ is the rotation angle difference, M HAE is the calibration matrix, (x cur ,y cur ) is the coordinate of the position information in the current image pose in the pixel coordinate system.

4. The method according to any one of claims 1 to 3, characterized in that The skewing matrix is ​​obtained as follows: Obtaining a calibration result of hand-eye calibration of the physical coordinate system and the pixel coordinate system; According to the calibration result, generating a bevel angle of the physical coordinate system relative to the orthogonal coordinate system; Based on the obtained skew angles, the skew matrix is ​​constructed.

5. The method according to claim 4, characterized in that If the motion mechanism is a two-axis separation mechanism, the calibration result includes a single-axis calibration matrix corresponding to each single axis, wherein the single-axis calibration matrix corresponding to each single axis represents the transformation relationship between the orthogonal coordinate system corresponding to the single axis and the pixel coordinate system, and the orthogonal coordinate system corresponding to each single axis is: an orthogonal coordinate system constructed with the single axis as the coordinate axis; generating the oblique angle of the physical coordinate system relative to the orthogonal coordinate system according to the calibration result, including: obtaining the coordinates of the position information in the reference image posture in the orthogonal coordinate systems corresponding to the two single axes according to the two single-axis calibration matrices; generating the rotation angle between the two orthogonal coordinate systems corresponding to the single axes based on the obtained coordinates; determining the oblique angle of the physical coordinate system relative to the orthogonal coordinate system according to the rotation angle; or If the motion mechanism is a two-axis integrated mechanism, the calibration result is the calibration matrix; generating the bevel angle of the physical coordinate system relative to the orthogonal coordinate system based on the calibration result includes: using the first coefficient in the calibration matrix to determine the x-axis scaling coefficient, wherein the first coefficient represents the scaling and rotation relationship between the pixel coordinate system and the physical coordinate system in the x-axis direction; using the second coefficient in the calibration matrix to determine the y-axis scaling coefficient, wherein the second coefficient represents the scaling, rotation and bevel relationship between the pixel coordinate system and the physical coordinate system in the y-axis direction; generating the bevel angle of the physical coordinate system relative to the orthogonal coordinate system based on the first coefficient, the second coefficient, the x-axis scaling coefficient and the y-axis scaling coefficient.

6. The method according to claim 5, characterized in that The step of generating the rotation angle between the two orthogonal coordinate systems corresponding to the single axes based on the obtained coordinates includes: generating the rotation angle between the two orthogonal coordinate systems corresponding to the single axes according to the following expression: Wherein, α is the rotation angle between the orthogonal coordinate systems corresponding to the two single axes, (x1, y1) and (x2, y2) are the coordinates of the position information in the reference image pose in the orthogonal coordinate systems corresponding to the two single axes respectively; or Generating the bevel angle of the physical coordinate system relative to the orthogonal coordinate system according to the first coefficient, the second coefficient, the x-axis scaling coefficient, and the y-axis scaling coefficient includes: generating the bevel angle of the physical coordinate system relative to the orthogonal coordinate system according to the following expression: Wherein, δ is the bevel angle, D2 is the second coefficient, D1 is the first coefficient, sx is the x-axis scaling coefficient, and sy is the y-axis scaling coefficient.

7. The method according to any one of claims 1 to 3, characterized in that If the motion mechanism is a two-axis separation mechanism, the calibration matrix is ​​obtained in the following manner: Obtain a single-axis calibration matrix obtained by performing hand-eye calibration on two single axes in the motion mechanism, wherein the single-axis calibration matrix corresponding to each single axis represents the transformation relationship between the orthogonal coordinate system corresponding to the single axis and the pixel coordinate system, and the orthogonal coordinate system corresponding to each single axis is: an orthogonal coordinate system constructed with the single axis as the coordinate axis, and when performing hand-eye calibration on each single axis, the calibration data is collected while the single axis is moved and the other single axis is fixed; according to the two single-axis calibration matrices, the coordinates of the position information in the reference image posture in the orthogonal coordinate systems corresponding to the two single axes are obtained; based on the obtained coordinates, a rotation angle between the orthogonal coordinate systems corresponding to the two single axes is generated; based on the rotation angle, an angle between the two single axes is obtained; based on the angle, a basis on the two single axes is generated, and the calibration matrix is ​​determined using the generated basis and the obtained single-axis calibration matrix; or If the motion mechanism is a two-axis integrated mechanism, the calibration matrix is ​​obtained in the following manner: Obtain image coordinates when the reference object corresponding to the motion mechanism is located at different positions and physical coordinates of the reference object corresponding to the motion mechanism, wherein the different positions are not collinear; construct a calibration matrix based on the obtained image coordinates and physical coordinates, wherein the image coordinates are: the coordinates of the reference object in the image captured by the image acquisition device.

8. A motion mechanism control device, characterized in that: The device comprises: An image pose acquisition module, used to obtain the current image pose of the object to be grasped by the motion mechanism in the image captured by the image acquisition device; an angle difference determination module, for determining a rotation angle difference between the current image pose and a reference image pose of the object; a translation deviation determination module, for determining the translation deviation of the motion mechanism moving from the first physical position to the second physical position according to the current image pose, the reference image pose, a calibration matrix, a skew matrix and the rotation angle difference, wherein the calibration matrix represents the transformation relationship between the pixel coordinate system of the image acquisition device and the physical coordinate system of the motion mechanism, the skew matrix represents the transformation relationship between the physical coordinate system and the orthogonal coordinate system, the first physical position is the position corresponding to the reference image pose in the physical coordinate system, and the second physical position is the position corresponding to the current image pose in the physical coordinate system; The motion mechanism control module is used to control the motion mechanism to move from the first physical position to the second physical position according to the translation deviation.

9. The device according to claim 8, characterized in that The translation deviation determination module includes: a first physical position determination unit, used to determine a first physical position according to a calibration matrix and position information in the reference image posture; a second physical position determination unit, used to determine a second physical position according to the calibration matrix, the skew matrix, the rotation angle difference and the position information in the current image posture; a difference calculation unit, used to calculate the difference between the first physical position and the second physical position as a translation deviation of the motion mechanism moving from the first physical position to the second physical position; and / or The second physical location determining unit is specifically configured to determine the second physical location according to the following expression: in, is the inverse matrix of the shear matrix, δ is the shear angle, is the rotation transformation matrix, Δθ is the rotation angle difference, M HAE is the calibration matrix, (x cur ,y cur ) is the coordinate of the position information in the current image pose in the pixel coordinate system; and / or The skew matrix is ​​obtained in the following manner: obtaining a calibration result of hand-eye calibration of the physical coordinate system and the pixel coordinate system; generating a skew angle of the physical coordinate system relative to an orthogonal coordinate system according to the calibration result; and constructing the skew matrix based on the obtained skew angle; and / or If the motion mechanism is a two-axis separate mechanism, the calibration result includes a single-axis calibration matrix corresponding to each single axis, wherein the single-axis calibration matrix corresponding to each single axis represents the transformation relationship between the orthogonal coordinate system corresponding to the single axis and the pixel coordinate system, and the orthogonal coordinate system corresponding to each single axis is: an orthogonal coordinate system constructed with the single axis as the coordinate axis; generating the oblique angle of the physical coordinate system relative to the orthogonal coordinate system according to the calibration result includes: obtaining the coordinates of the position information in the reference image posture in the orthogonal coordinate systems corresponding to the two single axes according to the two single-axis calibration matrices; generating the rotation angle between the two orthogonal coordinate systems corresponding to the two single axes based on the obtained coordinates; and determining the rotation angle of the physical coordinate system relative to the orthogonal coordinate system according to the rotation angle. bevel angle; or, if the motion mechanism is a two-axis integrated mechanism, the calibration result is the calibration matrix; the generating the bevel angle of the physical coordinate system relative to the orthogonal coordinate system according to the calibration result comprises: using the first coefficient in the calibration matrix to determine the x-axis scaling coefficient, wherein the first coefficient represents the scaling and rotation relationship between the pixel coordinate system and the physical coordinate system in the x-axis direction; using the second coefficient in the calibration matrix to determine the y-axis scaling coefficient, wherein the second coefficient represents the scaling, rotation and bevel relationship between the pixel coordinate system and the physical coordinate system in the y-axis direction; generating the bevel angle of the physical coordinate system relative to the orthogonal coordinate system according to the first coefficient, the second coefficient, the x-axis scaling coefficient and the y-axis scaling coefficient; and / or The step of generating the rotation angle between the two orthogonal coordinate systems corresponding to the single axes based on the obtained coordinates includes: generating the rotation angle between the two orthogonal coordinate systems corresponding to the single axes according to the following expression: Wherein, α is the rotation angle between the orthogonal coordinate systems corresponding to the two single axes, (x1, y1) and (x2, y2) are the coordinates of the position information in the reference image pose in the orthogonal coordinate systems corresponding to the two single axes respectively; or, generating the oblique angle of the physical coordinate system relative to the orthogonal coordinate system according to the first coefficient, the second coefficient, the x-axis scaling coefficient and the y-axis scaling coefficient, comprises: generating the oblique angle of the physical coordinate system relative to the orthogonal coordinate system according to the following expression: Wherein, δ is the bevel angle, D2 is the second coefficient, D1 is the first coefficient, sx is the x-axis scaling coefficient, and sy is the y-axis scaling coefficient; and / or If the motion mechanism is a two-axis separated mechanism, the calibration matrix is ​​obtained in the following manner: obtain the single-axis calibration matrices obtained by performing hand-eye calibration on the two single axes in the motion mechanism respectively, wherein the single-axis calibration matrix corresponding to each single axis represents the transformation relationship between the orthogonal coordinate system corresponding to the single axis and the pixel coordinate system, and the orthogonal coordinate system corresponding to each single axis is: an orthogonal coordinate system constructed with the single axis as the coordinate axis, and when performing hand-eye calibration on each single axis, the calibration data is collected while moving the single axis and fixing the other single axis; according to the two single-axis calibration matrices, the coordinates of the position information in the reference image posture in the orthogonal coordinate systems corresponding to the two single axes are obtained; based on the obtained coordinates, generate The rotation angle between the orthogonal coordinate systems corresponding to the two single axes; based on the rotation angle, obtaining the angle between the two single axes; based on the angle, generating bases on the two single axes, and using the generated bases and the obtained single-axis calibration matrix to determine the calibration matrix; or, if the motion mechanism is a two-axis integrated mechanism, obtaining the calibration matrix in the following manner: obtaining the image coordinates when the reference object corresponding to the motion mechanism is located at different positions and the physical coordinates of the reference object corresponding to the motion mechanism, wherein the different positions are not collinear; constructing a calibration matrix based on the obtained image coordinates and physical coordinates, wherein the image coordinates are: the coordinates of the reference object in the image captured by the image acquisition device.

10. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-7 when executing a program stored in a memory.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Para light source image deviation adjustment self-calibration method

    CN105216437A

  • Drilling multi-dimensional feature accurate recognition method based on machine vision

    CN117522794A

  • Welding gun tail end deviation calibration method and device, storage medium and electronic equipment

    CN117697091A

  • Image processing method and apparatus, computer device, storage medium, and program product

    WO2023045284A1

  • KR20230116502A