WO2023024278A1 - Robot joint pose optimization method, robot control method, and robot - Google Patents

Robot joint pose optimization method, robot control method, and robot Download PDF

Info

Publication number
WO2023024278A1
WO2023024278A1 PCT/CN2021/131673 CN2021131673W WO2023024278A1 WO 2023024278 A1 WO2023024278 A1 WO 2023024278A1 CN 2021131673 W CN2021131673 W CN 2021131673W WO 2023024278 A1 WO2023024278 A1 WO 2023024278A1
Authority
WO
WIPO (PCT)
Prior art keywords
joint
robot
angular velocity
optimization
optimization function
Prior art date
Application number
PCT/CN2021/131673
Other languages
French (fr)
Chinese (zh)
Inventor
刘益彰
熊友军
罗璇
张志豪
陈春玉
葛利刚
Original Assignee
深圳市优必选科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市优必选科技股份有限公司 filed Critical 深圳市优必选科技股份有限公司
Publication of WO2023024278A1 publication Critical patent/WO2023024278A1/en

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1602Programme controls characterised by the control system, structure, architecture
    • B25J9/161Hardware, e.g. neural networks, fuzzy logic, interfaces, processor
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1602Programme controls characterised by the control system, structure, architecture
    • B25J9/1607Calculation of inertia, jacobian matrixes and inverses
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1628Programme controls characterised by the control loop
    • B25J9/163Programme controls characterised by the control loop learning, adaptive, model based, rule based expert control
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1628Programme controls characterised by the control loop
    • B25J9/1651Programme controls characterised by the control loop acceleration, rate control
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1656Programme controls characterised by programming, planning systems for manipulators
    • B25J9/1661Programme controls characterised by programming, planning systems for manipulators characterised by task planning, object-oriented languages

Definitions

  • the present application relates to the technical field of robot control, in particular to a robot joint pose optimization method, a robot control method and a robot.
  • Robots generally have multiple degrees of freedom, and through the coordination of multiple degrees of freedom to complete various tasks, in order to increase the range of motion and flexibility of the robot, many robots have added redundant joints, but the processing of redundant joints generally requires Very complex logic processing and classification calculations, which bring many challenges to the control of the robot.
  • some methods such as Newton's method are used to calculate the kinematic inverse solution in motion planning, which not only takes a long time to calculate, but also is difficult to calculate. , which leads to a longer total time for motion planning and lower planning efficiency.
  • the embodiment of the present application provides a robot joint pose optimization method, a robot control method, and a robot.
  • the optimization method uses the idea of double-layer optimization to deal with joint redundancy, and can obtain better joint angles to ensure that the robot can be completed first.
  • the speed task of the joints in the Cartesian space also makes each joint angle have a large range of motion.
  • Embodiments of the present application provide a method for optimizing robot joint poses, including:
  • the first optimization function includes the inequality constraint and the equality constraint including the slack variable that the joint angular velocity satisfies;
  • the second optimization function includes the constraint condition that the joint angular velocity satisfies and contains the same slack variable
  • An optimal joint angle of the robot is obtained according to the optimal joint angular velocity, and a pose of the robot joint is optimized according to the optimal joint angle of the robot.
  • the inequality constraint satisfied by the joint angular velocity is obtained through the following steps, including:
  • a synthetic constraint to obtain the joint angular velocity is constructed as the inequality constraint.
  • the first constraint condition is:
  • i-th joint angle in, and are the upper and lower limits of the i-th joint angle, respectively; is the i-th joint angle at time t; is the joint angular velocity of the i-th joint; T is the control command cycle of the robot.
  • the second constraint is:
  • the first optimization function takes the square of the slack variable as the optimization index
  • w is the slack variable
  • J is the speed Jacobian matrix of the robot
  • J is the joint angular velocity vector of all joints of the robot
  • the second optimization function uses the Euclidean distance between the joint angle and the joint limit as the optimization index
  • q is described Euclidean distance; and are the upper and lower limits of the i-th joint angle, respectively; is the i-th joint angle at time t.
  • the constraints containing the same slack variable of the second optimization function are the same as the equality constraints of the first optimization function, and the second optimization function further includes that the joint angular velocity satisfies The inequality constraints of ;
  • i-th joint angle at time t-1 is the i-th joint angle at time t-1; T is the control instruction period of the robot; w is the relaxation variable, J is the speed Jacobian matrix of the robot, is the joint angular velocity vector of all joints of the robot; is the terminal velocity vector of the robot; and are the upper and lower limits of the i-th joint angle, respectively; and are the upper and lower limits of the i-th joint angular velocity, respectively; and are the upper limit and lower limit of the i-th joint angular acceleration, respectively; and are the i-th joint angular velocity at time t-1 and time t, respectively.
  • Embodiments of the present application also provide a robot control method, including:
  • the robot is controlled to perform corresponding operations according to the optimized joint poses.
  • An embodiment of the present application also provides a robot, the robot includes a processor and a memory, the memory stores a computer program, and the processor is used to execute the computer program to implement the above-mentioned robot joint pose optimization method or robot Control Method.
  • Embodiments of the present application also provide a readable storage medium, which stores a computer program, and when the computer program is executed by a processor, implements the above-mentioned robot joint pose optimization method or robot control method.
  • the robot joint pose optimization method of the embodiment of the present application adopts the idea of double-layer optimization to deal with joint redundancy, by constructing the first optimization function with the joint angular velocity as the optimization variable, the robot terminal speed as the control target, and the joint angle away from the joint
  • the limit is the second optimization function of the control target.
  • the same slack variable is introduced into the two optimization functions and corresponding constraints are added, and the joint angle is optimally solved by combining the two optimization functions, which can ensure that the obtained solution can Prioritize the completion of the Cartesian space task, and on this basis, leave enough margin for each joint angle, so as to stay away from the joint limit.
  • the joint pose optimization method is not only suitable for joint angle optimization of rotational joint robots, but also suitable for joint position optimization of translational joints and translation-rotation hybrid robots, and has strong universality.
  • FIG. 1 is a schematic diagram of the first flow chart of the robot joint pose optimization method of the embodiment of the present application
  • FIG. 2 is a schematic diagram of the second flow chart of the robot joint pose optimization method of the embodiment of the present application
  • FIG. 3 is a schematic flow diagram of a robot control method in an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of a robot joint pose optimization device according to an embodiment of the present application.
  • the quadratic programming problem is mainly the process of selecting the optimal solution from multiple solutions under the constraints of equality and inequality.
  • the main form of the quadratic programming problem is as follows:
  • H is a Hessian matrix
  • x is an n-dimensional optimization variable
  • f is a row vector
  • a eq is an mxn (m ⁇ n) dimensional matrix
  • b eq is m Row and column vector
  • Ax ⁇ b is an inequality constraint
  • A is a matrix with n columns
  • b is a column vector.
  • the range of motion and flexibility of the robot are often increased by adding redundant joints.
  • the existing processing of redundant joints is generally very complicated and takes a long time to calculate, and there are certain limitations in practical use.
  • considering the characteristics of the robot's own structure it often has various constraints such as joint angles, joint angular velocities, and joint torques in different application scenarios.
  • Optimal kinematics inverse solution the embodiment of the present application will use the quadratic programming problem to optimize the solution, specifically, the joint angle is optimized and solved by constructing a double-layer optimization index (ie, a double-layer quadratic optimization problem).
  • the robot joint pose optimization method of the embodiment of the present application constructs the first optimization function with the joint angular velocity as the optimization variable and the robot end speed as the control target, and the joint angular velocity as the optimization variable and the joint angle away from the joint limit as the control target
  • the second optimization function and introduce the same slack variable to these two optimization functions and add corresponding constraints.
  • FIG. 1 is a schematic diagram of a first flowchart of a method for optimizing a joint pose of a robot according to an embodiment of the present application.
  • the robot joint pose optimization method includes:
  • Step S110 constructing a first optimization function with the joint angular velocity as the optimization variable and the robot terminal velocity as the control objective, the first optimization function includes the inequality constraints that the joint angular velocity satisfies and the equality constraints including slack variables.
  • a quadratic programming problem is constructed here with the joint angular velocity as the control variable and the end velocity as the control target, which is the above-mentioned first optimization function. It can be understood that the "first" in the first optimization function is mainly used to distinguish it from other optimization functions mentioned later.
  • the first optimization function will introduce a slack variable, and obtain the index to be optimized based on the slack variable.
  • the optimization index may be the square of the slack variable, etc., of course, may also take other forms related to the slack variable, which are not limited here.
  • the first optimization function will also be added with corresponding constraints, which mainly include equality constraints with slack variables that the joint angular velocity satisfies, and inequality constraints that are directly or indirectly related to the joint angular velocity, so as to ensure that the obtained joint angular velocity
  • constraints which mainly include equality constraints with slack variables that the joint angular velocity satisfies, and inequality constraints that are directly or indirectly related to the joint angular velocity, so as to ensure that the obtained joint angular velocity
  • the optimal solution can achieve the speed index of the terminal under the constraints of each joint.
  • the velocity Jacobian matrix of the robot can reflect the relationship between the angular velocity of each joint and the terminal velocity, in the case of introducing the slack variable, the equality constraint equation satisfied by the joint angular velocity, the slack variable and the terminal velocity will be constructed here.
  • the inequality constraints of the first optimization function may include, but are not limited to, joint angle constraints, physical constraints on joint angular velocity itself, and joint angular acceleration constraints, for example.
  • the inequality constraints satisfied by the joint angular velocity can be obtained through the following steps, including:
  • Step S210 constructing joint angle constraints that each joint of the robot satisfies in a corresponding control period, and converting the joint angle constraints into a first constraint condition with joint angular velocity as a variable.
  • joint limit constraints satisfied by each joint angle of the robot are first constructed, and then converted to obtain the corresponding joint angular velocity constraints.
  • the above-mentioned joint limit mainly refers to the limit of the joint position; and for robots with rotary joints, the above-mentioned joint limit mainly refers to Limits on joint angles.
  • Step S220 construct the joint angular acceleration constraints that each joint satisfies in the corresponding control period, and convert the joint angular acceleration constraints into a second constraint condition with the joint angular velocity as a variable.
  • this embodiment will first construct the constraints that the angular acceleration of each joint of the robot satisfies, and then convert to obtain the corresponding joint angular velocity constraint.
  • Step S230 based on the first constraint condition, the second constraint condition and the self-constraint of the joint angular velocity, construct a composite constraint to obtain the joint angular velocity as the above-mentioned inequality constraint.
  • the robot also has joint angular velocity constraints, assuming that the upper limit of the i-th joint angular velocity is The lower limit is Then, the self-constraint of joint angular velocity can be expressed as:
  • joint angle (or joint position) constraint joint angular velocity constraint and joint angular acceleration constraint to obtain the composite inequality constraint of joint angular velocity is only an example of adding inequality, and in actual application, you can also add more There are many constraints, which are not limited here.
  • the first optimization function if the square of the slack variable is used as the optimization index, and the corresponding equality constraint equation and inequality constraint are constructed, the first optimization function can be written as follows:
  • Step S120 constructing a second optimization function with the joint angular velocity as the optimization variable and the robot's joint angle away from the joint limit as the control objective, the second optimization function includes the constraint conditions with the same slack variable that the joint angular velocity satisfies.
  • another quadratic programming problem that is, the above-mentioned second optimization function
  • the second optimization function uses the Euclidean distance between the joint angle and the joint limit as the optimization index.
  • Euclidean distance In addition to the Euclidean distance, other calculation formulas that can reflect the joint angle and the joint limit can also be used , is not limited here.
  • q is the Euclidean distance; and are the upper and lower limits of the i-th joint angle, respectively; is the i-th joint angle at time t.
  • a double-layer quadratic programming problem is used to comprehensively solve an optimal joint angular velocity.
  • the joint angular velocity of the second optimization function in order to make the joint angular velocity finally solved under the premise of ensuring the end velocity of the Cartesian space control, further make each joint If the angle gradually approaches the optimal solution, the joint angular velocity of the second optimization function also needs to add corresponding constraints.
  • the joint angular velocity of the second optimization function may add an equality constraint including the same slack variable and an inequality constraint related to the joint angular velocity.
  • the second optimization function if the optimization index of each joint angle is farthest from the joint limit as an example, and the same equality constraint equation and inequality constraint as the first optimization function are added, the second optimization function can be written as In the following form:
  • step S130 the solution of the slack variable is obtained by solving according to the first optimization function, and the optimal joint angular velocity is obtained according to the solution of the slack variable and the second optimization function.
  • an open-source solver can be used to optimally solve the first optimization function to obtain the joint angular velocity and the solution of the slack variable; then, use the solved slack variable
  • the solution of the second optimization function is optimally solved, and the optimal joint angular velocity can be obtained at this time, which is the required joint angular velocity.
  • step S140 the optimal joint angle of the robot is obtained according to the optimal joint angular velocity, and the pose of the robot joint is optimized according to the optimal joint angle of the robot.
  • the optimal joint angle can be obtained through an integral operation. Furthermore, the posture (such as angle or position) of the robot joints can be adjusted according to the optimal joint angles, so as to ensure that the robot can perform corresponding task operations.
  • the joint pose optimization method of the robot in this embodiment uses the idea of double-layer optimization to deal with the problem of joint redundancy, by constructing the first optimization function that takes the joint angular velocity as the optimization variable, the robot end speed as the control target and introduces the slack variable, and The second optimization function that takes the joint angle away from the joint limit as the control target and introduces the same slack variable, and adds synthetic constraints such as the angle, angular velocity, and angular acceleration of each joint to these two optimization functions, where the second optimization
  • the function is further solved for joint angular velocity within the range of joint angle constraints satisfied by the first optimization function, so it can be realized that under various joint constraint conditions, the velocity task in Cartesian space can be completed first, and on this basis, each joint angle can be given Sufficient margin is left, that is, it has a large activity margin.
  • the method is versatile and can be used to automatically optimize the joint positions or joint angles of various types of robots such as rotational joints, translational joints, and translational-rotation
  • this embodiment proposes a robot control method.
  • -Robots and the like in mixed motion are not limited here.
  • the rotating joint type robot means that the robot drives the robot joints connected to the steering gear through the steering gear outputting the rotation angle to realize the movement corresponding to the rotation angle.
  • the robot of the translational joint type means that the robot drives the robot joints connected to the steering gear through the steering gear outputting the linear displacement to realize the movement corresponding to the translation angle.
  • the robot has redundant joints, and various tasks can be completed by coordinating these redundant joints.
  • the robot control method includes:
  • Step S310 acquiring state parameters related to joint angular velocity of the robot in the current control command cycle.
  • Step S320 using the robot joint pose optimization method to optimize the joint pose of the next control command cycle according to the state parameters.
  • state parameters need to be obtained can be determined according to the constructed first optimization function and the second optimization function. These state parameters can be directly collected by sensors, etc., or can be obtained through calculation and processing of collected data. What is obtained later is not limited here.
  • the joint angle corresponding to the control command cycle, the expected terminal velocity, and the Jacobian matrix can be obtained, and then the known quantities are substituted into the optimization function to be used to calculate the joint angular velocity.
  • the optimization variable and the slack variable are solved, and the second optimization function is the same.
  • Step S330 controlling the robot to perform corresponding operations according to the optimized joint poses.
  • these joint angles or joint positions required for the next control command cycle of the robot are obtained, these joint angles or joint positions are sent as commands to the corresponding joint motors, so that the robot performs corresponding operations, for example, can It is robot obstacle avoidance task, human-computer interaction task, etc.
  • the robot control method of this embodiment uses the robot joint pose optimization method to automatically optimize the joint pose, so that the robot joint position can always have the largest activity margin under the premise of ensuring the Cartesian space pose. .
  • the robot joint pose optimization device 100 includes:
  • the construction module 110 is used to construct a first optimization function with the joint angular velocity as the optimization variable and the robot terminal velocity as the control target, the first optimization function includes the inequality constraint and the equality constraint including the slack variable that the joint angular velocity satisfies.
  • the construction module 110 is also used to construct a second optimization function with the joint angular velocity as the optimization variable and the joint angle of the robot away from the joint limit as the control target, the second optimization function includes the same slack that the joint angular velocity satisfies Variable constraints.
  • the solving module 120 is configured to solve according to the first optimization function to obtain the solution of the slack variable, and obtain the optimal joint angular velocity according to the solution of the slack variable and the second optimization function.
  • the solving module 120 is also used to obtain the optimal joint angle of the robot according to the optimal joint angular velocity.
  • An optimization module 130 configured to optimize the poses of the robot joints according to the optimal joint angles of the robot.
  • the device in this embodiment corresponds to the method in the above-mentioned embodiment 1, and the optional items in the above-mentioned embodiment 1 are also applicable to this embodiment, so the description will not be repeated here.
  • the present application also provides a robot.
  • the robot includes a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program so that the robot performs the above-mentioned robot joint pose optimization method Or the functions of each module in the above-mentioned robot joint pose optimization device.
  • the present application also provides a readable storage medium for storing the computer program used in the above robot.
  • each block in a flowchart or block diagram may represent a module, program segment, or part of code that includes one or more Executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flow diagrams, and combinations of blocks in the block diagrams and/or flow diagrams can be implemented by a dedicated hardware-based system that performs the specified function or action. may be implemented, or may be implemented by a combination of special purpose hardware and computer instructions.
  • each functional module or unit in each embodiment of the present application may be integrated to form an independent part, each module may exist independently, or two or more modules may be integrated to form an independent part.
  • the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially 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, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a smart phone, a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc., which can store program codes. .

Abstract

Disclosed are a robot joint pose optimization method, a robot control method, and a robot. The method comprises: constructing a first optimization function using joint angular velocity as an optimization variable and robot terminal velocity as a control target, the first optimization function comprising an inequality constraint satisfied by the joint angular velocity and an equality constraint including a slack variable; constructing a second optimization function using joint angular velocity as the optimization variable and a joint angle away from a joint limit as a control target, the second optimization function comprising constraint conditions having the same slack variable satisfied by the joint angular velocity; solving the first optimization function to obtain a solution for the slack variable, and using the solution of the slack variable in the second optimization function to obtain an optimal joint angular velocity, thereby solving to obtain an optimal joint angle for optimizing the joint pose of the robot. The present method can achieve an optimal solution for a joint pose, causing each joint angle to consistently have a larger activity margin while still ensuring the priority of speed of task completion.

Description

机器人关节位姿优化方法、机器人控制方法和机器人Robot joint pose optimization method, robot control method and robot
相关申请的交叉引用Cross References to Related Applications
本申请要求于2021年08月24日提交中国专利局的申请号为2021109769813、名称为“机器人关节位姿优化方法、机器人控制方法和机器人”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 2021109769813 and titled "robot joint pose optimization method, robot control method and robot" filed with the China Patent Office on August 24, 2021, the entire contents of which are incorporated by reference in this application.
技术领域technical field
本申请涉及机器人控制技术领域,尤其涉及一种机器人关节位姿优化方法、机器人控制方法和机器人。The present application relates to the technical field of robot control, in particular to a robot joint pose optimization method, a robot control method and a robot.
背景技术Background technique
机器人一般具备多个自由度,通过多个自由度的协调来完成各种任务,为了增大机器人的运动范围和灵活度,很多机器人添加了冗余关节,但对于冗余关节的处理一般都需要非常复杂的逻辑处理和分类计算,这给机器人的控制带来了很多挑战。例如,在具有冗余自由度的机械臂或多足机器人的运动规划中,有的采用如牛顿法等方法来计算运动规划中的运动学逆解,不仅计算时间较长,且计算难度较高,这就导致运动规划的总时间较长、规划效率较低等。Robots generally have multiple degrees of freedom, and through the coordination of multiple degrees of freedom to complete various tasks, in order to increase the range of motion and flexibility of the robot, many robots have added redundant joints, but the processing of redundant joints generally requires Very complex logic processing and classification calculations, which bring many challenges to the control of the robot. For example, in the motion planning of robotic arms or multi-legged robots with redundant degrees of freedom, some methods such as Newton's method are used to calculate the kinematic inverse solution in motion planning, which not only takes a long time to calculate, but also is difficult to calculate. , which leads to a longer total time for motion planning and lower planning efficiency.
申请内容application content
本申请实施例提供一种机器人关节位姿优化方法、机器人控制方法和机器人,该寻优方法采用双层优化的思想来处理关节冗余,可以求解得到较优的关节角度,以保证优先完成机器人关节在笛卡尔空间的速度任务,还使得各关节角度具备较大的活动裕度。The embodiment of the present application provides a robot joint pose optimization method, a robot control method, and a robot. The optimization method uses the idea of double-layer optimization to deal with joint redundancy, and can obtain better joint angles to ensure that the robot can be completed first. The speed task of the joints in the Cartesian space also makes each joint angle have a large range of motion.
本申请的实施例提供一种机器人关节位姿优化方法,包括:Embodiments of the present application provide a method for optimizing robot joint poses, including:
构建以关节角速度为优化变量、机器人末端速度为控制目标的第一优化函数,所述第一优化函数包括所述关节角速度满足的不等式约束和含松弛变量的等式约束;Constructing a first optimization function with the joint angular velocity as the optimization variable and the robot terminal velocity as the control target, the first optimization function includes the inequality constraint and the equality constraint including the slack variable that the joint angular velocity satisfies;
构建以关节角速度为优化变量、所述机器人的关节角度远离关节限位为控制目标的第二优化函数,所述第二优化函数包括所述关节角速度满足的含相同松弛变量的约束条件;Constructing a second optimization function with the joint angular velocity as the optimization variable, and the joint angle of the robot being away from the joint limit as the control target, the second optimization function includes the constraint condition that the joint angular velocity satisfies and contains the same slack variable;
根据所述第一优化函数求解得到所述松弛变量的解,并根据所述松弛变量的解及所 述第二优化函数得到最优的关节角速度;Solving according to the first optimization function to obtain the solution of the slack variable, and obtaining the optimal joint angular velocity according to the solution of the slack variable and the second optimization function;
根据所述最优的关节角速度得出所述机器人的最优关节角度,并根据所述机器人的最优关节角度优化所述机器人关节的位姿。An optimal joint angle of the robot is obtained according to the optimal joint angular velocity, and a pose of the robot joint is optimized according to the optimal joint angle of the robot.
在一些实施例中,所述关节角速度满足的所述不等式约束通过如下步骤获取,包括:In some embodiments, the inequality constraint satisfied by the joint angular velocity is obtained through the following steps, including:
构建所述机器人各个关节在对应控制周期满足的关节角度约束,并将所述关节角度约束转换为以关节角速度为变量的第一约束条件;Constructing joint angle constraints that each joint of the robot satisfies in a corresponding control cycle, and converting the joint angle constraints into a first constraint condition with joint angular velocity as a variable;
构建各个关节在所述对应控制周期满足的关节角加速度约束,并将所述关节角加速度约束转换为以关节角速度为变量的第二约束条件;Constructing joint angular acceleration constraints that each joint satisfies in the corresponding control period, and converting the joint angular acceleration constraints into a second constraint condition with joint angular velocity as a variable;
基于所述第一约束条件、所述第二约束条件和所述关节角速度的自身限位,构建得到所述关节角速度的合成约束以作为所述不等式约束。Based on the first constraint condition, the second constraint condition, and the self-limit of the joint angular velocity, a synthetic constraint to obtain the joint angular velocity is constructed as the inequality constraint.
在一些实施例中,所述第一约束条件为:In some embodiments, the first constraint condition is:
Figure PCTCN2021131673-appb-000001
Figure PCTCN2021131673-appb-000001
其中,
Figure PCTCN2021131673-appb-000002
Figure PCTCN2021131673-appb-000003
分别为第i个关节角度的上限和下限;
Figure PCTCN2021131673-appb-000004
为t时刻的第i个关节角度;
Figure PCTCN2021131673-appb-000005
为第i个关节的关节角速度;T为所述机器人的控制指令周期。
in,
Figure PCTCN2021131673-appb-000002
and
Figure PCTCN2021131673-appb-000003
are the upper and lower limits of the i-th joint angle, respectively;
Figure PCTCN2021131673-appb-000004
is the i-th joint angle at time t;
Figure PCTCN2021131673-appb-000005
is the joint angular velocity of the i-th joint; T is the control command cycle of the robot.
在一些实施例中,所述第二约束条件为:In some embodiments, the second constraint is:
Figure PCTCN2021131673-appb-000006
Figure PCTCN2021131673-appb-000006
其中,
Figure PCTCN2021131673-appb-000007
Figure PCTCN2021131673-appb-000008
分别为第i个关节角加速度的上限和下限;
Figure PCTCN2021131673-appb-000009
Figure PCTCN2021131673-appb-000010
分别为t-1时刻和t时刻的第i个关节角速度。
in,
Figure PCTCN2021131673-appb-000007
and
Figure PCTCN2021131673-appb-000008
are the upper limit and lower limit of the i-th joint angular acceleration, respectively;
Figure PCTCN2021131673-appb-000009
and
Figure PCTCN2021131673-appb-000010
are the i-th joint angular velocity at time t-1 and time t, respectively.
在一些实施例中,所述第一优化函数以松弛变量的平方为优化指标;In some embodiments, the first optimization function takes the square of the slack variable as the optimization index;
所述第一优化函数的表达式为:The expression of the first optimization function is:
Figure PCTCN2021131673-appb-000011
Figure PCTCN2021131673-appb-000011
其中,w为松弛变量,J为所述机器人的速度雅可比矩阵,
Figure PCTCN2021131673-appb-000012
为所述机器人所有关节的关节角速度向量;
Figure PCTCN2021131673-appb-000013
为所述机器人的末端速度向量;
Figure PCTCN2021131673-appb-000014
Figure PCTCN2021131673-appb-000015
分别为第i个关节角速度的上限和下限。
Wherein, w is the slack variable, J is the speed Jacobian matrix of the robot,
Figure PCTCN2021131673-appb-000012
is the joint angular velocity vector of all joints of the robot;
Figure PCTCN2021131673-appb-000013
is the terminal velocity vector of the robot;
Figure PCTCN2021131673-appb-000014
and
Figure PCTCN2021131673-appb-000015
are the upper and lower limits of the i-th joint angular velocity, respectively.
在一些实施例中,所述第二优化函数以关节角度与关节限位的欧式距离为优化指标;In some embodiments, the second optimization function uses the Euclidean distance between the joint angle and the joint limit as the optimization index;
所述欧式距离的计算公式为:The formula for calculating the Euclidean distance is:
Figure PCTCN2021131673-appb-000016
Figure PCTCN2021131673-appb-000016
其中,
Figure PCTCN2021131673-appb-000017
in,
Figure PCTCN2021131673-appb-000017
其中,q为所述欧式距离;
Figure PCTCN2021131673-appb-000018
Figure PCTCN2021131673-appb-000019
分别为第i个关节角度的上限和下限;
Figure PCTCN2021131673-appb-000020
为t时刻的第i个关节角度。
Wherein, q is described Euclidean distance;
Figure PCTCN2021131673-appb-000018
and
Figure PCTCN2021131673-appb-000019
are the upper and lower limits of the i-th joint angle, respectively;
Figure PCTCN2021131673-appb-000020
is the i-th joint angle at time t.
在一些实施例中,所述第二优化函数的所述含相同松弛变量的约束条件与所述第一优化函数的所述等式约束相同,所述第二优化函数还包括所述关节角速度满足的所述不等式约束;In some embodiments, the constraints containing the same slack variable of the second optimization function are the same as the equality constraints of the first optimization function, and the second optimization function further includes that the joint angular velocity satisfies The inequality constraints of ;
所述第二优化函数的表达式为:The expression of the second optimization function is:
Figure PCTCN2021131673-appb-000021
Figure PCTCN2021131673-appb-000021
其中,
Figure PCTCN2021131673-appb-000022
Figure PCTCN2021131673-appb-000023
为t-1时刻的第i个关节角度;T为所述机器人的控制指令周期;w为所述松弛变量,J为所述机器人的速度雅可比矩阵,
Figure PCTCN2021131673-appb-000024
为所述机器人所有关节的关节角速度向量;
Figure PCTCN2021131673-appb-000025
为所述机器人的末端速度向量;
Figure PCTCN2021131673-appb-000026
Figure PCTCN2021131673-appb-000027
分别为第i个关节角度的上限和下限;
Figure PCTCN2021131673-appb-000028
Figure PCTCN2021131673-appb-000029
分别为第i个关节角速度的上限和下限;
Figure PCTCN2021131673-appb-000030
Figure PCTCN2021131673-appb-000031
分别为第i个关节角加速度的上限和下限;
Figure PCTCN2021131673-appb-000032
Figure PCTCN2021131673-appb-000033
分别为t-1时刻和t时刻的第i个关节角速度。
in,
Figure PCTCN2021131673-appb-000022
Figure PCTCN2021131673-appb-000023
is the i-th joint angle at time t-1; T is the control instruction period of the robot; w is the relaxation variable, J is the speed Jacobian matrix of the robot,
Figure PCTCN2021131673-appb-000024
is the joint angular velocity vector of all joints of the robot;
Figure PCTCN2021131673-appb-000025
is the terminal velocity vector of the robot;
Figure PCTCN2021131673-appb-000026
and
Figure PCTCN2021131673-appb-000027
are the upper and lower limits of the i-th joint angle, respectively;
Figure PCTCN2021131673-appb-000028
and
Figure PCTCN2021131673-appb-000029
are the upper and lower limits of the i-th joint angular velocity, respectively;
Figure PCTCN2021131673-appb-000030
and
Figure PCTCN2021131673-appb-000031
are the upper limit and lower limit of the i-th joint angular acceleration, respectively;
Figure PCTCN2021131673-appb-000032
and
Figure PCTCN2021131673-appb-000033
are the i-th joint angular velocity at time t-1 and time t, respectively.
本申请的实施例还提供一种机器人控制方法,包括:Embodiments of the present application also provide a robot control method, including:
获取机器人在当前控制指令周期的与关节角速度相关的状态参数;Obtain the state parameters related to the joint angular velocity of the robot in the current control command cycle;
根据所述状态参数利用上述的机器人关节位姿优化方法来优化下一控制指令周期的关节位姿;Utilizing the above-mentioned robot joint pose optimization method according to the state parameters to optimize the joint pose of the next control command cycle;
根据所述优化的关节位姿控制所述机器人执行相应操作。The robot is controlled to perform corresponding operations according to the optimized joint poses.
本申请的实施例还提供一种机器人,所述机器人包括处理器和存储器,所述存储器存储有计算机程序,所述处理器用于执行所述计算机程序以实施上述的机器人关节位姿优化方法或机器人控制方法。An embodiment of the present application also provides a robot, the robot includes a processor and a memory, the memory stores a computer program, and the processor is used to execute the computer program to implement the above-mentioned robot joint pose optimization method or robot Control Method.
本申请的实施例还提供一种可读存储介质,其存储有计算机程序,所述计算机程序被处理器执行时,实施上述的机器人关节位姿优化方法或机器人控制方法。Embodiments of the present application also provide a readable storage medium, which stores a computer program, and when the computer program is executed by a processor, implements the above-mentioned robot joint pose optimization method or robot control method.
本申请的实施例具有如下有益效果:Embodiments of the application have the following beneficial effects:
本申请实施例的机器人关节位姿优化方法采用双层优化的思想来处理关节冗余,通过构建以关节角速度为优化变量、机器人末端速度为控制目标的第一优化函数,以及以关节角度远离关节限位为控制目标的第二优化函数,对这两个优化函数引入相同的松弛变量并添加相应的约束条件,并联合这两个优化函数进行关节角度最优求解,可以保证求解到的解能够优先完成笛卡尔空间任务,并在此基础上给各个关节角度留有足够的余量,从而远离关节限位。此外,该关节位姿优化方法除了适用于转动关节机器人的关节角度优化外,同样适用于平动关节及平动-转动混合的机器人的关节位置优化,具备较强的普适性。The robot joint pose optimization method of the embodiment of the present application adopts the idea of double-layer optimization to deal with joint redundancy, by constructing the first optimization function with the joint angular velocity as the optimization variable, the robot terminal speed as the control target, and the joint angle away from the joint The limit is the second optimization function of the control target. The same slack variable is introduced into the two optimization functions and corresponding constraints are added, and the joint angle is optimally solved by combining the two optimization functions, which can ensure that the obtained solution can Prioritize the completion of the Cartesian space task, and on this basis, leave enough margin for each joint angle, so as to stay away from the joint limit. In addition, the joint pose optimization method is not only suitable for joint angle optimization of rotational joint robots, but also suitable for joint position optimization of translational joints and translation-rotation hybrid robots, and has strong universality.
附图说明Description of drawings
为了更清楚地说明本申请实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本申请的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the accompanying drawings used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, so It should be regarded as a limitation on the scope, and those skilled in the art can also obtain other related drawings based on these drawings without creative work.
图1所示为本申请实施例机器人关节位姿优化方法的第一流程示意图;FIG. 1 is a schematic diagram of the first flow chart of the robot joint pose optimization method of the embodiment of the present application;
图2所示为本申请实施例机器人关节位姿优化方法的第二流程示意图;FIG. 2 is a schematic diagram of the second flow chart of the robot joint pose optimization method of the embodiment of the present application;
图3所示为本申请实施例机器人控制方法的流程示意图;FIG. 3 is a schematic flow diagram of a robot control method in an embodiment of the present application;
图4所示为本申请实施例机器人关节位姿优化装置的结构示意图。FIG. 4 is a schematic structural diagram of a robot joint pose optimization device according to an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all of them.
通常在此处附图中描述和示出的本申请实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本申请的实施例的详细描述并非旨在限制要求保护的本申请的范围,而是仅仅表示本申请的选定实施例。基于本申请的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本申请保护的范围。The components of the embodiments of the application generally described and illustrated in the figures herein may be arranged and designed in a variety of different configurations. Accordingly, the following detailed description of the embodiments of the application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative efforts belong to the scope of protection of the present application.
二次规划问题主要是在满足等式及不等式约束条件下,从多个解中选取最优解的过程。示范性地,二次规划问题的主要形式如下:The quadratic programming problem is mainly the process of selecting the optimal solution from multiple solutions under the constraints of equality and inequality. Exemplarily, the main form of the quadratic programming problem is as follows:
Figure PCTCN2021131673-appb-000034
Figure PCTCN2021131673-appb-000034
其中,
Figure PCTCN2021131673-appb-000035
为优化指标,H为海森矩阵;x为n维优化变量;f为行向量;A eq·x=b eq为等式约束,A eq为mxn(m≤n)维矩阵,b eq为m行列向量;Ax≤b为不等式约束,A为n列矩阵,b为列向量。
in,
Figure PCTCN2021131673-appb-000035
is an optimization index, H is a Hessian matrix; x is an n-dimensional optimization variable; f is a row vector; A eq x=b eq is an equality constraint, A eq is an mxn (m≤n) dimensional matrix, and b eq is m Row and column vector; Ax≤b is an inequality constraint, A is a matrix with n columns, and b is a column vector.
对于机器人来说,常常通过添加冗余关节来增大机器人的运动范围和灵活度等。现有的对冗余关节的处理一般非常复杂且计算时间长,在实际使用中存在一定的限制。对此,考虑到机器人自身结构的特性,其往往在不同运用场合下会存在关节角度、关节角速度、关节力矩等多种限制,为求解得到能够用于执行相应任务且满足对应多种限制的最优运动学逆解,本申请实施例将利用二次规划问题来进行优化求解,具体而言,通过构建双层优化指标(即双层二次优化问题)来进行关节角度的优化求解。For robots, the range of motion and flexibility of the robot are often increased by adding redundant joints. The existing processing of redundant joints is generally very complicated and takes a long time to calculate, and there are certain limitations in practical use. In this regard, considering the characteristics of the robot's own structure, it often has various constraints such as joint angles, joint angular velocities, and joint torques in different application scenarios. Optimal kinematics inverse solution, the embodiment of the present application will use the quadratic programming problem to optimize the solution, specifically, the joint angle is optimized and solved by constructing a double-layer optimization index (ie, a double-layer quadratic optimization problem).
本申请实施例的机器人关节位姿优化方法通过构建以关节角速度为优化变量、机器人末端速度为控制目标的第一优化函数,以及以关节角速度为优化变量、关节角度远离关节限位为控制目标的第二优化函数,并对这两个优化函数引入相同的松弛变量并添加相应的约束条件,通过联合这两个优化函数进行关节角度最优求解,可以保证求解到的解能够优先完成笛卡尔空间的任务,并在此基础上使得各个关节尽量远离关节限位,达到关节位姿优化目的。下面结合实施例对该机器人关节位姿优化方法进行说明。The robot joint pose optimization method of the embodiment of the present application constructs the first optimization function with the joint angular velocity as the optimization variable and the robot end speed as the control target, and the joint angular velocity as the optimization variable and the joint angle away from the joint limit as the control target The second optimization function, and introduce the same slack variable to these two optimization functions and add corresponding constraints. By combining these two optimization functions to solve the joint angle optimally, it can be guaranteed that the solution obtained can be completed in Cartesian space first. The task, and on this basis, make each joint as far away as possible from the joint limit, so as to achieve the purpose of joint pose optimization. The method for optimizing the joint pose of the robot will be described below with reference to the embodiments.
实施例1Example 1
图1所示为本申请实施例机器人关节位姿优化方法的第一流程示意图。FIG. 1 is a schematic diagram of a first flowchart of a method for optimizing a joint pose of a robot according to an embodiment of the present application.
示范性地,该机器人关节位姿优化方法包括:Exemplarily, the robot joint pose optimization method includes:
步骤S110,构建以关节角速度为优化变量、机器人末端速度为控制目标的第一优化函数,该第一优化函数包括关节角速度满足的不等式约束和含松弛变量的等式约束。Step S110, constructing a first optimization function with the joint angular velocity as the optimization variable and the robot terminal velocity as the control objective, the first optimization function includes the inequality constraints that the joint angular velocity satisfies and the equality constraints including slack variables.
为了保证机器人的末端能够优先执行笛卡尔空间中的任务,这里以关节角速度为控制变量,以末端速度为控制目标来构建出一个二次规划问题,即上述的第一优化函数。可以理解,该第一优化函数中的“第一”主要用于与后文提及的其他优化函数进行区分。In order to ensure that the end of the robot can perform tasks in Cartesian space first, a quadratic programming problem is constructed here with the joint angular velocity as the control variable and the end velocity as the control target, which is the above-mentioned first optimization function. It can be understood that the "first" in the first optimization function is mainly used to distinguish it from other optimization functions mentioned later.
示范性地,该第一优化函数将引入一松弛变量,并基于该松弛变量得到待优化的指 标。例如,在一种实施方式中,该优化指标可为松弛变量的平方等,当然也可以取与松弛变量有关的其他形式,这里不作限定。Exemplarily, the first optimization function will introduce a slack variable, and obtain the index to be optimized based on the slack variable. For example, in an implementation manner, the optimization index may be the square of the slack variable, etc., of course, may also take other forms related to the slack variable, which are not limited here.
同时,该第一优化函数还将添加有相应的约束条件,其主要包括关节角速度满足的含松弛变量的等式约束、以及与关节角速度直接或间接相关的不等式约束,以保证求解出的关节角速度最优解能够使得在各个关节约束条件下达到末端的速度指标。At the same time, the first optimization function will also be added with corresponding constraints, which mainly include equality constraints with slack variables that the joint angular velocity satisfies, and inequality constraints that are directly or indirectly related to the joint angular velocity, so as to ensure that the obtained joint angular velocity The optimal solution can achieve the speed index of the terminal under the constraints of each joint.
由于机器人的速度雅克比矩阵可以反映各个关节角速度与末端速度之间的关系,在引入松弛变量的情况下,这里将构建关节角速度、松弛变量与末端速度三者之间满足的等式约束方程。Since the velocity Jacobian matrix of the robot can reflect the relationship between the angular velocity of each joint and the terminal velocity, in the case of introducing the slack variable, the equality constraint equation satisfied by the joint angular velocity, the slack variable and the terminal velocity will be constructed here.
对于第一优化函数的不等式约束,例如,可包括但不限于包括关节角度约束、关节角速度自身物理约束及关节角加速度约束等。The inequality constraints of the first optimization function may include, but are not limited to, joint angle constraints, physical constraints on joint angular velocity itself, and joint angular acceleration constraints, for example.
示范性地,如图2所示,该关节角速度满足的不等式约束可通过如下步骤得到,包括:Exemplarily, as shown in FIG. 2, the inequality constraints satisfied by the joint angular velocity can be obtained through the following steps, including:
步骤S210,构建机器人各个关节在对应控制周期满足的关节角度约束,并将该关节角度约束转换为以关节角速度为变量的第一约束条件。Step S210, constructing joint angle constraints that each joint of the robot satisfies in a corresponding control period, and converting the joint angle constraints into a first constraint condition with joint angular velocity as a variable.
由于机器人关节结构的限制而使得一些关节位置或角度不可达,即存在关节限位,本实施例将先构建机器人各个关节角度满足的关节限位约束,进而转换得到对应的关节角速度约束。Due to the limitation of the joint structure of the robot, some joint positions or angles are unreachable, that is, there are joint limits. In this embodiment, the joint limit constraints satisfied by each joint angle of the robot are first constructed, and then converted to obtain the corresponding joint angular velocity constraints.
应当明白的是,对于平动关节类型的机器人,由于不存在转动,故上述的关节限位主要是指对关节位置的限位;而对于转动关节类型的机器人,上述的关节限位主要是指对关节角度的限位。It should be understood that for robots with translational joints, since there is no rotation, the above-mentioned joint limit mainly refers to the limit of the joint position; and for robots with rotary joints, the above-mentioned joint limit mainly refers to Limits on joint angles.
以转动关节类型的机器人为例,假设关节角度的上限为
Figure PCTCN2021131673-appb-000036
下限为
Figure PCTCN2021131673-appb-000037
机器人的控制指令周期为T,
Figure PCTCN2021131673-appb-000038
为t时刻的第i个关节角度,
Figure PCTCN2021131673-appb-000039
为第i个关节的关节角速度,则t+1时刻的关节角度
Figure PCTCN2021131673-appb-000040
为:
Taking the robot of rotary joint type as an example, suppose the upper limit of the joint angle is
Figure PCTCN2021131673-appb-000036
The lower limit is
Figure PCTCN2021131673-appb-000037
The control command period of the robot is T,
Figure PCTCN2021131673-appb-000038
is the i-th joint angle at time t,
Figure PCTCN2021131673-appb-000039
is the joint angular velocity of the i-th joint, then the joint angle at time t+1
Figure PCTCN2021131673-appb-000040
for:
Figure PCTCN2021131673-appb-000041
Figure PCTCN2021131673-appb-000041
对应地,根据关节角度约束,则有:Correspondingly, according to the joint angle constraints, there are:
Figure PCTCN2021131673-appb-000042
Figure PCTCN2021131673-appb-000042
于是,可得到转换后的以关节角速度为变量的第一约束方程为:Therefore, the converted first constraint equation with the joint angular velocity as a variable can be obtained as:
Figure PCTCN2021131673-appb-000043
Figure PCTCN2021131673-appb-000043
可以理解,对于平动关节机器人,可将上述对应关节的关节角度及关节角速度适应 性地替换为平移位置和平移速度,原理类似,故不作展开描述。对于平动-转动混合运动的机器人,同样也适用。It can be understood that for translational joint robots, the joint angles and joint angular velocities of the above-mentioned corresponding joints can be adaptively replaced by translational positions and translational velocities. The principle is similar, so no further description is given. The same applies to robots with translational-rotational mixed motion.
步骤S220,构建各个关节在对应控制周期满足的关节角加速度约束,并将该关节角加速度约束转换为以关节角速度为变量的第二约束条件。Step S220, construct the joint angular acceleration constraints that each joint satisfies in the corresponding control period, and convert the joint angular acceleration constraints into a second constraint condition with the joint angular velocity as a variable.
由于机器人的单个关节的输出力矩是受限的,相应地将对关节的角加速度进行了自身限制,同样,本实施例将先构建机器人各个关节角加速度满足的约束,进而转换得到对应的关节角速度约束。Since the output torque of a single joint of the robot is limited, the angular acceleration of the joint will be limited accordingly. Similarly, this embodiment will first construct the constraints that the angular acceleration of each joint of the robot satisfies, and then convert to obtain the corresponding joint angular velocity constraint.
仍以转动关节类型的机器人为例,假设关节角加速度的上限为
Figure PCTCN2021131673-appb-000044
下限为
Figure PCTCN2021131673-appb-000045
t时刻的第i个关节角速度为
Figure PCTCN2021131673-appb-000046
则t+1时刻的关节角速度
Figure PCTCN2021131673-appb-000047
为:
Still taking the robot of rotary joint type as an example, suppose the upper limit of joint angular acceleration is
Figure PCTCN2021131673-appb-000044
The lower limit is
Figure PCTCN2021131673-appb-000045
The i-th joint angular velocity at time t is
Figure PCTCN2021131673-appb-000046
Then the joint angular velocity at time t+1
Figure PCTCN2021131673-appb-000047
for:
Figure PCTCN2021131673-appb-000048
Figure PCTCN2021131673-appb-000048
对应地,根据关节角加速度约束,则有:Correspondingly, according to the joint angular acceleration constraints, there are:
Figure PCTCN2021131673-appb-000049
Figure PCTCN2021131673-appb-000049
于是,可得到转换后的以关节角速度为变量的第二约束方程为:Therefore, the converted second constraint equation with the joint angular velocity as a variable can be obtained as:
Figure PCTCN2021131673-appb-000050
Figure PCTCN2021131673-appb-000050
其中,
Figure PCTCN2021131673-appb-000051
为t-1时刻的第i个关节角速度。
in,
Figure PCTCN2021131673-appb-000051
is the angular velocity of the ith joint at time t-1.
步骤S230,基于该第一约束条件、该第二约束条件和该关节角速度的自身约束,构建得到该关节角速度的合成约束以作为上述的不等式约束。Step S230, based on the first constraint condition, the second constraint condition and the self-constraint of the joint angular velocity, construct a composite constraint to obtain the joint angular velocity as the above-mentioned inequality constraint.
机器人同样存在关节角速度的约束,假设第i个关节角速度的上限为
Figure PCTCN2021131673-appb-000052
下限为
Figure PCTCN2021131673-appb-000053
于是,关节角速度的自身约束可表示为:
The robot also has joint angular velocity constraints, assuming that the upper limit of the i-th joint angular velocity is
Figure PCTCN2021131673-appb-000052
The lower limit is
Figure PCTCN2021131673-appb-000053
Then, the self-constraint of joint angular velocity can be expressed as:
Figure PCTCN2021131673-appb-000054
Figure PCTCN2021131673-appb-000054
由于同一t时刻的各个关节角速度需要同时满足多种限制,这里为了方便求解,将联合上述添加的约束方程及自身限制来得到该关节角速度的约束合成。示范性地,以添加关节角度、关节角速度及关节角加速度这三种约束为例,则有:Since the angular velocity of each joint at the same time t needs to satisfy multiple constraints at the same time, for the convenience of solution, the above-mentioned added constraint equation and its own constraints are combined to obtain the constraint synthesis of the joint angular velocity. Exemplarily, taking the addition of three constraints of joint angle, joint angular velocity and joint angular acceleration as an example, there are:
Figure PCTCN2021131673-appb-000055
Figure PCTCN2021131673-appb-000055
于是,该合成约束通过一个不等式约束来描述,则有:Then, the composite constraint is described by an inequality constraint, then:
Figure PCTCN2021131673-appb-000056
Figure PCTCN2021131673-appb-000056
可以理解,利用上述的关节角度(或关节位置)约束、关节角速度约束及关节角加 速度约束来得到关节角速度的合成不等式约束,仅为一种添加不等式的示例,在实际运用中,还可以添加更多的约束条件,这里并不作限定。It can be understood that using the above-mentioned joint angle (or joint position) constraint, joint angular velocity constraint and joint angular acceleration constraint to obtain the composite inequality constraint of joint angular velocity is only an example of adding inequality, and in actual application, you can also add more There are many constraints, which are not limited here.
对于该第一优化函数,若以将松弛变量的平方作为优化指标,并构建得到相应的等式约束方程和不等式约束,此时第一优化函数可写成如下形式:For the first optimization function, if the square of the slack variable is used as the optimization index, and the corresponding equality constraint equation and inequality constraint are constructed, the first optimization function can be written as follows:
Figure PCTCN2021131673-appb-000057
Figure PCTCN2021131673-appb-000057
通过对该优化函数进行最优求解,即可以得到在关节限位、关节角速度的自身约束及关节角加速度的约束下,使得机器人末端速度为
Figure PCTCN2021131673-appb-000058
的关于关节角速度
Figure PCTCN2021131673-appb-000059
及松弛变量w的解。
By optimally solving the optimization function, it can be obtained that under the constraints of joint limit, joint angular velocity and joint angular acceleration, the end velocity of the robot is
Figure PCTCN2021131673-appb-000058
of the joint angular velocity
Figure PCTCN2021131673-appb-000059
And the solution of the slack variable w.
可以理解,以松弛变量为优化指标,可以保证即便该第一优化函数在约束条件存在冲突的情况下,依然会求解出该约束方程的接近解,进而可用于下一步处理;否则,如果上述约束条件本身存在冲突,如等式约束无解等,则将导致整个二次规划的寻优方案求解出错。It can be understood that taking the slack variable as the optimization index can ensure that even if the first optimization function has conflicting constraints, it will still find a close solution to the constraint equation, which can be used in the next step; otherwise, if the above constraints Conflicts in the conditions themselves, such as no solution to the equality constraints, will lead to errors in the solution of the entire quadratic programming optimization scheme.
步骤S120,构建以关节角速度为优化变量、机器人的关节角度远离关节限位为控制目标的第二优化函数,该第二优化函数包括关节角速度满足的含相同松弛变量的约束条件。Step S120, constructing a second optimization function with the joint angular velocity as the optimization variable and the robot's joint angle away from the joint limit as the control objective, the second optimization function includes the constraint conditions with the same slack variable that the joint angular velocity satisfies.
为了解决关节冗余的问题,本实施例将以各关节角度远离关节限位为目标,来构建另一个二次规划问题,即上述的第二优化函数。例如,在一种实施方式中,该第二优化函数以关节角度与关节限位的欧式距离为优化指标,当然,除了欧式距离,也可以采用其他的能够反映关节角度距离关节限位的计算公式,在此并不作限定。In order to solve the problem of joint redundancy, in this embodiment, another quadratic programming problem, that is, the above-mentioned second optimization function, will be constructed with the goal that each joint angle is away from the joint limit. For example, in one embodiment, the second optimization function uses the Euclidean distance between the joint angle and the joint limit as the optimization index. Of course, in addition to the Euclidean distance, other calculation formulas that can reflect the joint angle and the joint limit can also be used , is not limited here.
示范性地,该欧式距离的计算公式为:Exemplarily, the formula for calculating the Euclidean distance is:
Figure PCTCN2021131673-appb-000060
Figure PCTCN2021131673-appb-000060
其中,
Figure PCTCN2021131673-appb-000061
in,
Figure PCTCN2021131673-appb-000061
其中,q为欧式距离;
Figure PCTCN2021131673-appb-000062
Figure PCTCN2021131673-appb-000063
分别为第i个关节角度的上限和下限;
Figure PCTCN2021131673-appb-000064
为t时刻的第i个关节角度。
Among them, q is the Euclidean distance;
Figure PCTCN2021131673-appb-000062
and
Figure PCTCN2021131673-appb-000063
are the upper and lower limits of the i-th joint angle, respectively;
Figure PCTCN2021131673-appb-000064
is the i-th joint angle at time t.
本实施例利用双层二次规划问题来综合求解出一个最优关节角速度,本实施例中, 为使得最终求解出的关节角速度能够在保证笛卡尔空间控制末端速度的前提下,进一步使得各个关节角度逐步趋近于最优解,则该第二优化函数的关节角速度同样需要添加相应的约束条件。In this embodiment, a double-layer quadratic programming problem is used to comprehensively solve an optimal joint angular velocity. In this embodiment, in order to make the joint angular velocity finally solved under the premise of ensuring the end velocity of the Cartesian space control, further make each joint If the angle gradually approaches the optimal solution, the joint angular velocity of the second optimization function also needs to add corresponding constraints.
例如,在一种实施方式中,基于上述第一优化函数的约束条件,该第二优化函数的关节角速度可添加含同一松弛变量的等式约束,以及与关节角速度相关的不等式约束。For example, in one implementation, based on the constraint conditions of the above-mentioned first optimization function, the joint angular velocity of the second optimization function may add an equality constraint including the same slack variable and an inequality constraint related to the joint angular velocity.
对于该第二优化函数,若以各个关节角度距离关节限位最远为优化指标为例,并添加与第一优化函数具有相同的等式约束方程和不等式约束,此时第二优化函数可写成如下形式:For the second optimization function, if the optimization index of each joint angle is farthest from the joint limit as an example, and the same equality constraint equation and inequality constraint as the first optimization function are added, the second optimization function can be written as In the following form:
Figure PCTCN2021131673-appb-000065
Figure PCTCN2021131673-appb-000065
其中,
Figure PCTCN2021131673-appb-000066
Figure PCTCN2021131673-appb-000067
为t-1时刻的第i个关节角度。
in,
Figure PCTCN2021131673-appb-000066
Figure PCTCN2021131673-appb-000067
is the i-th joint angle at time t-1.
可以理解,第二优化函数的约束条件设置与第一优化函数相同时,可以保证在满足关节限位、关节角速度的自身约束以及关节角加速度的约束下,第一优化函数求解得到的解能够满足末端速度的需求,即实现优先执行速度任务,与此同时,还能保证使得各个关节角度具有最大的活动裕度,从而达到关节位姿优化目的。It can be understood that when the constraint conditions of the second optimization function are set to be the same as those of the first optimization function, it can be guaranteed that the solution obtained by the first optimization function can satisfy the constraints of the joint limit, joint angular velocity and joint angular acceleration The demand for terminal speed is to realize the priority execution of speed tasks, and at the same time, it can also ensure that each joint angle has the maximum activity margin, so as to achieve the purpose of joint pose optimization.
步骤S130,根据第一优化函数求解得到松弛变量的解,并根据该松弛变量的解及该第二优化函数得到最优的关节角速度。In step S130, the solution of the slack variable is obtained by solving according to the first optimization function, and the optimal joint angular velocity is obtained according to the solution of the slack variable and the second optimization function.
示范性地,基于第一优化函数和第二优化函数,可利用开源的求解器先对第一优化函数进行最优求解,以得到关节角速度及松弛变量的解;进而,利用求解出的松弛变量的解对第二优化函数进行最优求解,此时可得到最优的关节角速度,即为所需的关节角速度。Exemplarily, based on the first optimization function and the second optimization function, an open-source solver can be used to optimally solve the first optimization function to obtain the joint angular velocity and the solution of the slack variable; then, use the solved slack variable The solution of the second optimization function is optimally solved, and the optimal joint angular velocity can be obtained at this time, which is the required joint angular velocity.
步骤S140,根据该最优的关节角速度得出机器人的最优关节角度,并根据该机器人的最优关节角度优化机器人关节的位姿。In step S140, the optimal joint angle of the robot is obtained according to the optimal joint angular velocity, and the pose of the robot joint is optimized according to the optimal joint angle of the robot.
示范性地,由于机器人的关节角速度与关节角度存在积分关系,在求解出最优的关节角速度后,即可通过积分运算来得到最优的关节角度。进而,可根据该最优的关节角度调整机器人关节的位姿(如角度或位置),以保证机器人能够执行相应的任务操作。Exemplarily, since there is an integral relationship between the joint angular velocity and the joint angle of the robot, after the optimal joint angular velocity is obtained, the optimal joint angle can be obtained through an integral operation. Furthermore, the posture (such as angle or position) of the robot joints can be adjusted according to the optimal joint angles, so as to ensure that the robot can perform corresponding task operations.
本实施例的机器人关节位姿优化方法通过双层优化的思想来处理关节冗余的问题,通过构建以关节角速度为优化变量、机器人末端速度为控制目标且引入松弛变量的第一优化函数,以及以关节角度远离关节限位为控制目标且引入相同的松弛变量的第二优化函数,并对这两个优化函数添加各个关节的角度、角速度、角加速度等合成的约束条件,其中,第二优化函数是在第一优化函数满足的关节角度约束范围内作进一步关节角速度求解的,因此可以实现在各种关节约束条件下,优先完成笛卡尔空间的速度任务,并在此基础上给各个关节角度留有足够的余量,即具备较大的活动裕度。此外,该方法具有通用性,可用于实现转动关节、平动关节及平动-转动混合运动等各类机器人的关节位置或关节角度的自动寻优。The joint pose optimization method of the robot in this embodiment uses the idea of double-layer optimization to deal with the problem of joint redundancy, by constructing the first optimization function that takes the joint angular velocity as the optimization variable, the robot end speed as the control target and introduces the slack variable, and The second optimization function that takes the joint angle away from the joint limit as the control target and introduces the same slack variable, and adds synthetic constraints such as the angle, angular velocity, and angular acceleration of each joint to these two optimization functions, where the second optimization The function is further solved for joint angular velocity within the range of joint angle constraints satisfied by the first optimization function, so it can be realized that under various joint constraint conditions, the velocity task in Cartesian space can be completed first, and on this basis, each joint angle can be given Sufficient margin is left, that is, it has a large activity margin. In addition, the method is versatile and can be used to automatically optimize the joint positions or joint angles of various types of robots such as rotational joints, translational joints, and translational-rotational hybrid motions.
实施例2Example 2
请参照图3,基于上述实施例1的方法,本实施例提出一种机器人控制方法,例如,该机器人可以是转动关节类型的机器人,也可以是平动关节类型的机器人,还可以是平动-转动混合运动的机器人等,这里不作限定。本申请中,所述转动关节类型的机器人是指机器人通过输出旋转角度的舵机,驱动与舵机相连的机器人关节实现对应转动角度的运动。所述平动关节类型的机器人是指机器人通过输出直线位移的舵机,驱动与舵机相连的机器人关节实现对应平移角度的运动。Please refer to Fig. 3. Based on the method of the above-mentioned embodiment 1, this embodiment proposes a robot control method. -Robots and the like in mixed motion are not limited here. In this application, the rotating joint type robot means that the robot drives the robot joints connected to the steering gear through the steering gear outputting the rotation angle to realize the movement corresponding to the rotation angle. The robot of the translational joint type means that the robot drives the robot joints connected to the steering gear through the steering gear outputting the linear displacement to realize the movement corresponding to the translation angle.
本实施例中,该机器人具有冗余关节,通过协调这些冗余关节可以完成各种任务。示范性地,如图3所示,该机器人控制方法包括:In this embodiment, the robot has redundant joints, and various tasks can be completed by coordinating these redundant joints. Exemplarily, as shown in Figure 3, the robot control method includes:
步骤S310,获取机器人在当前控制指令周期的与关节角速度相关的状态参数。Step S310, acquiring state parameters related to joint angular velocity of the robot in the current control command cycle.
步骤S320,根据所述状态参数利用机器人关节位姿优化方法来优化下一控制指令周期的关节位姿。Step S320, using the robot joint pose optimization method to optimize the joint pose of the next control command cycle according to the state parameters.
示范性地,可根据构建的第一优化函数和第二优化函数来确定具体需要获取哪些状态参数,这些状态参数可以是通过传感器等直接采集得到的,也可以是通过采集得到的数据经过运算处理后得到的,这里并不作限定。Exemplarily, which state parameters need to be obtained can be determined according to the constructed first optimization function and the second optimization function. These state parameters can be directly collected by sensors, etc., or can be obtained through calculation and processing of collected data. What is obtained later is not limited here.
例如,以上述的第一优化函数为例,可获取到对应控制指令周期的关节角度、期望的末端速度以及雅克比矩阵等,然后将已知的量代入优化函数以用于对关节角速度这一优化变量及松弛变量进行求解,第二优化函数同理。For example, taking the above-mentioned first optimization function as an example, the joint angle corresponding to the control command cycle, the expected terminal velocity, and the Jacobian matrix can be obtained, and then the known quantities are substituted into the optimization function to be used to calculate the joint angular velocity. The optimization variable and the slack variable are solved, and the second optimization function is the same.
可以理解,关于本实施例所采用的机器人关节位姿优化方法,具体参见上述实施例1的描述,这里不再重复描述。It can be understood that for the method for optimizing the pose and posture of the robot joints adopted in this embodiment, refer to the description of the above-mentioned embodiment 1 for details, and the description will not be repeated here.
步骤S330,根据所述优化的关节位姿控制机器人执行相应操作。Step S330, controlling the robot to perform corresponding operations according to the optimized joint poses.
示范性地,在求解出机器人下一控制指令周期所需的关节角度或关节位置后,则将这些关节角度或关节位置作为指令发送到对应的关节电机,以使得机器人执行相应操作,例如,可以是机器人避障任务、人机交互任务等。Exemplarily, after the joint angles or joint positions required for the next control command cycle of the robot are obtained, these joint angles or joint positions are sent as commands to the corresponding joint motors, so that the robot performs corresponding operations, for example, can It is robot obstacle avoidance task, human-computer interaction task, etc.
本实施例的机器人控制方法通过采用的机器人关节位姿优化方法来进行关节位姿的自动寻优,可以使机器人关节位置在保证笛卡尔空间位姿的前提下,始终具备最大的活动裕度等。The robot control method of this embodiment uses the robot joint pose optimization method to automatically optimize the joint pose, so that the robot joint position can always have the largest activity margin under the premise of ensuring the Cartesian space pose. .
实施例3Example 3
请参照图4,基于上述实施例1的方法,本实施例提出一种机器人关节位姿优化装置100,示范性地,该机器人关节位姿优化装置100包括:Please refer to FIG. 4. Based on the method of the above-mentioned embodiment 1, this embodiment proposes a robot joint pose optimization device 100. Exemplarily, the robot joint pose optimization device 100 includes:
构建模块110,用于构建以关节角速度为优化变量、机器人末端速度为控制目标的第一优化函数,所述第一优化函数包括所述关节角速度满足的不等式约束和含松弛变量的等式约束。The construction module 110 is used to construct a first optimization function with the joint angular velocity as the optimization variable and the robot terminal velocity as the control target, the first optimization function includes the inequality constraint and the equality constraint including the slack variable that the joint angular velocity satisfies.
构建模块110,还用于构建以关节角速度为优化变量、所述机器人的关节角度远离关节限位为控制目标的第二优化函数,所述第二优化函数包括所述关节角速度满足的含相同松弛变量的约束条件。The construction module 110 is also used to construct a second optimization function with the joint angular velocity as the optimization variable and the joint angle of the robot away from the joint limit as the control target, the second optimization function includes the same slack that the joint angular velocity satisfies Variable constraints.
求解模块120,用于根据所述第一优化函数求解得到所述松弛变量的解,并根据所述松弛变量的解及所述第二优化函数得到最优的关节角速度。The solving module 120 is configured to solve according to the first optimization function to obtain the solution of the slack variable, and obtain the optimal joint angular velocity according to the solution of the slack variable and the second optimization function.
求解模块120还用于根据所述最优的关节角速度得出所述机器人的最优关节角度。The solving module 120 is also used to obtain the optimal joint angle of the robot according to the optimal joint angular velocity.
优化模块130,用于根据所述机器人的最优关节角度优化所述机器人关节的位姿。An optimization module 130, configured to optimize the poses of the robot joints according to the optimal joint angles of the robot.
可以理解,本实施例的装置对应于上述实施例1的方法,上述实施例1中的可选项同样适用于本实施例,故在此不再重复描述。It can be understood that the device in this embodiment corresponds to the method in the above-mentioned embodiment 1, and the optional items in the above-mentioned embodiment 1 are also applicable to this embodiment, so the description will not be repeated here.
本申请还提供了一种机器人,示范性地,该机器人包括处理器和存储器,其中,存储器存储有计算机程序,处理器通过运行所述计算机程序,从而使机器人执行上述的机器人关节位姿优化方法或者上述机器人关节位姿优化装置中的各个模块的功能。The present application also provides a robot. Exemplarily, the robot includes a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program so that the robot performs the above-mentioned robot joint pose optimization method Or the functions of each module in the above-mentioned robot joint pose optimization device.
本申请还提供了一种可读存储介质,用于储存上述机器人中使用的所述计算机程序。The present application also provides a readable storage medium for storing the computer program used in the above robot.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,也可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,附图中的流程图和结构图显示了根据本申请的多个实施例的装置、方法和计算机程序产品的可能实现的体 系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,结构图和/或流程图中的每个方框、以及结构图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may also be implemented in other ways. The device embodiments described above are only illustrative. For example, the flow charts and structural diagrams in the accompanying drawings show the possible implementation architecture and functions of devices, methods and computer program products according to multiple embodiments of the present application. and operation. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or part of code that includes one or more Executable instructions. It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It is also to be noted that each block of the block diagrams and/or flow diagrams, and combinations of blocks in the block diagrams and/or flow diagrams, can be implemented by a dedicated hardware-based system that performs the specified function or action. may be implemented, or may be implemented by a combination of special purpose hardware and computer instructions.
另外,在本申请各个实施例中的各功能模块或单元可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或更多个模块集成形成一个独立的部分。In addition, each functional module or unit in each embodiment of the present application may be integrated to form an independent part, each module may exist independently, or two or more modules may be integrated to form an independent part.
所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是智能手机、个人计算机、服务器、或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially 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, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a smart phone, a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc., which can store program codes. .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。The above is only a specific implementation of the application, but the scope of protection of the application is not limited thereto. Anyone familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the application. Should be covered within the protection scope of this application.

Claims (10)

  1. 一种机器人关节位姿优化方法,其特征在于,包括:A robot joint pose optimization method, characterized in that, comprising:
    构建以关节角速度为优化变量、机器人末端速度为控制目标的第一优化函数,所述第一优化函数包括所述关节角速度满足的不等式约束和含松弛变量的等式约束;Constructing a first optimization function with the joint angular velocity as the optimization variable and the robot terminal velocity as the control target, the first optimization function includes the inequality constraint and the equality constraint including the slack variable that the joint angular velocity satisfies;
    构建以关节角速度为优化变量、所述机器人的关节角度远离关节限位为控制目标的第二优化函数,所述第二优化函数包括所述关节角速度满足的含相同松弛变量的约束条件;Constructing a second optimization function with the joint angular velocity as the optimization variable, and the joint angle of the robot being away from the joint limit as the control target, the second optimization function includes the constraint condition that the joint angular velocity satisfies and contains the same slack variable;
    根据所述第一优化函数求解得到所述松弛变量的解,并根据所述松弛变量的解及所述第二优化函数得到最优的关节角速度;Solving according to the first optimization function to obtain the solution of the slack variable, and obtaining the optimal joint angular velocity according to the solution of the slack variable and the second optimization function;
    根据所述最优的关节角速度得出所述机器人的最优关节角度,并根据所述机器人的最优关节角度优化所述机器人关节的位姿。An optimal joint angle of the robot is obtained according to the optimal joint angular velocity, and a pose of the robot joint is optimized according to the optimal joint angle of the robot.
  2. 根据权利要求1所述的机器人关节位姿优化方法,其特征在于,所述关节角速度满足的所述不等式约束通过如下步骤获取,包括:The robot joint pose optimization method according to claim 1, wherein the inequality constraint satisfied by the joint angular velocity is obtained through the following steps, comprising:
    构建所述机器人各个关节在对应控制周期满足的关节角度约束,并将所述关节角度约束转换为以关节角速度为变量的第一约束条件;Constructing joint angle constraints that each joint of the robot satisfies in a corresponding control cycle, and converting the joint angle constraints into a first constraint condition with joint angular velocity as a variable;
    构建各个关节在所述对应控制周期满足的关节角加速度约束,并将所述关节角加速度约束转换为以关节角速度为变量的第二约束条件;Constructing joint angular acceleration constraints that each joint satisfies in the corresponding control period, and converting the joint angular acceleration constraints into a second constraint condition with joint angular velocity as a variable;
    基于所述第一约束条件、所述第二约束条件和所述关节角速度的自身限位,构建得到所述关节角速度的合成约束以作为所述不等式约束。Based on the first constraint condition, the second constraint condition, and the self-limit of the joint angular velocity, a synthetic constraint to obtain the joint angular velocity is constructed as the inequality constraint.
  3. 根据权利要求2所述的机器人关节位姿优化方法,其特征在于,所述第一约束条件为:The robot joint pose optimization method according to claim 2, wherein the first constraint condition is:
    Figure PCTCN2021131673-appb-100001
    Figure PCTCN2021131673-appb-100001
    其中,
    Figure PCTCN2021131673-appb-100002
    Figure PCTCN2021131673-appb-100003
    分别为第i个关节角度的上限和下限;
    Figure PCTCN2021131673-appb-100004
    为t时刻的第i个关节角度;
    Figure PCTCN2021131673-appb-100005
    为第i个关节的关节角速度;T为所述机器人的控制指令周期。
    in,
    Figure PCTCN2021131673-appb-100002
    and
    Figure PCTCN2021131673-appb-100003
    are the upper and lower limits of the i-th joint angle, respectively;
    Figure PCTCN2021131673-appb-100004
    is the i-th joint angle at time t;
    Figure PCTCN2021131673-appb-100005
    is the joint angular velocity of the i-th joint; T is the control command period of the robot.
  4. 根据权利要求3所述的机器人关节位姿优化方法,其特征在于,所述第二约束条件为:The robot joint pose optimization method according to claim 3, wherein the second constraint condition is:
    Figure PCTCN2021131673-appb-100006
    Figure PCTCN2021131673-appb-100006
    其中,
    Figure PCTCN2021131673-appb-100007
    Figure PCTCN2021131673-appb-100008
    分别为第i个关节角加速度的上限和下限;
    Figure PCTCN2021131673-appb-100009
    Figure PCTCN2021131673-appb-100010
    分别为t-1时刻和t时刻的第i个关节角速度。
    in,
    Figure PCTCN2021131673-appb-100007
    and
    Figure PCTCN2021131673-appb-100008
    are the upper limit and lower limit of the i-th joint angular acceleration, respectively;
    Figure PCTCN2021131673-appb-100009
    and
    Figure PCTCN2021131673-appb-100010
    are the i-th joint angular velocity at time t-1 and time t, respectively.
  5. 根据权利要求4所述的机器人关节位姿优化方法,其特征在于,所述第一优化函数以松弛变量的平方为优化指标;The robot joint pose optimization method according to claim 4, wherein the first optimization function takes the square of the slack variable as the optimization index;
    所述第一优化函数的表达式为:The expression of the first optimization function is:
    Figure PCTCN2021131673-appb-100011
    Figure PCTCN2021131673-appb-100011
    其中,w为松弛变量,J为所述机器人的速度雅可比矩阵,
    Figure PCTCN2021131673-appb-100012
    为所述机器人所有关节的关节角速度向量;
    Figure PCTCN2021131673-appb-100013
    为所述机器人的末端速度向量;
    Figure PCTCN2021131673-appb-100014
    Figure PCTCN2021131673-appb-100015
    分别为第i个关节角速度的上限和下限。
    Wherein, w is the slack variable, J is the speed Jacobian matrix of the robot,
    Figure PCTCN2021131673-appb-100012
    is the joint angular velocity vector of all joints of the robot;
    Figure PCTCN2021131673-appb-100013
    is the terminal velocity vector of the robot;
    Figure PCTCN2021131673-appb-100014
    and
    Figure PCTCN2021131673-appb-100015
    are the upper and lower limits of the i-th joint angular velocity, respectively.
  6. 根据权利要求1所述的机器人关节位姿优化方法,其特征在于,所述第二优化函数以关节角度与关节限位的欧式距离为优化指标;The robot joint pose optimization method according to claim 1, wherein the second optimization function uses the Euclidean distance between the joint angle and the joint limit as the optimization index;
    所述欧式距离的计算公式为:The formula for calculating the Euclidean distance is:
    Figure PCTCN2021131673-appb-100016
    Figure PCTCN2021131673-appb-100016
    Figure PCTCN2021131673-appb-100017
    Figure PCTCN2021131673-appb-100017
    其中,q为所述欧式距离;
    Figure PCTCN2021131673-appb-100018
    Figure PCTCN2021131673-appb-100019
    分别为第i个关节角度的上限和下限;
    Figure PCTCN2021131673-appb-100020
    为t时刻的第i个关节角度。
    Wherein, q is described Euclidean distance;
    Figure PCTCN2021131673-appb-100018
    and
    Figure PCTCN2021131673-appb-100019
    are the upper and lower limits of the i-th joint angle, respectively;
    Figure PCTCN2021131673-appb-100020
    is the i-th joint angle at time t.
  7. 根据权利要求6所述的机器人关节位姿优化方法,其特征在于,所述第二优化函数的所述含相同松弛变量的约束条件与所述第一优化函数的所述等式约束相同,所述第二优化函数还包括所述关节角速度满足的所述不等式约束;The robot joint pose optimization method according to claim 6, wherein the constraint condition containing the same slack variable of the second optimization function is the same as the equality constraint of the first optimization function, so The second optimization function also includes the inequality constraint that the joint angular velocity satisfies;
    所述第二优化函数的表达式为:The expression of the second optimization function is:
    Figure PCTCN2021131673-appb-100021
    Figure PCTCN2021131673-appb-100021
    其中,
    Figure PCTCN2021131673-appb-100022
    为t-1时刻的第i个关节角度;T为所述机器人的控制 指令周期;w为所述松弛变量,J为所述机器人的速度雅可比矩阵,
    Figure PCTCN2021131673-appb-100023
    为所述机器人所有关节的关节角速度向量;
    Figure PCTCN2021131673-appb-100024
    为所述机器人的末端速度向量;
    Figure PCTCN2021131673-appb-100025
    Figure PCTCN2021131673-appb-100026
    分别为第i个关节角度的上限和下限;
    Figure PCTCN2021131673-appb-100027
    Figure PCTCN2021131673-appb-100028
    分别为第i个关节角速度的上限和下限;
    Figure PCTCN2021131673-appb-100029
    Figure PCTCN2021131673-appb-100030
    分别为第i个关节角加速度的上限和下限;
    Figure PCTCN2021131673-appb-100031
    Figure PCTCN2021131673-appb-100032
    分别为t-1时刻和t时刻的第i个关节角速度。
    in,
    Figure PCTCN2021131673-appb-100022
    is the i-th joint angle at time t-1; T is the control instruction period of the robot; w is the relaxation variable, J is the speed Jacobian matrix of the robot,
    Figure PCTCN2021131673-appb-100023
    is the joint angular velocity vector of all joints of the robot;
    Figure PCTCN2021131673-appb-100024
    is the terminal velocity vector of the robot;
    Figure PCTCN2021131673-appb-100025
    and
    Figure PCTCN2021131673-appb-100026
    are the upper and lower limits of the i-th joint angle, respectively;
    Figure PCTCN2021131673-appb-100027
    and
    Figure PCTCN2021131673-appb-100028
    are the upper and lower limits of the i-th joint angular velocity, respectively;
    Figure PCTCN2021131673-appb-100029
    and
    Figure PCTCN2021131673-appb-100030
    are the upper limit and lower limit of the i-th joint angular acceleration, respectively;
    Figure PCTCN2021131673-appb-100031
    and
    Figure PCTCN2021131673-appb-100032
    are the i-th joint angular velocity at time t-1 and time t, respectively.
  8. 一种机器人控制方法,其特征在于,包括:A method for controlling a robot, comprising:
    获取机器人在当前控制指令周期的与关节角速度相关的状态参数;Obtain the state parameters related to the joint angular velocity of the robot in the current control command cycle;
    根据所述状态参数利用如权利要求1至7中任一项所述的机器人关节位姿优化方法来优化下一控制指令周期的关节位姿;Utilizing the robot joint pose optimization method according to any one of claims 1 to 7 to optimize the joint pose of the next control command cycle according to the state parameters;
    根据所述优化的关节位姿控制所述机器人执行相应操作。The robot is controlled to perform corresponding operations according to the optimized joint poses.
  9. 一种机器人,其特征在于,所述机器人包括处理器和存储器,所述存储器存储有计算机程序,所述处理器用于执行所述计算机程序以实施权利要求1-7中任一项所述的机器人关节位姿优化方法或权利要求8所述的机器人控制方法。A robot, characterized in that the robot comprises a processor and a memory, the memory stores a computer program, and the processor is used to execute the computer program to implement the robot according to any one of claims 1-7 The joint pose optimization method or the robot control method described in claim 8.
  10. 一种可读存储介质,其特征在于,其存储有计算机程序,所述计算机程序被处理器执行时,实施根据权利要求1-7中任一项所述的机器人关节位姿优化方法或权利要求8所述的机器人控制方法。A readable storage medium, characterized in that it stores a computer program, and when the computer program is executed by a processor, it implements the robot joint pose optimization method or claim according to any one of claims 1-7 The robot control method described in 8.
PCT/CN2021/131673 2021-08-24 2021-11-19 Robot joint pose optimization method, robot control method, and robot WO2023024278A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110976981.3A CN113618741B (en) 2021-08-24 2021-08-24 Robot joint pose optimization method, robot control method and robot
CN202110976981.3 2021-08-24

Publications (1)

Publication Number Publication Date
WO2023024278A1 true WO2023024278A1 (en) 2023-03-02

Family

ID=78387594

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/131673 WO2023024278A1 (en) 2021-08-24 2021-11-19 Robot joint pose optimization method, robot control method, and robot

Country Status (2)

Country Link
CN (1) CN113618741B (en)
WO (1) WO2023024278A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113618741B (en) * 2021-08-24 2022-07-29 深圳市优必选科技股份有限公司 Robot joint pose optimization method, robot control method and robot
CN114227687B (en) * 2021-12-28 2023-08-15 深圳市优必选科技股份有限公司 Robot control method and device, terminal equipment and storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040254679A1 (en) * 2003-04-10 2004-12-16 Kenichiro Nagasaka Robot movement control system
US20070185618A1 (en) * 2006-01-16 2007-08-09 Kenichiro Nagasaka Control system, control method, and computer program
JP2011183527A (en) * 2010-03-10 2011-09-22 Toyota Motor Corp Joint target value determining method of redundant robot and control device of redundant robot
CN106584461A (en) * 2016-12-21 2017-04-26 西安科技大学 Method for optimizing inverse kinematic humanoid-arm configuration of 7-freedom-degree humanoid mechanical arm under multi-constraint condition
CN106625666A (en) * 2016-12-16 2017-05-10 广州视源电子科技股份有限公司 Method and device for controlling redundant mechanical arm
CN107234617A (en) * 2017-07-10 2017-10-10 北京邮电大学 A kind of obstacle-avoiding route planning method of the unrelated Artificial Potential Field guiding of avoidance task
JP2019063912A (en) * 2017-09-29 2019-04-25 キヤノン株式会社 Robot control data processing method, robot control data processing device and robot system
CN110561441A (en) * 2019-10-23 2019-12-13 中山大学 Single 94LVI iterative algorithm for pose control of redundant manipulator
CN111538949A (en) * 2020-07-10 2020-08-14 深圳市优必选科技股份有限公司 Redundant robot inverse kinematics solving method and device and redundant robot
CN112873208A (en) * 2021-01-29 2021-06-01 佛山树客智能机器人科技有限公司 Anti-noise and dynamic constraint robot real-time motion planning method and device
CN113618741A (en) * 2021-08-24 2021-11-09 深圳市优必选科技股份有限公司 Robot joint pose optimization method, robot control method and robot

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110103225B (en) * 2019-06-04 2023-04-11 兰州大学 Data-driven method and device for controlling repeated motion of mechanical arm
CN110861088A (en) * 2019-11-29 2020-03-06 沈阳通用机器人技术股份有限公司 Motion optimization method of redundant degree of freedom robot
CN113084791B (en) * 2019-12-23 2022-09-23 深圳市优必选科技股份有限公司 Mechanical arm control method, mechanical arm control device and terminal equipment
CN111037560B (en) * 2019-12-25 2021-06-25 广东省智能制造研究所 Cooperative robot compliance control method and system
CN111300414B (en) * 2020-03-06 2022-07-15 陕西理工大学 Dual-criterion redundant mechanical arm self-movement planning method
CN111975768B (en) * 2020-07-08 2022-03-25 华南理工大学 Mechanical arm motion planning method based on fixed parameter neural network
CN113070881B (en) * 2021-04-02 2022-11-11 深圳市优必选科技股份有限公司 Robot motion control method and device and robot

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040254679A1 (en) * 2003-04-10 2004-12-16 Kenichiro Nagasaka Robot movement control system
US20070185618A1 (en) * 2006-01-16 2007-08-09 Kenichiro Nagasaka Control system, control method, and computer program
JP2011183527A (en) * 2010-03-10 2011-09-22 Toyota Motor Corp Joint target value determining method of redundant robot and control device of redundant robot
CN106625666A (en) * 2016-12-16 2017-05-10 广州视源电子科技股份有限公司 Method and device for controlling redundant mechanical arm
WO2018107851A1 (en) * 2016-12-16 2018-06-21 广州视源电子科技股份有限公司 Method and device for controlling redundant robot arm
CN106584461A (en) * 2016-12-21 2017-04-26 西安科技大学 Method for optimizing inverse kinematic humanoid-arm configuration of 7-freedom-degree humanoid mechanical arm under multi-constraint condition
CN107234617A (en) * 2017-07-10 2017-10-10 北京邮电大学 A kind of obstacle-avoiding route planning method of the unrelated Artificial Potential Field guiding of avoidance task
JP2019063912A (en) * 2017-09-29 2019-04-25 キヤノン株式会社 Robot control data processing method, robot control data processing device and robot system
CN110561441A (en) * 2019-10-23 2019-12-13 中山大学 Single 94LVI iterative algorithm for pose control of redundant manipulator
CN111538949A (en) * 2020-07-10 2020-08-14 深圳市优必选科技股份有限公司 Redundant robot inverse kinematics solving method and device and redundant robot
CN112873208A (en) * 2021-01-29 2021-06-01 佛山树客智能机器人科技有限公司 Anti-noise and dynamic constraint robot real-time motion planning method and device
CN113618741A (en) * 2021-08-24 2021-11-09 深圳市优必选科技股份有限公司 Robot joint pose optimization method, robot control method and robot

Also Published As

Publication number Publication date
CN113618741A (en) 2021-11-09
CN113618741B (en) 2022-07-29

Similar Documents

Publication Publication Date Title
WO2023024278A1 (en) Robot joint pose optimization method, robot control method, and robot
WO2023024279A1 (en) Dynamic obstacle avoidance method and apparatus for robot, and robot
Ceccarelli et al. Fundamentals of the mechanics of robots
JP2019517929A (en) Trajectory planning method of point-to-point movement in robot joint space
WO2020151406A1 (en) Motion control method, apparatus and system, and storage medium
Jin et al. Perturbed manipulability optimization in a distributed network of redundant robots
WO2023024317A1 (en) Robot obstacle avoidance method and apparatus, and robot
WO2020093253A1 (en) Robot motion control method, control system and storage device
CN108406769A (en) The joint rotation angle of serial manipulator determines method and device
WO2022205844A1 (en) Robot forward kinematics solution method and apparatus, readable storage medium, and robot
CN111123943B (en) Super-redundancy robot track planning method and system based on pseudo-inverse constraint
CN114211492B (en) Optimal track planning method of multi-degree-of-freedom mechanical arm based on model
CN112356032B (en) Posture smooth transition method and system
US11007639B2 (en) Joint control method for serial robot and serial robot using the same
Pikalov et al. Vector model for solving the inverse kinematics problem in the system of external adaptive control of robotic manipulators
CN115816459A (en) Robot control method, device, computer equipment, storage medium and product
CN110543095A (en) Design method of numerical control gear chamfering machine control system based on quantum frame
CN113276116B (en) Error-controllable robot track synchronous transition method
Park et al. Tracking on lie group for robot manipulators
CN113910245A (en) Industrial robot control method based on big data clustering
CN117407630B (en) Inverse kinematics analysis and solution system for solving shoulder and elbow angles through cooperative mechanical arm
CN117182932B (en) Method and device for planning obstacle avoidance action of mechanical arm and computer equipment
CN112621761B (en) Communication time lag-oriented mechanical arm system multi-stage optimization coordination control method
CN117817659A (en) Inverse kinematics analysis solution method for solving shoulder and elbow angles by cooperative mechanical arm
Ren et al. Target Grasping and Obstacle Avoidance Motion Planning of Humanoid Robot

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21954797

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE