Robot public reachable posture solution method, system and readable storage medium
Through the solution method of the computer robot's public reachable position, the Adam optimization algorithm is used to determine whether the robot end can reach the same target point on a personal PC, which solves the problems of large computing volume and resource consumption in the existing technology, and realizes efficient robot public access Point determination and joint value solution.
Patent Information
- Application Number
- CN202411513972.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-10-29
AI Technical Summary
When processing complex robot systems, the intersection of computer robots' public reachable space requires a large amount of computing resources, which is difficult to solve on personal PCs, and the calculation amount is large and consumes a lot of GPU time. It is impossible to effectively realize whether the robot end can reach the same goal. Decision of points.
A common reachable position solution method for robots is adopted. By obtaining the end position and rotation vector and weight data of robot A and robot B, the loss function is calculated and iterated using the Adam optimization algorithm until the loss function converges, and robot A and robot B are obtained. target position, including joint values and Cartesian coordinates.
It is realized that using a small amount of computing resources on a personal PC determines whether the ends of any two robots can reach the same target point, and solves the joint value and Cartesian coordinates of the point, reducing the calculation amount and resource consumption.
Smart Images

Figure CN119048588B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robot operation technology, and more specifically, to a method, system and readable storage medium for solving a robot's publicly reachable posture. Background Art
[0002] In the field of robotic operations, there are many methods used to solve robot kinematics and collaboration problems. Traditional methods include heuristic search-based algorithms and optimization algorithms. In recent years, optimization algorithms based on gradient descent have gradually attracted attention, especially when dealing with complex nonlinear problems. Most studies on whether two robots can reach a certain point together use exhaustive methods to traverse the reachable space and then calculate the intersection.
[0003] For example, in the prior art, some scholars have established a kinematic model of a dual-arm robot, calculated the reachable space of each robot arm, and analyzed the intersection of the two reachable spaces to obtain the common working space of the dual-arm robot. However, this analysis process is relatively complicated and requires the establishment of an accurate kinematic model and a large amount of calculation. For a complex robot system, the amount of calculation may be very large, and it will take up a lot of memory and consume a lot of GPU computing time, which is not suitable for solving on a personal PC. Summary of the invention
[0004] The purpose of the present invention is to provide a method, system and readable storage medium for solving the common reachable posture of robots, which can realize the determination of the common reachable points of robots. Using a small amount of computing resources, it can be determined on a personal PC whether any two robot ends can reach the same target point, and the joint values and Cartesian coordinates of the point can be solved.
[0005] A first aspect of the present invention provides a method for solving a robot's publicly reachable posture, comprising the following steps:
[0006] Acquire first data of robot A, wherein the first data includes a first position of an end effector of robot A and a first rotation vector;
[0007] Acquire second data of robot B, wherein the second data includes a second position of an end effector of robot B and a second rotation vector;
[0008] Acquire weight data, wherein the weight data includes a terminal distance weight, a terminal rotation difference weight, and a ground distance item weight;
[0009] A loss function is calculated based on the first data, the second data, and the weight data, and the loss function is iterated to obtain a target pose.
[0010] In this solution, the obtaining of the first data of the robot A specifically includes:
[0011] Acquiring real-time parameters of robot A based on the operation record data of robot A;
[0012] Performing factor identification based on the real-time parameters of the robot A to identify the position factor of the robot A and the rotation factor of the robot A;
[0013] The first position is obtained based on the robot A position factor ;
[0014] The first rotation vector is obtained based on the rotation factor of the robot A. .
[0015] In this solution, the obtaining of the second data of robot B specifically includes:
[0016] Acquiring real-time parameters of robot B based on the operation record data of robot B;
[0017] Performing factor identification based on the real-time parameters of the robot B to identify the position factor of the robot B and the rotation factor of the robot B;
[0018] The second position is obtained based on the robot B position factor ;
[0019] The second rotation vector is obtained based on the robot B rotation factor .
[0020] In this solution, the obtaining of weight data specifically includes:
[0021] Get user input data;
[0022] The weight data is obtained based on the user input data, specifically including identifying the terminal distance weight , the terminal rotation difference weight , and the ground distance term weight , where the terminal distance weight Greater than the terminal rotation difference weight .
[0023] In this solution, the loss function is calculated based on the first data, the second data and the weight data, specifically including:
[0024] The loss function is calculated based on the first data, the second data and the weight data using a preset calculation formula. , where the calculation formula is as follows:
[0025] ;
[0026] in, It is the first position. is the first rotation vector, It is the second position. is the second rotation vector, and yes and of Coordinate components, is the weight of the end distance, is the terminal rotation difference weight, is the ground distance term weight, is the distance attenuation weight between robots, is the attenuation factor constant.
[0027] In this solution, the loss function is iterated until the target pose is obtained when it converges successfully, specifically including:
[0028] Obtaining an optimization algorithm, wherein the optimization algorithm includes an Adam optimization algorithm;
[0029] The loss function is iterated based on the optimization algorithm until the loss function successfully converges and the number of iterations reaches a maximum, thereby obtaining the target postures of robot A and robot B, wherein the target postures include the joint values of robot A and their corresponding Cartesian coordinates, and the joint values of robot B and their corresponding Cartesian coordinates.
[0030] The second aspect of the present invention further provides a robot public reachable posture solution system, comprising a memory and a processor, wherein the memory comprises a robot public reachable posture solution method program, and when the robot public reachable posture solution method program is executed by the processor, the following steps are implemented:
[0031] Acquire first data of robot A, wherein the first data includes a first position of an end effector of robot A and a first rotation vector;
[0032] Acquire second data of robot B, wherein the second data includes a second position of an end effector of robot B and a second rotation vector;
[0033] Acquire weight data, wherein the weight data includes a terminal distance weight, a terminal rotation difference weight, and a ground distance item weight;
[0034] A loss function is calculated based on the first data, the second data, and the weight data, and the loss function is iterated to obtain a target pose.
[0035] In this solution, the obtaining of the first data of the robot A specifically includes:
[0036] Acquiring real-time parameters of robot A based on the operation record data of robot A;
[0037] Performing factor identification based on the real-time parameters of the robot A to identify the position factor of the robot A and the rotation factor of the robot A;
[0038] The first position is obtained based on the robot A position factor ;
[0039] The first rotation vector is obtained based on the rotation factor of the robot A. .
[0040] In this solution, the obtaining of the second data of robot B specifically includes:
[0041] Acquiring real-time parameters of robot B based on the operation record data of robot B;
[0042] Performing factor identification based on the real-time parameters of the robot B to identify the position factor of the robot B and the rotation factor of the robot B;
[0043] The second position is obtained based on the robot B position factor ;
[0044] The second rotation vector is obtained based on the robot B rotation factor .
[0045] In this solution, the obtaining of weight data specifically includes:
[0046] Get user input data;
[0047] The weight data is obtained based on the user input data, specifically including identifying the terminal distance weight , the terminal rotation difference weight , and the ground distance term weight , where the terminal distance weight Greater than the terminal rotation difference weight .
[0048] In this solution, the loss function is calculated based on the first data, the second data and the weight data, specifically including:
[0049] The loss function is calculated based on the first data, the second data and the weight data using a preset calculation formula. , where the calculation formula is as follows:
[0050] ;
[0051] in, It is the first position. is the first rotation vector, It is the second position. is the second rotation vector, and yes and of Coordinate components, is the weight of the end distance, is the terminal rotation difference weight, is the ground distance term weight, is the distance attenuation weight between robots, is the attenuation factor constant.
[0052] In this solution, the loss function is iterated until the target pose is obtained when it converges successfully, specifically including:
[0053] Obtaining an optimization algorithm, wherein the optimization algorithm includes an Adam optimization algorithm;
[0054] The loss function is iterated based on the optimization algorithm until the loss function successfully converges and the number of iterations reaches a maximum, thereby obtaining the target postures of robot A and robot B, wherein the target postures include the joint values of robot A and their corresponding Cartesian coordinates, and the joint values of robot B and their corresponding Cartesian coordinates.
[0055] The third aspect of the present invention provides a computer-readable storage medium, which includes a robot public reachable posture solution method program for a machine. When the robot public reachable posture solution method program is executed by a processor, the steps of a robot public reachable posture solution method as described in any one of the above items are implemented.
[0056] The present invention discloses a method, system and readable storage medium for solving a robot's publicly reachable posture, which can realize the determination of a robot's publicly reachable point. With a small amount of computing resources, it is possible to determine on a personal PC whether any two robot ends can reach the same target point, and can solve the joint value and Cartesian coordinates of the point. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 A step diagram of a method for solving a robot's publicly reachable posture according to the present invention is shown;
[0058] Figure 2 A flowchart of a method for solving a robot's publicly reachable posture according to the present invention is shown;
[0059] Figure 3 A block diagram of a robot public reachable posture solution system of the present invention is shown. DETAILED DESCRIPTION
[0060] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0061] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0062] Figure 1 A flow chart of a method for solving a robot's publicly reachable posture according to the present application is shown.
[0063] like Figure 1 As shown, the present application discloses a method for solving a robot's publicly reachable posture, comprising the following steps:
[0064] S102, acquiring first data of robot A, wherein the first data includes a first position of an end effector of robot A and a first rotation vector;
[0065] S104, acquiring second data of robot B, wherein the second data includes a second position of an end effector of robot B and a second rotation vector;
[0066] S106, acquiring weight data, wherein the weight data includes a terminal distance weight, a terminal rotation difference weight, and a ground distance item weight;
[0067] S108, calculating a loss function based on the first data, the second data and the weight data, and iterating the loss function to obtain a target pose.
[0068] It should be noted that in this embodiment, when determining whether the ends of two arbitrary robots can reach the same target point, a distance function method based on the Adam optimization algorithm is used to determine whether the two robots can reach a certain point together under a given joint configuration, thereby solving the joint value and Cartesian coordinates of the point, which correspond to the target posture.
[0069] Specifically, the first position and the first rotation vector of the end effector of robot A and the second position and the second rotation vector of the end effector of robot B are obtained, and the weight data is obtained, so as to calculate the loss function by using the preset calculation formula in combination with the above parameters, calculate the loss function by the position and rotation difference of their end effectors, and use the Adam optimization algorithm to minimize the loss function, so as to find the joint values and Cartesian coordinates that are commonly reachable by the two robots as the target posture.
[0070] According to an embodiment of the present invention, obtaining the first data of robot A specifically includes:
[0071] Acquiring real-time parameters of robot A based on the operation record data of robot A;
[0072] Performing factor identification based on the real-time parameters of the robot A to identify the position factor of the robot A and the rotation factor of the robot A;
[0073] The first position is obtained based on the robot A position factor ;
[0074] The first rotation vector is obtained based on the rotation factor of the robot A. .
[0075] It should be noted that, in this embodiment, robot A will record its own operating data in real time when operating, wherein the operating data is the various data recorded in real time when the robot is operating. Therefore, the real-time parameters of robot A can be obtained based on the operating data of robot A. Correspondingly, the real-time parameters are position parameters and rotation parameters. Then, factor identification is performed based on the real-time parameters of robot A to identify the position factor of robot A and the rotation factor of robot A, so as to obtain the first position factor based on the position factor of robot A. ; and obtaining the first rotation vector based on the robot A rotation factor .
[0076] According to an embodiment of the present invention, obtaining the second data of robot B specifically includes:
[0077] Acquiring real-time parameters of robot B based on the operation record data of robot B;
[0078] Performing factor identification based on the real-time parameters of the robot B to identify the position factor of the robot B and the rotation factor of the robot B;
[0079] The second position is obtained based on the robot B position factor ;
[0080] The second rotation vector is obtained based on the robot B rotation factor .
[0081] It should be noted that in this embodiment, robot B will record its own operating data in real time when working. Therefore, the real-time parameters of robot B can be obtained based on the operating record data of robot B, and then factor identification can be performed based on the real-time parameters of robot B to identify the position factor of robot B and the rotation factor of robot A, so as to obtain the second position factor based on the position factor of robot B. ; and obtaining the second rotation vector based on the robot A rotation factor .
[0082] According to an embodiment of the present invention, obtaining weight data specifically includes:
[0083] Get user input data;
[0084] The weight data is obtained based on the user input data, specifically including identifying the terminal distance weight , the terminal rotation difference weight , and the ground distance term weight , where the terminal distance weight Greater than the terminal rotation difference weight .
[0085] It should be noted that in this embodiment, different weights are used when calculating the loss function, including the terminal distance weight , the terminal rotation difference weight , and the ground distance term weight , where the ends described in the end distance weight and the end rotation difference weight are the ends of the robot, and the ground distance weight is the distance between the end of the robot and the ground. In addition, the goal of the present invention is to obtain a publicly accessible point, so and The weight should be dominant. The specific weight ratio should be set according to the robot parameters and environment parameters. Different ratios will eventually affect the approximation speed of each dimension in the iteration process. If the allocation is too large, the angle will definitely converge first, but as the position of the end changes, the angle must be adjusted every time, and the convergence efficiency will definitely be relatively low. Therefore, the weight configuration needs to meet .
[0086] According to an embodiment of the present invention, calculating the loss function based on the first data, the second data and the weight data specifically includes:
[0087] The loss function is calculated based on the first data, the second data and the weight data using a preset calculation formula. , where the calculation formula is as follows:
[0088] ;
[0089] in, It is the first position. is the first rotation vector, It is the second position. is the second rotation vector, and yes and of Coordinate components, is the weight of the end distance, is the terminal rotation difference weight, is the ground distance term weight, is the distance attenuation weight between robots, is the attenuation factor constant.
[0090] It should be noted that, in this embodiment, the position difference between robot A and robot B is , the rotation difference is the dot product of the two vectors, and accordingly, the loss function It can be expressed as:
[0091] ;
[0092] in, It is the first position. is the first rotation vector, It is the second position. is the second rotation vector, and yes and of Coordinate components, is the weight of the end distance, is the terminal rotation difference weight, is the ground distance term weight, is the distance attenuation weight between robots, is the attenuation factor constant.
[0093] Specifically, if there is no need to constrain the end to pick up the ground, the loss function Can be removed This one, The purpose of this is to move the end gripping position away from the robot base.
[0094] According to an embodiment of the present invention, iterating the loss function until successfully converging to obtain the target pose specifically includes:
[0095] Obtaining an optimization algorithm, wherein the optimization algorithm includes an Adam optimization algorithm;
[0096] The loss function is iterated based on the optimization algorithm until the loss function successfully converges and the number of iterations reaches a maximum, thereby obtaining the target postures of robot A and robot B, wherein the target postures include the joint values of robot A and their corresponding Cartesian coordinates, and the joint values of robot B and their corresponding Cartesian coordinates.
[0097] It should be noted that, in this embodiment, reference Figure 2 , take two six-axis robots as examples for experiments, select random initial values x, and initialize Adam parameters, then solve the position and loss function, and use the Adam optimization algorithm to iterate the loss function, where the Adam optimization algorithm is a first-order optimization algorithm that can replace the traditional stochastic gradient descent process, and can iteratively update the neural network weights given training data. In this embodiment, it is used as an application, and the specific process is not repeated here, until the loss function successfully converges and the number of iterations reaches the maximum, the target posture of robot A and robot B is obtained, that is, when the loss value of the loss function drops below the minimum threshold, it is considered that the function has approached the optimal solution, where epsilon is usually set to "1e-6", the initial value x is the joint value vector of the two robots, X[0:6] is the joint value of robot A, x[6:12] is the joint value of robot B, and the Forward function is the posture of the Cartesian space in the world coordinate system corresponding to the joint value solved by the robot forward kinematics.
[0098] Specifically, for two six-axis robots with a total of 12 degrees of freedom, the experimental results are shown in Table 1.
[0099] .
[0100] Figure 3 A block diagram of a robot public reachable posture solution system of the present invention is shown.
[0101] like Figure 3 As shown, the present invention discloses a robot public reachable posture solution system, including a memory and a processor, wherein the memory includes a robot public reachable posture solution method program, and when the robot public reachable posture solution method program is executed by the processor, the following steps are implemented:
[0102] Acquire first data of robot A, wherein the first data includes a first position of an end effector of robot A and a first rotation vector;
[0103] Acquire second data of robot B, wherein the second data includes a second position of an end effector of robot B and a second rotation vector;
[0104] Acquire weight data, wherein the weight data includes a terminal distance weight, a terminal rotation difference weight, and a ground distance item weight;
[0105] A loss function is calculated based on the first data, the second data, and the weight data, and the loss function is iterated until a target pose is obtained when successful convergence occurs.
[0106] It should be noted that in this embodiment, when determining whether the ends of two arbitrary robots can reach the same target point, a distance function method based on the Adam optimization algorithm is used to determine whether the two robots can reach a certain point together under a given joint configuration, thereby solving the joint value and Cartesian coordinates of the point, which correspond to the target posture.
[0107] Specifically, the first position and the first rotation vector of the end effector of robot A and the second position and the second rotation vector of the end effector of robot B are obtained, and the weight data is obtained, so as to calculate the loss function by using the preset calculation formula in combination with the above parameters, calculate the loss function by the position and rotation difference of their end effectors, and use the Adam optimization algorithm to minimize the loss function, so as to find the joint values and Cartesian coordinates that are commonly reachable by the two robots as the target posture.
[0108] According to an embodiment of the present invention, obtaining the first data of robot A specifically includes:
[0109] Acquiring real-time parameters of robot A based on the operation record data of robot A;
[0110] Performing factor identification based on the real-time parameters of the robot A to identify the position factor of the robot A and the rotation factor of the robot A;
[0111] The first position is obtained based on the robot A position factor ;
[0112] The first rotation vector is obtained based on the rotation factor of the robot A. .
[0113] It should be noted that in this embodiment, robot A will record its own operation data in real time when working. Therefore, the real-time parameters of robot A can be obtained based on the operation record data of robot A, and then factor identification can be performed based on the real-time parameters of robot A to identify the position factor of robot A and the rotation factor of robot A, so as to obtain the first position factor based on the position factor of robot A. ; and obtaining the first rotation vector based on the robot A rotation factor .
[0114] According to an embodiment of the present invention, obtaining the second data of robot B specifically includes:
[0115] Acquiring real-time parameters of robot B based on the operation record data of robot B;
[0116] Performing factor identification based on the real-time parameters of the robot B to identify the position factor of the robot B and the rotation factor of the robot B;
[0117] The second position is obtained based on the robot B position factor ;
[0118] The second rotation vector is obtained based on the robot B rotation factor .
[0119] It should be noted that in this embodiment, robot B will record its own operating data in real time when working. Therefore, the real-time parameters of robot B can be obtained based on the operating record data of robot B, and then factor identification can be performed based on the real-time parameters of robot B to identify the position factor of robot B and the rotation factor of robot A, so as to obtain the second position factor based on the position factor of robot B. ; and obtaining the second rotation vector based on the robot A rotation factor .
[0120] According to an embodiment of the present invention, obtaining weight data specifically includes:
[0121] Get user input data;
[0122] The weight data is obtained based on the user input data, specifically including identifying the terminal distance weight , the terminal rotation difference weight , and the ground distance term weight , where the terminal distance weight Greater than the terminal rotation difference weight .
[0123] It should be noted that in this embodiment, different weights are used when calculating the loss function, including the terminal distance weight , the terminal rotation difference weight , and the ground distance term weight , wherein the present invention aims to obtain publicly accessible points, so and The weight should be dominant. The specific weight ratio should be set according to your robot parameters and environment parameters. Different ratios will eventually affect the approximation speed of each dimension during the iteration process. If the allocation is too large, the angle will definitely converge first, but as the position of the end changes, the angle must be adjusted every time, and the convergence efficiency will definitely be relatively low. Therefore, the weight configuration needs to meet .
[0124] According to an embodiment of the present invention, calculating the loss function based on the first data, the second data and the weight data specifically includes:
[0125] The loss function is calculated based on the first data, the second data and the weight data using a preset calculation formula. , where the calculation formula is as follows:
[0126] ;
[0127] in, It is the first position. is the first rotation vector, It is the second position. is the second rotation vector, and yes and of Coordinate components, is the weight of the end distance, is the terminal rotation difference weight, is the ground distance term weight, is the distance attenuation weight between robots, is the attenuation factor constant.
[0128] It should be noted that, in this embodiment, the position difference between robot A and robot B is , the rotation difference is the dot product of the two vectors, and accordingly, the loss function It can be expressed as:
[0129] ;
[0130] in, It is the first position. is the first rotation vector, It is the second position. is the second rotation vector, and yes and of Coordinate components, is the weight of the end distance, is the terminal rotation difference weight, is the ground distance term weight, is the distance attenuation weight between robots, is the attenuation factor constant.
[0131] Specifically, if there is no need to constrain the end to pick up the ground, the loss function Can be removed This one, The purpose of this is to move the end gripping position away from the robot base.
[0132] According to an embodiment of the present invention, iterating the loss function until successfully converging to obtain the target pose specifically includes:
[0133] Obtaining an optimization algorithm, wherein the optimization algorithm includes an Adam optimization algorithm;
[0134] The loss function is iterated based on the optimization algorithm until the loss function successfully converges and the number of iterations reaches a maximum, thereby obtaining the target postures of robot A and robot B, wherein the target postures include the joint values of robot A and their corresponding Cartesian coordinates, and the joint values of robot B and their corresponding Cartesian coordinates.
[0135] It should be noted that, in this embodiment, reference Figure 2 , taking two six-axis robots as examples for the experiment, a random initial value x is selected, and the Adam parameters are initialized to solve the position and loss function. The Adam optimization algorithm is used to iterate the loss function until the loss function successfully converges and the number of iterations reaches the maximum to obtain the target posture of robot A and robot B. That is, when the loss value of the loss function drops below the minimum threshold, it is considered that the function has approached the optimal solution. Among them, epsilon is usually set to "1e-6", the initial value x is the joint value vector of the two robots, X[0:6] is the joint value of robot A, and x[6:12] is the joint value of robot B. The Forward function is the Cartesian space posture of the robot in the world coordinate system corresponding to the joint value solved by the forward kinematics of the robot.
[0136] The third aspect of the present invention provides a computer-readable storage medium, which includes a robot public reachable posture solution method program. When the robot public reachable posture solution method program is executed by a processor, the steps of a robot public reachable posture solution method as described in any one of the above items are implemented.
[0137] The present invention discloses a method, system and readable storage medium for solving a robot's publicly reachable posture, which can realize the determination of a robot's publicly reachable point. With a small amount of computing resources, it is possible to determine on a personal PC whether any two robot ends can reach the same target point, and can solve the joint value and Cartesian coordinates of the point.
[0138] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0139] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0140] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0141] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: a mobile storage device, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0142] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.
Claims
1. A method for solving a robot's publicly reachable posture, characterized in that: The following steps are involved: Acquire first data of robot A, wherein the first data includes a first position of an end effector of robot A and a first rotation vector; Acquire second data of robot B, wherein the second data includes a second position of an end effector of robot B and a second rotation vector; Acquire weight data, wherein the weight data includes a terminal distance weight, a terminal rotation difference weight, and a ground distance item weight; Calculating a loss function based on the first data, the second data, and the weight data, and iterating the loss function until a target pose is obtained when successful convergence occurs; The obtaining of the first data of the robot A specifically includes: Acquiring real-time parameters of robot A based on the operation record data of robot A; Performing factor identification based on the real-time parameters of the robot A to identify the position factor of the robot A and the rotation factor of the robot A; The first position is obtained based on the robot A position factor ; The first rotation vector is obtained based on the rotation factor of the robot A. ; It is characterized in that the obtaining of the second data of the robot B specifically includes: Acquiring real-time parameters of robot B based on the operation record data of robot B; Performing factor identification based on the real-time parameters of the robot B to identify the position factor of the robot B and the rotation factor of the robot B; The second position is obtained based on the robot B position factor ; The second rotation vector is obtained based on the robot B rotation factor ; The obtaining of weight data specifically includes: Get user input data; The weight data is obtained based on the user input data, specifically including identifying the terminal distance weight , the terminal rotation difference weight , and the ground distance term weight , where the terminal distance weight Greater than the terminal rotation difference weight ; The calculating of the loss function based on the first data, the second data and the weight data specifically includes: The loss function is calculated based on the first data, the second data and the weight data using a preset calculation formula. , where the calculation formula is as follows: ; in, It is the first position. is the first rotation vector, It is the second position. is the second rotation vector, yes of Coordinate components, yes of Coordinate components, is the weight of the end distance, is the terminal rotation difference weight, is the ground distance term weight, is the distance attenuation weight between robots, is the attenuation factor constant; The iterating the loss function until the target pose is obtained when the loss function converges successfully specifically includes: Obtaining an optimization algorithm, wherein the optimization algorithm includes an Adam optimization algorithm; The loss function is iterated based on the optimization algorithm until the loss function successfully converges and the number of iterations reaches a maximum, thereby obtaining the target postures of robot A and robot B, wherein the target postures include the joint values of robot A and their corresponding Cartesian coordinates, and the joint values of robot B and their corresponding Cartesian coordinates.
2. A robot public reachable posture solution system, characterized in that: The invention comprises a memory and a processor, wherein the memory comprises a robot public reachable posture solution method program, and when the robot public reachable posture solution method program is executed by the processor, the following steps are implemented: Acquire first data of robot A, wherein the first data includes a first position of an end effector of robot A and a first rotation vector; Acquire second data of robot B, wherein the second data includes a second position of an end effector of robot B and a second rotation vector; Acquire weight data, wherein the weight data includes a terminal distance weight, a terminal rotation difference weight, and a ground distance item weight; Calculating a loss function based on the first data, the second data, and the weight data, and iterating the loss function until a target pose is obtained when successful convergence occurs; The obtaining of the first data of the robot A specifically includes: Acquiring real-time parameters of robot A based on the operation record data of robot A; Performing factor identification based on the real-time parameters of the robot A to identify the position factor of the robot A and the rotation factor of the robot A; The first position is obtained based on the robot A position factor ; The first rotation vector is obtained based on the rotation factor of the robot A. ; It is characterized in that the obtaining of the second data of the robot B specifically includes: Acquiring real-time parameters of robot B based on the operation record data of robot B; Performing factor identification based on the real-time parameters of the robot B to identify the position factor of the robot B and the rotation factor of the robot B; The second position is obtained based on the robot B position factor ; The second rotation vector is obtained based on the robot B rotation factor ; The obtaining of weight data specifically includes: Get user input data; The weight data is obtained based on the user input data, specifically including identifying the terminal distance weight , the terminal rotation difference weight , and the ground distance term weight , where the terminal distance weight Greater than the terminal rotation difference weight ; The calculating of the loss function based on the first data, the second data and the weight data specifically includes: The loss function is calculated based on the first data, the second data and the weight data using a preset calculation formula. , where the calculation formula is as follows: ; in, It is the first position. is the first rotation vector, It is the second position. is the second rotation vector, yes of Coordinate components, yes of Coordinate components, is the weight of the end distance, is the terminal rotation difference weight, is the ground distance term weight, is the distance attenuation weight between robots, is the attenuation factor constant; The iterating the loss function until the target pose is obtained when the loss function converges successfully specifically includes: Obtaining an optimization algorithm, wherein the optimization algorithm includes an Adam optimization algorithm; The loss function is iterated based on the optimization algorithm until the loss function successfully converges and the number of iterations reaches a maximum, thereby obtaining the target postures of robot A and robot B, wherein the target postures include the joint values of robot A and their corresponding Cartesian coordinates, and the joint values of robot B and their corresponding Cartesian coordinates.
3. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a robot public reachable posture solution method program. When the robot public reachable posture solution method program is executed by a processor, the steps of a robot public reachable posture solution method as described in claim 1 are implemented.
Citation Information
Patent Citations
Path planning method and device for collaborative rotation of two robots
CN110757454A
Double-arm passing and receiving position selection method for double-arm cooperative robot
CN111515949A