Series robot and its inverse kinematics solution method, related media and devices
Through the whole-body optimal control strategy and the iterative method of sequence convex optimization, the problem of joint limits not being considered in inverse kinematics solving is solved, and the precise motion control of any configuration tandem robot is realized, which improves the solution efficiency and accuracy, and ensures that the joint angle is feasible in actual operation.
Patent Information
- Application Number
- CN202410705494.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2044-05-31
AI Technical Summary
The existing inverse kinematics solution algorithms are less adaptable to tandem robots of any configuration, and fail to effectively consider physical constraints such as joint limits, resulting in joint angles exceeding the actual mechanical limits.
The whole-body optimal control strategy is adopted to transform the inverse kinematics problem into a constrained optimization problem. Through differential inverse kinematics calculation and sequence convex optimization iteration method, physical constraints such as joint limits are considered, and the optimal joint speed is obtained, and it is integrated to the current joint angle until the position error is less than the target error or the number of iterations is reached.
Accurate motion control of a tandem type robot of any configuration is realized, reducing joint exceeding limits, improving resolution efficiency and accuracy, ensuring that joint angles are feasible in actual operation, and enhancing the safety and reliability of robot operation.
Smart Images

Figure CN118636129B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical fields of serial robots and differential inverse kinematics, and particularly to a serial robot, a method for solving its inverse kinematics, a computer-readable storage medium, and a computer device. Background Art
[0002] Currently, inverse kinematics solving algorithms include analytical methods and iterative methods. The analytical method has requirements for robot modeling, that is, it needs to conform to the Piper criterion. If the three adjacent joint axes of the robot intersect at a point, or the three axes are parallel, the closed solution can be obtained for the inverse kinematics solution of the robot. This method has low adaptability, and for different models that conform to the Piper criterion, different closed solutions need to be derived. Iterative methods such as the Newton iterative method are applicable to serial robots with any configuration, but do not consider physical constraints such as joint limits, which may result in the joint angles obtained exceeding the actual mechanical limits.
[0003] Based on this, the present application provides a serial robot, a method for solving its inverse kinematics, a computer-readable storage medium, and a computer device to improve related technologies. Summary of the Invention
[0004] The purpose of the present application is to provide a serial robot, a method for solving its inverse kinematics, a computer-readable storage medium, and a computer device, which are applicable to serial robots with any configuration, and the optimization solving process takes into account physical constraint conditions, and the obtained joint angles will not exceed the actual mechanical limits.
[0005] The purpose of the present application is achieved by adopting the following technical solutions:
[0006] In a first aspect, the present application provides a method for solving the inverse kinematics of a serial robot, the method comprising:
[0007] Calculating the current pose of the end of the robot based on the current joint angles of the serial robot;
[0008] When the pose error between the current pose and the target pose is not less than the target error, performing differential inverse kinematics calculation to obtain joint velocities, and based on the target physical constraint conditions, performing optimization solving to obtain the optimal joint velocities;
[0009] Integrating the optimal joint velocities to the current joint angles to update the current joint angles until the pose error between the current pose calculated based on the current joint angles and the target pose is less than the target error or the target iteration times are exceeded;
[0010] Performing motion control on the serial robot based on the current joint angles after the iteration ends.
[0011] In some embodiments, calculating the current pose of the end effector of the robot based on the current joint angles of the serial robot includes:
[0012] Receiving the kinematic model of the serial robot, where the kinematic model is used to define the joint configuration space and joint velocities;
[0013] Performing forward kinematic calculations based on the current joint angles of the serial robot and the kinematic model to obtain the current pose.
[0014] In some embodiments, the pose error is represented by an error screw.
[0015] In some embodiments, performing an optimization solution based on the target physical constraint conditions to obtain the optimal joint velocities includes:
[0016] Under the condition of satisfying the target physical constraint conditions, taking the joint velocities as the optimization variables of the optimization objective function, and calculating the optimal joint velocities that minimize the optimization objective function, where the optimization objective function includes a pose task optimization term corresponding to the pose task, and the pose task optimization term is based on and e are determined;
[0017] where V is the six-dimensional space velocity, J(q) is the Jacobian matrix, q is the joint angle, is the joint velocity, and e is the error screw.
[0018] In some embodiments, the target physical constraint conditions include one or more of joint velocity constraint conditions, joint angle constraint conditions, and joint acceleration constraint conditions.
[0019] In some embodiments, the target physical constraint conditions include joint velocity constraint conditions, joint angle constraint conditions, and joint acceleration constraint conditions. Under the condition of satisfying the target physical constraint conditions, taking the joint velocities as the optimization variables of the optimization objective function, and calculating the optimal joint velocities that minimize the optimization objective function includes:
[0020] Performing a first-order approximation of the target physical constraint conditions, so as to represent the joint angles and joint accelerations in the optimization objective function as expressions containing joint velocities based on the step size;
[0021] Taking the joint velocities and the actually measured current joint angles as inputs, using the joint velocities as the optimization variables, and using a target quadratic programming solver to calculate the optimal joint velocities that minimize the optimization objective function.
[0022] In some embodiments, integrating the optimal joint velocities into the current joint angles to update the current joint angles includes:
[0023] With the optimal joint speed As an increment, increase the optimal joint speed to the current joint angle to update the current joint angle.
[0024] In some embodiments, for a serial robot with redundant degrees of freedom, the optimization objective function further includes a secondary task optimization term corresponding to a secondary task other than the pose task. Thus, the null space projection method is adopted to incorporate the secondary task other than the pose task into the optimization objective function to ensure the existence of a globally unique optimal solution.
[0025] In a second aspect, the present application provides a serial robot, which includes a control module for executing any one of the above methods.
[0026] In a third aspect, the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any one of the above methods.
[0027] In a fourth aspect, the present application provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor, when executing the computer program, implements any one of the above methods.
[0028] The present application provides a serial robot, its inverse kinematics solving method, a computer-readable storage medium, and a computer device. Through the whole-body optimal control strategy, the above embodiments transform the inverse kinematics problem into a constrained optimization problem, which has strong generality and is applicable to serial robots with any degrees of freedom. By incorporating physical constraints such as joint limits into the optimization solution, it is ensured that the calculated joint angles are feasible in actual operation, reducing the situation of exceeding joint limits. In addition, this method, such as using optimization methods like sequential convex optimization iteration, can solve the inverse kinematics problem in microseconds, improving the solution efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The present application will be further described below in conjunction with the specification drawings and specific embodiments.
[0030] Figure 1 is a schematic flowchart of an inverse kinematics solving method for a serial robot provided by an embodiment of the present application.
[0031] Figure 2 is a schematic flowchart of another inverse kinematics solving method for a serial robot provided by an embodiment of the present application.
[0032] Figure 3It is a structural block diagram of a computer device provided by an embodiment of the present application. Detailed implementation manners
[0033] Next, in conjunction with the accompanying drawings in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts fall within the protection scope of the present application.
[0034] In the description of the embodiments of the present application, it should be understood that the terms "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of the described features. In the description of the embodiments of the present application, the meaning of "a plurality" is two or more, unless otherwise specifically defined.
[0035] The present application adopts the method of whole-body control, and provides a method for optimizing and solving the inverse kinematics of a serial robot with multiple joints by using the degrees of freedom of the whole body. Through the whole-body optimal control strategy, the inverse kinematics problem is transformed into a constrained optimization problem, which has strong generality and is applicable to the inverse kinematics solution of serial robots with any degrees of freedom when performing operation tasks. Since the joint limit constraints are considered, the obtained solution must satisfy the joint limits and is applicable to serial multi-joint robots with any configurations. That is to say, by incorporating physical constraints such as joint limits into the optimization solution, it is ensured that the calculated joint angles are feasible in actual operation, and the situation of exceeding the joint limits is reduced. In addition, the present application adopts optimization methods such as sequential convex optimization iteration, etc., and can solve the inverse kinematics problem in microseconds, improving the solution efficiency and accuracy.
[0036] Next, the embodiments of the present application will be specifically described.
[0037] See Figure 1 , Figure 1 It is a schematic flow chart of a method for solving the inverse kinematics of a serial robot provided by an embodiment of the present application.
[0038] To improve the related technology, an embodiment of the present application provides a method for solving the inverse kinematics of a serial robot, and the method includes steps S101 to S104.
[0039] Step S101: Calculate the current pose of the robot end according to the current joint angles of the serial robot.
[0040] Step S102: When the pose error between the current pose and the target pose is not less than the target error, perform differential inverse kinematics calculation to obtain the joint velocity, and based on the target physical constraint conditions, perform optimization to obtain the optimal joint velocity.
[0041] Step S103: Integrate the optimal joint velocity to the current joint angle to update the current joint angle until the pose error between the current pose calculated based on the current joint angle and the target pose is less than the target error or exceeds the target iteration times.
[0042] Step S104: Based on the current joint angle after the iteration ends, perform motion control on the serial robot.
[0043] Among them, the serial robot is a multi-degree-of-freedom robot composed of multiple joints and linkages in series, and can be applied to industrial automation, medical treatment, service and other fields. The serial robot can be, for example, a robot with multiple joints connected in series, a robotic arm or an industrial automation device, etc. The robot can be, for example, a biped robot, a quadruped robot, a wheeled robot, etc. As an example, each joint corresponds to one degree of freedom. Forward kinematics refers to calculating the pose of the end (actuator) of the robot based on the joint angles of each joint of the robot. Inverse kinematics refers to calculating the joint angles of each joint based on the desired pose of the end (actuator) of the robot. The inverse kinematics solution method is a method of calculating the joint angles by giving the target pose of the end of the robot. The current pose is the position and orientation (a calculated value, not necessarily the actual measurement result) of the end (actuator) of the robot obtained by forward kinematics from the current joint angles. The joint angle refers to the specific angle or displacement of each joint of the robot at a certain moment. The target pose refers to the position and orientation that the end (actuator) of the robot is expected to reach. The pose error is used to describe the difference between the current pose and the target pose, and is represented, for example, by the position error and the orientation error, and is used to measure the deviation degree of the current (calculated) state of the robot from the target state. The physical constraint conditions refer to the joint limits (corresponding to the joint positions, or the joint angles), joint velocities, joint accelerations, etc. of the robot to ensure that the solution result is feasible under the actual physical conditions. In this article, based on the current pose and the target pose, differential inverse kinematics can be used to calculate the joint velocity, optimize to obtain the optimal joint velocity, and then integrate the optimal joint velocity to the current joint angle to update the current joint angle, and further update the current pose, and perform iterative calculation based on the difference between the current pose and the target pose. The optimal joint velocity refers to the optimal solution obtained by an optimization method under the physical constraint conditions, for example, the joint velocity that minimizes the optimization objective function. The target iteration times can be, for example, 3, 10, 50, 100, 1000, etc.
[0044] The above embodiments provide an inverse kinematics solution method for a serial robot, the core of which is to achieve precise control of the end pose of the robot through optimization solution techniques. First, according to the current joint angles, the current pose of the robot end is calculated using the forward kinematics model. Forward kinematics describes the mapping relationship from the joint space to the workspace (i.e., the end pose), which is the basis for inverse kinematics solution. Next, the pose error between the current pose and the target pose is calculated. When the pose error is not less than the specified threshold (i.e., the target error), it indicates that the current end pose of the robot has not reached the target and needs to be adjusted. Then, through the differential inverse kinematics method, the pose error is transformed into an optimization problem. Considering physical constraints such as joint limits, speed, and acceleration, optimization methods such as sequential convex optimization iteration method are used to solve for the optimal joint speed. By solving for the optimal joint speed to gradually approach the target pose, it has high solution efficiency and accuracy. After that, the obtained optimal joint speed is integrated into the current joint angles to update the current joint angles. The role of this step is to gradually adjust the angles of each joint of the robot according to the results of the optimization solution, making it approach the target pose. The integration operation ensures the continuity and smoothness of the joint angles, reducing drastic angle changes. Repeat the above steps, recalculate the current pose (after the current joint angles are updated, the current pose calculated based on the current joint angles will also change) and evaluate the pose error until the pose error is less than the target error or the maximum number of iterations is reached. Through multiple iterations, the end pose of the robot gradually approaches the target pose, ultimately achieving precise control. After that, based on the current joint angles after the iteration ends, motion control is performed on the serial robot to ensure that the robot completes the task according to the predetermined trajectory and pose.
[0045] The above embodiments are applicable to serial robots with any degree of freedom without specific assumptions or simplifications of the robot model. Compared with the related analytical methods, the above inverse kinematics solution method is applicable to robots with various configurations and has a wider application range. During the optimization solution process, physical constraints such as joint limits, speeds, and accelerations of the robot are fully considered to ensure that the calculated joint angles are feasible in actual operations, reducing the problem of joint over-limit and improving the safety and reliability of robot operation. Considering physical constraint conditions such as joint angles, joint speeds, and joint accelerations, the solved joint angles will definitely not exceed the joint limits and will not, like the related closed solutions, possibly solve for solutions that exceed the joint limits. By using methods such as the sequential convex optimization iteration method for optimization solution, the inverse kinematics problem can be efficiently solved within microseconds. The target pose is gradually approximated through iterative solution, ensuring the accuracy of the solution result. In addition, the integration operation ensures the smooth transition of joint angles, reduces drastic angle changes, and improves the smoothness of robot motion. Integrating the optimal joint speed into the current joint angle to update the current joint angle enables each adjustment to effectively reduce the pose error and gradually approximate the target pose. This process ensures the coherence and effectiveness of joint angle adjustment, improving the convergence speed and stability of the solution. In addition, in the application of redundant degree-of-freedom manipulators, based on the primary task (the pose task of the robot end-effector), the null space projection method can be used to simultaneously process secondary tasks (such as the reference joint configuration). This feature enhances the flexibility and adaptability of the robot in complex tasks. That is to say, it is convenient to expand and introduce other constraint conditions and other task objectives beyond the constraints, and all degrees of freedom of the robot can be fully utilized. In addition to satisfying the constraints of the end-effector pose task, the reference joint configuration, manipulability measure, etc. can also be considered.
[0046] In some embodiments, calculating the current pose of the robot end-effector based on the current joint angles of the serial robot (i.e., step S101) may include: receiving the kinematic model of the serial robot, where the kinematic model is used to define the joint configuration space and joint speeds; and performing forward kinematics calculation based on the current joint angles of the serial robot and the kinematic model to obtain the current pose.
[0047] In the above embodiments, first, the kinematic model of the serial robot is received, and this kinematic model defines the joint configuration space and joint speeds. Based on the current joint angles, the current pose of the robot end-effector is obtained through forward kinematics calculation. Forward kinematics calculation provides the mapping relationship from joint angles to the robot end-effector pose and is the basis for inverse kinematics solution. The above embodiments improve the efficiency of inverse kinematics solution and meet the requirements of robot real-time control through the combination of forward kinematics calculation and numerical iterative calculation based on differential inverse kinematics.
[0048] As an example, a serial robot is established as a kinematic model of joints and linkages. In the kinematic model, the joint configuration space is as follows:
[0049]
[0050] where q1, q2, …, q n are the joint angles corresponding to the joints numbered 1, 2, …, n respectively. The joint velocity is expressed as, for example, The forward kinematics is to obtain the end pose p(q) of the robot based on the joint configuration space, and the inverse kinematics is to find the corresponding joint configuration space given the desired end pose.
[0051] Next, the tasks are defined. The tasks can include pose tasks and tasks other than pose tasks. First, the pose tasks will be described. The pose tasks can include position tasks and orientation tasks, and the pose error can be determined based on the position error and the orientation error.
[0052] The objective equation corresponding to the position error for the position task can be defined as follows, for example:
[0053] e(q) = p * ― p(q)
[0054] where p * is the target position of the robot end, and p(q) is the current position of the robot end based on the forward kinematics. When e(q) is zero, it is considered that the end Cartesian position task is completed, as follows:
[0055] p(q) = p *
[0056] q = p ―1 (p * )
[0057] where p ―1 is the position inverse kinematics.
[0058] The objective equation corresponding to the orientation error for the orientation task can be defined as follows, for example:
[0059]
[0060] e(q) = log(R * R(q) ―1 )
[0061] where R * is the target orientation of the robot end, and R(q) is the current orientation of the robot end based on the forward kinematics. When e(q) is zero, the end Cartesian orientation task is completed at this time. The orientation inverse kinematics is similar to the position inverse kinematics and will not be elaborated here.
[0062] Combining the position task and the pose task, for the Cartesian space pose multi-task, the corresponding target equations of the pose task can be represented by a system of equations as follows:
[0063]
[0064] As an example, the Jacobian matrix can be used to relate the joint velocity to the spatial velocity as follows:
[0065]
[0066] where, V is, for example, a six-dimensional spatial velocity, which can be considered as the deviation velocity corresponding to the target pose of the robot end effector, and J(q) is the Jacobian matrix. For a redundant degree-of-freedom robot, such as a 7-degree-of-freedom robotic arm,
[0067] the number of joint freedoms is greater than the dimension of the desired joint velocity. At this time, Moore-Penrose pseudo-inverse (i.e., Moore-Penrose generalized inverse) calculation is performed to obtain the joint velocity and the corresponding angular change:
[0068] e(q) = J(q) + δq
[0069] where the superscript + is the pseudo-inverse symbol, and J(q) + is the pseudo-inverse of the Jacobian matrix J(q).
[0070] In some embodiments, the pose error can be represented by an error twist.
[0071] In the above embodiments, the pose error between the target pose and the current pose is converted into an error twist, that is, the difference between the target pose and the current pose is represented in the form of a twist. Specifically, the difference between the target pose and the current pose (including the differences in position and orientation) can be converted into a six-dimensional vector, which is described as the instantaneous motion required for the robot end effector to move from the current pose to the target pose. Among them, the pose includes position and orientation. The position can be represented by a three-dimensional vector, and the orientation can be represented by a rotation matrix, a quaternion, or Euler angles. A twist is, for example, a six-dimensional vector, where the first three components represent the angular velocity and the last three components represent the linear velocity.
[0072] The related numerical iteration method based on differential inverse kinematics, such as the Newton iteration method, is a numerical solution for inverse kinematics. However, when the Jacobian J(q) is within the singular interval, the obtained joint velocity will be very large, and it is also difficult to satisfy the physical constraints of a real robot such as joint velocity, joint acceleration, and torque constraints. By using the solution method based on whole-body optimal control, the above constraints can be added to the constraint conditions.
[0073] In some embodiments, in step S102, the optimizing solution based on the target physical constraint conditions to obtain the optimal joint velocity may include: under the condition of satisfying the target physical constraint conditions, using the joint velocity as the optimization variable of the optimization objective function, and calculating the optimal joint velocity that minimizes the optimization objective function. The optimization objective function includes a pose task optimization term corresponding to the pose task, and the pose task optimization term is based on and e; where V is the six-dimensional space velocity, J(q) is the Jacobian matrix, q is the joint angle, is the joint velocity, and e is the error screw.
[0074] In some embodiments, the target physical constraint conditions may include one or more of joint velocity constraint conditions, joint angle constraint conditions, and joint acceleration constraint conditions.
[0075] In some embodiments, the target physical constraint conditions may include joint velocity constraint conditions, joint angle constraint conditions, and joint acceleration constraint conditions. Under the condition of satisfying the target physical constraint conditions, using the joint velocity as the optimization variable of the optimization objective function and calculating the optimal joint velocity that minimizes the optimization objective function may include:
[0076] Performing a first-order approximation on the target physical constraint conditions, so as to represent the joint angle and joint acceleration in the optimization objective function as expressions containing the joint velocity based on the step size;
[0077] Using the joint velocity and the currently measured current joint angle as inputs, using the joint velocity as the optimization variable, and using a target quadratic programming solver to calculate the optimal joint velocity that minimizes the optimization objective function.
[0078] In some embodiments, the expression of the pose task optimization term in the optimization objective function is as follows:
[0079]
[0080] For differential kinematics such as the pseudo-inverse is the optimal solution for the above least-squares optimal problem.
[0081] where For the optimization variables, For the optimal solution that minimizes the optimization objective function, there is a pseudoinverse as its closed-form solution:
[0082]
[0083] If the six-dimensional pose of differential kinematics is regarded as six separate tasks, the optimization objective function can be written in the weighted least squares form as follows:
[0084]
[0085] where the subscript i is the serial number of the six separate tasks corresponding to the above six-dimensional pose, and ω i is the weight of the i-th task. At this time, the joint velocity constraint condition can be directly added to the optimization objective function as follows:
[0086]
[0087] That is, the target equation corresponding to the joint velocity constraint condition is represented by an inequality system of equations. The above formula is weighted full-body optimization. Compared with the pseudoinverse method for solving the unconstrained optimization, the optimization solution scheme based on the above formula can solve the differential inverse kinematics problem under velocity constraints. And the above optimization problem is a convex quadratic optimization problem with linear constraints, and a specified solver can be used to solve the above problem. Among them, the solver is, for example, a quadratic programming solver, that is, a QP solver.
[0088] In addition to the joint velocity constraint condition, the joint angle constraint condition and the joint acceleration constraint condition can also be added to the optimization objective function, that is:
[0089]
[0090] where h is the step size, is the joint acceleration, is the actual joint velocity. That is, the target equations corresponding to the joint angle constraint condition and the joint acceleration constraint condition can also be represented by an inequality system of equations. The above formula can be written in the QP optimization form as follows:
[0091]
[0092] subject to constraints.
[0093] where W is the weight matrix, J is the Jacobian matrix, {J(q) T WJ(q)} is the Hessian matrix, and {―J T We} is the gradient vector.
[0094] The above embodiments perform a first-order approximation on each physical constraint condition, and associate the optimization variables (i.e., joint velocities) with joint angles and joint accelerations based on the step size h. Receive the current joint angle q and joint velocity calculation results obtained from actual measurements as inputs, use the joint velocity as the optimization variable, and use a QP solver to perform optimization. Among them, the Euler approximation of the position (i.e., joint angle) and the first derivative of the acceleration can be expressed in the form of joint velocity.
[0095] For a robotic arm with redundant degrees of freedom, such as a 7-degree-of-freedom robotic arm, there are infinite solutions to solve the inverse kinematics. Other tasks except the target pose can be described in the objective function to have a globally unique optimal solution.
[0096] In some embodiments, for a serial robot with redundant degrees of freedom, the optimization objective function further includes a secondary task optimization term corresponding to a secondary task other than the pose task. Thus, using the null space projection method, the secondary tasks other than the pose task are incorporated into the optimization objective function to ensure the existence of a globally unique optimal solution.
[0097] In the above embodiments, the optimization objective function includes, in addition to the pose task optimization term, optimization terms corresponding to other tasks. If the pose task is regarded as the main task (or the primary task), then other tasks can be regarded as secondary tasks.
[0098] The null space projection of the Jacobian matrix utilizes the characteristics of the null space, such that the motion in the null space does not interfere with the main task. For differential kinematics, the main task is the target pose, and the null space can specify other tasks such as the reference joint angle and manipulability. Taking the reference joint angle as an example, the joint velocity can be written as:
[0099]
[0100] where K p is the proportional control parameter, and q0 is the reference joint angle. The above proportional controller can make each joint of the robot reach the specified reference configuration.
[0101] Let N(q) be the null space of the Jacobian matrix. One solution method is, for example, n = (I - J + J), at this time the motion in the null space does not affect the main task of the target pose. Let be the second task priority. Then the complete optimization objective function including the main task and the secondary tasks can be written in the following form:
[0102]
[0103] subject to constraints.
[0104] where ∈ is a scalar weight coefficient of the second priority, and its value is, for example, 0.01, which can be selected as needed.
[0105] Write the above formula in the QP optimization form, that is:
[0106]
[0107] subject to constraints.
[0108] where H = J(q) T WJ(q)+∈N T N is the Hessian matrix, g = -J T We - ∈*N T NK p (q0 - q) is the gradient vector.
[0109] In some embodiments, the integrating the optimal joint velocity into the current joint angle to update the current joint angle (i.e., step S103) may include: using the optimal joint velocity as an increment, adding the optimal joint velocity to the current joint angle to achieve the update of the current joint angle.
[0110] See Figure 2 , Figure 2 which is a schematic flowchart of another inverse kinematics solution method for a serial robot provided by an embodiment of the present application.
[0111] The embodiment of the present application abstractly describes the robot inverse kinematics solution algorithm based on global optimal control as a QP optimization problem at the velocity level. At this time, the inverse kinematics solution is a local differential approximation. For the global IK problem (i.e., inverse kinematics) at the position (i.e., joint angle) level, the SQP (Sequential Quadratic Programming) idea can be adopted, and the basic algorithm flow is as Figure 2As shown. Given the desired pose (i.e., the target pose) X_des, the current pose X_cur can be calculated based on the current joint angles q_cur. If the pose error X_err between the desired pose and the current pose is less than the specified threshold (i.e., the target error) tol, such as 10e-6, then the current joint angles q_cur are considered the solution to the inverse kinematics problem. If the pose error X_err is greater than or equal to tol, then an optimal solution for the joint velocity dq is obtained through optimization and integration is performed to update the current joint angles q_cur, and the iteration count iter is incremented by one. When the convergence threshold condition is met within the maximum iteration count iter_max, the solution is successful; otherwise, the solution fails. In the case of a failed solution, the optimal solution can be returned, such as the optimal joint velocity dq obtained in the most recent iteration.
[0112] The above embodiment provides a method for solving the inverse kinematics of a serial robot with arbitrary degrees of freedom considering joint limits. According to the target pose task of the robot end, the inverse kinematics solution of the robot is determined under the constraint of joint limits. And for a redundant manipulator with seven degrees of freedom, for example, on the premise of satisfying the high-priority target pose task of the robot end, tasks with lower priority such as the reference configuration can be executed in the null space. Since the above method is a numerical optimization method, it can be applied to serial robots with arbitrary configurations and arbitrary degrees of freedom, and the inverse kinematics problem of any serial configuration robot can be solved. The above method is a sequential convex optimization iteration method and can solve the inverse kinematics problem at the microsecond level. Regarding the joint limits as constraints, the solved joint angles will definitely not exceed the joint limits, unlike the related closed solutions, which sometimes solve for solutions that exceed the joint limits. In addition, the above method makes full use of all degrees of freedom of the robot. Besides satisfying the pose task constraints of the end, it can also consider the reference joint configuration, the manipulability measure, etc., and has strong practicability and can meet the diverse needs of users.
[0113] The embodiment of the present application also provides a serial robot, and the serial robot includes a control module, and the control module is used to execute any one of the above methods.
[0114] In some embodiments, the serial robot may further include one or more sensors. One or more sensors may include, for example, one or more of an angle encoder, a torque sensor, a current sensor, and a six-axis force sensor.
[0115] The embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements any one of the above methods.
[0116] The embodiments of the present application also provide a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements any of the above methods.
[0117] The computer program product can be a portable compact disc read-only memory (CD-ROM) and includes program code, and can run on a terminal device, such as a personal computer. However, the computer program product of the present application is not limited to this. The computer program product can adopt any combination of one or more computer-readable media.
[0118] The embodiments of the present application also provide a computer device, which includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, it implements any of the above methods.
[0119] See Figure 3 , Figure 3 is a structural block diagram of a computer device provided by the embodiments of the present application.
[0120] The embodiments of the present application do not limit the computer device. For example, it can be a local computer device, a cloud computer device, a distributed computer device, etc.
[0121] The computer device can include: a memory 110, a processor 120, and a communication interface 130. Among them, the memory 110, the processor 120, and the communication interface 130 are connected through an internal connection path.
[0122] The memory 110 is used to store a computer program. In some implementation manners, the computer program can include code for implementing the method of the embodiments of the present application.
[0123] The processor 120 is used to execute the computer program stored in the memory 110 to control the communication interface 130 to receive input data and information and output operation result data, etc. In some implementation manners, when implementing the solution of the embodiments of the present application through software or firmware, the computer program for implementing the solution of the embodiments of the present application can be stored in the processor 120 and executed by the processor 120.
[0124] The memory 110 can be a volatile memory, a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM). It should be noted that the memory 110 described herein is intended to include, but is not limited to, any of these and other suitable types of memories. As an example, the memory 110 includes a random access memory (RAM), a cache memory, and a read-only memory (ROM). Among them, the memory 110 stores a computer program, and the computer program can be executed by the processor 120, so that the processor 120 implements the steps of any of the above methods.
[0125] The processor 120 can be a central processing unit (CPU), and the processor 120 can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, or, the processor 120 can also be any conventional processor, etc.
[0126] In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in the processor 120 or the instructions in the form of software. The method disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by a hardware processor, or executed and completed by a combination of the hardware and software modules in the processor 120. The software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory 110, and the processor 120 reads the information in the memory 110 and combines its hardware to complete the steps of the above method. To avoid repetition, it will not be described in detail here.
[0127] In some implementations, in addition to the hardware units described above, a computer device may further include software modules. Among them, the software modules may be, for example, an operating system, a Basic Input Output System (BIOS), application software, etc.
[0128] The operating system is used to manage the hardware and / or software resources of a computer device and is the kernel and cornerstone of the computer device. The operating system needs to handle basic tasks such as managing and configuring memory, determining the priority order of system resource supply and demand, controlling input and output devices, operating the network, and managing the file system. To facilitate user operation, most operating systems provide a user interface for the user to interact with the system.
[0129] The BIOS is used to perform hardware initialization during the power-on boot phase and provide runtime services for the operating system and application programs. In some implementations, the BIOS can also monitor the display processor temperature and perform functions such as adjusting the temperature protection strategy.
[0130] Application software, also known as an application program, can be understood as software written for a specific application purpose of users and is one of the main classifications of computer software. For example, the application software can be a program for achieving purposes such as power control and temperature management.
[0131] It can be understood that the specific examples in this specification are only to help those skilled in the art better understand the implementation manners of the present application, rather than limiting the protection scope of the present application.
[0132] It can be understood that in various implementation manners of this specification, the magnitudes of the sequence numbers of the various processes do not mean the order of execution. The order of execution of the various processes should be determined by their functions and internal logics, and should not constitute any limitation to the implementation process of the present application.
[0133] It can be understood that the various implementation manners described in this specification can be implemented alone or in combination, and the present application does not limit this.
[0134] Unless otherwise specified, all technical and scientific terms used in this specification have the same meaning as commonly understood by those skilled in the technical field of this specification. The terms used in this specification are only for the purpose of describing specific implementation manners and are not intended to limit the scope of this specification. The term "and / or" used in this specification includes any and all combinations of one or more of the related listed items. The singular forms of "a", "above", and "the" used in this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0135] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this specification.
[0136] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described embodiments can refer to the corresponding processes in other embodiments, and will not be elaborated herein.
[0137] In the several embodiments provided in this specification, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the couplings or direct couplings or communication connections shown or discussed with each other can be through some interfaces. The indirect couplings or communication connections of devices or units can be electrical, mechanical, or other forms.
[0138] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they can be located in one place, or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the technical solution of this application.
[0139] In addition, in each embodiment of this specification, the functional units can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.
[0140] If a function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this specification, in essence, or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this specification. The aforementioned storage medium includes: various media that can store program codes such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs.
[0141] The above are only the specific embodiments of this specification, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed in this specification can easily think of changes or substitutions, which should all be covered by the protection scope of this specification. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.
Claims
1. An inverse kinematics solution method for a serial robot, characterized in that, The method includes: Calculating the current pose of the robot end according to the current joint angles of the serial robot; When the pose error between the current pose and the target pose is not less than the target error, performing differential inverse kinematics calculation to obtain the joint velocities, and based on the target physical constraint conditions, performing an optimization solution to obtain the optimal joint velocities, so that the solved optimal joint angles satisfy the corresponding target physical constraint conditions of the joints of the serial robot; the optimization solution is performed based on the whole-body optimal control strategy; Integrating the optimal joint velocities into the current joint angles to update the current joint angles until the pose error between the current pose calculated based on the current joint angles and the target pose is less than the target error or the target iteration times are exceeded; Performing motion control on the serial robot based on the current joint angles after the iteration ends; Wherein, the target physical constraint conditions include one or more of joint velocity constraint conditions, joint angle constraint conditions, and joint acceleration constraint conditions, and the performing an optimization solution based on the target physical constraint conditions to obtain the optimal joint velocities includes: With the joint velocity as the optimization variable of the optimization objective function under the condition of satisfying the target physical constraint conditions, calculate the optimal joint velocity that minimizes the optimization objective function. The optimization objective function includes a pose task optimization term corresponding to the pose task, and the pose task optimization term is determined based on and e; Among them, V is the six-dimensional space velocity, J(q) is the Jacobian matrix, q is the joint angle, is the joint velocity, and e is the pose error.
2. The inverse kinematics solution method for the serial robot according to claim 1, characterized in that The calculating the current pose of the robot end according to the current joint angles of the serial robot includes: Receiving the kinematic model of the serial robot, where the kinematic model is used to define the joint configuration space and joint velocities; Performing forward kinematics calculation according to the current joint angles of the serial robot and the kinematic model to obtain the current pose.
3. The inverse kinematics solution method of the serial robot according to claim 1, characterized in that, The pose error is represented by an error screw.
4. The inverse kinematics solution method of the serial robot according to claim 1, characterized in that, The target physical constraint conditions include joint velocity constraint conditions, joint angle constraint conditions, and joint acceleration constraint conditions. When the target physical constraint conditions are satisfied, with the joint velocity as the optimization variable of the optimization objective function, calculating the optimal joint velocity that minimizes the optimization objective function includes: Performing a first-order approximation on the target physical constraint conditions, so as to represent the joint angles and joint accelerations in the optimization objective function as expressions containing joint velocities based on the step size; Using the joint velocity and the actually measured current joint angles as inputs, using the joint velocity as the optimization variable, and using a target quadratic programming solver to calculate the optimal joint velocity that minimizes the optimization objective function.
5. The inverse kinematics solution method for the serial robot according to claim 1, characterized in that For a serial robot with redundant degrees of freedom, the optimization objective function further includes a secondary task optimization term corresponding to a secondary task other than the pose task, so that the null space projection method is adopted to incorporate the secondary tasks other than the pose task into the optimization objective function to ensure the existence of a globally unique optimal solution.
6. A serial robot, characterized in that, The serial robot includes a control module, and the control module is used to execute the method according to any one of claims 1 to 5.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
8. A computer device, characterized in that, The computer device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Repetitive movement planning method for redundancy mechanical arm
CN106945041A
Manipulator servo control method, system and device based on screw theory
CN109483529A