Robot path updating method and system, electronic equipment and storage medium
By obtaining and updating the conversion matrix between the workpiece and the robot base coordinate system in real time, the path deviation problem caused by the change in the workpiece position is solved, and the robot path is quickly and accurately adjusted, ensuring the continuity and accuracy of production.
Patent Information
- Application Number
- CN202510500687.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-21
- Publication Date
- 2025-07-29
AI Technical Summary
In the prior art, industrial robots lack real-time dynamic calibration capabilities when the workpiece position changes, resulting in path planning deviating from actual locations, affecting production continuity and accuracy.
By obtaining the coordinates of the workpiece under the tracker coordinate system in real time, determining the conversion matrix between the workpiece and the tracker coordinate system and the robot base coordinate system, dynamically updating the robot path, ensuring the accuracy of the path when the workpiece position changes.
It realizes rapid and accurate dynamic updates of robot paths, ensures production continuity and processing accuracy, and avoids the tedious process of repeated calibration.
Smart Images

Figure CN120382484A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of robots, and more particularly, to a method, a system, an electronic device, and a storage medium for updating a robot path. Background Art
[0002] In the wave of modern manufacturing, industrial robots have become the core driving force for promoting the efficient operation of automated production lines. Their status is becoming increasingly important, especially in manufacturing scenarios with strict requirements for precision and efficiency. In the scenario of automatically processing workpieces using industrial robots, it is necessary to calibrate the position of the workpiece, and the robot plans the operation path of the robot according to the calibrated position and processes the workpiece.
[0003] Traditional workpiece calibration methods highly rely on the preset fixed position of the workpiece. If the workpiece moves or changes during the processing, or needs to be repositioned due to process requirements, it is necessary to perform cumbersome and time-consuming secondary or even multiple repeated calibrations. Such repeated calibrations not only significantly reduce production efficiency, but also may lead to the forced stagnation of the production line, causing unnecessary economic losses. Moreover, traditional workpiece calibration systems generally lack the ability of real-time dynamic calibration. When the position of the workpiece changes, the system cannot timely sense and dynamically adjust the operation path of the robot. The direct consequence is that the planned path points deviate from the actual workpiece position and even become completely unreachable, seriously affecting the continuity of production and the processing accuracy of the final product.
[0004] Therefore, how to achieve fast, accurate, and dynamic calibration on a robot automated production line and perform path planning for the robot accordingly is a problem to be solved. Summary of the Invention
[0005] The purpose of the present application is to provide a method, a system, an electronic device, and a storage medium for updating a robot path, aiming at the deficiencies in the above-mentioned prior art, to realize dynamically adjusting the motion trajectory of the robot according to the real-time position of the workpiece and ensure the operation accuracy.
[0006] To achieve the above purpose, the technical solutions adopted in the embodiments of the present application are as follows:
[0007] In a first aspect, an embodiment of the present application provides a method for updating a robot path, the method including:
[0008] Obtaining, in real time, the first coordinates of each reference point of the current workpiece at the current moment in the tracker coordinate system corresponding to the tracker;
[0009] If the first coordinates are different from the second coordinates, determine a first transformation matrix between the workpiece coordinate system and the tracker coordinate system according to each of the first coordinates and the coordinates of each of the reference points in the workpiece coordinate system, where the second coordinates are the coordinates of the reference points in the tracker coordinate system at the previous moment of the current moment;
[0010] Determine a third transformation matrix between the workpiece coordinate system and the robot base coordinate system according to the first transformation matrix and a second transformation matrix pre-calibrated between the tracker coordinate system and the robot base coordinate system;
[0011] Obtain an initial path of the robot in the workpiece coordinate system;
[0012] Determine a target path of the robot in the robot base coordinate system according to the initial path and the third transformation matrix.
[0013] Optionally, the process of pre-calibrating the second transformation matrix between the tracker coordinate system and the robot base coordinate system includes:
[0014] Obtain a first pose of the robot's end flange in a variety of different poses and a second pose of the scanner corresponding to each of the first poses, where the second pose is the pose of the scanner in the tracker coordinate system, the scanner is mounted on the robot's end flange, and the tracker is fixed at a fixed position;
[0015] Determine the second transformation matrix according to the multiple first poses and the multiple second poses.
[0016] Optionally, the determining the second transformation matrix according to the multiple first poses and the multiple second poses includes:
[0017] Input each of the first poses and the second pose corresponding to each of the first poses into the formula to obtain the second transformation matrix, where is the first pose, is the second pose corresponding to the first pose, T bt is the second transformation matrix, T fs is the transformation matrix between the scanner coordinate system and the flange coordinate system.
[0018] Optionally, the process of determining the initial path in the workpiece coordinate system includes:
[0019] Obtain the third coordinates of each point on the surface of the first workpiece of the same model as the current workpiece and the feature information of each point in the tracker coordinate system;
[0020] Determine at least one target point according to the characteristic information of each point;
[0021] Determine the initial path according to the third coordinate of each target point and the fourth transformation matrix between the workpiece coordinate system and the tracker calibrated in advance.
[0022] Optionally, the determining the third transformation matrix between the workpiece coordinate system and the robot base coordinate system according to the first transformation matrix and the second transformation matrix between the tracker coordinate system and the robot base coordinate system calibrated in advance includes:
[0023] Multiply the first transformation matrix by the second transformation matrix to obtain the third transformation matrix.
[0024] Optionally, the determining the target path of the robot in the robot base coordinate system according to the initial path and the third transformation matrix includes:
[0025] Determine the target path according to the coordinates of each path point in the initial path in the workpiece coordinate system and the third transformation matrix.
[0026] Optionally, the determining the target path according to the coordinates of each path point in the initial path in the workpiece coordinate system and the third transformation matrix includes:
[0027] Multiply the coordinates of each path point by the third transformation matrix to obtain the target path point in the robot base coordinate system;
[0028] Connect the target path points in sequence to obtain the target path.
[0029] In a second aspect, an embodiment of the present application further provides a robot path update system, including: a host computer, a robot, a tracker, and a scanner;
[0030] The robot drives the scanner to scan points on the surface of the workpiece, and the tracker is used to determine the coordinates of the scanned points in the tracker coordinate system;
[0031] The host computer is communicatively connected to the robot and the tracker, and the host computer is configured to execute the method steps described in the first aspect.
[0032] In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor, a storage medium, and a bus. The storage medium stores program instructions executable by the processor. When the application program runs, the processor communicates with the storage medium through the bus, and the processor executes the program instructions to execute the steps of the robot path update method described in the first aspect above.
[0033] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program is read and executed to perform the steps of the robot path update method described in the first aspect above.
[0034] The beneficial effects of the present application are as follows:
[0035] A robot path update method, system, electronic device, and storage medium provided by the present application obtain, in real time, a first coordinate of a reference point of a current workpiece in a tracker coordinate system corresponding to a tracker at the current moment; if the first coordinate is different from a second coordinate, a first transformation matrix between the workpiece coordinate system and the tracker coordinate system is determined according to the first coordinate and the coordinate of the reference point in the workpiece coordinate system, so that it is possible to timely determine whether the position of the current workpiece has changed. If the position has changed, a first transformation matrix between the workpiece coordinate system and the tracker coordinate system after the position change of the current workpiece can be timely determined, and according to the determined first transformation matrix and a second transformation matrix between the tracker coordinate system and the robot base coordinate system calibrated in advance, a third transformation matrix between the workpiece coordinate system and the robot base coordinate system can be determined, so that a target path in the robot base coordinate system can be obtained based on the obtained third transformation matrix and the initial path in the workpiece coordinate system, and then the robot can be controlled to process the current workpiece according to the obtained target path. Since the initial path is planned in the workpiece coordinate system, when the workpiece moves, the position of the path point in the workpiece coordinate system is not affected. Therefore, it is possible to avoid repeatedly planning the robot operation path points due to the movement of the workpiece position, and only need to dynamically update the initial path in the workpiece coordinate system based on the transformation matrix between the workpiece coordinate system and the tracker coordinate system after the position movement, so as to ensure the operation efficiency and operation accuracy of the robot. Description of the Drawings
[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0037] Figure 1 It is a schematic structural diagram of a robot path planning system provided by an embodiment of the present application;
[0038] Figure 2 It is a schematic flowchart of a robot path planning method provided by an embodiment of the present application;
[0039] Figure 3A schematic diagram of a workpiece provided by an embodiment of the present application;
[0040] Figure 4 A schematic flowchart of a method for calibrating a second conversion matrix provided by an embodiment of the present application;
[0041] Figure 5 A schematic diagram of a robot structure provided by an embodiment of the present application;
[0042] Figure 6 A schematic flowchart of a method for determining an initial path provided by an embodiment of the present application;
[0043] Figure 7 A structural block diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0044] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. It should be understood that the accompanying drawings in the present application are only for the purposes of illustration and description, and are not used to limit the protection scope of the present application. In addition, it should be understood that the schematic drawings are not drawn to actual scale. The flowcharts used in the present application illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations in the flowchart may not be implemented in sequence, and steps without logical context may be reversed or implemented simultaneously. In addition, those skilled in the art may add one or more other operations to the flowchart or remove one or more operations from the flowchart under the guidance of the content of the present application.
[0045] In addition, the described embodiments are only some embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and illustrated in the accompanying drawings here may be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application claimed, but merely represents selected embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative efforts fall within the protection scope of the present application.
[0046] It should be noted that the term "including" will be used in the embodiments of the present application to indicate the existence of the subsequently stated features, but does not exclude the addition of other features.
[0047] Figure 1 A schematic diagram of a robot path planning system provided by an embodiment of the present application. As Figure 1 shown, the system may include: a host computer, a robot, a tracker, and a scanner. As Figure 1As shown in the figure, on the left is a robot, and a constant velocity joint type scanner is installed on the end flange of the robot. Figure 1 Workpieces can be placed on the middle table. Figure 1 On the right rectangular counter, a tracker is placed, and the position of the tracker is fixedly set. The tracker and the scanner can cooperate to collect the coordinates on the surface of the workpiece. The robot can drive the constant velocity joint type scanner to scan the surface of the workpiece placed on the middle table and send the obtained point cloud data to the tracker. The tracker determines the coordinates of each point cloud data, and the determined coordinates are in the coordinate system of the tracker. The host computer can communicate with the robot and the tracker. By using the robot path planning method provided by the embodiments of the present application, when the position of the workpiece changes, the host computer can timely sense the change of the workpiece and timely update and plan the path of the robot based on the change of the workpiece, so as to avoid affecting the continuity of production and the machining accuracy of the product.
[0048] Figure 2 As shown in the figure, it is a schematic flowchart of a robot path planning method provided by an embodiment of the present application. The execution subject of this method is the host computer described above. Figure 2 As shown, this method may include:
[0049] S101. Obtain in real time the first coordinates of each reference point of the current workpiece at the current moment in the tracker coordinate system corresponding to the tracker.
[0050] Among them, the tracker coordinate system is a coordinate system with a preset position point on the tracker as the origin. The current workpiece may refer to the workpiece being processed or the workpiece to be processed, that is, the workpiece placed on the middle table at the current moment. Figure 1 on the middle table.
[0051] Optionally, the reference points of the current workpiece may be multiple points on the workpiece. For example, reference point 1, reference point 2, and reference point 3. The first coordinate A1 of reference point 1 on the current workpiece at the current moment in the tracker coordinate system, the first coordinate B1 of reference point 2 in the tracker coordinate system, and the first coordinate C1 of reference point 3 in the tracker coordinate system can be collected.
[0052] Exemplarily, for the current workpiece A placed on the table, the robot can drive the scanner and cooperate with the tracker to scan the reference points on the surface of the current workpiece in real time to obtain the first coordinates of each reference point in the tracker coordinate system.
[0053] S102. If the first coordinates are different from the second coordinates, determine the first transformation matrix between the workpiece coordinate system and the tracker coordinate system according to the first coordinates and the coordinates of each reference point in the workpiece coordinate system.
[0054] Among them, the second coordinate is the coordinate of the reference point in the tracker coordinate system at the previous moment of the current moment. The coordinate of the reference point in the workpiece coordinate system is fixed and unchanged.
[0055] Specifically, for the current workpiece being processed, if the first coordinate of the reference point at the current moment is different from the second coordinate of the reference point at the previous moment of the current moment, it indicates that the position of the current workpiece has changed, that is, the current workpiece has moved. Then, according to the first coordinate of the reference point in the tracker coordinate system at the current moment and the coordinate of the reference point in the workpiece coordinate system, a preset method can be used to determine the first transformation matrix between the workpiece coordinate system and the tracker coordinate system. That is to say, when the position of the current workpiece changes, the first transformation matrix between the workpiece coordinate system and the tracker coordinate system also changes. Therefore, it is necessary to determine this first transformation matrix according to the first coordinate of the reference point in the tracker coordinate system at the current moment and the coordinate of the reference point in the workpiece coordinate system.
[0056] Optionally, for the current workpiece being processed, if the first coordinate of the reference point at the current moment is the same as the second coordinate of the reference point at the previous moment of the current moment, it indicates that the position of the current workpiece has not changed, that is, the current workpiece does not move. Then the robot can process the current workpiece according to the previous path.
[0057] Optionally, for the current workpiece to be processed, the first transformation matrix between the workpiece coordinate system and the tracker coordinate system can be directly determined according to the first coordinate of the reference point of the current workpiece in the tracker coordinate system at the current moment and the coordinate of the reference point in the workpiece coordinate system.
[0058] Exemplarily, when the first coordinate A1 of the reference point 1 on the current workpiece at the current moment t1 is different from the second coordinate A0 at the previous moment t0 of the current moment t1, the first coordinate B1 of the reference point 2 is different from the second coordinate B0 at the previous moment t0 of the current moment t1, and the first coordinate C1 of the reference point 3 is different from the second coordinate C0 at the previous moment t0 of the current moment t1, it indicates that the current workpiece has moved. And according to the first coordinate A1 of the reference point 1, the first coordinate B1 of the reference point 2, the first coordinate C1 of the reference point 3, the coordinate of the reference point 1 in the workpiece coordinate system, the coordinate of the reference point 2 in the workpiece coordinate system, and the coordinate of the reference point 3 in the workpiece coordinate system at the current moment, a preset method is used to determine the first transformation matrix between the workpiece coordinate system and the tracking coordinate system.
[0059] S103. Determine the third transformation matrix between the workpiece coordinate system and the robot base coordinate system according to the first transformation matrix and the second transformation matrix between the pre-calibrated tracker coordinate system and the robot base coordinate system.
[0060] Among them, the second transformation matrix between the tracker coordinate system and the robot base coordinate system can be calibrated in advance using a preset method. The tracker position is fixed, and the robot base position is fixed. Therefore, the second transformation matrix between the tracker coordinate system and the robot base coordinate system is a fixed transformation matrix. For example, it can be represented by T bt to represent this second transformation matrix.
[0061] Optionally, the first transformation matrix is the transformation matrix between the workpiece coordinate system and the tracker coordinate system after the current workpiece changes. Therefore, based on the first transformation matrix and the second transformation matrix between the tracker coordinate system and the robot base coordinate system calibrated in advance, a preset method can be used to determine the third transformation matrix between the workpiece coordinate system and the robot base coordinate system after the current workpiece changes.
[0062] S104. Obtain the initial path of the robot in the workpiece coordinate system.
[0063] Among them, the workpiece coordinate system is a coordinate system with a preset position point on the workpiece as the origin. For each workpiece of the same model, the coordinates of the points on each workpiece in the workpiece coordinate system are the same. For example, workpiece 1 and workpiece 2 are workpieces of the same model, and there are the same point h on both workpiece 1 and workpiece 2. As Figure 3 shown, although the poses of workpiece 1 and workpiece 2 are different, the position of point h1 on workpiece 1 is the same as the position of point h2 on workpiece 2. Then the coordinates of point h1 in the workpiece coordinate system are, for example, (1, 0, 0), and the coordinates of point h2 in the workpiece coordinate system are also (1, 0, 0).
[0064] Among them, the initial path can be the initial path obtained by path planning based on the first workpiece of the same model as the current workpiece. For all workpieces of the same model, when the robot processes each workpiece, the path in the workpiece coordinate system is unchanged. Therefore, no matter how the position of the workpiece changes on the table, the path in the workpiece coordinate system is unchanged. Therefore, when processing each workpiece of the same model, only the initial path in the working coordinate system needs to be planned on the first workpiece, and for other workpieces of the same model, there is no need to re-plan the path due to the movement of the workpiece position.
[0065] S105. Determine the target path of the robot in the robot base coordinate system according to the initial path and the third transformation matrix.
[0066] Optionally, after the current workpiece is moved, the initial path in the workpiece coordinate system can be converted into the target path in the robot base coordinate system according to the initial path in the workpiece coordinate system and the third transformation matrix between the workpiece coordinate system and the robot base coordinate system obtained in step S103. After the target path is obtained, the host computer can send the obtained target path to the robot, so that the robot can process the moved current workpiece based on the received target path.
[0067] In this embodiment, by obtaining in real time the first coordinate of the reference point of the current workpiece in the tracker coordinate system corresponding to the tracker; if the first coordinate is different from the second coordinate, then according to the first coordinate and the coordinate of the reference point in the workpiece coordinate system, the first transformation matrix between the workpiece coordinate system and the tracker coordinate system is determined, so that it is possible to timely determine whether the position of the current workpiece has changed. If the position has changed, then the first transformation matrix between the workpiece coordinate system and the tracker coordinate system after the position change of the current workpiece can be timely determined, and according to the determined first transformation matrix and the pre-calibrated second transformation matrix between the tracker coordinate system and the robot base coordinate system, the third transformation matrix between the workpiece coordinate system and the robot base coordinate system can be determined. Thus, the target path in the robot base coordinate system can be obtained based on the obtained third transformation matrix and the initial path in the workpiece coordinate system, and then the robot can be controlled to process the current workpiece according to the obtained target path. Since the initial path is planned in the workpiece coordinate system, when the workpiece moves, it does not affect the position of the path points in the workpiece coordinate system. Therefore, it is possible to avoid repeatedly planning the robot operation path points due to the movement of the workpiece position, and only need to dynamically update the initial path in the workpiece coordinate system based on the transformation matrix between the workpiece coordinate system and the tracker coordinate system after the position movement, so as to ensure the operation efficiency and operation accuracy of the robot.
[0068] Figure 4 It is a schematic flowchart of a method for calibrating the second transformation matrix provided by an embodiment of the present application. As Figure 4 shown, the process of pre-calibrating the second transformation matrix between the tracker coordinate system and the robot base coordinate system can include:
[0069] S201. Obtain the first pose of the end flange of the robot in a variety of different poses and the second pose of the scanner corresponding to each first pose.
[0070] Among them, the second pose is the pose of the scanner in the tracker coordinate system. The structural connection diagram of the end flange and the scanner is as Figure 5 shown. As Figure 5 shown, a spherical cage type scanner is loaded on the end flange of the robot, and the tracker is fixed at a fixed position. The fixed position of the tracker is as Figure 1on the right table. The first pose refers to the pose in the robot base coordinate system. The first pose can be used, for example, to identify T bf , and the second pose can be used, for example, to identify T ts .
[0071] Optionally, in the calibration stage, the first poses of the robot's end flange in multiple different poses can be collected. At the same time, since the scanner is mounted at the end flange, the tracker can track the second pose of the scanner in the tracker coordinate system at each pose, and obtain the second pose of the scanner corresponding to each first pose.
[0072] For example, at pose 1, the first pose T bf1 of the end flange and the first pose T bf1 corresponding to the second pose T ts1 of the scanner can be obtained; at pose 2, the first pose T bf2 of the end flange and the first pose T bf2 corresponding to the second pose T ts2 of the scanner can be obtained; at pose 3, the first pose T bf3 of the end flange and the first pose T bf3 corresponding to the second pose T ts3 of the scanner can be obtained; at pose 4, the first pose T bf4 of the end flange and the first pose T bf4 corresponding to the second pose T ts4 of the scanner can be obtained; at pose 5, the first pose T bf5 of the end flange and the first pose T bf5 corresponding to the second pose T ts5 of the scanner can be obtained, and so on.
[0073] S202. Determine the second transformation matrix according to multiple first poses and multiple second poses.
[0074] Specifically, according to the multiple first poses T bf of the multiple end flanges in the robot base coordinate system obtained in S101 and the multiple second poses T ts of the multiple scanners in the tracker coordinate system, a preset method can be used to determine the second transformation matrix between the tracker coordinate system and the robot base coordinate system.
[0075] In this embodiment, in the calibration stage, the second transformation matrix between the tracker coordinate system and the robot base coordinate system can be pre-calibrated through multiple groups of data, so that the transformation matrix between the workpiece coordinate system and the robot base coordinate system can be quickly obtained based on the second transformation matrix in the subsequent process, improving the efficiency of path dynamic update.
[0076] Optionally, determining the second transformation matrix according to the plurality of first poses and the plurality of second poses in S202 above may include:
[0077] Optionally, each first pose T bf and the second pose T corresponding to each first pose ts may be respectively input into the formula to obtain the second transformation matrix, where i is a pose identifier, is the first pose, is the second pose corresponding to the first pose, T bt is the second transformation matrix, and T fs is the transformation matrix between the scanner coordinate system and the flange coordinate system. Due to the existence of noise and errors, more than 10 groups of data may be used to calculate the second transformation matrix.
[0078] Exemplarily, according to, T bf1 ·T fs = T bt ·T ts1 ; T bf2 ·T fs = T bt ·T ts2 ; T bf3 ·T fs = T bt ·T ts3 ; T bf4 ·T fs = T bt ·T ts4 ; T bf5 ·T fs = T bt ·T ts5 ; T bf6 ·T fs = T bt ·T ts6 ; T bf7 ·T fs = T bt ·T ts7 ; T bf8 ·T fs = T bt ·T ts8 ; T bf9 ·T fs = T bt ·T ts9 ; T bf10 ·T fs = T bt ·T ts10 ; the second transformation matrices T bt and T fs are obtained.
[0079] Optionally, the step of determining the first transformation matrix between the workpiece coordinate system and the tracker coordinate system according to the first coordinates and the coordinates of the reference points in the workpiece coordinate system in S102 may include:
[0080] Specifically, the first coordinate A1 of reference point 1 in the tracker coordinate system and the coordinate A of reference point 1 in the workpiece coordinate system; the first coordinate B1 of reference point 2 in the tracker coordinate system and the coordinate B of reference point 2 in the workpiece coordinate system; the first coordinate C1 of reference point 3 in the tracker coordinate system and the coordinate C of reference point 3 in the workpiece coordinate system may be used to obtain the first transformation matrix between the workpiece coordinate system and the tracker coordinate system by using the covariance matrix.
[0081] Figure 6 The figure is a schematic flowchart of a method for determining an initial path provided by an embodiment of the present application. As Figure 6 shown, the process of determining the initial path in the workpiece coordinate system may include:
[0082] S301. Obtain the third coordinates of each point among all points on the surface of the first workpiece of the same model as the current workpiece in the tracker coordinate system.
[0083] Optionally, for workpieces of the same model, the robot needs to process each workpiece separately, and the first workpiece refers to the first workpiece to be processed in the same model. For the first workpiece to be processed, the robot can drive the scanner to obtain the third coordinates of each point among all points on the surface of the first workpiece in the tracker coordinate system.
[0084] S302. Determine at least one target point according to the feature information of each point.
[0085] Exemplarily, points on the hole edge, corner points, etc. of the workpiece may be selected as target points. The obtained target points are the points where the robot needs to operate on the workpiece.
[0086] S303. Determine the initial path according to the third coordinates of each target point and the fourth transformation matrix between the calibrated workpiece coordinate system and the tracker.
[0087] Among them, for the first workpiece placed on the table, the workpiece coordinate system can be calibrated in advance to obtain the fourth transformation matrix between the calibrated workpiece coordinate system and the tracker. For example, the PCA analysis method can be used to calibrate the workpiece coordinate system.
[0088] Optionally, the third coordinate of each target point is the coordinate in the tracker coordinate system, and the fourth transformation matrix is the transformation matrix pre-calibrated between the workpiece coordinate system and the tracker coordinate system. Therefore, the third coordinate of each target point can be transformed into the coordinate in the workpiece coordinate system through the pre-calibrated fourth transformation matrix, that is, the coordinates of each target point in the workpiece coordinate system are obtained. At the same time, the third coordinates of other points except the target points can also be transformed into the coordinates in the workpiece coordinate system. The set of each target point in the workpiece coordinate system is used as the initial path.
[0089] In this embodiment, the workpiece coordinate system of the first workpiece is pre-calibrated, and based on the third coordinates of all points scanned on the first workpiece and the feature information of each point, the initial path in the workpiece coordinate system is determined, so that when processing other workpieces or the first workpiece moves later, it is not necessary to calibrate the workpiece again. The transformation matrix between the workpiece coordinate system and the tracker coordinate system can be dynamically updated based on the first coordinates of each reference point scanned in real time and the coordinates of each reference point in the workpiece coordinate system, so as to dynamically update the transformation matrix between the workpiece coordinate system and the robot base coordinate system, and then dynamically update the initial path to obtain the target path.
[0090] Optionally, the above S103, determining the third transformation matrix between the workpiece coordinate system and the robot base coordinate system according to the first transformation matrix and the second transformation matrix pre-calibrated between the tracker coordinate system and the robot base coordinate system, may include:
[0091] Optionally, the first transformation matrix and the second transformation matrix can be multiplied to obtain the third transformation matrix. Specifically, according to the formula T obj2base = T bt ·T traker2obj the third transformation matrix is obtained. Wherein, T traker2obj is the first transformation matrix between the workpiece coordinate system and the tracker coordinate system, T bt is the second transformation matrix pre-calibrated between the tracker coordinate system and the robot base coordinate system, and T obj2base is the third transformation matrix between the workpiece coordinate system and the robot base coordinate system.
[0092] Optionally, in the above S105 step, determining the target path of the robot in the robot base coordinate system according to the initial path and the third transformation matrix may include:
[0093] Specifically, the target path can be determined by using a preset method according to the coordinates of each path point in the initial path in the workpiece coordinate system and the third transformation matrix.
[0094] Optionally, determining the target path according to the coordinates of each path point in the initial path in the workpiece coordinate system and the third transformation matrix may include:
[0095] Optionally, the coordinates of each path point may be multiplied by the third transformation matrix to obtain the target path points in the robot base coordinate system, and the path obtained by connecting the target path points in sequence is used as the target path. Specifically, it can be through the formula P base = T obj2base ·P obj to obtain the target path points in the robot base coordinate system, where P obj is the coordinates of each path point in the initial path in the workpiece coordinate system, T obj2base is the third transformation matrix between the workpiece coordinate system and the robot base coordinate system, and P base is the target path point.
[0096] In this embodiment, each path point in the initial path can be directly converted into the coordinates in the robot base coordinate system, so as to quickly update the initial path, without the need to re-plan the path points due to the movement of the current workpiece position. Only the conversion of each path point in the initial path is required to complete the update of the robot path.
[0097] Optionally, a motion trajectory of the robot can be generated based on the obtained target path, and the robot motion can be controlled to execute the corresponding operation task. Since the workpiece pose is updated in real time, the robot can dynamically adjust the motion trajectory according to the real-time position of the workpiece to ensure the operation accuracy.
[0098] Figure 7 The following is a structural block diagram of an electronic device 400 provided by an embodiment of the present application. This electronic device can be, for example, the host computer described in the foregoing embodiment. As Figure 7 shown, the electronic device may include: a processor 401 and a memory 402.
[0099] Optionally, a bus 403 may further be included. Among them, the memory 402 is used to store machine-readable instructions executable by the processor 401. When the electronic device 400 runs, the processor 401 communicates with the memory 402 through the bus 403. When the machine-readable instructions are executed by the processor 401, the method steps in the above method embodiments are executed.
[0100] An embodiment of the present application further provides a computer-readable storage medium. A computer program is stored on this computer-readable storage medium. When the computer program is run by a processor, the method steps in the above method embodiments of the robot path update method are executed.
[0101] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems and devices described above can refer to the corresponding processes in the method embodiments, and will not be elaborated herein. In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation. For another example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some communication interfaces, and the indirect coupling or communication connection of the devices or modules can be in electrical, mechanical or other forms.
[0102] In addition, each functional unit in the various embodiments of the present application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks or optical disks and other various media that can store program codes.
[0103] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, and all should be covered by the protection scope of the present application.
Claims
1. A method for updating a robot path, characterized in that The method includes: Obtaining, in real time, first coordinates of each reference point of the current workpiece at the current moment in a tracker coordinate system corresponding to a tracker; If the first coordinates are different from second coordinates, determining a first transformation matrix between the workpiece coordinate system and the tracker coordinate system according to the first coordinates and coordinates of the reference points in the workpiece coordinate system, where the second coordinates are coordinates of the reference points in the tracker coordinate system at a previous moment of the current moment; Determining a third transformation matrix between the workpiece coordinate system and the robot base coordinate system according to the first transformation matrix and a second transformation matrix between the tracker coordinate system and the robot base coordinate system that is pre-calibrated; Obtaining an initial path of the robot in the workpiece coordinate system; Determining a target path of the robot in the robot base coordinate system according to the initial path and the third transformation matrix.
2. The robot path update method according to claim 1, wherein, The process of pre-calibrating the second transformation matrix between the tracker coordinate system and the robot base coordinate system includes: Obtaining first poses of the end flange of the robot in a plurality of different poses and second poses of a scanner corresponding to each of the first poses, where the second poses are poses of the scanner in the tracker coordinate system, the scanner is mounted on the end flange of the robot, and the tracker is fixed at a fixed position; Determining the second transformation matrix according to the plurality of first poses and the plurality of second poses.
3. The robot path update method according to claim 2, wherein The determining the second transformation matrix according to the plurality of first poses and the plurality of second poses includes: Input each of the first poses and the corresponding second poses into the formula to obtain the second transformation matrix, where is the first pose,[[]] is the second pose corresponding to the first pose, T bt is the second transformation matrix, T fs is the transformation matrix between the scanner coordinate system and the flange coordinate system.
4. The robot path update method according to claim 1, wherein The process of determining an initial path in the workpiece coordinate system includes: Obtaining third coordinates of each point among all points on the surface of the first workpiece of the same model as the current workpiece in the tracker coordinate system and characteristic information of each point; Determining at least one target point according to the characteristic information of each point; Determining the initial path according to the third coordinates of each target point and a fourth transformation matrix between the workpiece coordinate system and the tracker that is pre-calibrated.
5. The robot path update method according to claim 1, wherein The determining the third transformation matrix between the workpiece coordinate system and the robot base coordinate system according to the first transformation matrix and the second transformation matrix between the tracker coordinate system and the robot base coordinate system that is pre-calibrated includes: Multiplying the first transformation matrix by the second transformation matrix to obtain the third transformation matrix.
6. The robot path update method according to claim 1, wherein, The determining the target path of the robot in the robot base coordinate system according to the initial path and the third transformation matrix includes: Determining the target path according to coordinates of each path point in the initial path in the workpiece coordinate system and the third transformation matrix.
7. The robot path update method according to claim 6, wherein The determining the target path according to coordinates of each path point in the initial path in the workpiece coordinate system and the third transformation matrix includes: Multiplying the coordinates of each path point by the third transformation matrix to obtain a target path point in the robot base coordinate system; Taking the path obtained by connecting the target path points in sequence as the target path.
8. A robot path update system, characterized in that, Includes: A host computer, a robot, a tracker, a scanner; The robot drives the scanner to scan points on the surface of the workpiece, and the tracker is used to determine the coordinates of the scanned points in the tracker coordinate system; The host computer is communicatively connected to the robot and the tracker, and the host computer is configured to execute the steps of the robot path update method according to any one of claims 1-7.
9. An electronic device, characterized in that, It includes a memory and a processor. The memory stores a computer program executable by the processor. When the processor executes the computer program, the steps of the robot path update method according to any one of claims 1-7 are implemented.
10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium. When the computer program is run by the processor, the steps of the robot path update method according to any one of claims 1-7 are executed.