Inverse kinematics solution method for redundant mechanical arm based on physical space constraint mechanism generation model
By introducing a physical space constraint mechanism into the generative neural network, the kinematic parameter solutions of the redundant robotic arm are generated, which solves the problems of high training data requirements and insufficient inverse solution accuracy, and realizes efficient and accurate control of the redundant robotic arm.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TSINGHUA UNIVERSITY
- Filing Date
- 2026-01-23
- Publication Date
- 2026-05-05
AI Technical Summary
Generative neural networks have several drawbacks in solving the inverse kinematics of redundant robotic arms, including high requirements for training data, potential output violations of joint range of motion or mechanical constraints, and a lack of mathematical theoretical support, which leads to insufficient accuracy in the inverse kinematics solution.
A physical space constraint mechanism is introduced. The kinematic parameter solutions for r first degrees of freedom are generated through a pre-trained generative neural network, and the kinematic parameter solutions for nr second degrees of freedom are determined by the forward kinematic control equations. This establishes the physical space constraint relationship between the n degrees of freedom of the redundant robotic arm, reducing training costs and improving the accuracy and real-time performance of the inverse solution.
It reduces computational complexity and training costs while ensuring the accuracy and real-time performance of inverse kinematics solutions, thus meeting the control requirements for the end-effector's pose.
Smart Images

Figure CN121973200A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of robotic arm technology, and in particular to a method for solving the inverse kinematics of redundant robotic arms based on a model generated by a physical space constraint mechanism. Background Technology
[0002] Hyperredundant robotic arms, with their high flexibility and obstacle avoidance capabilities, have been widely used in precision manufacturing, medical surgery, aerospace operations, nuclear industry, and disaster relief. In the future, they will replace manual labor in complex environments, becoming an important direction for the development of robotics technology. For example, the Wide-Spectrum Ultra-High Flux Test Reactor (WHMR) is a large scientific facility for conducting material irradiation experiments, rare isotope production, and neutron science research. Its internal space is extremely small and complex, requiring redundant robotic arms to load and unload irradiation targets (used to hold materials to be irradiated and isotope production samples). However, compared to conventional non-redundant robotic arms, solving the inverse kinematics of redundant robotic arms faces multiple challenges: high computational complexity (multiple degrees of freedom lead to large computational loads), difficulty in optimizing multiple solutions (requiring selection of the optimal solution from an infinite number of options), risks of joint over-limit and configurational deviation, insufficient real-time performance (traditional methods struggle to meet rapid response requirements), and difficulty in multi-constraint collaborative optimization (simultaneously satisfying conditions such as end-effector accuracy, obstacle avoidance, and energy consumption).
[0003] Generative neural networks have become a revolutionary tool for solving the inverse kinematics of ultra-redundant robotic arms, offering significant advantages: Compared to the limitations of traditional numerical iteration or analytical methods, which can only generate one set of solutions at a time, determination methods based on generative neural networks can output multiple complete feasible solutions in parallel through parameterized probability distributions, comprehensively covering the solution space and providing optimal solution selection for scenarios such as complex assembly and obstacle avoidance planning; the inference speed of determination methods based on generative neural networks can reach millisecond levels (generating 10 solutions takes only 10ms), and with GPU acceleration, the efficiency is improved by tens of times compared to traditional methods, meeting the needs of continuous real-time adjustment in dynamic environments; it can be used in... During training, various constraints such as collision detection, joint limits, and torque balance are naturally embedded to generate collision-free and smoothly moving joint configurations. Even when some joints fail, the system can still complete the task, improving its robustness. A single generative neural network can be adapted to robotic arms with different configurations and degrees of freedom. With only a few model parameter fine-tunings, it can be applied to new scenarios, demonstrating strong generalization and transfer capabilities and significantly reducing deployment costs. The determination method based on generative neural networks does not require complex mathematical derivations. It directly establishes a nonlinear mapping between the end-effector pose and joint angles through end-to-end learning, achieving sub-millimeter-level positional accuracy and sub-degree-level angular accuracy, avoiding the jitter problem of traditional methods. These advantages enable deterministic methods based on generative neural networks to play a key role in fields such as minimally invasive surgical robots in medical care (avoiding vital organs and improving surgical safety), on-orbit servicing in aerospace (multi-scheme planning in zero-gravity environments and fault tolerance), flexible manufacturing in industry (flexible operation between dense equipment and micro-assembly), disaster relief and special operations (obstacle avoidance in dangerous environments and adaptation to unstructured scenarios). They have completely changed the solution paradigm of inverse kinematics for redundant robotic arms and opened up new possibilities for the autonomous and flexible movement of intelligent robots in complex worlds.
[0004] However, generative neural networks still have several shortcomings when applied to solving the inverse kinematics of hyperredundant robotic arms: First, they are highly dependent on training data, which must be a high-quality dataset covering the entire workspace. The more degrees of freedom a redundant robotic arm has, the larger the solution space (i.e., the set of all possible solutions for kinematic parameters that can achieve the same end-effector pose) becomes, leading to an exponential increase in training data volume and higher training costs. Second, the output of generative neural networks may violate joint range of motion or mechanical constraints and lacks mathematical theoretical support, making it impossible to guarantee the accuracy of the inverse solution. Finally, for scenarios requiring higher precision in parameter determination, more complex network structures are often needed, which can negatively impact computational efficiency, and the "black box" nature of the network increases the difficulty of problem diagnosis. These issues directly limit the application of generative neural networks in solving the inverse kinematics of redundant robotic arms. Summary of the Invention
[0005] In view of this, this disclosure proposes a method for solving the inverse kinematics of a redundant manipulator based on a model generated by a physical space constraint mechanism. By introducing spatial physical constraints, the parameters of the n degrees of freedom satisfy the end-effector pose, which can reduce the training cost of the model and improve the generation efficiency of the inverse kinematics solution. It also ensures the accuracy and real-time performance of the solution results of the inverse kinematics of the redundant manipulator based on the model generated by the physical space constraint mechanism.
[0006] According to one aspect of this disclosure, a method for solving the inverse kinematics of a redundant robotic arm based on a physical space constraint mechanism-generated model is provided, wherein the redundant robotic arm includes n degrees of freedom, where n is a positive integer; the method includes:
[0007] Given the end-effector pose of the redundant robotic arm at the next moment, the end-effector pose is input into a pre-trained generative neural network with physical space constraints to obtain multiple sets of kinematic parameter solutions for r first degrees of freedom. Each set of kinematic parameter solutions includes the kinematic parameters for the r first degrees of freedom at the next moment. The generative neural network with physical space constraints is trained using pre-generated training data, which includes sample end-effector poses and multiple sets of kinematic parameter sample values for the r first degrees of freedom that can achieve the sample end-effector pose. nr is the minimum number of degrees of freedom required for the redundant robotic arm to complete any task, where r is a positive integer and n is greater than r.
[0008] Based on the transformation expression of the kinematic parameters of the second degree of freedom, the end-effector target pose, and the kinematic parameter solutions of each set of r first degrees of freedom, the kinematic parameter solutions of nr second degrees of freedom are determined; each set of kinematic parameter solutions of the r first degrees of freedom and its corresponding kinematic parameter solutions of the nr second degrees of freedom constitute a complete set of kinematic parameter solutions; wherein, the transformation expression is determined based on the forward kinematic control equations, and the kinematic parameters of the r first degrees of freedom are used to represent the kinematic parameters of the nr second degrees of freedom, thereby establishing the physical space constraint relationship between the n degrees of freedom of the redundant manipulator; the forward kinematic control equations are determined based on the structural parameters of the redundant manipulator and are used to describe the relationship between the end-effector pose and the n degrees of freedom;
[0009] Based on the target optimization function set according to the operational requirements, an optimal set of kinematic parameter solutions is selected from multiple sets of complete kinematic parameter solutions to control the redundant robotic arm to operate according to the optimal kinematic parameter solution and reach the target pose of the end effector at the next moment.
[0010] In one possible implementation, the process of generating the training data includes:
[0011] Within the allowable variation range of the kinematic parameters for each degree of freedom, multiple kinematic parameter sample values corresponding to each degree of freedom are sampled according to the preset solution accuracy; wherein, a set of complete kinematic parameter solution samples is formed by one kinematic parameter sample value corresponding to each of the n degrees of freedom.
[0012] Based on the positive kinematic control equations, the end pose sample corresponding to each complete kinematic parameter solution sample is determined, and the correspondence between the kinematic parameter sampling values of the r first degrees of freedom in the complete kinematic parameter solution sample and the end pose sample is established to obtain the initial training data;
[0013] Based on actual needs, the initial training data is cleaned to obtain the training data.
[0014] In one possible implementation, training the generative neural network with physical space constraints using the training data includes:
[0015] Each end pose sample and the kinematic parameter sampling values of r first degrees of freedom corresponding to the end pose sample are input into the generative neural network to be trained, so that the kinematic parameter sampling values of each group of r first degrees of freedom are mapped to the values in the base distribution.
[0016] The values from the base distribution are input into a preset loss function to obtain the loss value;
[0017] The model parameters of the generative neural network to be trained are iteratively updated based on the loss value, so that the generative neural network to be trained learns the invertible mapping of the kinematic parameter sampling values of the multiple sets of r first degrees of freedom to the base distribution based on the end pose sample and the corresponding multiple sets of r first degrees of freedom kinematic parameter sampling values, thereby obtaining a trained generative neural network with physical space constraint mechanism.
[0018] In one possible implementation, the input of the end-effector pose to a pre-trained generative neural network with physical space constraints yields multiple sets of kinematic parameter solutions for r first degrees of freedom, including:
[0019] The end-target pose is input into the trained generative neural network with physical space constraints, so that the trained generative neural network with physical space constraints samples multiple random variables from the base distribution, and maps each random variable and the end-target pose to r kinematic parameter solutions of the first degree of freedom based on the learned invertible mapping, thereby obtaining multiple sets of kinematic parameter solutions of the r first degrees of freedom corresponding to the multiple random variables.
[0020] In one possible implementation, the generative neural network to be trained includes: multiple sets of transformation networks connected in sequence, each set of transformation networks including: a coupling layer, a permutation layer and a coefficient network;
[0021] The coupling layer is used to split the input data corresponding to the end pose sample into a first part and a second part; and input the first part into the coefficient network;
[0022] The coefficient network is used to process the first part and the end pose sample to generate a scaling factor and an offset factor.
[0023] The coupling layer is further configured to perform a nonlinear transformation on the second part based on the scaling factor and the offset factor, and the first part and the nonlinearly transformed second part are used to obtain the nonlinear transformation result of the coupling layer;
[0024] The permutation layer is used to permutate the dimensions of the nonlinear transformation result to obtain output data, and to generate values in the base distribution based on the output data.
[0025] In one possible implementation, the operational requirements can be expressed by a theoretical expression; the operational requirements include at least one of the following:
[0026] Optimal softness requirement;
[0027] Not exceeding the joint's limit threshold;
[0028] Obstacle avoidance requirements;
[0029] Optimal energy demand.
[0030] In one possible implementation, all n degrees of freedom are rotary joints; or, the n degrees of freedom include both rotary joints and telescopic joints.
[0031] According to another aspect of this disclosure, a device for solving the inverse kinematics of a redundant robotic arm based on a physical space constraint mechanism-generated model is provided. The redundant robotic arm includes n degrees of freedom, where n is a positive integer. The device includes:
[0032] The first degree-of-freedom kinematic parameter solution generation module is used to: upon obtaining the end-effector target pose of the redundant robotic arm at the next moment, input the end-effector target pose into a pre-trained generative neural network with a physical space constraint mechanism to obtain multiple sets of kinematic parameter solutions for r first degrees of freedom, each set of kinematic parameter solutions including the kinematic parameters of the r first degrees of freedom at the next moment; wherein, the generative neural network with a physical space constraint mechanism is trained using pre-generated training data, the training data including sample end-effector poses and multiple sets of kinematic parameter sample values for the r first degrees of freedom that can achieve the sample end-effector pose; nr is the minimum number of degrees of freedom required for the redundant robotic arm to complete any task, r is a positive integer, and n is greater than r;
[0033] The second degree-of-freedom kinematic parameter solution generation module is used to: determine the kinematic parameter solutions for nr degrees of freedom based on the transformation expression of the second degree-of-freedom kinematic parameters, the end-effector target pose, and each set of kinematic parameter solutions for r first degrees of freedom; each set of kinematic parameter solutions for r first degrees of freedom and its corresponding set of kinematic parameter solutions for nr second degrees of freedom constitute a complete set of kinematic parameter solutions; wherein, the transformation expression is determined based on the forward kinematic control equations, and the kinematic parameters of r first degrees of freedom are used to represent the kinematic parameters of nr second degrees of freedom, thereby establishing the physical space constraint relationship between the n degrees of freedom of the redundant manipulator; the forward kinematic control equations are determined based on the structural parameters of the redundant manipulator and are used to describe the relationship between the end-effector pose and the n degrees of freedom;
[0034] The kinematic parameter solution determination module is used to: select an optimal kinematic parameter solution from multiple complete kinematic parameter solutions based on a target optimization function set according to operational requirements, so as to control the redundant robotic arm to operate according to the optimal kinematic parameter solution and reach the end-effector target pose at the next moment.
[0035] According to another aspect of this disclosure, a device for solving the inverse kinematics of a redundant robotic arm based on a physical space constraint mechanism generation model is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above method.
[0036] According to another aspect of this disclosure, a non-volatile computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the above-described method.
[0037] According to another aspect of this disclosure, a computer program product is provided, including a computer program or a non-volatile computer-readable storage medium carrying the computer program, wherein the computer program, when executed by a processor, implements the steps of the above-described method.
[0038] By acquiring the end-effector pose of the redundant robotic arm at the next moment, the end-effector pose is input into a pre-trained generative neural network with a physical space constraint mechanism to obtain multiple sets of kinematic parameter solutions for r first degrees of freedom. Each set of kinematic parameter solutions includes the kinematic parameters of the r first degrees of freedom at the next moment. Based on the transformation expression of the kinematic parameters of the second degrees of freedom, the end-effector pose, and each set of kinematic parameter solutions for the r first degrees of freedom, the kinematic parameter solutions for nr second degrees of freedom are determined. Each set of kinematic parameter solutions for the r first degrees of freedom and its corresponding kinematic parameter solutions for the nr second degrees of freedom constitute a complete set of kinematic parameter solutions. The transformation expression uses the kinematic parameters of the r first degrees of freedom to represent the kinematic parameters of the nr second degrees of freedom, thereby establishing the physical space constraint relationship between the n degrees of freedom of the redundant robotic arm. Based on the target optimization function set according to the operational requirements, an optimal set of kinematic parameter solutions is selected from multiple sets of complete kinematic parameter solutions to control the redundant robotic arm to operate according to the optimal kinematic parameter solution and reach the end-effector pose at the next moment. On the one hand, the model no longer needs to generate kinematic parameters for n degrees of freedom, which reduces computational complexity. At the same time, the model no longer needs to use the sampled values of kinematic parameters for n degrees of freedom during training, which reduces training costs. On the other hand, since the transformation expression is determined by the forward kinematic control equation, after determining the kinematic parameter solutions for r first degrees of freedom, the kinematic parameter solutions for nr second degrees of freedom determined based on the transformation expression must meet the physical space constraint condition of the forward kinematic control equation, thus ensuring that the determined kinematic parameters can achieve the end-effector pose and realize the accurate control of the redundant robotic arm.
[0039] Other features and aspects of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description
[0040] The accompanying drawings, which are included in and form part of this specification, illustrate exemplary embodiments, features, and aspects of this disclosure together with the specification and serve to explain the principles of this disclosure.
[0041] Figure 1 A flowchart is shown showing a method for solving the inverse kinematics of a redundant robotic arm based on a physical space constraint mechanism generation model according to an embodiment of the present disclosure;
[0042] Figure 2 A flowchart is shown illustrating a process for training a generative neural network using training data according to an embodiment of the present disclosure;
[0043] Figure 3 A schematic diagram of a generative neural network to be trained according to an embodiment of the present disclosure is shown;
[0044] Figure 4 A block diagram is shown of a device for solving the inverse kinematics of a redundant robotic arm based on a physical space constraint mechanism generating model according to an embodiment of the present disclosure;
[0045] Figure 5 A block diagram is shown of a device for solving the inverse kinematics of a redundant robotic arm based on a physical space constraint mechanism generating model according to another embodiment of the present disclosure. Detailed Implementation
[0046] Various exemplary embodiments, features, and aspects of this disclosure will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.
[0047] As used herein, the terms “comprising,” “including,” “having,” or variations thereof are open-ended and include one or more of the stated features, integrals, elements, steps, components, or functions, but do not exclude the presence or addition of one or more other features, integrals, elements, steps, components, functions, or groups thereof.
[0048] When an element is referred to as “connected,” “coupled,” “responding,” or a variation thereof relative to another element, it may be directly connected, coupled, or responding to another element, or there may be an intermediate element present.
[0049] Although the terms first, second, third, etc., may be used herein to describe various elements / operations, these elements / operations should not be limited by these terms. These terms are only used to distinguish one element / operation from another. Therefore, without departing from the teachings of the inventive concept, a first element / operation in some embodiments may be referred to as a second element / operation in other embodiments.
[0050] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.
[0051] Furthermore, to better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the main points of this disclosure.
[0052] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant regions.
[0053] Figure 1 This document illustrates a flowchart of a method for solving the inverse kinematics of a redundant robotic arm based on a physical space constraint mechanism-generated model, according to an embodiment of this disclosure. The redundant robotic arm includes n degrees of freedom, where n is a positive integer. Optionally, in this embodiment, all n degrees of freedom are rotary joints; or, the n degrees of freedom include both rotary and telescopic joints. This application does not limit the implementation of the n degrees of freedom. This embodiment uses the method in a control device for the redundant robotic arm as an example. This control device can be a controller installed in the redundant robotic arm, or an electronic device independent of the redundant robotic arm but communicatively connected to it. This electronic device includes, but is not limited to, devices with processing capabilities such as user terminals or servers. This embodiment does not limit the implementation of the control device. Figure 1 As shown, the method includes:
[0054] Step 101: After obtaining the end-effector pose of the redundant robotic arm at the next moment, input the end-effector pose into a pre-trained generative neural network with a physical space constraint mechanism to obtain multiple sets of kinematic parameter solutions for r first degrees of freedom. Each set of kinematic parameter solutions includes the kinematic parameters of the r first degrees of freedom at the next moment.
[0055] nr represents the minimum number of degrees of freedom required for the redundant robotic arm to complete any task, where r is a positive integer and n is greater than r.
[0056] The end-effector target pose refers to the position and orientation that the end effector of a redundant robotic arm needs to achieve in the next moment. The end-effector target pose can be represented as T(R, P), where T represents the end-effector target pose, P represents the position parameters in the end-effector target pose, and R represents the orientation parameters in the end-effector target pose. Optionally, the end-effector target pose can be sent by other devices or generated by control devices. This embodiment does not limit the method of obtaining the target end-effector pose.
[0057] In one example, the redundant robotic arm needs to track a pre-planned path (such as a spiral path, a straight path, etc.), which includes multiple end-effector poses. The relative positional relationship between two adjacent end-effector poses conforms to a preset end-effector pose constraint to ensure that the amplitude of each movement of the redundant robotic arm is not too large.
[0058] Among them, the generative neural network with physical space constraint mechanism is trained using pre-generated training data, which includes the end pose of the sample and multiple sets of kinematic parameter sampling values of r first degrees of freedom that can achieve the end pose of the sample.
[0059] In one example, the process of generating training data for a generative neural network with physical space constraints includes steps 1011 and 1012:
[0060] Step 1011: Within the allowable variation range of the kinematic parameters of each degree of freedom, sample multiple kinematic parameter values corresponding to each degree of freedom according to the preset solution accuracy.
[0061] In this set, the kinematic parameter sample value corresponding to each of the n degrees of freedom constitutes a complete kinematic parameter solution sample. In different sets of kinematic parameter sample values, there are at least one different kinematic parameter sample value for each degree of freedom.
[0062] For example, if n=8, for any one of the 8 degrees of freedom, if the operating range of that degree of freedom is [-170°, 170°] and the solution accuracy is 1°, then starting from -170°, a kinematic parameter sample value is sampled every 1° to obtain multiple kinematic parameter sample values for that degree of freedom.
[0063] Step 1102: Based on the forward kinematic control equation, determine the end pose sample corresponding to each complete kinematic parameter solution sample, and establish the correspondence between the kinematic parameter sampling values of the r first degrees of freedom in the complete kinematic parameter solution sample and the end pose sample to obtain the initial training data.
[0064] The forward kinematics control equations are determined based on the structural parameters of the redundant manipulator and are used to describe the relationship between the end effector pose and the n degrees of freedom. That is, once the structure of the redundant manipulator is determined, its forward kinematics control equations can also be determined accordingly. A detailed description of the forward kinematics control equations is provided in step 102 below, and will not be elaborated further in this embodiment.
[0065] Substituting each set of complete kinematic parameter solution samples (including a kinematic parameter sample value corresponding to each of the n degrees of freedom) into the forward kinematic control equations yields the end-effector pose sample (6-dimensional vector) corresponding to that set of complete kinematic parameter solution samples. Establishing the correspondence between the kinematic parameter sample values of the r first degrees of freedom in that set of complete kinematic parameter solution samples and the end-effector pose sample yields the initial training data.
[0066] Step 1103: Based on actual needs, clean the initial training data to obtain training data.
[0067] Actual requirements refer to the cleaning (or filtering) requirements of the initial training data, used to indicate which data in the initial training data is unusable, so that unusable data can be filtered out. Optionally, actual requirements include, but are not limited to, at least one of the following:
[0068] 1. To avoid collisions, for each group of r kinematic parameters of the first degree of freedom and the corresponding end pose sample in the initial training data, it is determined whether the end pose sample interferes with the surrounding environment. If interference occurs, the data in that group is filtered out.
[0069] 2. To avoid exceeding joint limits, for each group of r kinematic parameter samples of the first degree of freedom and the corresponding end pose samples in the initial training data, it is determined whether the kinematic parameter samples of the r first degrees of freedom and the kinematic parameter samples of the nr second degrees of freedom corresponding to the r first degrees of freedom exceed the corresponding joint limits. If they exceed the limits, the group of data is filtered out.
[0070] 3. To meet the torque balance requirement, based on this requirement, for each group of r first degrees of freedom kinematic parameter sampling values and corresponding end pose samples in the initial training data, determine the torque corresponding to the r first degrees of freedom kinematic parameter sampling values and the corresponding nr second degrees of freedom kinematic parameter sampling values, and determine whether the torque meets the preset balance condition; if it does not meet the condition, the data is filtered out.
[0071] In other implementations, the generative neural network with physical space constraint mechanism can generate training data in other ways, such as: sampling within the allowable variation range of the kinematic parameters of the r first degrees of freedom to obtain multiple kinematic parameter sample values corresponding to each first degree of freedom; for each end pose sample among multiple end pose samples, substituting the end pose sample and the kinematic parameter sample values corresponding to the r first degrees of freedom into the forward kinematic control equation to obtain the kinematic parameter solutions of the nr second degrees of freedom; if the set of data consisting of the kinematic parameter sample values corresponding to the r first degrees of freedom, the kinematic parameter solutions of the nr second degrees of freedom, and the corresponding end pose samples meets the actual requirements, then a correspondence is established between the kinematic parameter sample values corresponding to the r first degrees of freedom and the end pose sample to obtain training data; if the set of data does not meet the actual requirements, then the correspondence is not established, and at least one kinematic parameter sample value of the first degree of freedom and / or the end pose sample is updated.
[0072] After obtaining the training data, a generative neural network with physical space constraints is trained using the training data, referencing... Figure 2 Specifically, this includes steps 1014-1016:
[0073] Step 1014: Input each end pose sample and the kinematic parameter sampling values of the r first degrees of freedom corresponding to the end pose sample into the generative neural network to be trained, so as to map the kinematic parameter sampling values of each group of r first degrees of freedom to the values in the base distribution.
[0074] The base distribution, or initial sampling distribution of a generative neural network, is the starting point for the generation (or inference) process of the generative neural network and is used to provide initial random variables. The base distribution typically possesses the characteristics of easy sampling and easy probability density calculation. For example, the base distribution can be a normal distribution. Therefore, the training objective of the generative neural network to be trained is to obtain an invertible mapping that maps the sampled values of the kinematic parameters of each group of r degrees of freedom to the base distribution, thus obtaining the values in the base distribution. In this way, during the generation process, the model can use the inverse process of this mapping to obtain random variables sampled from the base distribution. The solution is transformed into a kinematic parameter solution with r first degrees of freedom.
[0075] For example, the generative neural network to be trained can be implemented based on normalized flow. (See reference) Figure 3 The generative neural network to be trained shown includes multiple sets of transformation networks 300 connected in sequence. Each set of transformation networks 300 includes: coupling layers 301, permute layers 302, and coefficient networks 303.
[0076] During training, the coupling layer 301 in the first group of transform networks is used to acquire multiple sets of r kinematic parameter sampling values for the first degree of freedom corresponding to each end pose sample input to the generative neural network to be trained. That is, the input data of the coupling layer 301 in the first group of transform networks is multiple sets of r kinematic parameter sampling values for the first degree of freedom corresponding to each end pose sample. The coupling layers 301 in the second group and subsequent transform networks are connected to the permutation layer 302 in the previous group of transform networks, that is, the input data of the coupling layers 301 in the second group and subsequent transform networks is the output data of the permutation layer 302 in the previous group of transform networks.
[0077] The coupling layer 301 in each transformation network supports conditional information injection to generate a result that conforms to the conditional information. The conditional information includes end-effector pose samples. In other embodiments, the conditional information may also include noise information, etc. This embodiment does not limit the implementation method of the conditional information.
[0078] The coupling layer 301 is connected to both the coefficient network 303 and the permutation layer 302, and is used to implement a reversible nonlinear transformation. For example, refer to... Figure 3 During training, coupling layer 301 is used to: split the input data x into a first part x 1:d Part 2 x d+1:D ; and the first part x 1:d Input coefficient network 303. Accordingly, coefficient network 303 is used to obtain the first part x 1:d After obtaining the corresponding end-effector pose sample, the first part x 1:d The end-effector pose samples are processed to generate a scaling factor s and an offset factor t. Here, d is a preset value less than D, such as d = D / 2; D represents the dimension of each group of r kinematic parameter samples for the first degree of freedom.
[0079] The coupling layer 301 is also used to: adjust the second part x based on the scaling factor s and offset factor t output by the coefficient network 303. d+1:D A nonlinear transformation is performed, and the first part is combined with the nonlinearly transformed second part to obtain the nonlinear transformation result of coupling layer 301. For example, the nonlinear transformation method can be expressed by the following formula:
[0080] ;
[0081] in, This indicates that for the second part x d+1:D The nonlinear transformation result obtained by performing a nonlinear transformation. Represents element-wise product; .
[0082] In this embodiment, the nonlinear transformation of the coupling layer 301 is a reversible transformation. Taking the above nonlinear transformation as an example, its corresponding reversible transformation is expressed as follows:
[0083] ;
[0084] .
[0085] The permutation layer 302 is used to permutate the dimensions of the nonlinear transformation result, that is, to exchange the nonlinear transformation result generated by the coupling layer 301 (i.e., […]). The output data is obtained by alternating the dimensional order of the coefficient network 303 to ensure that all dimensions of the data can be fully processed by the coefficient network 303. Since a single coupling layer 301 only processes the second part, by setting the permutation layer 302 to permutate the dimensional order in each set of exchange networks, data of different dimensions can be processed alternately in subsequent coupling layers 301, thereby capturing complex dependencies between variables and improving the accuracy of data generation.
[0086] During training, each end pose sample is input into each group of transformation networks, and the kinematic parameter sampling values of each group of r first degrees of freedom corresponding to the end pose sample are input into the coupling layer 301 in the first group of transformation networks. After being processed sequentially, the output data obtained by the permutation layer 302 of the last group of transformation networks is obtained. This output data is the value after mapping the kinematic parameter sampling values of each group of r first degrees of freedom corresponding to the end pose sample to the base distribution.
[0087] Step 1015: Input the values from the base distribution into the preset loss function to obtain the loss value.
[0088] The loss function is used to guide the model to learn the mapping from the base distribution to the target distribution (i.e., the solution distribution is composed of multiple sets of r kinematic parameter samples of the first degree of freedom corresponding to each end pose sample).
[0089] For example, the loss function is implemented based on maximum likelihood loss, which is used to make the model sample the kinematic parameters for each group of r first degrees of freedom. Assign the highest possible probability density According to the variable substitution formula of probability density:
[0090] ;
[0091] in, This represents a random variable sampled from a base distribution; The inverse transformation represents the transformation from the forward transformation to the inverse transformation of a random variable. Transformed into sampled kinematic parameters of each group of r degrees of freedom Transformation function; Indicates the basis distribution of a random variable The probability density at that location. Based on this, in order to maximize... Minimize Correspondingly, the maximum likelihood loss It can be represented as:
[0092] ;
[0093] in, This represents the probability density of the base distribution at the value z in the base distribution generated by the generative neural network to be trained; The Jacobian matrix represents the forward transformation (i.e., the transformation from the sampled values of the kinematic parameters in the r first degrees of freedom to the values in the basis distribution). The determinant; This represents the inverse transform of the forward transform, that is, it represents the transformation relationship between the value z in the base distribution and the sampled values of the kinematic parameters of the r first degrees of freedom. and This indicates the conditional information injected into each coupling layer 301. This represents the end-effector pose sample. This represents noise information, such as a normal distribution used to simulate noise. Inverse Transformation The Jacobian matrix for values in the basis distribution is used to describe the effect of small changes in z on the output.
[0094] Step 1016: Iteratively update the model parameters of the generative neural network to be trained based on the loss value, so that the generative neural network to be trained learns the invertible mapping from the kinematic parameter sampling values of the r first degrees of freedom (i.e., the target distribution) to the base distribution based on the end pose samples and the corresponding multiple sets of r first degrees of freedom kinematic parameter sampling values, thereby obtaining the trained generative neural network with physical space constraint mechanism.
[0095] Determine the gradient of the loss value with respect to the model parameters, and optimize the model parameters in reverse based on this gradient. Repeat steps 1013-1015 until the generative neural network to be trained converges or the number of iterations reaches the preset number, thus obtaining the trained generative neural network. Taking the generative neural network to be trained based on normalized flow as an example, the model parameters include, but are not limited to, the network parameters of the coefficient network 303 and the network parameters of the coupling layer 301.
[0096] In this embodiment, the trained generative neural network with physical space constraints has a one-to-many output capability. That is, by inputting an end-effector target pose, it can obtain multiple sets of kinematic parameter solutions for r first degrees of freedom corresponding to that end-effector target pose. For example, taking the generative neural network to be trained as being implemented based on normalized flow, the trained generative neural network with physical space constraints is also implemented based on normalized flow. Accordingly, by inputting the end-effector target pose into the pre-trained generative neural network with physical space constraints, multiple sets of kinematic parameter solutions for r first degrees of freedom are obtained, including:
[0097] The end-target pose is input into a trained generative neural network with physical space constraints, so that the trained generative neural network with physical space constraints samples multiple random variables from the base distribution. Based on the learned invertible mapping Each random variable and the end target pose are mapped to a kinematic parameter solution with r degrees of freedom, resulting in multiple sets of kinematic parameter solutions for the r degrees of freedom corresponding to the multiple random variables.
[0098] Step 102: Based on the transformation expression of the kinematic parameters of the second degree of freedom, the end-effector pose, and the kinematic parameter solutions of each set of r first degrees of freedom, determine the kinematic parameter solutions of nr second degrees of freedom; each set of kinematic parameter solutions of the r first degrees of freedom and its corresponding kinematic parameter solutions of nr second degrees of freedom constitute a complete set of kinematic parameter solutions. The transformation expression is determined based on the forward kinematic control equation, and the kinematic parameters of the r first degrees of freedom are used to represent the kinematic parameters of the nr second degrees of freedom, thereby establishing the physical space constraint relationship between the n degrees of freedom of the redundant robotic arm.
[0099] The forward kinematics control equations are determined based on the structural parameters of the redundant manipulator and are used to describe the relationship between the end-effector pose and the n degrees of freedom. For example, the forward kinematics control equations can be established based on a homogeneous transformation matrix; for instance, the forward kinematics control equations can be expressed as:
[0100] ;
[0101] in, Let be a homogeneous transformation matrix, representing the relative position and orientation between adjacent (i-1)th joints and the ith joint in the redundant robotic arm; where i is a positive integer from 1 to n, and i-1=0 represents the robotic arm base; The matrix representing the total homogeneous transformation from the robot arm base to the end effector in a redundant robot arm consists of a rotation matrix R and a position vector P. (i.e., the end target pose matrix) ) can be represented as:
[0102] .
[0103] Wherein, the rotation matrix R is used to describe the orientation of the end effector, its column vectors correspond to the unit vectors of the end effector coordinate axes, and can be equivalently represented by a 3×1 orientation vector; n=[n x ,n y ,n z ] T , represents the direction vector of the x-axis of the end effector's end coordinate system in the base coordinate system of the robot arm base, n x n represents the projection length of the x-axis of the end coordinate system onto the x-axis of the base coordinate system. y n represents the projection length of the x-axis of the end coordinate system onto the y-axis of the base coordinate system. z This represents the projection length of the x-axis of the end coordinate system onto the z-axis of the base coordinate system. o=[o x ,o y ,o z ] T, represents the direction vector of the y-axis of the end effector's end coordinate system in the base coordinate system of the robot arm base, o x o represents the projection length of the y-axis of the end coordinate system onto the x-axis of the base coordinate system. y o represents the projection length of the y-axis of the end coordinate system onto the y-axis of the base coordinate system. z This represents the projection length of the y-axis of the end coordinate system onto the z-axis of the base coordinate system. a=[a x ,a y ,a z ] T , represents the direction vector of the z-axis of the end effector's end coordinate system in the base coordinate system of the robot arm base, a x a represents the projection length of the z-axis of the end coordinate system onto the x-axis of the base coordinate system. y a represents the projection length of the z-axis of the end coordinate system onto the y-axis of the base coordinate system. z This represents the projection length of the z-axis of the end coordinate system onto the z-axis direction of the base coordinate system. Position vector P = [p x ,p y ,p z ] T , representing the position of the origin of the end effector's end coordinate system relative to the robot arm base, p x p represents the distance from the origin of the end coordinate system along the x-axis of the base coordinate system to the origin of the base. y p represents the distance from the origin of the end coordinate system along the y-axis of the base coordinate system to the origin of the base. z This represents the distance from the origin of the end coordinate system to the origin of the base coordinate system along the z-axis.
[0104] The rotation matrix R and position vector P can be represented by the kinematic parameters of the redundant manipulator. The kinematic parameters of each joint indicate its state value. For example, if a joint is a rotary joint, the kinematic parameters indicate its angle; if a joint is a sliding joint, the kinematic parameters indicate its sliding distance. In forward kinematics, the complete kinematic parameters of the redundant manipulator are... It can be represented as: ,in, Let represent the kinematic parameters corresponding to the 1st to the nth joints. Correspondingly, the forward kinematic control equations can also be simply expressed as: Where F represents the total homogeneous transformation matrix with n degrees of freedom. The relationship between them.
[0105] The r first degrees of freedom are preset in the control device. Optionally, the r first degrees of freedom can be selected according to preset rules or manually specified. This embodiment does not limit the selection method of the r first degrees of freedom.
[0106] For example, let a = nr, then the complete kinematic parameters It can be represented as:
[0107] ;
[0108] in, Represents the kinematic parameters of the 'a'th degree of freedom. Let r represent the kinematic parameters of the first degree of freedom.
[0109] Accordingly, the above For each of the *a* expressions, by transformation and solution, we can obtain the expressions for the *a* second-degree-of-freedom kinematic parameters with respect to the *r* first-degree-of-freedom kinematic parameters: This yields the transformation expression.
[0110] By substituting the end-target pose and the kinematic parameter solutions for each of the r first degrees of freedom output by the trained generative neural network with physical space constraints into the transformation expression, we can obtain the kinematic parameter solutions for the nr second degrees of freedom.
[0111] In this embodiment, multiple sets of kinematic parameter solutions for r first degrees of freedom are generated by the model. Then, each set of kinematic parameter solutions is substituted into the transformation expression to obtain nr kinematic parameter solutions for n second degrees of freedom. On the one hand, the model no longer needs to generate kinematic parameters for n degrees of freedom, which can reduce computational complexity. At the same time, the model no longer needs to use the kinematic parameter sampling values of n degrees of freedom during training, which can reduce training costs. On the other hand, since the transformation expression is determined by the forward kinematic control equation, after determining the kinematic parameter solutions for r first degrees of freedom, the kinematic parameter solutions for nr second degrees of freedom determined based on the transformation expression must conform to the forward kinematic control equation, thereby ensuring that the determined kinematic parameters can achieve the end-effector pose and satisfy the physical space constraints, thus realizing the accurate control of the redundant robotic arm.
[0112] Step 103: Based on the target optimization function set according to the operation requirements, select an optimal set of kinematic parameter solutions from multiple sets of complete kinematic parameter solutions, so as to control the redundant robotic arm to run according to the optimal kinematic parameter solution and reach the end target pose at the next moment.
[0113] For example, selecting the optimal kinematic parameter solution from multiple sets of complete kinematic parameter solutions based on the objective optimization function set according to operational requirements includes: selecting a set of optimal kinematic parameter solutions from multiple sets of complete kinematic parameter solutions that can minimize or maximize the objective optimization function.
[0114] This embodiment selects the optimal kinematic parameter solution from multiple complete kinematic parameter solutions based on the objective optimization function, thus obtaining a kinematic parameter solution that can meet the user's needs as much as possible.
[0115] The objective optimization function is set based on the operational requirements of the redundant robotic arm, which can be expressed by a theoretical expression. For example, the operational requirements include at least one of the following:
[0116] 1. Optimal compliance requirement, used to make the movement of redundant robotic arms smoother and more stable, reducing abrupt joint movements and shocks.
[0117] For example, the objective optimization function is determined based on the operational requirement of "optimal compliance requirement". It can be represented as:
[0118] ;
[0119] in, Represents a complete set of kinematic parameter solutions; This represents the kinematic parameters at the previous moment.
[0120] 2. Do not exceed the joint's limit threshold to avoid kinematic parameter errors. Exceeding its physical limitations.
[0121] For example, the objective optimization function is determined based on the operational requirement of "not exceeding the joint limit threshold". It can be represented as:
[0122] ;
[0123] ;
[0124] in, Represents a complete set of kinematic parameter solutions; This represents the minimum value within the range of variation of a kinematic parameter. This represents the maximum value of the range of variation of the kinematic parameter.
[0125] 3. Obstacle avoidance requirement: to prevent redundant robotic arms from colliding with obstacles in the working environment.
[0126] In other implementations, the objective optimization function can also be established based on other operational requirements. This embodiment does not limit the implementation method of the objective optimization function.
[0127] 4. Energy Optimal Demand: This is used to select the kinematic parameter solution with the minimum energy consumption from multiple complete kinematic parameter solutions.
[0128] Taking the objective optimization function as an example, which is based on at least two operational requirements, the objective optimization function can be the sum of the theoretical expressions corresponding to each operational requirement, or a weighted sum. For example, the objective optimization function includes the above... and Then the objective optimization function It can be represented as:
[0129] ;
[0130] in, Represents a complete set of kinematic parameter solutions; express The corresponding weights; express The corresponding weights.
[0131] In summary, the inverse kinematics solution method for redundant robotic arms based on a physical space constraint mechanism provided in this embodiment obtains the end-effector pose of the redundant robotic arm at the next moment. It then inputs this pose into a pre-trained generative neural network with a physical space constraint mechanism to obtain multiple sets of kinematic parameter solutions for r first degrees of freedom. Each set of kinematic parameter solutions includes the kinematic parameters for the r first degrees of freedom at the next moment. Based on the transformation expression of the second degree of freedom kinematic parameters, the end-effector pose, and each set of kinematic parameter solutions for the r first degrees of freedom, the nrth kinematic parameter solution is determined. The kinematic parameter solution for two degrees of freedom; each set of kinematic parameter solutions for the r first degrees of freedom and its corresponding nr second degrees of freedom constitutes a complete set of kinematic parameter solutions. The transformation expression uses the kinematic parameters of the r first degrees of freedom to represent the kinematic parameters of the nr second degrees of freedom, thereby establishing the physical space constraint relationship between the n degrees of freedom of the redundant robotic arm; based on the objective optimization function set according to the operational requirements, a set of optimal kinematic parameter solutions is selected from multiple sets of complete kinematic parameter solutions to control the redundant robotic arm to run according to the optimal kinematic parameter solution and reach the end-effector target pose at the next moment. On the one hand, the model no longer needs to generate kinematic parameters for n degrees of freedom, which reduces computational complexity. At the same time, the model no longer needs to use the sampled values of kinematic parameters for n degrees of freedom during training, which reduces training costs. On the other hand, since the transformation expression is determined by the forward kinematic control equation, after determining the kinematic parameter solutions for r first degrees of freedom, the kinematic parameter solutions for nr second degrees of freedom determined based on the transformation expression must meet the physical space constraint condition of the forward kinematic control equation, thus ensuring that the determined kinematic parameters can achieve the end-effector pose and realize the accurate control of the redundant robotic arm.
[0132] To better understand the inverse kinematics solution method for redundant robotic arms based on a physical space constraint mechanism provided in this application, an example is given below. For instance, an 8-DOF (n=8) redundant robotic arm has three telescopic arms: telescopic arm #1, telescopic arm #2, and telescopic arm #3, and five rotary joints: rotary joint #1, rotary joint #2, rotary joint #3, rotary joint #4, and rotary joint #5. The telescopic arms include sliding joints.
[0133] Assume the parameter table of the 8-DOF redundant robotic arm is as shown in Table 1 below. The column containing the Link represents the joint numbers of two adjacent joints; for example, 1-2 represents the positive kinematic parameters of joint 1 to joint 2, ..., 8-e represents the positive kinematic parameters of joint 8 to the end effector. , , These represent the translation components along the x, y, and z axes from the previous joint to the current joint, respectively. , , These represent the rotational components around the x, y, and z axes from the previous joint to the current joint, respectively. i q represents the length of the robotic arm between two adjacent joints. i Represents a sliding joint, θ i This indicates a rotary joint.
[0134] Table 1:
[0135]
[0136] Based on the positive kinematic parameters shown in Table 1, the homogeneous transformation matrix between adjacent joints can be obtained as follows:
[0137] ; ;
[0138] ; ;
[0139] ; ;
[0140] ; .
[0141] The forward kinematic control equations can be obtained from the homogeneous transformation matrices. , Given the end target pose After that, it can be established Kinematic parameters of joint degrees of freedom The equation between them is expressed as follows:
[0142] , formula (1);
[0143] , formula (2);
[0144] , formula (3);
[0145] , formula (4);
[0146] , formula (5);
[0147] , formula (6);
[0148] , formula (7);
[0149] , formula (8).
[0150] Assume the first degree of freedom is and At this point, given the first degree of freedom and ,as well as According to formula (1), we can obtain The conversion expression is:
[0151] According to this expression, we can obtain... The expression.
[0152] According to formulas (2) and (3), we can obtain The conversion expression is:
[0153]
[0154]
[0155] .
[0156] According to formulas (4) and (5), we can obtain The conversion expression is:
[0157]
[0158]
[0159] .
[0160] According to formulas (6) and (7), the sliding joint can be obtained. and The conversion expression is:
[0161] .
[0162] According to formula (8), the sliding joint can be obtained. The conversion expression is:
[0163] .
[0164] Thus, transformation expressions for the six second-degree-of-freedom kinematic parameters were established based on the two first-degree-of-freedom kinematic parameters, namely... .
[0165] After obtaining the transformation expression, before model training, multiple kinematic parameter values are sampled according to a preset solution accuracy within the allowable range of motion corresponding to each degree of freedom kinematic parameter. For example, the allowable range of motion for each joint is shown in Table 2 below. For joint 1, from -170° < Multiple kinematic parameter sampling values are sampled within a range of <170° according to a preset solution accuracy. Then, the kinematic parameter sampling values corresponding to each degree of freedom are substituted into the positive kinematic control equations shown in formulas (1) to (8) to obtain the end pose samples corresponding to this set of kinematic parameter sampling values, and the kinematic parameter sampling values are established. and The initial training data is obtained by establishing the correspondence between the initial training data and the end-effector pose samples. After data cleaning, the final training data is obtained.
[0166] Table 2:
[0167]
[0168] After training the generative neural network to be trained using training data, inputting the end-effector target pose into the trained generative neural network with physical space constraints yields multiple sets of kinematic parameter solutions for the two first degrees of freedom corresponding to that end-effector target pose. Substituting each set of kinematic parameter solutions for the two first degrees of freedom into the transformation expression, we obtain kinematic parameter solutions for the six first degrees of freedom. Each set of kinematic parameter solutions for the two first degrees of freedom and its corresponding six second degrees of freedom constitutes a complete set of kinematic parameter solutions. Thus, multiple sets of complete kinematic parameter solutions can be obtained.
[0169] Substituting multiple complete kinematic parameter solutions into the target optimization function set according to operational requirements yields function values. The optimal kinematic parameter solution whose function value satisfies the desired condition (such as the maximum or minimum function value) is then selected.
[0170] Figure 4 A block diagram is shown of a device for solving the inverse kinematics of a redundant robotic arm based on a physical space constraint mechanism according to an embodiment of the present disclosure. The redundant robotic arm includes n degrees of freedom, where n is a positive integer. The device includes: a first degree-of-freedom kinematic parameter solution generation module 410, a second degree-of-freedom kinematic parameter solution generation module 420, and a kinematic parameter solution selection module 430.
[0171] The first degree-of-freedom kinematic parameter solution generation module 410 is used to: upon obtaining the end-effector target pose of the redundant robotic arm at the next moment, input the end-effector target pose into a pre-trained generative neural network with a physical space constraint mechanism to obtain multiple sets of kinematic parameter solutions for r first degrees of freedom, each set of kinematic parameter solutions including the kinematic parameters of the r first degrees of freedom at the next moment; wherein, the generative neural network with a physical space constraint mechanism is trained using pre-generated training data, the training data including sample end-effector poses and multiple sets of kinematic parameter sample values for the r first degrees of freedom that can achieve the sample end-effector pose; nr is the minimum number of degrees of freedom required for the redundant robotic arm to complete any task, r is a positive integer, and n is greater than r;
[0172] The second degree-of-freedom kinematic parameter solution generation module 420 is used to: determine the kinematic parameter solutions for nr degrees of freedom based on the transformation expression of the second degree-of-freedom kinematic parameters, the end-effector target pose, and each set of kinematic parameter solutions for r first degrees of freedom; each set of kinematic parameter solutions for r first degrees of freedom and its corresponding set of kinematic parameter solutions for nr second degrees of freedom constitute a complete set of kinematic parameter solutions; wherein, the transformation expression is determined based on the forward kinematic control equations, and the kinematic parameters of r first degrees of freedom are used to represent the kinematic parameters of nr second degrees of freedom, thereby establishing the physical space constraint relationship between the n degrees of freedom of the redundant manipulator; the forward kinematic control equations are determined based on the structural parameters of the redundant manipulator and are used to describe the relationship between the end-effector pose and the n degrees of freedom;
[0173] The kinematic parameter solution selection module 430 is used to: select an optimal kinematic parameter solution from multiple complete kinematic parameter solutions based on the target optimization function set according to the operation requirements, so as to control the redundant robotic arm to run according to the optimal kinematic parameter solution and reach the end target pose at the next moment.
[0174] Optionally, the process of generating the training data includes:
[0175] Within the allowable variation range of the kinematic parameters for each degree of freedom, multiple kinematic parameter sample values corresponding to each degree of freedom are sampled according to the preset solution accuracy; wherein, a set of complete kinematic parameter solution samples is formed by one kinematic parameter sample value corresponding to each of the n degrees of freedom.
[0176] Based on the positive kinematic control equations, the end pose sample corresponding to each complete kinematic parameter solution sample is determined, and the correspondence between the kinematic parameter sampling values of the r first degrees of freedom in the complete kinematic parameter solution sample and the end pose sample is established to obtain the initial training data.
[0177] Based on actual needs, the initial training data is cleaned to obtain the training data.
[0178] Optionally, training the generative neural network with physical space constraints using the training data includes:
[0179] Each end pose sample and the kinematic parameter sampling values of r first degrees of freedom corresponding to the end pose sample are input into the generative neural network to be trained, so that the kinematic parameter sampling values of each group of r first degrees of freedom are mapped to the values in the base distribution.
[0180] The values from the base distribution are input into a preset loss function to obtain the loss value;
[0181] The model parameters of the generative neural network to be trained are iteratively updated based on the loss value, so that the generative neural network to be trained learns the invertible mapping of the kinematic parameter sampling values of the multiple sets of r first degrees of freedom to the base distribution based on the end pose sample and the corresponding multiple sets of r first degrees of freedom kinematic parameter sampling values, thereby obtaining a trained generative neural network with physical space constraint mechanism.
[0182] Optionally, the first degree-of-freedom kinematic parameter solution generation module 410 is used for:
[0183] The end-target pose is input into the trained generative neural network with physical space constraints, so that the trained generative neural network with physical space constraints samples multiple random variables from the base distribution, and maps each random variable and the end-target pose to r kinematic parameter solutions of the first degree of freedom based on the learned invertible mapping, thereby obtaining multiple sets of kinematic parameter solutions of the r first degrees of freedom corresponding to the multiple random variables.
[0184] Optionally, the generative neural network to be trained includes: multiple sets of transformation networks connected in sequence, each set of transformation networks including: a coupling layer, a permutation layer and a coefficient network;
[0185] The coupling layer is used to split the input data corresponding to the end pose sample into a first part and a second part; and input the first part into the coefficient network;
[0186] The coefficient network is used to process the first part and the end pose sample to generate a scaling factor and an offset factor.
[0187] The coupling layer is further configured to perform a nonlinear transformation on the second part based on the scaling factor and the offset factor, and the first part and the nonlinearly transformed second part are used to obtain the nonlinear transformation result of the coupling layer;
[0188] The permutation layer is used to permutate the dimensions of the nonlinear transformation result to obtain output data, and to generate values in the base distribution based on the output data.
[0189] Optionally, the operational requirements can be expressed by a theoretical expression; the operational requirements include at least one of the following:
[0190] Optimal softness requirement;
[0191] Not exceeding the joint's limit threshold;
[0192] Obstacle avoidance requirements;
[0193] Optimal energy demand.
[0194] Optionally, all n degrees of freedom are rotary joints; or, the n degrees of freedom include both rotary joints and telescopic joints.
[0195] For details, please refer to the above method implementation examples.
[0196] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0197] This disclosure also provides a device for solving the inverse kinematics of a redundant robotic arm based on a physical space constraint mechanism-generated model, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above method.
[0198] This disclosure also provides a non-volatile computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0199] This disclosure also provides a computer program product, including a computer program or a non-volatile computer-readable storage medium carrying the computer program, wherein the computer program, when executed by a processor, implements the steps of the above method.
[0200] Figure 5 This is a block diagram illustrating a redundant robotic arm inverse kinematics solver 1900 based on a physical space constraint mechanism-generated model, according to an exemplary embodiment. For example, the device 1900 can be provided as a server or terminal device. (Refer to...) Figure 5The apparatus 1900 includes a processing component 1922, which further includes one or more processors, and memory resources represented by memory 1932 for storing instructions, such as application programs, that can be executed by the processing component 1922. The application programs stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 1922 is configured to execute instructions to perform the methods described above.
[0201] Device 1900 may also include a power supply component 1926 configured to perform power management of device 1900, a wired or wireless network interface 1950 configured to connect device 1900 to a network, and an input / output interface 1958 (I / O interface). Device 1900 can operate on an operating system, such as Windows Server, stored in memory 1932. TM macOS X TM Uoix TM Lioux TM FreeBSD TM Or similar.
[0202] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions that can be executed by a processing component 1922 of the device 1900 to perform the above-described method.
[0203] Computer-readable storage media can be tangible devices capable of holding and storing programs / instructions used by instruction execution devices. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0204] The computer program (or computer-readable program instructions) described herein can be downloaded from a computer-readable storage medium to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage medium in the respective computing / processing device.
[0205] The computer program (or computer program instructions) used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAo) or a wide area network (WAo)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuits, such as programmable logic circuits, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), are personalized by utilizing state information of computer-readable program instructions. These electronic circuits can execute computer-readable program instructions to implement various aspects of this disclosure.
[0206] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0207] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0208] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0209] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0210] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method for solving the inverse kinematics of a redundant robotic arm based on a model generated by physical space constraint mechanisms, characterized in that, The redundant robotic arm has n degrees of freedom, where n is a positive integer; the method includes: Given the end-effector pose of the redundant robotic arm at the next moment, the end-effector pose is input into a pre-trained generative neural network with physical space constraints to obtain multiple sets of kinematic parameter solutions for r first degrees of freedom. Each set of kinematic parameter solutions includes the kinematic parameters for the r first degrees of freedom at the next moment. The generative neural network with physical space constraints is trained using pre-generated training data, which includes sample end-effector poses and multiple sets of kinematic parameter sample values for the r first degrees of freedom that can achieve the sample end-effector pose. nr is the minimum number of degrees of freedom required for the redundant robotic arm to complete any task, where r is a positive integer and n is greater than r. Based on the transformation expression of the kinematic parameters of the second degree of freedom, the end-effector target pose, and the kinematic parameter solutions of each set of r first degrees of freedom, the kinematic parameter solutions of nr second degrees of freedom are determined; each set of kinematic parameter solutions of the r first degrees of freedom and its corresponding kinematic parameter solutions of the nr second degrees of freedom constitute a complete set of kinematic parameter solutions; wherein, the transformation expression is determined based on the forward kinematic control equations, and the kinematic parameters of the r first degrees of freedom are used to represent the kinematic parameters of the nr second degrees of freedom, thereby establishing the physical space constraint relationship between the n degrees of freedom of the redundant manipulator; the forward kinematic control equations are determined based on the structural parameters of the redundant manipulator and are used to describe the relationship between the end-effector pose and the n degrees of freedom; Based on the target optimization function set according to the operational requirements, an optimal set of kinematic parameter solutions is selected from multiple sets of complete kinematic parameter solutions to control the redundant robotic arm to operate according to the optimal kinematic parameter solution and reach the target pose of the end effector at the next moment.
2. The method according to claim 1, characterized in that, The process of generating the training data includes: Within the allowable variation range of the kinematic parameters for each degree of freedom, multiple kinematic parameter sample values corresponding to each degree of freedom are sampled according to the preset solution accuracy; wherein, a set of complete kinematic parameter solution samples is formed by one kinematic parameter sample value corresponding to each of the n degrees of freedom. Based on the positive kinematic control equations, the end pose sample corresponding to each complete kinematic parameter solution sample is determined, and the correspondence between the kinematic parameter sampling values of the r first degrees of freedom in the complete kinematic parameter solution sample and the end pose sample is established to obtain the initial training data. Based on actual needs, the initial training data is cleaned to obtain the training data.
3. The method according to claim 1, characterized in that, Training the generative neural network with physical space constraints using the training data includes: Each end pose sample and the kinematic parameter sampling values of r first degrees of freedom corresponding to the end pose sample are input into the generative neural network to be trained, so that the kinematic parameter sampling values of each group of r first degrees of freedom are mapped to the values in the base distribution. The values from the base distribution are input into a preset loss function to obtain the loss value; The model parameters of the generative neural network to be trained are iteratively updated based on the loss value, so that the generative neural network to be trained learns the invertible mapping of the kinematic parameter sampling values of the multiple sets of r first degrees of freedom to the base distribution based on the end pose sample and the corresponding multiple sets of r first degrees of freedom kinematic parameter sampling values, thereby obtaining a trained generative neural network with physical space constraint mechanism.
4. The method according to claim 3, characterized in that, The process involves inputting the end-effector pose into a pre-trained generative neural network with physical space constraints to obtain multiple sets of kinematic parameter solutions for r first degrees of freedom, including: The end-target pose is input into the trained generative neural network with physical space constraints, so that the trained generative neural network with physical space constraints samples multiple random variables from the base distribution, and maps each random variable and the end-target pose to r kinematic parameter solutions of the first degree of freedom based on the learned invertible mapping, thereby obtaining multiple sets of kinematic parameter solutions of the r first degrees of freedom corresponding to the multiple random variables.
5. The method according to claim 3, characterized in that, The generative neural network to be trained includes: multiple sets of transformation networks connected in sequence, each set of transformation networks including: a coupling layer, a permutation layer and a coefficient network; The coupling layer is used to split the input data corresponding to the end pose sample into a first part and a second part; and input the first part into the coefficient network; The coefficient network is used to process the first part and the end pose sample to generate a scaling factor and an offset factor. The coupling layer is further configured to perform a nonlinear transformation on the second part based on the scaling factor and the offset factor, and the first part and the nonlinearly transformed second part are used to obtain the nonlinear transformation result of the coupling layer; The permutation layer is used to permutate the dimensions of the nonlinear transformation result to obtain output data, and to generate values in the base distribution based on the output data.
6. The method according to claim 1, characterized in that, The operational requirements can be expressed by a theoretical expression; the operational requirements include at least one of the following: Optimal softness requirement; Not exceeding the joint's limit threshold; Obstacle avoidance requirements; Optimal energy demand.
7. The method according to claim 1, characterized in that, All n degrees of freedom are rotational joints; or, the n degrees of freedom include both rotational joints and extensional joints.
8. A device for solving the inverse kinematics of a redundant robotic arm based on a physical space constraint mechanism-generated model, characterized in that, The redundant robotic arm has n degrees of freedom, where n is a positive integer; the device includes: The first degree-of-freedom kinematic parameter solution generation module is used to: upon obtaining the end-effector target pose of the redundant robotic arm at the next moment, input the end-effector target pose into a pre-trained generative neural network with a physical space constraint mechanism to obtain multiple sets of kinematic parameter solutions for r first degrees of freedom, each set of kinematic parameter solutions including the kinematic parameters of the r first degrees of freedom at the next moment; wherein, the generative neural network with a physical space constraint mechanism is trained using pre-generated training data, the training data including sample end-effector poses and multiple sets of kinematic parameter sample values for the r first degrees of freedom that can achieve the sample end-effector pose; nr is the minimum number of degrees of freedom required for the redundant robotic arm to complete any task, r is a positive integer, and n is greater than r; The second degree-of-freedom kinematic parameter solution generation module is used to: determine the kinematic parameter solutions for nr degrees of freedom based on the transformation expression of the second degree-of-freedom kinematic parameters, the end-effector target pose, and each set of kinematic parameter solutions for r first degrees of freedom; each set of kinematic parameter solutions for r first degrees of freedom and its corresponding set of kinematic parameter solutions for nr second degrees of freedom constitute a complete set of kinematic parameter solutions; wherein, the transformation expression is determined based on the forward kinematic control equations, and the kinematic parameters of r first degrees of freedom are used to represent the kinematic parameters of nr second degrees of freedom, thereby establishing the physical space constraint relationship between the n degrees of freedom of the redundant manipulator; the forward kinematic control equations are determined based on the structural parameters of the redundant manipulator and are used to describe the relationship between the end-effector pose and the n degrees of freedom; The kinematic parameter solution determination module is used to: select an optimal kinematic parameter solution from multiple complete kinematic parameter solutions based on a target optimization function set according to operational requirements, so as to control the redundant robotic arm to operate according to the optimal kinematic parameter solution and reach the end-effector target pose at the next moment.
9. A device for solving the inverse kinematics of a redundant robotic arm based on a physical space constraint mechanism-generated model, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 8.
10. A non-volatile computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.