Position calibration method, system and electronic device for a robot arm
By installing a laser device at the end of the robotic arm, the conversion relationship can be obtained and iteratively updated, thus solving the problem of non-contact calibration between the robotic arm and the TV screen and achieving high-precision calibration results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 深圳市沃莱特电子有限公司
- Filing Date
- 2026-05-09
- Publication Date
- 2026-07-14
AI Technical Summary
Existing technology cannot accurately calibrate the robotic arm and the TV screen in non-contact scenarios, affecting the accuracy of the remote control's pointing.
By installing a laser device at the end of the robotic arm, a laser spot is emitted onto the working plane to obtain the coordinate information of multiple calibration points. The transformation relationship is iteratively updated using a control device, and the projection error is calculated until the error converges, thus determining the target transformation relationship.
This enables non-contact calibration of the robotic arm, reducing calibration errors and improving calibration accuracy.
Smart Images

Figure CN122143065B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and more specifically, to a method, system, and electronic device for calibrating the position of a robotic arm. Background Technology
[0002] Pointing remote controls are a new generation of remote control devices following Bluetooth remote controls. Based on UWB positioning technology, they can accurately sense the remote control's position and then display the pointing cursor's location on the TV screen. Since the pointing cursor's position is virtually derived through sensor sensing and calculation, the accuracy of the pointing remote control directly affects the user experience. When using a robotic arm to assist in remote control accuracy testing, strict calibration of the robotic arm and TV screen is necessary before testing to ensure pointing accuracy. However, there is a certain distance between the robotic arm and the TV screen, and currently known contact calibration methods cannot calibrate the robotic arm and TV screen. Therefore, how to calibrate the robotic arm in non-contact application scenarios is a problem that urgently needs to be solved. Summary of the Invention
[0003] In view of the above problems, this application provides a method, system and electronic device for calibrating the position of a robotic arm.
[0004] In a first aspect, this application provides a method for calibrating the position of a robotic arm. The end of the robotic arm is used to mount a laser device, which emits a laser spot onto a working plane. The method includes: acquiring a set of first pose information of the laser device's emission point in a first coordinate system when the laser device emits a laser spot onto several calibration points on the working plane; wherein the first coordinate system has the center of the robotic arm's base as its origin; acquiring a set of first true coordinate information of the several calibration points in a second coordinate system; wherein the second coordinate system has a point on the working plane as its origin; calculating a set of projection coordinate information of the laser spot emitted by the laser device onto the several calibration points in the second coordinate system based on the first pose information set and a desired transformation relationship; wherein the desired transformation relationship is a preset transformation relationship from the first coordinate system to the second coordinate system; calculating a projection error based on the projection coordinate information set and the first true coordinate information set; iteratively updating the desired transformation relationship and recalculating the projection error until the projection error converges; and determining a target transformation relationship from the first coordinate system to the second coordinate system based on the desired transformation relationship corresponding to the convergence of the projection error.
[0005] In one implementation, determining the target transformation relationship from the first coordinate system to the second coordinate system based on the expected transformation relationship corresponding to the convergence of the projection error includes: determining a preliminary transformation relationship from the first coordinate system to the second coordinate system based on the expected transformation relationship corresponding to the convergence of the projection error; acquiring a second pose information set of the laser device's emission point in the first coordinate system when the laser device emits a laser spot to several verification points on the working plane; wherein the several verification points are different from the several calibration points; acquiring a second true coordinate information set of the several verification points in the second coordinate system; calculating a set of verification coordinate information of the laser spot emitted by the laser device to the several verification points in the second coordinate system based on the second pose information set and the preliminary transformation relationship; calculating a verification error based on the set of verification coordinate information and the second true coordinate information set; and determining the preliminary transformation relationship as the target transformation relationship from the first coordinate system to the second coordinate system when the verification error is less than a preset error value.
[0006] In one implementation, when acquiring the laser spot emitted by the laser device to several calibration points on the working plane, the first pose information set of the laser device's emission point in the first coordinate system includes: acquiring the pose of the laser device's emission point in the third coordinate system; wherein the third coordinate system has the end of the robotic arm's end effector as its origin; acquiring the first transformation relationship from the third coordinate system to the first coordinate system; and calculating the first pose information set based on the pose and the first transformation relationship.
[0007] In one implementation, obtaining the first transformation relationship from the third coordinate system to the first coordinate system includes: obtaining the real-time pose information of the robotic arm in the first coordinate system; and determining the first transformation relationship based on the real-time pose information.
[0008] In one implementation, calculating the projection coordinate information set of the laser spot emitted by the laser device to a plurality of calibration points in the second coordinate system based on the first pose information set and the expected transformation relationship includes: calculating the expected transformation information set from the emission point to the second coordinate system based on the first pose information set corresponding to the plurality of calibration points and the expected transformation relationship; obtaining the projection function from the emission point of the laser device to the second coordinate system based on the positional relationship between the laser device and the working plane; and substituting the expected transformation information set into the projection function to calculate the projection coordinate information set.
[0009] In one implementation, calculating the projection error based on the set of projected coordinate information and the first set of true coordinate information includes: calculating the square of the difference between the projected coordinates of the laser spot corresponding to each calibration point and the true coordinates of the calibration point; and determining the projection error based on the sum of the squares of the differences corresponding to all calibration points.
[0010] In one implementation, the step of calculating the projection coordinate information set of the laser spot emitted by the laser device to a plurality of calibration points in the second coordinate system based on the first pose information set and the desired transformation relationship includes: obtaining a projection function from the emission point of the laser device to the second coordinate system based on the positional relationship between the laser device and the working plane; and substituting the first pose information set and the desired transformation relationship into the projection function to calculate the projection coordinate information set.
[0011] In one implementation, the step of calculating the set of verification coordinate information of the laser spot emitted by the laser device to a plurality of verification points in the second coordinate system based on the second pose information set and the preliminary transformation relationship includes: obtaining a projection function from the emission point of the laser device to the second coordinate system based on the positional relationship between the laser device and the working plane; and substituting the second pose information set and the preliminary transformation relationship into the projection function to calculate the set of verification coordinate information.
[0012] In one implementation, calculating the verification error based on the set of verification coordinate information and the set of true coordinate information includes: calculating the square of the difference between the verification coordinates of the laser spot corresponding to each verification point and the true coordinates of the verification point; and determining the verification error based on the sum of the squares of the differences corresponding to all verification points.
[0013] Secondly, this application provides a position calibration system for a robotic arm, including a laser device, a robotic arm, a test display, and a control device. The end of the robotic arm is used to mount the laser device, which is used to emit a laser spot onto the working plane of the test display. The test display is disposed opposite to the robotic arm. The control device is connected to the robotic arm and is used to execute the position calibration method in the first aspect.
[0014] In one implementation, the test display is further configured to display an auxiliary calibration image on the working plane, the auxiliary calibration image comprising a plurality of cells, the corner points of each cell serving as calibration points or verification points.
[0015] Thirdly, this application provides an electronic device, the electronic device comprising: a processor; and a memory storing executable instructions of the processor; wherein the processor is configured to perform the position calibration method of the first aspect by executing the executable instructions.
[0016] The robotic arm position calibration method, system, and electronic equipment provided in this application can acquire the first pose information set of the laser device's emission point in the first coordinate system when the laser device emits laser spots to several calibration points on the working plane, acquire the first true coordinate information set of the several calibration points in the second coordinate system, calculate the projection coordinate information set of the laser spots emitted by the laser device to the several calibration points in the second coordinate system based on the first pose information set and the desired transformation relationship, calculate the projection error based on the projection coordinate information set and the first true coordinate information set, calculate the projection error separately according to each desired transformation relationship, and then determine the target transformation relationship from the first coordinate system to the second coordinate system based on the desired transformation relationship corresponding to the minimum value among all projection errors. Therefore, it can achieve non-contact calibration of the robotic arm, reduce the calibration error of the robotic arm, and improve calibration accuracy. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the position calibration system for the robotic arm provided in this application.
[0018] Figure 2 A schematic diagram of a calibration scenario provided for this application.
[0019] Figure 3 A schematic diagram of the auxiliary calibration images provided for this application.
[0020] Figure 4 A flowchart illustrating the location calibration method provided in this application.
[0021] Figure 5 for Figure 4 A detailed flowchart of step S600.
[0022] Figure 6 for Figure 4 A detailed flowchart of step S100.
[0023] Figure 7 for Figure 6 A detailed flowchart of step S120.
[0024] Figure 8 for Figure 4 A detailed flowchart of step S300.
[0025] Figure 9 for Figure 4A detailed flowchart of step S400.
[0026] Figure 10 for Figure 5 A detailed flowchart of step S640.
[0027] Figure 11 for Figure 5 A detailed flowchart of step S650.
[0028] Figure 12 A schematic diagram of the modules of the electronic device provided in this application. Detailed Implementation
[0029] The technical solutions in the embodiments of this application will be clearly described below with reference to the accompanying drawings.
[0030] It is understood that the connection relationships described in this application refer to direct or indirect connections. For example, the connection between A and B can be a direct connection between A and B, or an indirect connection between A and B through one or more other electrical components. For example, A can be directly connected to C, and C can be directly connected to B, thus achieving a connection between A and B through C. It is also understood that the "A connects to B" described in this application can be a direct connection between A and B, or an indirect connection between A and B through one or more other electrical components.
[0031] In the description of this application, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A exists alone, A and B exist simultaneously, and B exists alone.
[0032] In the description of this application, the words "first," "second," etc., are used only to distinguish different objects and do not limit the quantity or order of execution, nor do they imply that they must be different. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion.
[0033] Please see Figure 1 , Figure 1 This is a schematic diagram of the robotic arm position calibration system 100 provided in this application. The position calibration system 100 includes a laser device 110, a robotic arm 120, a test display 130, and a control device 140. The end of the robotic arm 120 is used to mount the laser device 110. The laser device 110 is used to emit a laser spot onto the working plane of the test display 130. The test display 130 is arranged opposite to the robotic arm 120. The control device 140 is connected to the laser device 110 and the robotic arm 120.
[0034] like Figure 1 As shown, the robotic arm 120 can have six degrees of freedom and can perform movement and rotation actions through dragging and program control. The control device 140 can establish a first coordinate system with the center of the base of the robotic arm 120 as the origin. The first coordinate system is a three-dimensional rectangular coordinate system. The robotic arm 120 can move in the X direction under the first coordinate system. w Axial direction, Y w Axial direction and Z w The axis moves, that is, the first coordinate system changes from X... w coordinate axes, Y w coordinate axes and Z w The coordinate axes are configured. Therefore, the robotic arm 120 can move the laser device 110 to any coordinate point in the environment. Taking an example where the base of the robotic arm 120 is set on the ground, X... w The axis direction is horizontal, Y w The axis direction is perpendicular to the Z direction. w The axis direction is the height direction.
[0035] In some embodiments, a special clamp (not shown in the figure) may be installed at the end of the robotic arm 120 to mount the laser device 110 at the end of the robotic arm 120. Of course, the specific implementation of the laser device 110 being mounted at the end of the robotic arm 120 is not limited in the embodiments of this application, as long as the laser device 110 can be fixed at the end of the robotic arm 120.
[0036] In this embodiment, a second coordinate system can be established using a point on the working plane of the test display 130 as the origin. This allows the position of the laser spot emitted by the laser device 110 on the test display 130 to be determined based on the second coordinate system. For example, the second coordinate system can be formed using the upper left corner of the test display 130 as the origin. The second coordinate system can be defined by X... s coordinate axes, Y s coordinate axes and Z s The coordinate system is composed of coordinate axes. Of course, in some embodiments, the second coordinate system may also include only two coordinate axes, such as only the X-axis. s coordinate axes and Y s Coordinate axes. Or, although the second coordinate system is determined by X... s coordinate axes, Y s coordinate axes and Z s The coordinate axes are constructed, but since the cursor points are displayed on the test monitor 130, each cursor point is in the Z... s Since the coordinate values on the coordinate axes are all zero, the first set of coordinate information can only include the coordinates of each cursor point at the X-axis. s coordinate axes, Y s The coordinate values on the coordinate axes. Where X... sThe coordinate axis corresponds to the length direction of the test display 130, Y s The coordinate axes correspond to the height direction of the test monitor 130. It can be understood that the working plane of the test monitor 130 is the display plane of the test monitor 130.
[0037] In the embodiments of this application, such as Figure 2 and Figure 3 As shown, the test display 130 can be used to display an auxiliary calibration image on its working plane. The auxiliary calibration image includes several cells, and the corner points of each cell serve as calibration points or verification points. The resolution of the auxiliary calibration image can be the same as the resolution of the test display 130, thus allowing the coordinate values of the corner points of each cell in the auxiliary calibration image to be directly determined according to the second coordinate system. The coordinate values of each corner point can be expressed as C. i C i =(X si Y si Z si It is understandable that, since the auxiliary calibration image is displayed on the working plane of the test monitor 130, each point on the auxiliary calibration image is in the Z... s If all coordinate values on the coordinate axes are zero, then the Z-axis of each corner point... si All are equal to zero.
[0038] In some specific examples, such as Figure 3 As shown, the red corner points serve as calibration points, and the green corner points serve as verification points. Therefore, this embodiment of the application includes nine calibration points and eight verification points. The calibration points can be used to calibrate the conversion relationship between the working plane of the robotic arm 120 and the test display 130, while the verification points can be used to verify whether the calibrated conversion relationship meets the requirements.
[0039] In this embodiment, the robotic arm 120 can be dragged by a worker so that the laser spot emitted by the laser device 110 can be displayed on each calibration point or each verification point.
[0040] In this embodiment, a third coordinate system can also be established with the end of the robotic arm 120 as the origin. This allows the position from the emission point of the laser device 110 to the end of the robotic arm 120 to be determined based on the positional relationship between the laser device 110 and the end of the robotic arm 120. The second coordinate system can be defined by X... e coordinate axes, Y e coordinate axes and Z e The coordinate axes are formed.
[0041] In this embodiment of the application, a fourth coordinate system can also be established with the emission point of the laser device 110 as the origin. The fourth coordinate system can be defined by X. t coordinate axes, Y t coordinate axes and Zt The coordinate axes are formed. The coordinates of the emission point of the laser device 110 in the fourth coordinate system are (0, 0, 0).
[0042] It is understood that the laser device 110 is fixedly mounted on the end of the robotic arm 120. The attitude information of the laser device 110's emission point relative to the end of the robotic arm 120 can be accurately measured according to the mounting method. Therefore, the pose of the laser device 110's emission point in the third coordinate system can be determined by accurate measurement. In some embodiments, the pose of the laser device 110's emission point in the third coordinate system can be represented as... .
[0043] In this embodiment, the control device 140 can be configured as an electronic device such as a desktop computer, laptop computer, tablet computer, or mobile phone.
[0044] It is understood that the posture of the end effector of the robotic arm 120 will change according to the operation of the robotic arm 120. The control device 140 can pre-store the posture information of the laser device 110's emission point relative to the end effector of the robotic arm 120, that is, the control device 140 can pre-store the pose of the laser device 110's emission point in the third coordinate system. The control device 140 can communicate with the robotic arm 120 in real time to obtain the real-time posture information of the robotic arm 120, and then obtain the pose information of the laser device 110's emission point in the first coordinate system based on the pose of the laser device 110's emission point in the third coordinate system and the real-time posture information.
[0045] Specifically, the control device 140 can acquire the posture information of the robotic arm 120 in real time during its movement. Based on this real-time posture information, the control device 140 can determine the pose information of the end effector of the robotic arm 120 in the first coordinate system. Then, based on the pose of the laser device 110's emission point in the third coordinate system and the pose information of the robotic arm 120's end effector in the first coordinate system, the control device 140 can determine the pose information of the laser device 110's emission point in the first coordinate system. It can be understood that the control device 140 can determine the first transformation relationship from the third coordinate system to the first coordinate system based on the pose information of the robotic arm 120's end effector. Furthermore, based on the first transformation relationship and the pose of the laser device 110's emission point in the third coordinate system, the control device 140 can determine the pose information of the emission point in the first coordinate system. The first transformation relationship can be expressed as follows: Then the pose information of the laser device 110's emission point in the first coordinate system can be expressed as: .
[0046] Based on this, the control device 140 can also pre-acquire a set of first true coordinate information of several calibration points in the second coordinate system on the working plane of the test display 130, and a set of second true coordinate information of several verification points in the second coordinate system. The first true coordinate information set contains the coordinate data of each calibration point in the second coordinate system, and the second true coordinate information set contains the coordinate data of each verification point in the second coordinate system. In this embodiment, the first and second true coordinate information sets can be acquired and saved by the internal memory of the test display 130 to form a coordinate information file. The test display 130 can be communicatively connected to the control device 140, and the test display 130 can directly send the first and second true coordinate information sets to the control device 140. Alternatively, the first and second true coordinate information sets can be pre-viewed by the operator on the test display 130, input, and stored in the control device 140. The control device 140 can then retrieve the first and second true coordinate information sets when needed. This application embodiment does not limit the specific implementation method of the control device 140 acquiring the first set of truth coordinate information and the second set of truth coordinate information.
[0047] Based on this, each time the operator drags the robotic arm 120 to a calibration point where the laser spot emitted by the laser device 110 is displayed, the control device 140 can acquire the real-time attitude information of the robotic arm 120. Based on this real-time attitude information, the control device 140 determines the pose information of the end effector of the robotic arm 120, and then determines the pose information of the emission point of the laser device 110. The set of pose information of the emission point of the laser device 110 at several calibration points is used as the first pose information set. The control device 140 can then calculate the projection coordinate information set of the laser spot emitted by the laser device to several calibration points in the second coordinate system based on the first pose information set and the desired transformation relationship. Finally, the control device 140 calculates the projection error based on the projection coordinate information set and the first true value coordinate information set of each calibration point in the second coordinate system. The desired transformation relationship is a preset transformation relationship from the first coordinate system to the second coordinate system. In this embodiment of the application, the expected transformation relationship can be preset with an initial value. Then, the control device 140 calculates the projection error according to each expected transformation relationship, iteratively updates the expected transformation relationship, and recalculates the projection error.
[0048] In other words, the control device 140 can iteratively update the desired transformation relationship and recalculate the projection error with the updated desired transformation relationship each time it is updated, until the projection error converges. The control device 140 can determine the target transformation relationship from the first coordinate system to the second coordinate system based on the desired transformation relationship corresponding to the convergence of the projection error. This achieves non-contact calibration of the robotic arm 120. Furthermore, since the control device 140 iteratively updates the desired transformation relationship, correspondingly updating the projection error until the projection error converges, and determines the target transformation relationship based on the desired transformation relationship corresponding to the convergence of the projection error, the calibration error of the robotic arm 120 can be reduced, and the calibration accuracy can be improved.
[0049] This application also provides a position calibration method that enables non-contact calibration of the robotic arm 120, reduces the projection error of the robotic arm 120, and improves calibration accuracy.
[0050] Please see Figure 4 , Figure 4 This is a flowchart illustrating the position calibration method provided in this application. In at least one embodiment, the accuracy testing method can be applied to the control device 140 as described above. Figure 4 As shown, the location calibration method specifically includes the following steps.
[0051] Step S100: Obtain the first pose information set of the laser device's emission point in the first coordinate system when the laser device emits laser spots to several calibration points on the working plane.
[0052] In this process, a worker can drag the robotic arm 120 to a calibration point on the working plane of the test display 130 where the laser device 110 can emit a laser spot. The worker then temporarily stops dragging the robotic arm 120, and the control device 140 acquires the real-time attitude information of the robotic arm 120. Based on this real-time attitude information, the position and orientation information of the end effector of the robotic arm 120 in the first coordinate system are determined. Then, based on the positional relationship between the laser device 110 and the end effector of the robotic arm 120, the position and orientation information of the emission point in the first coordinate system are determined. The worker drags the robotic arm 120 sequentially to each calibration point where the laser device 110 emits a laser spot, allowing the control device 140 to acquire the position and orientation information of the end effector of the robotic arm 120 when the laser spot is emitted to each calibration point, thus forming a first set of posture information.
[0053] It is understandable that staff can visually observe whether the laser spot is emitted to the calibration point, and stop dragging the robotic arm 120 when they observe that the laser spot is emitted to the calibration point.
[0054] Of course, the working plane in this application embodiment is not limited to the display interface of the test display 130. For example, it can also be an operating table used to place PCB circuit boards in PCB board placement operations, etc.
[0055] Step S200: Obtain a set of first true coordinate information of several calibration points in the second coordinate system.
[0056] The control device 140 can establish a first coordinate system based on the center of the base of the robotic arm 120, that is, the first coordinate system takes the center of the base of the robotic arm 120 as its origin. The test display 130 can establish a second coordinate system based on a point on its working plane, for example, a corner of its working plane, that is, the second coordinate system takes a corner of the test display 130 as its origin. The control device 140 can pre-store a set of first true coordinate information.
[0057] Step S300: Calculate the projection coordinate information set of the laser spot emitted by the laser device to several calibration points in the second coordinate system based on the first pose information set and the expected transformation relationship.
[0058] Wherein, the desired transformation relationship is a preset transformation relationship from the first coordinate system to the second coordinate system, and the desired transformation relationship can be expressed as follows: The control device 140 can preset an initial value for the desired transformation relationship, and iteratively update the desired transformation relationship starting from this initial value. The control device 140 can calculate the corresponding projected coordinates based on each pose information in the first pose information set and the desired transformation relationship, and the projected coordinates corresponding to several calibration points form a projected coordinate information set.
[0059] Step S400: Calculate the projection error based on the projection coordinate information set and the first true value coordinate information set.
[0060] It can be understood that the projected coordinate information set includes the projected coordinates of several calibration points in the second coordinate system predicted according to the expected transformation relationship, and the first true coordinate information set includes the true coordinates of several calibration points in the second coordinate system (i.e., the actual coordinates of the calibration points in the second coordinate system). The predicted projected coordinates of the several calibration points correspond one-to-one with the actual true coordinates of the several calibration points. For example, the projected coordinates of one of the predicted calibration points are (X... si ', Y si ' , Z si The true coordinates of the corresponding calibration point are (X'), si Y si Z si ), can X si ' - X si The X coordinate of the calibration point in the second coordinate system is obtained. sErrors in the axial direction will affect the Y-axis. si ' - Y si The Y-axis of the calibration point in the second coordinate system is obtained. s Errors in the axial direction will affect Z. si ' - Z si The Z-axis of the calibration point in the second coordinate system is obtained. s Error in the axial direction. The control device 140 can calculate the X-axis of each calibration point in the second coordinate system based on the projected coordinate information set and the first true coordinate information set. s Axial direction, Y s Axial direction and Z s The error in the axial direction, and then based on the X-axis of all calibration points in the second coordinate system. s Axial direction, Y s Axial direction and Z s The error in the axial direction determines the projection error.
[0061] Step S500: Iteratively update the expected transformation relationship and recalculate the projection error until the projection error converges.
[0062] The control device 140 needs to iteratively update the expected transformation relationship and recalculate the projection error each time the expected transformation relationship is updated. Therefore, the control device 140 needs to re-execute steps S300 to S400 after updating the expected transformation relationship in order to recalculate the projection error.
[0063] Step S600: Determine the target transformation relationship from the first coordinate system to the second coordinate system based on the expected transformation relationship corresponding to the convergence of the projection error.
[0064] The control device 140 can determine the target transformation relationship from the first coordinate system to the second coordinate system based on the expected transformation relationship corresponding to the convergence of the projection error. When the projection error converges, it means that among all the iteratively updated expected transformation relationships, the predicted coordinates of the calibration point in the second coordinate system have the smallest difference from the actual coordinates of the calibration point in the second coordinate system. At this time, the target transformation relationship is determined based on the expected transformation relationship corresponding to the convergence of the projection error.
[0065] Therefore, the position calibration method provided in this application can achieve non-contact calibration of the robotic arm 120. Furthermore, since the target transformation relationship is determined by the expected transformation relationship corresponding to the convergence of the projection error when the projection error converges, the calibration error of the robotic arm 120 can be reduced and the calibration accuracy can be improved.
[0066] Please see Figure 5 , Figure 5 This is a detailed flowchart of step S600. Specifically, step S600 may include the following steps.
[0067] Step S610: Determine the preliminary transformation relationship from the first coordinate system to the second coordinate system based on the expected transformation relationship corresponding to the convergence of the projection error.
[0068] The control device 140 determines the expected transformation relationship corresponding to the convergence of the projection error as the preliminary transformation relationship.
[0069] Step S620: Obtain the second pose information set of the laser device's emission point in the first coordinate system when the laser device emits laser spots to several verification points on the working plane.
[0070] Among them, several verification points (such as Figure 3 (shown as green corner dots) and several calibration points (such as...) Figure 3 (The red corner dots shown are different). In this embodiment, the operator can also drag the robotic arm 120. When the robotic arm 120 is dragged to the verification point where the laser device 110 can emit the laser spot onto the working plane, the operator temporarily stops dragging the robotic arm 120. The control device 140 obtains the real-time posture information of the robotic arm 120 at this time. Based on the real-time posture information of the robotic arm 120, the position information of the end of the robotic arm 120 in the first coordinate system can be determined. Then, based on the position information of the end of the robotic arm 120, the position information of the emission point of the laser device 110 in the first coordinate system can be determined. The operator drags the robotic arm 120 to the laser device 110 in sequence to emit the laser spot onto each verification point, so that the control device 140 can obtain the position information of the emission point of the laser device 110 when the laser spot is emitted onto each verification point, so as to form a second position information set.
[0071] Step S630: Obtain a set of second true coordinate information of several verification points in the second coordinate system.
[0072] The control device 140 can pre-store a set of second true coordinate information.
[0073] Step S640: Calculate the set of verification coordinate information of the laser spot emitted by the laser device to several verification points in the second coordinate system based on the second pose information set and the preliminary transformation relationship.
[0074] The control device 140 can calculate the corresponding verification coordinate information based on each pose information in the second pose information set and the preliminary transformation relationship. The verification coordinate information corresponding to several verification points forms a verification coordinate information set.
[0075] Step S650: Calculate the verification error based on the verification coordinate information set and the second true value coordinate information set.
[0076] The control device 140 calculates the projection error and the verification error in the same way, which will not be described again here.
[0077] Step S660: When the verification error is less than the preset error value, the preliminary transformation relationship is determined to be the target transformation relationship from the first coordinate system to the second coordinate system.
[0078] The preset error value can be set in advance according to actual needs, such as setting a preset error value according to accuracy requirements. When the verification error is less than the preset error value, it means that the preliminary transformation relationship meets the actual needs. For example, the preliminary transformation relationship meets the accuracy requirements of the transformation relationship between the first coordinate system and the second coordinate system, that is, it meets the transformation accuracy requirements between the robotic arm 120 and the test display 130.
[0079] It is understandable that if the verification error is greater than the preset error value, it means that the initial conversion relationship cannot meet the conversion accuracy requirements between the robotic arm 120 and the test display 130. In this case, the robotic arm 120 can be recalibrated to redetermine the initial conversion relationship until the verification error is less than the preset error value. When recalibrating the robotic arm 120, the previously calibrated initial conversion relationship can be used as the initial value of the desired conversion relationship, or a different initial value can be used.
[0080] Please see Figure 6 , Figure 6 This is a detailed flowchart of step S100. Specifically, step S100 may include the following steps.
[0081] Step S110: Obtain the pose of the laser device's emission point in the third coordinate system.
[0082] In this system, the third coordinate system has its origin at the end of the robotic arm. Since the laser device is fixedly mounted at the end of the robotic arm 120, the pose of the laser device's emission point in the third coordinate system can be directly determined through precise measurement. The pose of the emission point in the third coordinate system can be expressed as... .
[0083] Step S120: Obtain the first transformation relationship from the third coordinate system to the first coordinate system.
[0084] It can be understood that the control device 140 can determine the first transformation relationship from the third coordinate system to the first coordinate system based on the positional relationship between the end of the robotic arm 120 and the center of the base of the robotic arm 120. The first transformation relationship can be expressed as follows: .
[0085] Step S130: Calculate the first pose information set based on the pose and the first transformation relationship.
[0086] In this embodiment, the pose information of the launch point in the first coordinate system can be calculated based on the pose of the launch point in the third coordinate system and the first transformation relationship. Then, the projected coordinates of the calibration point in the second coordinate system can be predicted based on the pose information of the launch point in the first coordinate system and the expected transformation relationship from the first coordinate system to the second coordinate system. Therefore, based on the positional relationship of the launch points corresponding to several calibration points and the first transformation relationship, a first pose information set can be calculated, and then a projected coordinate information set can be calculated based on the first pose information set and the expected transformation relationship.
[0087] The first pose information corresponding to a calibration point can be represented as: The first pose information set includes several different first pose information sets.
[0088] Furthermore, such as Figure 7 As shown, step S120 may include the following steps.
[0089] Step S121: Obtain the real-time pose information of the robotic arm in the first coordinate system.
[0090] The operator drags the robotic arm 120 so that the laser device 110 can emit the laser spot to different calibration points. The posture of the robotic arm 120 is different for each calibration point. Therefore, when the laser device emits the laser spot to each calibration point, the control device 140 needs to obtain the position and posture information of the robotic arm 120 in the first coordinate system.
[0091] Step S122: Determine the first transformation relationship based on the real-time pose information.
[0092] The control device 140 can determine the first transformation relationship from the third coordinate system to the first coordinate system based on the real-time pose information of the robotic arm 120.
[0093] Please see Figure 8 , Figure 8 This is a detailed flowchart of step S300. Specifically, step S330 may include the following steps.
[0094] Step S310: Calculate the expected transformation information set from the launch point to the second coordinate system based on the first pose information set corresponding to several calibration points and the expected transformation relationship.
[0095] The expected transformation information corresponding to a calibration point can be represented as: , In other words, the desired attitude from the launch point to the second coordinate system can be calculated based on the launch point's pose in the third coordinate system, the first transformation relationship from the third coordinate system to the first coordinate system, and the desired transformation relationship from the first coordinate system to the second coordinate system. This can be understood as the desired transformation information... This is the homogeneous transformation matrix from the emission point of laser device 110 to the second coordinate system. The expected transformation information corresponding to several calibration points together constitutes the expected transformation information set.
[0096] In this embodiment, the desired transformation information can be determined based on the pose of the launch point in the third coordinate system, the first transformation relationship from the third coordinate system to the first coordinate system, and the desired transformation relationship from the first coordinate system to the second coordinate system. Represented as:
[0097]
[0098] in, It is a 3×3 rotation matrix that describes the directional change from the fourth coordinate system to the second coordinate system. It is a 3×1 translation vector, which represents the offset between the origin of the fourth coordinate system and the origin of the second coordinate system.
[0099] Step S320: Obtain the projection function from the laser device's emission point to the second coordinate system based on the positional relationship between the laser device and the working plane.
[0100] In this embodiment, the control device 140 can construct a projection function based on the positional relationship between the working plane of the laser device 110 and the test display 130, and the projection function can be obtained from spatial solid geometry.
[0101] Since the laser device 110 emits a laser spot from its emission point onto the working plane of the test display 130, the projection function from the emission point to the second coordinate system can be used to solve for the coordinates of the laser spot emitted by the laser device 110 on the working plane (i.e., the second coordinate system) based on the expected transformation information of the emission point. In other words, the projection function can be used to solve for the projected coordinates of the predicted calibration point in the second coordinate system based on the expected transformation information of the emission point. The projection function can be expressed as follows: .
[0102] Step S330: Substitute the desired transformation information set into the projection function to calculate the projection coordinate information set.
[0103] This involves substituting each desired transformation information from the desired transformation information set into the projection function to calculate the projected coordinates of each calibration point. Substituting the desired transformation information into the projection function yields:
[0104]
[0105] Specifically, ,in, Represents X in the fourth coordinate system t The unit vectors of the coordinate axes , is the scale factor. Where, It is an unknown parameter.
[0106] In this embodiment, it is necessary to calculate the coordinates of the laser spot emitted by the laser device 110 on the working plane (second coordinate system) of the test display 130, and the Z-axis of the laser spot in the second coordinate system is... e The coordinate components of the coordinate axes are zero, therefore the Z-axis can be... ei Substituting 0 into the above formula, the specific value of the scale factor is calculated, and then the X-axis of the laser spot in the second coordinate system can be calculated. e coordinate axes and Y e The coordinate components of the coordinate axes are used to obtain the projected coordinates of the laser spot corresponding to the calibration point.
[0107] Please see Figure 9 , Figure 9 This is a detailed flowchart of step S400. Specifically, step S400 may include the following steps.
[0108] Step S410: Calculate the square of the difference between the projected coordinates of the laser spot corresponding to each calibration point and the true coordinates of the calibration point.
[0109] The square of the difference between the projected coordinates of the laser spot corresponding to each calibration point and the true coordinates of the calibration point can be expressed as:
[0110] Step S420: Determine the projection error based on the sum of the squares of the differences corresponding to all calibration points.
[0111] In this embodiment of the application, the projection error can be expressed as:
[0112]
[0113] in, The coordinates of the laser spot corresponding to the calibration point are the projected coordinates in the second coordinate system. These are the true coordinates of the calibration point.
[0114] In this embodiment, the control device 140 can construct an optimization solver with the desired transformation relationship as the optimization variable. During the iterative update of the desired transformation relationship, the optimization solver can calculate the corresponding projection error, and then output the corresponding desired transformation relationship when the projection error converges. The optimization solver can be represented as:
[0115]
[0116] There are various ways to implement the optimization solver, such as the Gauss-Newton iteration method and the gradient descent method. Through multiple updates and iterations of the optimizer, the expected transformation relationship corresponding to the convergence of the projection error is the target transformation relationship.
[0117] Please see Figure 10 , Figure 10 This is a detailed flowchart of step S640. Specifically, step S640 may include the following steps.
[0118] Step S641: Obtain the projection function from the laser device's emission point to the second coordinate system based on the positional relationship between the laser device and the working plane.
[0119] Step S642: Substitute the second pose information set and the preliminary transformation relationship into the projection function to calculate the verification coordinate information set.
[0120] In this embodiment of the application, the specific implementation method of the control device 140 in calculating the set of verification coordinate information is the same as that in calculating the set of projection coordinate information. It only requires a preliminary transformation relationship to calculate the verification coordinates of each verification point. This embodiment of the application will not elaborate further on this.
[0121] Please see Figure 11 , Figure 11 This is a detailed flowchart of step S650. Specifically, step S650 may include the following steps.
[0122] Step S651: Calculate the square of the difference between the verification coordinates of the laser spot corresponding to each verification point and the true coordinates of the verification point.
[0123] Step S652: Determine the verification error based on the sum of the squares of the differences corresponding to all verification points.
[0124] In this embodiment, the specific method by which the control device 140 calculates the verification error is the same as that for calculating the projection error, and will not be described again here.
[0125] It is understood that the position calibration method provided in this application embodiment can be applied to applications such as the accuracy test of pointing remote controllers and the PCBA placement operation of a robotic arm 120.
[0126] Please see Figure 12 This application also provides an electronic device 200, which includes a processor 210 and a memory 220. The memory 220 stores executable instructions of the processor 210, wherein the processor 210 is configured to perform the aforementioned position calibration method by executing the executable instructions. In some embodiments, the electronic device 200 may be the control device 140 described above.
[0127] Therefore, the position calibration method, system, and electronic device 200 provided in this application can acquire the first pose information set of the laser device 110's emission point in the first coordinate system when the laser device 110 emits laser spots to several calibration points on the working plane of the test display 130, acquire the set of true coordinate information of several calibration points in the second coordinate system, calculate the projection coordinate information set of the laser spots emitted by the laser device 110 to the several calibration points in the second coordinate system based on the first pose information set and the expected transformation relationship, calculate the projection error based on the projection coordinate information set and the first true coordinate information set, iteratively update the expected transformation relationship and recalculate the corresponding projection error until the projection error converges, and determine the target transformation relationship from the first coordinate system to the second coordinate system based on the expected transformation relationship corresponding to the convergence of the projection error. The position calibration method, system, and electronic device 200 of this application can not only realize non-contact calibration of the robotic arm 120, but also reduce the calibration error of the robotic arm 120 and improve the calibration accuracy.
[0128] Those skilled in the art should recognize that the above embodiments are only used to illustrate this application and are not intended to limit this application. Any appropriate changes and variations made to the above embodiments within the essential spirit and scope of this application fall within the scope of protection claimed in this application.
Claims
1. A method for calibrating the position of a robotic arm, characterized in that, The end effector of the robotic arm is used to mount a laser device, which is used to emit a laser spot onto the working plane. The position calibration method includes: When the laser device emits laser spots to several calibration points on the working plane, the first pose information set of the laser device's emission point in the first coordinate system is obtained; wherein, the first coordinate system takes the center of the robot arm's base as the origin. Obtain a set of first true coordinate information of several calibration points in a second coordinate system; wherein the second coordinate system takes a point on the working plane as the origin; The expected transformation information set from the launch point to the second coordinate system is calculated based on the first pose information set and the expected transformation relationship; wherein, the expected transformation relationship is a preset transformation relationship from the first coordinate system to the second coordinate system; The projection function from the emission point of the laser device to the second coordinate system is obtained based on the positional relationship between the laser device and the working plane. Substitute the desired transformation information set into the projection function to calculate the projection coordinate information set of the laser spot emitted by the laser device to the plurality of calibration points in the second coordinate system; The projection error is calculated based on the projection coordinate information set and the first true value coordinate information set; Iteratively update the desired transformation relationship and recalculate the projection error until the projection error converges; Based on the expected transformation relationship corresponding to the convergence of the projection error, a preliminary transformation relationship from the first coordinate system to the second coordinate system is determined; When the laser device emits laser spots to several verification points on the working plane, a second pose information set of the emission point of the laser device in the first coordinate system is obtained; wherein, the several verification points are different from the several calibration points; Obtain a set of second true coordinate information of several verification points in the second coordinate system; The set of verification coordinate information of the laser spot emitted by the laser device to several verification points in the second coordinate system is calculated based on the second pose information set and the preliminary transformation relationship. The verification error is calculated based on the set of verification coordinate information and the second set of true value coordinate information. When the verification error is less than the preset error value, the preliminary transformation relationship is determined to be the target transformation relationship from the first coordinate system to the second coordinate system; When acquiring the laser spot emitted by the laser device to several calibration points on the working plane, the first pose information set of the emission point of the laser device in the first coordinate system includes: The pose of the laser device's emission point in a third coordinate system is obtained; wherein the third coordinate system has the end of the robotic arm as its origin; Obtain the first transformation relationship from the third coordinate system to the first coordinate system; The first pose information set is calculated based on the pose and the first transformation relationship.
2. The position calibration method as described in claim 1, characterized in that, The step of obtaining the first transformation relationship from the third coordinate system to the first coordinate system includes: Obtain the real-time pose information of the robotic arm in the first coordinate system; The first transformation relationship is determined based on the real-time pose information.
3. The position calibration method as described in claim 1 or 2, characterized in that, The step of calculating the projection error based on the projection coordinate information set and the first true coordinate information set includes: Calculate the square of the difference between the projected coordinates of the laser spot corresponding to each calibration point and the true coordinates of the calibration point; The projection error is determined by the sum of the squares of the differences corresponding to all the calibration points.
4. The position calibration method as described in claim 1, characterized in that, The step of calculating the set of verification coordinate information of the laser spot emitted by the laser device to a plurality of verification points in the second coordinate system based on the second pose information set and the preliminary transformation relationship includes: The projection function from the emission point of the laser device to the second coordinate system is obtained based on the positional relationship between the laser device and the working plane. The second pose information set and the preliminary transformation relationship are substituted into the projection function to calculate the verification coordinate information set.
5. The position calibration method as described in claim 1, characterized in that, The step of calculating the verification error based on the verification coordinate information set and the second true value coordinate information set includes: Calculate the square of the difference between the verification coordinates of the laser spot corresponding to each verification point and the true coordinates of the verification point; The verification error is determined by the sum of the squares of the differences corresponding to all the verification points.
6. A position calibration system for a robotic arm, characterized in that, The device includes a laser device, a robotic arm, a test display, and a control device. The end of the robotic arm is used to mount the laser device, which is used to emit a laser spot onto the working plane of the test display. The test display is positioned opposite to the robotic arm. The control device is connected to the robotic arm and is used to execute the position calibration method as described in any one of claims 1 to 5.
7. An electronic device, characterized in that, The electronic device includes: Processor; and A memory that stores executable instructions of the processor; The processor is configured to execute the position calibration method according to any one of claims 1-5 by executing the executable instructions.