Mechanical arm calibration method and device, electronic device and storage medium
Patent Information
- Application Number
- CN202311284659.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-28
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-09-28
AI Technical Summary
[0003]相关技术中,不同待操作设备的高度可能不同,换用不同高度的待操作设备时,机械臂的控制精度会降低,此时需要人工进行复杂的校准操作重新校准机械臂,校准效率较低
[0047]This invention includes the following embodiments: Utilizing a robotic arm calibration device, in response to a first calibration command, identifying a first calibration line segment located on a first plane, obtaining and recording the first display pixel length of the first calibration line segment; when a device to be operated at a different height is used, and the operating plane of the device to be operated is changed to a second plane, in response to a second calibration command, identifying a second calibration line segment located on the second plane, obtaining the second display pixel length of the second calibration line segment; wherein the lengths of the first calibration line segment and the second calibration line segment are equal; obtaining a calibration ratio parameter based on the first display pixel length and the second display pixel length; in response to an operation point selection command, displaying the operation point on an interactive display interface, and obtaining the first screen display coordinates of the operation point; automatically converting the first screen display coordinates into first actual coordinates based on the calibration ratio parameter and pre-recorded calibration data information; simplifying the calibration operation, completing automated calibration, and improving calibration efficiency; controlling the end effector of the robotic arm to move from its current position to the first actual coordinates, enabling the robotic arm to accurately control the device to be operated at different heights after the change, ensuring that the robotic arm has high control accuracy, and enabling direct control of the robotic arm movement through a visual interactive interface. In other words, the solution of the present invention can simplify the calibration operation, complete the automated calibration, improve the calibration efficiency, and ensure that the robotic arm has high control accuracy when using different heights of the equipment to be operated.
Smart Images

Figure CN117325160B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robotic arm control technology, and in particular to a robotic arm calibration method and apparatus, electronic device, and storage medium. Background Technology
[0002] A robotic arm is a complex system characterized by multiple inputs and multiple outputs, high nonlinearity, and strong coupling. Due to its unique operational flexibility, it has been widely used in various laboratories, industrial assembly, and safety and explosion-proof fields. In a robotic arm control system, a device with a display screen, such as a tablet, smartphone, or time attendance machine, is typically placed below the robotic arm. The movement of the robotic arm is controlled, and the device is operated through the end effector of the robotic arm. Before using a robotic arm control system, the robotic arm needs to be calibrated.
[0003] In related technologies, the height of different devices to be operated may be different. When changing to devices of different heights, the control accuracy of the robotic arm will decrease. At this time, a complex manual calibration operation is required to recalibrate the robotic arm, which results in low calibration efficiency. Summary of the Invention
[0004] The following is an overview of the topics described in detail in this article.
[0005] This invention provides a robotic arm calibration method, apparatus, electronic device, and storage medium, which can simplify calibration operations, automate calibration, and improve calibration efficiency when using devices of different heights, while ensuring high control accuracy of the robotic arm.
[0006] In a first aspect, embodiments of the present invention provide a robotic arm calibration method, comprising:
[0007] In response to a first calibration command, a first calibration line segment located on a first plane is identified, and the first display pixel length of the first calibration line segment is obtained and recorded;
[0008] In response to the second calibration command, a second calibration line segment located on the second plane is identified, and the second display pixel length of the second calibration line segment is obtained; wherein the lengths of the first calibration line segment and the second calibration line segment are equal;
[0009] The calibration ratio parameter is obtained based on the first display pixel length and the second display pixel length;
[0010] In response to the operation point selection command, the operation point is displayed on the interactive display interface, and the first screen display coordinates of the operation point are obtained;
[0011] Based on the calibration ratio parameter and the pre-recorded calibration data, the first screen display coordinates are automatically converted into the first actual coordinates;
[0012] The end effector of the control robot arm is moved from its current position to the first actual coordinate.
[0013] According to some embodiments of the present invention, the calibration data information includes: screen display center coordinates, and the coordinate axis ratio relationship between the preview coordinate system and the actual coordinate system; the step of automatically converting the first screen display coordinates into the first actual coordinates based on the calibration ratio parameter and the pre-recorded calibration data information includes:
[0014] The second screen display coordinates are obtained by calculating and processing the first screen display coordinates, the calibration ratio parameter, and the screen display center coordinates.
[0015] The first actual coordinates are obtained by calculating the coordinates displayed on the second screen and the proportional relationship between the coordinate axes.
[0016] According to some embodiments of the present invention, the calibration data information further includes: reference screen coordinates, reference actual coordinates, and coordinate transformation relationship between screen coordinates and actual coordinates; the step of calculating and processing based on the second screen display coordinates and the coordinate axis ratio to obtain the first actual coordinates includes:
[0017] Calculate the difference between the second screen display coordinates and the reference screen coordinates, and use it as the screen displacement;
[0018] The actual displacement is obtained by calculating based on the screen displacement and the coordinate transformation relationship.
[0019] The first actual coordinates are obtained by calculating based on the actual displacement and the actual coordinates of the reference.
[0020] According to some embodiments of the present invention, the step of identifying a first calibration line segment located on a first plane in response to a first calibration command, and obtaining and recording the first display pixel length of the first calibration line segment, includes:
[0021] In response to the first calibration command, a calibration image is acquired on the first plane, the calibration image being used to display a first projection image formed after the first calibration line segment is imaged through a pinhole camera;
[0022] Identify the calibration image and determine the first projected image as the reference diagonal;
[0023] The first rectangular frame is determined based on the reference diagonal;
[0024] Based on the first rectangle, obtain the first calibration coordinates of the upper left endpoint and the second calibration coordinates of the lower right endpoint;
[0025] The length of the first display pixel is obtained by calculating based on the first calibration coordinate and the second calibration coordinate.
[0026] According to some embodiments of the present invention, the step of identifying a second calibration line segment located on a second plane and obtaining a second display pixel length of the second calibration line segment in response to a second calibration command includes:
[0027] In response to the second calibration command, a calibration image is acquired on the second plane, the calibration image being used to display a second projection image formed after the second calibration line segment is imaged through a pinhole camera;
[0028] Identify the calibration image and determine the second projected image as the reference diagonal;
[0029] The second rectangular frame is determined based on the reference diagonal;
[0030] Based on the second rectangle, obtain the third calibration coordinate of the upper left endpoint and the fourth calibration coordinate of the lower right endpoint;
[0031] The second display pixel length is obtained by calculating based on the third and fourth calibration coordinates.
[0032] According to some embodiments of the present invention, obtaining the calibration ratio parameter based on the first display pixel length and the second display pixel length includes:
[0033] Calculate the ratio of the length of the first display pixel to the length of the second display pixel;
[0034] The ratio is determined to be the calibration ratio parameter.
[0035] According to some embodiments of the present invention, before identifying the first calibration line segment located on the first plane in response to the first calibration command, the method further includes:
[0036] In the first plane, the actual coordinates and screen coordinates of the execution end are calibrated to obtain the calibration data information;
[0037] Record the calibration data information; wherein, the calibration data information includes: screen display center coordinates, upper left limit preview coordinates and lower right limit preview coordinates of the preview coordinate system, actual coordinates of the robotic arm, the coordinate axis ratio relationship between the preview coordinate system and the actual coordinate system, reference screen coordinates, reference actual coordinates, and the coordinate transformation relationship between screen coordinates and actual coordinates.
[0038] Secondly, embodiments of the present invention provide a robotic arm calibration device, comprising:
[0039] The first identification module is used to identify the first calibration line segment located on the first plane in response to the first calibration command, and to obtain and record the first display pixel length of the first calibration line segment;
[0040] The second identification module is used to identify the second calibration line segment located on the second plane in response to the second calibration command, and obtain the second display pixel length of the second calibration line segment; wherein the lengths of the first calibration line segment and the second calibration line segment are equal;
[0041] The first calculation module is used to obtain a calibration ratio parameter based on the first display pixel length and the second display pixel length;
[0042] The coordinate acquisition module is used to respond to the operation point selection command, display the operation point on the interactive display interface, and acquire the first screen display coordinates of the operation point;
[0043] The second calculation module is used to automatically convert the first screen display coordinates into the first actual coordinates based on the calibration ratio parameter and the pre-recorded calibration data information.
[0044] The motion control module is used to control the end effector of the robotic arm to move from its current position to the first actual coordinate.
[0045] Thirdly, embodiments of the present invention provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the robotic arm calibration method as described in the first aspect.
[0046] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the robotic arm calibration method as described in the first aspect.
[0047] This invention includes the following embodiments: Utilizing a robotic arm calibration device, in response to a first calibration command, identifying a first calibration line segment located on a first plane, obtaining and recording the first display pixel length of the first calibration line segment; when a device to be operated at a different height is used, and the operating plane of the device to be operated is changed to a second plane, in response to a second calibration command, identifying a second calibration line segment located on the second plane, obtaining the second display pixel length of the second calibration line segment; wherein the lengths of the first calibration line segment and the second calibration line segment are equal; obtaining a calibration ratio parameter based on the first display pixel length and the second display pixel length; in response to an operation point selection command, displaying the operation point on an interactive display interface, and obtaining the first screen display coordinates of the operation point; automatically converting the first screen display coordinates into first actual coordinates based on the calibration ratio parameter and pre-recorded calibration data information; simplifying the calibration operation, completing automated calibration, and improving calibration efficiency; controlling the end effector of the robotic arm to move from its current position to the first actual coordinates, enabling the robotic arm to accurately control the device to be operated at different heights after the change, ensuring that the robotic arm has high control accuracy, and enabling direct control of the robotic arm movement through a visual interactive interface. In other words, the solution of the present invention can simplify the calibration operation, complete the automated calibration, improve the calibration efficiency, and ensure that the robotic arm has high control accuracy when using different heights of the equipment to be operated.
[0048] Other features and advantages of the invention will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the description and the drawings. Attached Figure Description
[0049] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0050] Figure 1 This is a flowchart illustrating a robotic arm calibration method provided in one embodiment of the present invention;
[0051] Figure 2 This is an imaging schematic diagram of a camera taking pictures of a plane at different heights according to an embodiment of the present invention;
[0052] Figure 3 This is an imaging schematic diagram of a camera taking pictures of a plane at different heights, according to another embodiment of the present invention;
[0053] Figure 4 This is a schematic diagram illustrating the conversion between screen coordinates and actual coordinates in an embodiment of the present invention;
[0054] Figure 5 yes Figure 1A detailed flowchart of step S160 is shown below;
[0055] Figure 6 This is a schematic diagram of the structure of a robotic arm calibration device provided in one embodiment of the present invention;
[0056] Figure 7 This is a schematic diagram of the hardware structure of an electronic device provided in one embodiment of the present invention. Detailed Implementation
[0057] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0058] It should be noted that although a logical order is shown in the flowcharts in the description of this invention, in some cases, the steps shown or described may be performed in a different order than that shown in the flowcharts. In the description of this invention, "several" means one or more, and "more" means two or more. The terms "first" and "second" are used only to distinguish technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.
[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to limit the invention.
[0060] In a robotic arm control system, a device with a display screen, such as a tablet, smartphone, or time attendance machine, is typically placed below the robotic arm. The robotic arm is then moved to control the movement of the device, which is then operated via its end effector. Before using the robotic arm control system, the robotic arm needs to be calibrated.
[0061] In related technologies, the height of different devices to be operated may be different. When changing to devices of different heights, the control accuracy of the robotic arm will decrease. At this time, a complex manual calibration operation is required to recalibrate the robotic arm, which results in low calibration efficiency.
[0062] Based on this, the present invention provides a robotic arm calibration method, a robotic arm calibration device, an electronic device, and a computer-readable storage medium, which can simplify the calibration operation, complete automated calibration, improve calibration efficiency, and ensure high control accuracy of the robotic arm when changing the device to be operated at different heights.
[0063] The embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0064] Firstly, such as Figure 1As shown, the robotic arm calibration method may include, but is not limited to, steps S110 to S160.
[0065] Step S110: In response to the first calibration command, identify the first calibration line segment located on the first plane, and obtain and record the first display pixel length of the first calibration line segment.
[0066] In this step, at the factory, in calibration mode, in response to the first calibration command, the first calibration line segment located on the first plane is identified, and the first display pixel length of the first calibration line segment is obtained and recorded, providing a data basis for subsequent calculation of calibration ratio parameters.
[0067] Specifically, the first plane is the calibration plane used at the factory.
[0068] Specifically, the operator can input the first calibration command via mouse or touch screen. This invention does not specifically limit the method of inputting the first calibration command.
[0069] Step S120: In response to the second calibration command, identify the second calibration line segment located on the second plane and obtain the second display pixel length of the second calibration line segment; wherein the lengths of the first calibration line segment and the second calibration line segment are equal.
[0070] In this step, when using a device of different heights to be operated, in calibration mode, in response to the second calibration command, the second calibration line segment located on the second plane is identified, and the second display pixel length of the second calibration line segment is obtained, providing a data basis for subsequent calculation of calibration ratio parameters.
[0071] Specifically, the second plane is the operating plane of the replacement equipment to be operated.
[0072] Specifically, the operator can input the second calibration command through a mouse or touch screen. This invention does not specifically limit the method of inputting the second calibration command.
[0073] Step S130: Obtain the calibration ratio parameter based on the first display pixel length and the second display pixel length.
[0074] In this step, after calculating the first display pixel length and the second display pixel length, further calculations are performed to obtain the calibration ratio parameters, providing a reference basis for subsequent automatic verification.
[0075] Step S140: In response to the operation point selection command, display the operation point on the interactive display interface and obtain the first screen display coordinates of the operation point.
[0076] In this step, the operator can input the operation point selection command through a mouse, touch screen, or interactive display interface. This invention does not specifically limit the method of inputting the operation point selection command.
[0077] Specifically, the interactive display interface can be displayed on the camera's screen or on the screen of an electronic device (such as a PC, mobile phone, etc.) connected to the camera.
[0078] Step S150: Based on the calibration ratio parameters and pre-recorded calibration data, automatically convert the coordinates displayed on the first screen into the first actual coordinates.
[0079] In this step, calibration data information pre-recorded during the factory calibration process is obtained, and automatic calibration is performed based on the calibration ratio parameter and calibration data information to convert the coordinates displayed on the first screen into the first actual coordinates; this simplifies the calibration operation and improves calibration efficiency.
[0080] Step S160: Control the end effector of the robotic arm to move from its current position to the first actual coordinate.
[0081] In this step, the end effector of the robotic arm is moved according to the first actual coordinate, so that the robotic arm can accurately control the equipment to be operated at different heights after replacement.
[0082] The present invention implements steps S110 to S160 as follows: Using a robotic arm calibration device, in response to a first calibration command, a first calibration line segment located on a first plane is identified, and the first display pixel length of the first calibration line segment is obtained and recorded. When a device of different height is used, and the operating plane of the device changes to a second plane, in response to a second calibration command, a second calibration line segment located on the second plane is identified, and the second display pixel length of the second calibration line segment is obtained. The lengths of the first and second calibration line segments are equal. A calibration ratio parameter is obtained based on the first and second display pixel lengths. In response to an operation point selection command, an operation point is displayed on an interactive display interface, and the first screen display coordinates of the operation point are obtained. Based on the calibration ratio parameter and pre-recorded calibration data, the first screen display coordinates are automatically converted into first actual coordinates. This simplifies the calibration operation, completes automated calibration, and improves calibration efficiency. The robotic arm's end effector is controlled to move from its current position to the first actual coordinates, enabling the robotic arm to precisely control the device of different heights after the change, ensuring high control accuracy, and allowing direct control of the robotic arm's movement through a visual interactive interface. In other words, the solution of the present invention can simplify the calibration operation, complete the automated calibration, improve the calibration efficiency, and ensure that the robotic arm has high control accuracy when using different heights of the equipment to be operated.
[0083] According to some embodiments of the present invention, step S110 will be further described, and this step may include, but is not limited to, the following steps:
[0084] In response to a first calibration command, a calibration image is acquired on a first plane. The calibration image is used to display a first projection image formed after the first calibration line segment is imaged through a pinhole.
[0085] Identify the calibration image and determine the first projected image as the reference diagonal;
[0086] The first rectangle is determined based on the baseline diagonal;
[0087] Based on the first rectangle, obtain the first calibration coordinates of the upper left endpoint and the second calibration coordinates of the lower right endpoint;
[0088] The length of the first display pixel is obtained by calculating based on the first and second calibration coordinates.
[0089] Specifically, in a vision-based robotic arm control system, a camera is mounted above the device to be operated. The operator inputs a first calibration command, which controls the camera to capture an image of a first plane and displays the captured image on an interactive display interface. The displayed image is then processed to obtain the first display pixel length of the first calibration line segment after pinhole imaging.
[0090] According to some embodiments of the present invention, step S120 will be further described, and this step may include, but is not limited to, the following steps:
[0091] In response to the second calibration command, a calibration image is acquired on the second plane. The calibration image is used to display the second projection image formed after the second calibration line segment is imaged through a pinhole.
[0092] Identify the calibration image and determine the second projected image as the reference diagonal;
[0093] Determine the second rectangle based on the baseline diagonal;
[0094] Based on the second rectangle, obtain the third calibration coordinate of the upper left endpoint and the fourth calibration coordinate of the lower right endpoint;
[0095] The second display pixel length is obtained by calculating based on the third and fourth calibration coordinates.
[0096] Specifically, the operator inputs a second calibration command to control the camera to capture an image of the second plane and display the captured image on the interactive display interface; the displayed image is then processed to obtain the second display pixel length of the second calibration line segment after pinhole imaging.
[0097] According to some embodiments of the present invention, step S130 will be further described, and this step may include, but is not limited to, the following steps:
[0098] Calculate the ratio of the length of the first display pixel to the length of the second display pixel;
[0099] The ratio is determined to be the calibration ratio parameter.
[0100] In some embodiments, combined with Figure 2 and Figure 3 The principles of steps S110 to S130 are explained.
[0101] like Figure 2 As shown, point C is the camera. The center point directly below camera C has screen coordinates (x0, y0) on the PC display panel, where PC (personal compute) is a personal computer device. When the prototype is in plane B, the vertical height between the center point O of plane B and camera C is h. If the prototype plane is raised to plane B′, the vertical height between the center point O′ of plane B′ and camera C is h′.
[0102] Because the camera captures images of objects within its field of view and displays those images in a preview image with a fixed pixel ratio, that is, as shown Figure 2 The image shown is a preview image with a pixel size of m*n. Therefore, under the same lighting conditions, shooting a picture on plane B will produce image A, and shooting a picture on plane B′ will produce image A′. On the PC display panel, point A′ will be displayed in the same preview position as point A. Similarly, a point (x′, y′) in plane B′ will be displayed in the same preview position as (x, y) in plane B.
[0103] Suppose that the distance from the center point O of plane B to point A is R, and the distance from the center point O' of plane B' to point A' is R'. The center points O of plane B and O' of plane B' are both directly below the camera and are on the same straight line as the camera point C, and this straight line is perpendicular to plane B and plane B'.
[0104] Since points A, A', point C of the camera, and the center points O and O' of plane B and B' respectively are in the same triangle, and R' and R are parallel, according to the properties of similar triangles, R' and R have the following relationship:
[0105] R′ / R=h′ / h.
[0106] Therefore, it is understandable that the image will be radially scaled on different planes with the center point directly below the camera. This scaling ratio is related to the height of the image plane from the camera.
[0107] According to the mathematical properties of similar triangles, if the hypotenuse R in plane B is scaled, then the other two sides of the triangle defined by point (x,y) and hypotenuse R will also be scaled proportionally, that is:
[0108] R' / R=h' / h=|x'-x0| / |x-x0|=|y'-y0| / |y-y0|.
[0109] When the prototype plane moves upward from plane B to plane B′, the field of view shrinks from the entire parallelogram on plane B to a gray parallelogram on plane B′. However, the pixel size of the preview remains constant at m*n. Therefore, it can be understood that the range of the gray parallelogram area will be radially magnified by h / h′ times with the center point as the origin. This is how point A' will be displayed in the original location of point A. In other words, a point in the actual image is magnified h / h′ times from the center point in the preview.
[0110] Reference Figure 3 Further explanation based on the principle of pinhole imaging:
[0111] Point C is the camera head. The vertical height between the center point O of plane B and point C of the camera is h. If the camera is raised from plane B to plane B′, the vertical height between the center point O′ of plane B′ and point C of the camera is h′. There is a first calibration line segment of length X in plane B. After passing through the pinhole camera, the preview pixel length X is obtained. 预览 When the image is raised from plane B to plane B′, and there is a second calibration line segment of length X″ in plane B′, the pixel length X″ of the preview is obtained after passing through the pinhole camera. 预览 It should be noted that length X and length X″ are equal in size, that is: X = X″.
[0112] Combination Figure 3 Based on the mathematical properties of similar triangles, we can derive the following from the examples of similar triangles:
[0113] X′ / X=h′ / h;X′ / X 预览 =X″ / X″ 预览 ;
[0114] Since X = X″, then X′ / X″ = h′ / h, which further leads to h′ / h = X. 预览 / X″ 预览 .Right now:
[0115] X″ 预览 =X 预览 *(X″ / X′)=X 预览 *(h / h′).
[0116] The above formula illustrates that after the plane rises to plane B′, the actual image of plane B will be radially magnified by h / h′ times in the preview. Assuming there are screen coordinate points (x″, y″) in the preview existing on plane B′, the formula X″ can be used to... 预览 / X 预览=h / h′ is converted into: |x″-x0| / |x-x0|=|y″-y0| / |y-y0|=h / h′.
[0117] Since the screen coordinate point (x″,y″) and the original screen coordinate point (x,y) have the same radial direction, x″ and x are both greater than or less than x0 at the same time, and y″ and y are both greater than or less than y0 at the same time. Therefore, the relationship between the screen coordinate point (x″,y″) and the original screen coordinate point (x,y) can be obtained as:
[0118] When x>x0, (x″-x0) / (x-x0)=h / h′, we obtain: x″=x0+(x-x0)*(h / h′);
[0119] Namely: x=x0+(x″-x0)*(h′ / h)……(1).
[0120] When x<x0, (x0-x″) / (x0-x)=h / h′, we obtain: x″=x0-(x0-x)*(h / h′);
[0121] Namely: x=x0-(x0-x″)*(h′ / h)……(2).
[0122] When y>y0, (y″-y0) / (y-y0)=h / h′, we obtain: y″=y0+(y-y0)*(h / h′);
[0123] Namely: y=y0+(y″-y0)*(h′ / h)……(3).
[0124] When y<y0, (y0-y″) / (y0-y)=h / h′, we obtain: y″=y0-(y0-y)*(h / h′);
[0125] Namely: y=y0-(y0-y″)*(h′ / h)……(4).
[0126] According to some embodiments of the present invention, before step S110, the manipulator calibration method further includes, but is not limited to, the following steps:
[0127] In a first plane, calibration processing is performed on the actual coordinates and screen coordinates of the execution end to obtain calibration data information; the calibration data information is recorded; wherein the calibration data information includes: screen display center coordinates, upper-left limit preview coordinates and lower-right limit preview coordinates of a preview coordinate system, actual manipulator coordinates, the axis scale relationship between the preview coordinate system and the actual coordinate system, reference screen coordinates, reference actual coordinates, and the coordinate conversion relationship between screen coordinates and actual coordinates. Recording the calibration data information provides a reference basis for subsequent automatic calibration.
[0128] Specifically, in combination with Figure 4 This section provides further details on the calibration process performed on the robotic arm before it leaves the factory.
[0129] Reference Figure 4 The coordinate unit of the actual coordinate system Machine_0, where the end effector of the robotic arm is located, is millimeters (mm). The coordinate unit of the preview coordinate system PC_0 of the interactive display interface in the PC device is pixels (pixels). The effective area (B' area) outlined in the preview coordinate system is also in pixels (pixels). The operation points in the effective area (B' area) of the preview coordinate system can be mapped one-to-one to the target motion coordinates of the end effector in the actual coordinate system. That is, given the screen coordinates (x, y) in the B' area, the target motion coordinates (Xm, Ym) of the end effector in the actual coordinate system can be calculated.
[0130] First, in the preview coordinate system of the interactive display interface, the upper left endpoint of the effective area is determined as the screen start point, with the screen start point coordinates being (x1, y1), and the lower right endpoint of the effective area is determined as the screen end point, with the screen end point coordinates being (x2, y2).
[0131] Secondly, in the actual coordinate system of the plane where the execution end is located, determine the actual coordinates (Xadj1, Yadj1) of the actual starting point corresponding to the screen starting point of the effective area, and determine the actual coordinates (Xadj2, Yadj2) of the actual ending point corresponding to the screen ending point of the effective area.
[0132] Finally, based on the screen starting coordinates (x1, y1), screen ending coordinates (x2, y2), actual starting coordinates (Xadj1, Yadj1), and actual ending coordinates (Xadj2, Yadj2), the X-axis ratio of X-axis pixels to actual X-axis displacement and the Y-axis ratio of Y-axis pixels to actual Y-axis displacement are calculated. Given any screen coordinate in the preview coordinate system of the interactive display interface, the actual coordinates (Xm, Ym) of the corresponding end effector of the robotic arm can be obtained by converting the measured ratio between the actual coordinate system Machine_0 and the preview coordinate system PC_0. The X-axis and Y-axis ratios (i.e., the ratio of how many pixels on the PC correspond to each millimeter of the robotic arm) are as follows:
[0133] X_scale=(x2-x1) / (Xadj2-Xadj1);
[0134] Y_scale=(y2-y1) / (Yadj2-Yadj1).
[0135] It is understandable that (x1, y1) and (x2, y2) are the starting coordinates of the defined area B', obtained by clicking the mouse on the PC's interactive display interface, and are known values; (Xadj1, Yadj1) and (Xadj2, Yadj2) are obtained by manually adjusting the distance of the robotic arm's movement during calibration, and are also known values; (x, y) is the screen operation point selected by the operator in the preview coordinate system, and is a known value. Therefore, when the above data is known, the actual coordinates (Xm, Ym) of the operation point (x, y) in the preview coordinate system can be calculated. With the proportional relationship between the preview coordinate system PC_0 and the corresponding actual coordinate system Machine_0 remaining unchanged, the screen operation point (x, y) selected by the operator, the actual coordinates (Xm, Ym) of the operation point, the initially determined screen starting point coordinates (x1, y1), and the actual starting point coordinates (Xadj1, Yadj1) also satisfy the X-axis proportional relationship and the Y-axis proportional relationship, that is:
[0136] X_scale=(x-x1) / (Xm-Xadj1);
[0137] Y_scale=(y-y1) / (Ym-Yadj1);
[0138] By rearranging and converting the formula, we can obtain the actual coordinates of any operation point in the preview coordinate system:
[0139] Xm = Xadj1 + (x - x1) / X_scale;
[0140] Ym = Yadj1 + (y - y1) / Y_scale.
[0141] Understandably, the purpose of calibration on the same plane is for the operator to determine the operation point through the interactive display interface, so that the end effector of the robotic arm moves to the actual coordinates corresponding to the operation point.
[0142] Here's an example illustrating the factory calibration procedure:
[0143] Step 1: Determine the origin of the robotic arm's end effector as the reference point for calculating its motion. Theoretically, any point within the robotic arm's range of motion can be the origin. Typically, a fixed point can be established as the origin.
[0144] Step 2: Determine the first and second calibration points in the preview coordinate system of the interactive display interface. Theoretically, any two points on the plane where the test prototype is located can be selected for calibration. Generally, the upper left and lower right points of the prototype area are used.
[0145] Step 3: First, calibrate the first calibration point. The screen coordinates of the first calibration point in the preview coordinate system are (x1, y1). Control the end effector of the robotic arm to move from the origin position in the software until the end effector is aligned with the first calibration point on the display interface. Calculate the displacement Xadj1 in the X-axis direction and the displacement Yadj1 in the Y-axis direction of the end effector in the program. That is, obtain the actual coordinates of the end effector in the actual coordinate system at this time as (Xadj1, Yadj1).
[0146] Step 4: Calibrate the second calibration point. The screen coordinates of the second calibration point in the preview coordinate system are (x2, y2). Control the movement of the robotic arm's end effector in the software until the end effector aligns with the second calibration point on the display interface. At this point, obtain the actual coordinates of the end effector (Xadj2, Yadj2).
[0147] Step 5: Based on the screen coordinates (x1, y1) and corresponding actual coordinates (Xadj1, Yadj1) of the first calibration point, and the screen coordinates (x2, y2) and corresponding actual coordinates (Xadj2, Yadj2) of the second calibration point, the X-axis ratio of the X-axis pixel to the actual X-axis displacement, and the Y-axis ratio of the Y-axis pixel to the actual Y-axis displacement can be obtained.
[0148] X_scale=(x-x1) / (Xm-Xadj1); Y_scale=(y-y1) / (Ym-Yadj1).
[0149] After calibrating the first and second calibration points, the end effector of the robotic arm can be controlled to move to any specified point on the interactive display interface, providing a foundation for intelligent control of the robotic arm. The calibration data obtained during this calibration process is also saved for later use.
[0150] Specifically, the calibration data includes: the coordinates of the screen display center, the coordinate axis ratio between the preview coordinate system and the actual coordinate system, the reference screen coordinates, the reference actual coordinates, and the coordinate transformation relationship between the screen coordinates and the actual coordinates.
[0151] The center coordinates of the screen display are (x0, y0). When the camera is facing downwards, these coordinates are only related to the camera's resolution, so they are known data.
[0152] The coordinate axis scaling between the preview coordinate system and the actual coordinate system includes: the X-axis pixel ratio to the actual X-axis displacement, and the Y-axis pixel ratio to the actual Y-axis displacement. That is:
[0153] X_scale=(x-x1) / (Xm-Xadj1); Y_scale=(y-y1) / (Ym-Yadj1).
[0154] The reference screen coordinates are (x1, y1), and the reference actual coordinates are (Xadj1, Yadj1).
[0155] The coordinate conversion relationship between screen coordinates and actual coordinates includes:
[0156] Xm=Xadj1+(x-x1) / X_scale;
[0157] Ym=Yadj1+(y-y1) / Y_scale.
[0158] According to some embodiments of the present invention, in combination with Figure 5 step S160 is further described, and step S160 includes but is not limited to steps S210 to S220.
[0159] Step S210: perform calculation processing according to the first screen display coordinates, the calibration scale parameter and the screen display center coordinates to obtain second screen display coordinates;
[0160] In this step, the first screen display coordinates are (x″,y″), the calibration scale parameter is h′ / h, the screen display center coordinates are (x0,y0), and the second plane display coordinates are (x,y). After the plane rises to the B′ plane, the actual image of the B plane is radially magnified h / h′ times in the preview, that is, X″ 预览 / X 预览 =h / h′. The first screen display coordinates, the calibration scale parameter, the screen display center coordinates and the second plane display coordinates satisfy the following relational expression: |x″-x0| / |x-x0|=|y″-y0| / |y-y0|=h / h′.
[0161] Since the screen coordinate point (x″,y″) and the original screen coordinate point (x,y) have the same radial direction, x″ and x are both greater than or less than x0 at the same time, and y″ and y are both greater than or less than y0 at the same time. Therefore:
[0162] When x>x0, (x″-x0) / (x-x0)=h / h′, we obtain: x″=x0+(x-x0)*(h / h′);
[0163] That is: x=x0+(x″-x0)*(h′ / h)......(1).
[0164] When x<x0, (x0-x″) / (x0-x)=h / h′, we obtain: x″=x0-(x0-x)*(h / h′);
[0165] That is: x=x0-(x0-x″)*(h′ / h)......(2).
[0166] When y>y0, (y″-y0) / (y-y0)=h / h′, obtaining y″=y0+(y-y0)*(h / h′);
[0167] Namely: y=y0+(y″-y0)*(h′ / h)......(3).
[0168] When y<y0, (y0-y″) / (y0-y)=h / h′, obtaining y″=y0-(y0-y)*(h / h′);
[0169] Namely: y=y0-(y0-y″)*(h′ / h)......(4).
[0170] Step S220: performing calculation processing according to the second screen display coordinates and the axis scale relationship to obtain a first actual coordinate.
[0171] Specifically, the axis scale relationship is: Xm=Xadj1+(x-x1) / X_scale; Ym=Yadj1+(y-y1) / Y_scale.
[0172] In this step, according to some embodiments of the present invention, step S220 includes but is not limited to the following steps:
[0173] Step S221: calculating the difference between the second screen display coordinates and the reference screen coordinates, and taking the difference as the screen displacement;
[0174] Step S222: performing calculation processing according to the screen displacement and the coordinate conversion relationship to obtain an actual displacement;
[0175] Step S223: performing calculation processing according to the actual displacement and the reference actual coordinates to obtain a first actual coordinate.
[0176] Specifically, calculating the X-axis difference (x-x1) between the second screen display coordinates and the reference screen coordinates as the X-axis screen displacement; calculating the Y-axis difference (y-y1) as the Y-axis screen displacement; dividing the X-axis screen displacement (x-x1) by X_scale to obtain the X-axis actual displacement (x-x1) / X_scale, dividing the Y-axis screen displacement (y-y1) by Y_scale to obtain the Y-axis actual displacement (y-y1) / Y_scale; combining the X-axis actual displacement, the Y-axis actual displacement and the reference actual coordinates (Xadj1, Yadj1) to obtain the first actual coordinates (Xm, Ym) as: Xm=Xadj1+(x-x1) / X_scale; Ym=Yadj1+(y-y1) / Y_scale.
[0177] It can be understood that the actual coordinate points corresponding to the first screen display coordinates (x″,y″) and the second plane display coordinates (x,y) in the interactive display interface are the same, that is, the actual coordinate points (Xm′,Ym′) of the first screen display coordinates (x″,y″) are the same as (Xm,Ym), thus it can be obtained that: Xm′=Xm, Ym′=Ym, and then it can be obtained that:
[0178] Xm’=Xadj1+(x-x1) / X_scale;
[0179] Ym’=Yadj1+(y-y1) / Y_scale。
[0180] Substituting the formulas of x and y obtained in step S210 into the above formulas obtains the relationship between the actual coordinates (Xm′,Ym′) and the first screen display coordinates (x″,y″):
[0181] When x″>x0, Xm′=Xadj1+(x0+(x″-x0)*(h′ / h)-x1) / X_scale;
[0182] When x″<x0, Xm′=Xadj1+(x0-(x0-x″)*(h′ / h)-x1) / X_scale;
[0183] When y″>y0, Ym′=Yadj1+(y0+(y″-y0)*(h′ / h)-y1) / Y_scale;
[0184] When y″<y0, Ym′=Yadj1+(y0-(y0-y″)*(h′ / h)-y1) / Y_scale。
[0185] Through steps S210 to S220, the first plane display coordinates of the operating point determined by the operator are converted into corresponding first actual coordinates, so as to control the execution end of the mechanical arm to move to the first actual coordinate and realize visual intelligent control.
[0186] When the mechanical arm calibration method is executed by the mechanical arm calibration device provided according to the above embodiment, automatic calibration of the mechanical arm can be realized only after the calibration proportional parameter h′ / h is obtained by judging the proportional relationship between the display length of the same object on the factory default plane and the current plane.
[0187] An example is given below to illustrate the application method of the present solution in combination with an application scenario:
[0188] First, at the factory, draw a black line (i.e., the first calibration line segment) with a length of 100mm (or other length) on a piece of white paper and place it below the camera. In calibration mode, outline the line in the camera preview of the software. Obtain the coordinates of the top left and bottom right of the outline. Calculate the display pixel length 'a' in the preview based on the top left and bottom right coordinates and record the display pixel length 'a'.
[0189] Secondly, when testing a prototype, a black line of the same length (100mm) (i.e., the second calibration line segment) is placed on a white paper and placed on the prototype plane. Click "automatic calibration" on the interactive display interface. The camera will use its visual recognition function to identify the line and return the coordinates of the upper left and lower right of the line. The program calculates the length of the second pixel in the preview as b based on the upper left and lower right coordinates. Since the actual length of the line is consistent between the factory and the current calibration, we get h′ / h=a / b, that is, we obtain the value of h′ / h and complete the automatic calibration of the current flat prototype.
[0190] During use, the user selects an operation point on the interactive display interface of the PC device and obtains the first screen display coordinates (x″, y″) of the operation point. Substituting h′ / h into the relationship between the actual coordinates (Xm′, Ym′) obtained in step S220 and the first screen display coordinates (x″, y″), the actual coordinates (Xm′, Ym′) corresponding to the selected operation point (x″, y″) are obtained. The end effector of the robotic arm is controlled to move to the actual coordinates (Xm′, Ym′), realizing intelligent control of the robotic arm.
[0191] Secondly, referring to Figure 6 The robotic arm calibration device includes: a first identification module 110, a second identification module 120, a first calculation module 130, a coordinate acquisition module 140, a second calculation module 150, and a movement control module 160.
[0192] The first identification module 110 is used to identify the first calibration line segment located on the first plane in response to the first calibration command, and to obtain and record the first display pixel length of the first calibration line segment;
[0193] The second identification module 120 is used to identify the second calibration line segment located on the second plane in response to the second calibration command, and obtain the second display pixel length of the second calibration line segment; wherein the lengths of the first calibration line segment and the second calibration line segment are equal;
[0194] The first calculation module 130 is used to obtain the calibration ratio parameter based on the first display pixel length and the second display pixel length;
[0195] The coordinate acquisition module 140 is used to respond to the operation point selection command, display the operation point on the interactive display interface, and acquire the first screen display coordinates of the operation point;
[0196] The second calculation module 150 is used to automatically convert the coordinates displayed on the first screen into the first actual coordinates based on the calibration ratio parameter and the pre-recorded calibration data information.
[0197] The motion control module 160 is used to control the end effector of the robotic arm to move from its current position to the first actual coordinate.
[0198] According to an embodiment of the second aspect of the present invention, the robotic arm calibration device 100 is capable of responding to a first calibration command, identifying a first calibration line segment located on a first plane, obtaining and recording the first display pixel length of the first calibration line segment; when a device to be operated at a different height is used, and the operating plane of the device to be operated is changed to a second plane, the device is capable of responding to a second calibration command, identifying a second calibration line segment located on the second plane, and obtaining the second display pixel length of the second calibration line segment; obtaining a calibration ratio parameter based on the first display pixel length and the second display pixel length; displaying the operation point on the interactive display interface in response to an operation point selection command, and obtaining the first screen display coordinates of the operation point; automatically converting the first screen display coordinates into first actual coordinates based on the calibration ratio parameter and pre-recorded calibration data information; simplifying the calibration operation, completing automated calibration, and improving calibration efficiency; controlling the end effector of the robotic arm to move from the current position to the first actual coordinates, enabling the robotic arm to accurately control the device to be operated at a different height after the change, ensuring that the robotic arm has high control accuracy, and being able to directly control the movement of the robotic arm through a visual interactive interface. Therefore, the robotic arm calibration device can simplify the calibration operation, complete automated calibration, and improve calibration efficiency when changing the equipment to be operated at different heights, while ensuring that the robotic arm has high control accuracy.
[0199] It should be noted that since the robotic arm calibration device of this embodiment can realize the robotic arm calibration method of any of the previous embodiments, the robotic arm calibration device of this embodiment has the same technical principle and the same technical effect as the robotic arm calibration method of any of the previous embodiments. In order to avoid repetition and redundancy, it will not be described again here.
[0200] Those skilled in the art will understand that the device structure shown in the figures does not constitute a limitation on the embodiments of the present invention, and may include more or fewer components than shown, or combine certain components, or have different component arrangements. The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separate, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the embodiment solution according to actual needs.
[0201] It will be understood by those skilled in the art that the device architecture and application scenarios described in the embodiments of the present invention are for the purpose of more clearly illustrating the technical solutions of the embodiments of the present invention, and do not constitute a limitation on the technical solutions provided in the embodiments of the present invention. It is known by those skilled in the art that with the evolution of device architecture and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present invention are also applicable to similar technical problems.
[0202] Thirdly, referring to Figure 7 The electronic device 700 includes: a memory 720, a processor 710, and a computer program stored in the memory 720 and executable on the processor. When the processor 710 executes the computer program, it implements the robotic arm calibration method as described in the first aspect.
[0203] The processor 710 and memory 720 can be connected via a bus or other means.
[0204] The processor 710 can be implemented using a general-purpose central processing unit, microprocessor, application-specific integrated circuit, or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.
[0205] Memory 720, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory 720 may optionally include memory remotely located relative to the processor, and this remote memory can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0206] The non-transient software program and instructions required to implement the robotic arm calibration method of the above embodiments are stored in memory. When executed by a processor, the robotic arm calibration method of the above embodiments is executed, for example, the method described above. Figure 1 and Figure 5 The method steps are shown.
[0207] The device or system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0208] Fourthly, an embodiment of the present invention also provides a computer-readable storage medium storing computer-executable instructions that are executed by a processor or controller, for example, by a processor in the above-described device embodiment, causing the processor to perform the robotic arm calibration method in the above-described embodiment, for example, performing the above-described... Figure 1 and Figure 5 The method steps are shown.
[0209] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0210] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the present invention.
Claims
1. A method for calibrating a robotic arm, characterized in that, include: In response to a first calibration command, a first calibration line segment located on a first plane is identified, and the first display pixel length of the first calibration line segment is obtained and recorded; In response to the second calibration command, a second calibration line segment located on the second plane is identified, and the second display pixel length of the second calibration line segment is obtained; wherein the lengths of the first calibration line segment and the second calibration line segment are equal; The calibration ratio parameter is obtained based on the first display pixel length and the second display pixel length; In response to the operation point selection command, the operation point is displayed on the interactive display interface, and the first screen display coordinates of the operation point are obtained; Based on the calibration ratio parameters and pre-recorded calibration data, the first screen display coordinates are automatically converted into the first actual coordinates. The calibration data includes: screen display center coordinates, the coordinate axis ratio between the preview coordinate system and the actual coordinate system, the reference screen coordinates, the reference actual coordinates, and the coordinate transformation relationship between the screen coordinates and the actual coordinates. Control the end effector of the robotic arm to move from its current position to the first actual coordinate; The step of responding to a first calibration command, identifying a first calibration line segment located on a first plane, and obtaining and recording the first display pixel length of the first calibration line segment includes: responding to the first calibration command, acquiring a calibration image of the first plane, the calibration image being used to display a first projected image formed by the first calibration line segment after pinhole imaging; identifying the calibration image and determining the first projected image as a reference diagonal; determining a first rectangular frame based on the reference diagonal; obtaining the first calibration coordinates of the upper left endpoint and the second calibration coordinates of the lower right endpoint based on the first rectangular frame; and performing calculations based on the first calibration coordinates and the second calibration coordinates to obtain the first display pixel length. The step of obtaining the calibration ratio parameter based on the first display pixel length and the second display pixel length includes: calculating the ratio of the first display pixel length to the second display pixel length; and determining the ratio as the calibration ratio parameter. The step of automatically converting the first screen display coordinates into the first actual coordinates based on the calibration ratio parameter and pre-recorded calibration data information includes: performing calculations based on the first screen display coordinates, the calibration ratio parameter, and the screen display center coordinates to obtain the second screen display coordinates; and performing calculations based on the second screen display coordinates and the coordinate axis ratio relationship to obtain the first actual coordinates.
2. The robotic arm calibration method according to claim 1, characterized in that, The step of calculating and processing the first actual coordinates based on the proportional relationship between the second screen display coordinates and the coordinate axes includes: Calculate the difference between the second screen display coordinates and the reference screen coordinates, and use it as the screen displacement; The actual displacement is obtained by calculating based on the screen displacement and the coordinate transformation relationship. The first actual coordinates are obtained by calculating based on the actual displacement and the actual coordinates of the reference.
3. The robotic arm calibration method according to claim 1, characterized in that, The step of responding to a second calibration command, identifying a second calibration line segment located on a second plane, and obtaining the second display pixel length of the second calibration line segment includes: In response to the second calibration command, a calibration image is acquired on the second plane, the calibration image being used to display a second projection image formed after the second calibration line segment is imaged through a pinhole camera; Identify the calibration image and determine the second projected image as the reference diagonal; The second rectangular frame is determined based on the reference diagonal; Based on the second rectangle, obtain the third calibration coordinate of the upper left endpoint and the fourth calibration coordinate of the lower right endpoint; The second display pixel length is obtained by calculating based on the third and fourth calibration coordinates.
4. The robotic arm calibration method according to claim 1, characterized in that, Before identifying the first calibration line segment located on the first plane in response to the first calibration command, the method further includes: In the first plane, the actual coordinates and screen coordinates of the execution end are calibrated to obtain the calibration data information; Record the calibration data information; wherein, the calibration data information includes: screen display center coordinates, upper left limit preview coordinates and lower right limit preview coordinates of the preview coordinate system, actual coordinates of the robotic arm, the coordinate axis ratio between the preview coordinate system and the actual coordinate system, reference screen coordinates, reference actual coordinates, and the coordinate transformation relationship between screen coordinates and actual coordinates.
5. A robotic arm calibration device, characterized in that, include: The first identification module is used to identify the first calibration line segment located on the first plane in response to the first calibration command, and to obtain and record the first display pixel length of the first calibration line segment; The second identification module is used to identify the second calibration line segment located on the second plane in response to the second calibration command, and obtain the second display pixel length of the second calibration line segment; wherein the lengths of the first calibration line segment and the second calibration line segment are equal; The first calculation module is used to obtain a calibration ratio parameter based on the first display pixel length and the second display pixel length; The coordinate acquisition module is used to respond to the operation point selection command, display the operation point on the interactive display interface, and acquire the first screen display coordinates of the operation point; The second calculation module is used to automatically convert the first screen display coordinates into the first actual coordinates according to the calibration ratio parameter and the pre-recorded calibration data information. The calibration data information includes: screen display center coordinates, the coordinate axis ratio relationship between the preview coordinate system and the actual coordinate system, the reference screen coordinates, the reference actual coordinates, and the coordinate transformation relationship between the screen coordinates and the actual coordinates. The motion control module is used to control the end effector of the robotic arm to move from its current position to the first actual coordinate. The step of responding to a first calibration command, identifying a first calibration line segment located on a first plane, and obtaining and recording the first display pixel length of the first calibration line segment includes: responding to the first calibration command, acquiring a calibration image of the first plane, the calibration image being used to display a first projected image formed by the first calibration line segment after pinhole imaging; identifying the calibration image and determining the first projected image as a reference diagonal; determining a first rectangular frame based on the reference diagonal; obtaining the first calibration coordinates of the upper left endpoint and the second calibration coordinates of the lower right endpoint based on the first rectangular frame; and performing calculations based on the first calibration coordinates and the second calibration coordinates to obtain the first display pixel length. The step of obtaining the calibration ratio parameter based on the first display pixel length and the second display pixel length includes: calculating the ratio of the first display pixel length to the second display pixel length; and determining the ratio as the calibration ratio parameter. The step of automatically converting the first screen display coordinates into the first actual coordinates based on the calibration ratio parameter and pre-recorded calibration data information includes: performing calculations based on the first screen display coordinates, the calibration ratio parameter, and the screen display center coordinates to obtain the second screen display coordinates; and performing calculations based on the second screen display coordinates and the coordinate axis ratio relationship to obtain the first actual coordinates.
6. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, implements the robotic arm calibration method as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program instructions that, when executed by a processor, implement the robotic arm calibration method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Coordinate system calibration method, automatic assembly method and device
CN113643384A
Mechanical arm calibration method, device and equipment and storage medium
CN114543669A