WO2023024317A1 - Robot obstacle avoidance method and apparatus, and robot - Google Patents

Robot obstacle avoidance method and apparatus, and robot Download PDF

Info

Publication number
WO2023024317A1
WO2023024317A1 PCT/CN2021/135758 CN2021135758W WO2023024317A1 WO 2023024317 A1 WO2023024317 A1 WO 2023024317A1 CN 2021135758 W CN2021135758 W CN 2021135758W WO 2023024317 A1 WO2023024317 A1 WO 2023024317A1
Authority
WO
WIPO (PCT)
Prior art keywords
joint
angle
robot
obstacle
obstacle avoidance
Prior art date
Application number
PCT/CN2021/135758
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 WO2023024317A1 publication Critical patent/WO2023024317A1/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/1656Programme controls characterised by programming, planning systems for manipulators
    • B25J9/1664Programme controls characterised by programming, planning systems for manipulators characterised by motion, path, trajectory planning
    • B25J9/1666Avoiding collision or forbidden zones
    • 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/1612Programme controls characterised by the hand, wrist, grip 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 obstacle avoidance method, device and robot.
  • the working environment of the robot is also changeable.
  • Various static or dynamic obstacles often appear within the working space of the robot. Obstacles collide, resulting in damage to the robot body or obstacles.
  • collisions can be predicted to a certain extent, but it is difficult to replan the trajectory in real time according to the dynamic relative pose, and it is difficult for the general obstacle avoidance algorithm to ensure that the obstacle is avoided while ensuring the completion of the task.
  • the embodiment of the present application provides a robot obstacle avoidance method, device and robot.
  • the robot obstacle avoidance method determines the joint position or angle constraint of the robot by using the joint's own limit and obstacles, and combines the joint angular velocity constraint to jointly control the constructed
  • the obstacle avoidance optimization problem is solved to ensure that the obtained solution can complete the terminal speed task as much as possible while completing the obstacle avoidance.
  • Embodiments of the present application provide a robot obstacle avoidance method, including:
  • the position of the obstacle detect whether there is a predicted collision point in all the links corresponding to the joint axis along the direction of the end of the robot, and when there is a predicted collision point, calculate the distance between the predicted collision point on the corresponding link and the obstacle.
  • Rotation angle the rotation angle is used as the anti-collision angle limit of the joint where the corresponding joint axis is located;
  • the obstacle avoidance optimization function with the joint angular velocity as the optimization variable and the terminal velocity as the control target is solved to obtain the optimal solution of the joint angular velocity
  • the motion control of the robot is performed by using the optimal solution of the joint angular velocity.
  • the detection according to the position of the obstacle whether there is a predicted collision point of all the connecting rods corresponding to the joint axis along the direction of the end of the robot includes:
  • intersection point When there is an intersection point between the rotation track and any connecting rod, the intersection point is determined to be a predicted collision point.
  • the detection according to the position of the obstacle whether there is a predicted collision point for all the connecting rods corresponding to the joint axis along the direction of the end of the robot includes:
  • intersection point When there is an intersection point between the rotation track and any connecting rod, the intersection point is determined to be a predicted collision point.
  • the calculating the rotation angle between the predicted collision point on the corresponding link and the obstacle includes:
  • a second rotation angle at which the obstacle rotates counterclockwise to the predicted collision point is calculated according to the first rotation angle, and the second rotation angle is used as a lower limit of an anti-collision angle.
  • the physical angle limit of the joint includes the upper limit of the physical angle and the lower limit of the physical angle of the joint, and the determination based on the physical angle limit of the corresponding joint of the robot and the anti-collision angle limit Angle constraints of the corresponding joints described above, including:
  • a maximum value is selected from the lower limit of the physical angle and the difference between the joint angle at the current moment and the lower limit of the anti-collision angle as the lower limit of the joint angle constraint.
  • each group of rotation angles is used as multiple anti-collision angle limits of the joint where the corresponding joint axis is located; the multiple anti-collision angle limits are used to determine the corresponding joint with the physical angle limit of the corresponding joint angle constraints.
  • the multiple anti-collision angle limits and the physical angle limits of the corresponding joints determine the angle constraints of the corresponding joints according to the following rules:
  • the obstacle avoidance optimization function uses the square of the slack variable as the optimization index; the expression of the obstacle avoidance optimization function is as follows:
  • 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
  • T is the control command period of the robot
  • Embodiments of the present application also provide a robot obstacle avoidance device, including:
  • the collision detection module is used to detect, according to the position of the obstacle, whether there is a predicted collision point on all the connecting rods corresponding to the joint axis along the direction of the end of the robot, and when there is a predicted collision point, calculate the relationship between the predicted collision point on the corresponding connecting rod and the predicted collision point.
  • the rotation angle between the obstacles, the rotation angle is used as the anti-collision angle limit of the joint where the corresponding joint axis is located;
  • An angle constraint determination module configured to determine the angle constraint of the joint based on the physical angle limit of the joint and the anti-collision angle limit;
  • the optimization solution module is used to solve the obstacle avoidance optimization function with the joint angular velocity as the optimization variable and the terminal velocity as the control target according to the angular constraints of each joint of the robot and the self-constraints of each joint angular velocity, to obtain the joint angular velocity the optimal solution;
  • the motion control module is used to control the motion of the robot by using the optimal solution of the joint angular velocity.
  • 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 robot obstacle avoidance method.
  • the embodiment of the present application also provides a readable storage medium, which stores a computer program, and when the computer program is executed by a processor, implements the above-mentioned robot obstacle avoidance method.
  • the obstacle avoidance method of the robot in the embodiment of the present application uses obstacles as the joint position or angle constraints of the robot, and at the same time considers the self-limiting of the robot joints to determine the joint angle limit, and also combines the self-constraints of the joint angular velocity to control the obstacle avoidance.
  • the optimization problem solves the joint angular velocity to ensure that the obtained solution can complete obstacle avoidance; and because the obstacle avoidance optimization problem takes the terminal velocity as the control target, it also completes the task of following the terminal velocity as much as possible while performing obstacle avoidance.
  • Fig. 1 shows the schematic flow chart of the robot obstacle avoidance method of the embodiment of the present application
  • FIG. 2 shows a schematic flow diagram of a planar robot detecting and predicting a collision point in a robot obstacle avoidance method according to an embodiment of the present application
  • Fig. 3 a and Fig. 3 b respectively show the schematic diagram that the planar robot of the robot obstacle avoidance method of the embodiment of the present application collides with an obstacle and a plurality of obstacles;
  • FIG. 4 shows a schematic flow chart of detecting and predicting a collision point for a space-moving robot in a robot obstacle avoidance method according to an embodiment of the present application
  • Fig. 5 shows a schematic diagram of a space robot colliding with an obstacle in the robot obstacle avoidance method of the embodiment of the present application
  • Fig. 6 shows a schematic structural diagram of a robot obstacle avoidance 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 this application will use the quadratic programming problem to solve the obstacle avoidance optimization.
  • the robot obstacle avoidance method proposed in the embodiment of this application constructs an obstacle avoidance optimization function with the joint angular velocity as the optimization variable and the terminal velocity as the control target, adding obstacles as the position or angle limit of the robot and considering the physical properties of the robot joints. limit to obtain the angle constraints of the corresponding joints, and then add the joint angle constraints and the joint angular velocity's own constraints as the constraints of the obstacle avoidance optimization function to optimally solve the obstacle avoidance optimization function.
  • the solution obtained in this way makes While avoiding obstacles, the robot also completes the terminal speed following task as much as possible. The following will be described in conjunction with specific embodiments.
  • this embodiment proposes an obstacle avoidance method for a robot, which can be used for obstacle avoidance in different scenarios with one or more obstacles.
  • the robot obstacle avoidance method includes:
  • Step S110 according to the position of the obstacle, detect whether there is a predicted collision point on all the links of the corresponding joint axis along the direction of the end of the robot, and if there is a predicted collision point, calculate the distance between the predicted collision point on the corresponding link and the obstacle Rotation angle.
  • the rotation angle is used as the anti-collision angle limit of the joint where the corresponding joint axis is located.
  • the above-mentioned predicted collision point position refers to the predicted position where the robot will come into contact with the obstacle.
  • the position of the obstacle is transformed into a constraint on the joint angle, and then used as a constraint condition of the obstacle avoidance optimization function, so that the obtained solution can avoid collision with the obstacle.
  • planar motion robots abbreviated as planar robots
  • space motion robots referred to as space robots
  • some mechanical arms used for plane grinding are usually planar robots; Workshop processing manipulators, biped robots, etc. that perform relatively complex operations in three-dimensional space are usually space robots, but of course they are not limited thereto.
  • the detection process of whether there is a predicted collision point in the above step S110 includes:
  • Sub-step S210 calculating the distance from the corresponding joint axis to the obstacle according to the position of the obstacle.
  • the robot can obtain them in advance; for dynamic obstacles with indefinite positions, the robot can obtain them through real-time communication with external devices or real-time detection using sensory sensors, etc., which is not limited here.
  • the obstacle avoidance method of this embodiment may be applicable to obstacle avoidance of static obstacles and also applicable to obstacle avoidance of dynamic obstacles, and the principle is the same.
  • this embodiment calculates the distance from the obstacle to each joint axis of the robot, and judges whether the joint where the corresponding joint axis is located needs to add the corresponding obstacle constraint.
  • a known obstacle can be regarded as a point in the plane, and for a joint axis, it is recorded as the origin, and the coordinates of the two points are used to calculate the distance from the obstacle point to the origin of the current joint axis.
  • Sub-step S220 when locking all the joints of the corresponding joint axis along the direction of the robot base, take the corresponding joint axis as the origin and the above-mentioned distance as the radius, calculate the virtual rotation of the obstacle along the link motion plane connected by the corresponding joint axis rotation trajectory.
  • the corresponding joint axis is marked as the origin O, and P is the position of the obstacle.
  • O the origin
  • OP the position of the obstacle.
  • Sub-step S230 when there is an intersection point between the rotation track and any connecting rod, determine the intersection point as the predicted collision point.
  • the joint axis O can be used to The distance of the obstacle P and the position of the predicted collision point C are calculated using the triangle principle to calculate the rotation angle between the obstacle and the predicted collision point.
  • the rotation angle will be used as the anti-collision angle limit of the joint where the joint axis O is located.
  • the above-mentioned rotation may include clockwise rotation and counterclockwise rotation.
  • the obstacle is rotated clockwise to the first rotation angle of the predicted collision point As the upper limit of the anti-collision angle limit; and, according to the first rotation angle Calculate the counterclockwise rotation of the obstacle to the second rotation angle of the predicted collision point Take it as the lower limit of the anti-collision angle limit. Therefore, the anti-collision angle limit of the joint where the joint axis O is located can be expressed as
  • an obstacle may intersect with multiple links at the same time.
  • the corresponding rotation angle can be calculated for each predicted collision point as the multiple anti-collision angle limits bit.
  • the rotation angle between each predicted collision point and the obstacle is calculated, and the calculated Each group of rotation angles will be used as multiple anti-collision angle limits for the joint where the corresponding joint axis is located.
  • the detection process of whether there is a predicted collision point in the above step S110 includes:
  • Sub-step S310 calculating the vertical distance from the corresponding joint axis to the obstacle according to the position of the obstacle. Exemplarily, reference may be made to the above-mentioned step S210 for details, and the description will not be repeated here.
  • sub-step S320 the obstacle is expanded to a preset length in a direction parallel to the corresponding joint axis to obtain an expanded area of the obstacle.
  • this embodiment will expand the obstacle.
  • the expansion is performed according to a preset length in a direction parallel to the corresponding joint axis to obtain a corresponding expansion area, as shown in FIG. 5 .
  • the expanded region of the obstacle can be used for collision detection. It can be understood that the preset length can be determined by the actual shape of the obstacle.
  • Sub-step S330 when locking all the joints with the corresponding joint axis along the direction of the robot base, take the corresponding joint axis as the origin and the above-mentioned vertical distance as the radius, and calculate the virtual rotation trajectory of the expansion area around the corresponding joint axis.
  • sub-step S330 The principle of sub-step S330 is similar to that of the above-mentioned step S120. The only difference between them is that in sub-step S120, an obstacle point rotates in the plane of motion of the connecting rod, while in sub-step S330, an expansion area rotates around a joint axis, as shown in Figure 5 .
  • Sub-step S340 when there is an intersection point between the rotation trajectory and any connecting rod, then determine the intersection point as the predicted collision point.
  • intersection point C is the predicted collision point.
  • the corresponding rotation angle can also be calculated by using the triangle principle according to the vertical distance R, the preset length L, etc. The principle is similar to the calculation method of the rotation angle of the above-mentioned planar motion robot, and will not be described again here.
  • Step S120 determining the angle constraint of the joint based on the physical angle limit and the anti-collision angle limit of the joint.
  • the angle constraint of the joint is jointly determined by taking the obstacle as the angle constraint of the robot and considering the physical limit of the robot's joint itself, and adding it to the constraints of the constructed obstacle avoidance optimization function, so that It is guaranteed that the obtained kinematic inverse solution will not collide with obstacles and can satisfy its own structural constraints. It can be understood that if the corresponding joint does not have the above-mentioned anti-collision angle limit constraint, then the angle constraint of the joint only needs to consider the physical angle limit of the joint.
  • the joint angle self-constraint due to the limitation of the joint structure of the robot, some joint positions or angles are unreachable, so there will be joint physical limitations.
  • the physical limit of the joint mainly refers to the limit of the joint position; for the rotational joint, the physical limit of the joint mainly refers to the limit of the joint angle.
  • the obstacle avoidance method in this embodiment can be applied to a robot of a rotary joint type and a robot of a translational joint type, and the principle is similar.
  • the angle physical limit of a joint includes a physical angle upper limit and a physical angle lower limit.
  • the angle constraint includes the upper limit of the above-mentioned angle constraint and the lower limit of the angle constraint, and for the above-mentioned step S120, exemplarily, includes:
  • the angle constraint of joint i corresponding to the current joint axis can be determined as follows: from the upper limit of the physical angle of the joint i And the joint angle of joint i at time t Upper limit of anti-collision angle The sum of these two values, choose the minimum value as the upper limit of the angle constraint of the joint i; and, from the lower limit of the physical angle of the joint i And the joint angle of joint i at time t and anti-collision angle lower limit The difference between these two values, the maximum value is selected as the lower limit of the angle constraint of the joint i. Exemplarily, if expressed in a formula, then:
  • the rotation angle between each predicted collision point and the obstacle is calculated, and each set of calculated rotation angles will be used as the joint axis where the joint axis is located.
  • the upper limit of the upper limit of the k anti-collision angle can be determined first, and then from the minimum value of the upper limit and the sum of the joint angle of the joint at time t, and the upper limit of the physical angle of joint i The smaller value is selected as the upper limit of the angle constraint.
  • the maximum value of the lower limits of the k anti-collision angles can be determined first, and then from the difference between the joint angle of the joint at time t and the maximum value of the lower limit, and the physical Angle lower limit The larger value is selected as the lower limit of the angle constraint. If expressed by the formula, there are:
  • k is the number of predicted collision points; and are the upper and lower limits of the physical angle of the i-th joint, respectively; is the joint angle of the i-th joint at time t; and are the upper and lower bounds of the angle constraints of the i-th joint, respectively.
  • Step S130 according to the angular constraints of each joint of the robot and the self-constraints of each joint angular velocity, solve the obstacle avoidance optimization function with the joint angular velocity as the optimization variable and the terminal velocity as the control target to obtain the optimal solution of the joint angular velocity.
  • this embodiment will pre-build an obstacle avoidance optimization function with the joint angular velocity as the control variable and the end speed as the control target.
  • the obstacle avoidance optimization function will add corresponding constraints related to obstacles, of course, other constraints can also be added, for example, it can include but not limited to the robot's own physical constraints including the joint angle or joint position, the joint angular velocity's own physical constraints Constraints, etc. More constraints can be added according to actual needs.
  • joint angle constraint that considers obstacles. If joint i does not have the above-mentioned anti-collision angle limit, that is, it will not collide with obstacles, then in the formula and can be replaced by and
  • each joint angular velocity for example, if the upper limit of the i-th joint angular velocity is The lower limit is Then the i-th joint angular velocity Should meet:
  • the above-mentioned obstacle avoidance optimization function will introduce a slack variable, and an index to be optimized is obtained 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 square of the slack variable is used as the optimization index, and the above-mentioned composite constraint of joint angular velocity including obstacles is taken as an example.
  • the expression of the obstacle avoidance optimization function is as follows:
  • some open source solvers can be used to solve the quadratic programming, so as to obtain the optimal joint angular velocity. It can be understood that when
  • 2 0, it means has a solution, that is, there are joint angular velocities under the constraints The terminal velocity of the robot is And when
  • Step S140 using the optimal solution of the joint angular velocity to control the motion of the robot.
  • the joint angular velocity may be used for integral processing to obtain an optimal joint angle or joint position. Furthermore, the calculated joint angles or joint positions are used as control commands and sent to the corresponding joint motors, so that the robot can realize obstacle avoidance motion. At the same time, the end of the robot can also perform corresponding speed following tasks.
  • the robot obstacle avoidance method of this embodiment uses obstacles as the joint angle or position constraints of the robot, and combines the joint angle or position, and the joint angular velocity's own constraints to solve the joint angular velocity of the constructed obstacle avoidance optimization problem to ensure that the obtained
  • the solution can complete obstacle avoidance; at the same time, because the obstacle avoidance optimization problem takes the terminal speed as the control target, it can also complete the terminal speed following task as much as possible while avoiding obstacles.
  • the obstacle avoidance method can be applied to various scenarios such as one or more obstacles, dynamic or static obstacles, etc., and has universality. In addition, this method has nothing to do with the joint type and motion type of the robot, and it is universal. Whether it is a robot with rotational joints or translational joints, or a planar motion robot or a space motion robot, this method can be used for joint
  • the angular velocity is optimized to achieve the purpose of obstacle avoidance control.
  • the robot obstacle avoidance device 100 includes:
  • the collision detection module 110 is used to detect, according to the position of the obstacle, whether there is a predicted collision point on all the links of the corresponding joint axis along the direction of the end of the robot, and when there is a predicted collision point, calculate the relationship between the predicted collision point on the corresponding link and The rotation angle between the obstacles, the rotation angle is used as the anti-collision angle limit of the joint where the corresponding joint axis is located.
  • An angle constraint determining module 120 configured to determine the angle constraint of the corresponding joint based on the anti-collision angle limit of the joint and the physical angle limit of the corresponding joint.
  • the optimization solving module 130 is used to solve the obstacle avoidance optimization function with the joint angular velocity as the optimization variable and the terminal velocity as the control target according to the angular constraints of each joint of the robot and the self-constraints of each joint angular velocity, to obtain the joint Optimal solution for angular velocity.
  • the motion control module 140 is configured to use the optimal solution of the joint angular velocity to control the motion 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, for example, the robot may be a robot with multiple degrees of freedom.
  • the robot includes a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to enable the mobile terminal to execute the above robot obstacle avoidance method or the various modules in the above robot obstacle avoidance device function.
  • 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 described are realized 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 medium includes: 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

A robot obstacle avoidance method, a robot obstacle avoidance apparatus (100), and a robot. The robot obstacle avoidance method comprises: detecting, according to the position of an obstacle, whether a predicted collision point is present in all linkages of corresponding joint shafts along a robot end direction, and if a predicted collision point is present, calculating a rotating angle between the predicted collision point on the corresponding linkage and the obstacle, wherein the rotating angle is used as an anti-collision angle limit of the joint where the corresponding joint shaft is located (S110); determining an angle constraint of the joint on the basis of a physical angle limit and the anti-collision angle limit of the joint (S120); solving, according to the angle constraint of each joint of the robot and a self-constraint of each joint angular velocity, an obstacle avoidance optimization function with joint angular velocity as an optimization variable and tail end velocity as a control target to obtain an optimal solution of the joint angular velocity (S130); and performing motion control on the robot by using the optimal solution of the joint angular velocity (S140).

Description

一种机器人避障方法、装置和机器人A robot obstacle avoidance method, device and robot
相关申请的交叉引用Cross References to Related Applications
本申请要求于2021年08月24日提交中国专利局的申请号为2021109770276、名称为“一种机器人避障方法、装置和机器人”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 2021109770276 and titled "A Method, Device and Robot for Robot Obstacle Avoidance" submitted to the China Patent Office on August 24, 2021, the entire contents of which are incorporated herein by reference. Applying.
技术领域technical field
本申请涉及机器人控制技术领域,尤其涉及一种机器人避障方法、装置和机器人。The present application relates to the technical field of robot control, in particular to a robot obstacle avoidance method, device and robot.
背景技术Background technique
随着机器人应用范围的扩展,机器人所处的工作环境也是多变的,在机器人的作业空间范围内,经常会出现各类静态或者动态的障碍物,如果不做处理,则很可能出现机器人与障碍物相撞,导致机器人本体或者障碍物受到伤害。虽然基于视觉设备动态监测机器人与环境的距离,能够一定程度上对碰撞进行预知,但很难实时根据动态的相对位姿对轨迹进行重新规划,而且一般的避障算法很难保证在躲避障碍物的同时保证任务的完成。With the expansion of the application scope of the robot, the working environment of the robot is also changeable. Various static or dynamic obstacles often appear within the working space of the robot. Obstacles collide, resulting in damage to the robot body or obstacles. Although the distance between the robot and the environment can be dynamically monitored based on visual equipment, collisions can be predicted to a certain extent, but it is difficult to replan the trajectory in real time according to the dynamic relative pose, and it is difficult for the general obstacle avoidance algorithm to ensure that the obstacle is avoided while ensuring the completion of the task.
申请内容application content
本申请实施例提供一种机器人避障方法、装置和机器人,该机器人避障方法通过利用关节自身限位及障碍物来确定机器人的关节位置或角度约束,并结合关节角速度约束来共同对构建的避障优化问题进行求解,以保证得到的解在完成避障的同时,尽可能地完成末端速度任务。The embodiment of the present application provides a robot obstacle avoidance method, device and robot. The robot obstacle avoidance method determines the joint position or angle constraint of the robot by using the joint's own limit and obstacles, and combines the joint angular velocity constraint to jointly control the constructed The obstacle avoidance optimization problem is solved to ensure that the obtained solution can complete the terminal speed task as much as possible while completing the obstacle avoidance.
本申请的实施例提供一种机器人避障方法,包括:Embodiments of the present application provide a robot obstacle avoidance method, including:
根据障碍物的位置检测对应关节轴沿机器人末端方向的所有连杆是否存在预测碰撞点,并在存在预测碰撞点时,计算对应连杆上的所述预测碰撞点与所述障碍物之间的旋转角度,所述旋转角度作为所述对应关节轴所在关节的防碰撞角度限位;According to the position of the obstacle, detect whether there is a predicted collision point in all the links corresponding to the joint axis along the direction of the end of the robot, and when there is a predicted collision point, calculate the distance between the predicted collision point on the corresponding link and the obstacle. Rotation angle, the rotation angle is used as the anti-collision angle limit of the joint where the corresponding joint axis is located;
基于所述关节的物理角度限位和所述防碰撞角度限位确定所述关节的角度约束;determining an angle constraint of the joint based on the physical angle limit of the joint and the anti-collision angle limit;
根据所述机器人各个关节的所述角度约束和各个关节角速度的自身约束对以关节角速度为优化变量、末端速度为控制目标的避障优化函数进行求解,得到所述关节角速 度的最优解;According to the angular constraints of each joint of the robot and the self-constraints of each joint angular velocity, the obstacle avoidance optimization function with the joint angular velocity as the optimization variable and the terminal velocity as the control target is solved to obtain the optimal solution of the joint angular velocity;
利用所述关节角速度的最优解对所述机器人进行运动控制。The motion control of the robot is performed by using the optimal solution of the joint angular velocity.
在一些实施例中,所述机器人为平面运动型机器人时,所述根据障碍物的位置检测对应关节轴沿机器人末端方向的所有连杆是否存在预测碰撞点,包括:In some embodiments, when the robot is a planar motion robot, the detection according to the position of the obstacle whether there is a predicted collision point of all the connecting rods corresponding to the joint axis along the direction of the end of the robot includes:
根据障碍物的位置计算所述对应关节轴到所述障碍物的距离;calculating the distance from the corresponding joint axis to the obstacle according to the position of the obstacle;
在锁定所述对应关节轴沿机器人基座方向的所有关节时,以所述对应关节轴为原点、所述距离为半径,计算所述障碍物沿所述对应关节轴连接的连杆运动平面进行虚拟旋转的旋转轨迹;When locking all the joints of the corresponding joint axis along the direction of the robot base, with the corresponding joint axis as the origin and the distance as the radius, calculate the movement plane of the obstacle along the connecting rod connected to the corresponding joint axis Rotation trajectory of virtual rotation;
当所述旋转轨迹与任意一连杆存在交点时,则确定所述交点为预测碰撞点。When there is an intersection point between the rotation track and any connecting rod, the intersection point is determined to be a predicted collision point.
在一些实施例中,所述机器人为空间运动型机器人时,所述根据障碍物的位置检测对应关节轴沿机器人末端方向的所有连杆是否存在预测碰撞点,包括:In some embodiments, when the robot is a space-moving robot, the detection according to the position of the obstacle whether there is a predicted collision point for all the connecting rods corresponding to the joint axis along the direction of the end of the robot includes:
根据障碍物的位置计算所述对应关节轴到所述障碍物的垂距;calculating the vertical distance from the corresponding joint axis to the obstacle according to the position of the obstacle;
对所述障碍物在平行于所述对应关节轴的方向上进行预设长度扩张以得到所述障碍物的膨胀区域;expanding the obstacle to a preset length in a direction parallel to the corresponding joint axis to obtain an expanded area of the obstacle;
在锁定所述对应关节轴沿机器人基座方向的所有关节时,以所述对应关节轴为原点、所述垂距为半径,计算所述膨胀区域绕所对应关节轴进行虚拟旋转的旋转轨迹;When locking all the joints of the corresponding joint axis along the direction of the robot base, using the corresponding joint axis as the origin and the vertical distance as the radius, calculate the rotation trajectory of the virtual rotation of the expansion area around the corresponding joint axis;
当所述旋转轨迹与任意一连杆存在交点时,则确定所述交点为预测碰撞点。When there is an intersection point between the rotation track and any connecting rod, the intersection point is determined to be a predicted collision point.
在一些实施例中,所述计算对应连杆上的所述预测碰撞点与所述障碍物之间的旋转角度,包括:In some embodiments, the calculating the rotation angle between the predicted collision point on the corresponding link and the obstacle includes:
根据所述对应关节轴到所述障碍物的所述距离和所述预测碰撞点的位置计算所述障碍物顺时针旋转到所述预测碰撞点的第一旋转角度,所述第一旋转角度作为防碰撞角度上限;Calculate a first rotation angle at which the obstacle rotates clockwise to the predicted collision point according to the distance from the corresponding joint axis to the obstacle and the position of the predicted collision point, and the first rotation angle is used as Anti-collision angle upper limit;
根据所述第一旋转角度计算所述障碍物逆时针旋转到所述预测碰撞点的第二旋转角度,所述第二旋转角度作为防碰撞角度下限。A second rotation angle at which the obstacle rotates counterclockwise to the predicted collision point is calculated according to the first rotation angle, and the second rotation angle is used as a lower limit of an anti-collision angle.
在一些实施例中,所述关节的物理角度限位包括所述关节的物理角度上限和物理角度下限,所述基于所述机器人对应关节的物理角度限位和所述防碰撞角度限位确定所述对应关节的角度约束,包括:In some embodiments, the physical angle limit of the joint includes the upper limit of the physical angle and the lower limit of the physical angle of the joint, and the determination based on the physical angle limit of the corresponding joint of the robot and the anti-collision angle limit Angle constraints of the corresponding joints described above, including:
从所述物理角度上限、和当前时刻的关节角度与所述防碰撞角度上限之和中选取出最小值作为所述关节的角度约束上限;Selecting a minimum value from the upper limit of the physical angle and the sum of the joint angle at the current moment and the upper limit of the anti-collision angle as the upper limit of the joint angle constraint;
从所述物理角度下限、和当前时刻的关节角度与所述防碰撞角度下限之差中选取出最大值作为所述关节的角度约束下限。A maximum value is selected from the lower limit of the physical angle and the difference between the joint angle at the current moment and the lower limit of the anti-collision angle as the lower limit of the joint angle constraint.
在一些实施例中,当所述障碍物存在多个的情况下,若存在两个或两个以上的预测碰撞点,则计算每个所述预测碰撞点与所述障碍物之间的旋转角度,各组所述旋转角度作为所述对应关节轴所在关节的多个防碰撞角度限位;所述多个防碰撞角度限位用于与对应关节的所述物理角度限位确定所述对应关节的角度约束。In some embodiments, when there are multiple obstacles, if there are two or more predicted collision points, the rotation angle between each predicted collision point and the obstacle is calculated , each group of rotation angles is used as multiple anti-collision angle limits of the joint where the corresponding joint axis is located; the multiple anti-collision angle limits are used to determine the corresponding joint with the physical angle limit of the corresponding joint angle constraints.
在一些实施例中,所述多个防碰撞角度限位与对应关节的所述物理角度限位按照如下规则来确定所述对应关节的角度约束:In some embodiments, the multiple anti-collision angle limits and the physical angle limits of the corresponding joints determine the angle constraints of the corresponding joints according to the following rules:
从所述多个防碰撞角度的上限中选取出上限最小值,并从对应关节在当前时刻的关节角度与所述上限最小值之和、以及所述对应关节的物理角度上限中选取出最小值,以作为所述对应关节的角度约束的上限;Select an upper minimum value from the upper limits of the multiple anti-collision angles, and select a minimum value from the sum of the joint angle of the corresponding joint at the current moment and the upper minimum value, and the upper limit of the physical angle of the corresponding joint. , as the upper limit of the angle constraint of the corresponding joint;
从所述多个防碰撞角度的下限中选取出下限最大值,并从对应关节在当前时刻的关节角度与所述下限最大值之差、以及所述对应关节的物理角度下限中选取出最大值,以作为所述对应关节的角度约束的下限。Select the maximum value of the lower limit from the lower limits of the multiple anti-collision angles, and select the maximum value from the difference between the joint angle of the corresponding joint at the current moment and the maximum value of the lower limit, and the lower limit of the physical angle of the corresponding joint. , as the lower limit of the angle constraints of the corresponding joints.
在一些实施例中,所述避障优化函数以松弛变量的平方为优化指标;所述避障优化函数的表达式如下:In some embodiments, the obstacle avoidance optimization function uses the square of the slack variable as the optimization index; the expression of the obstacle avoidance optimization function is as follows:
Figure PCTCN2021135758-appb-000001
Figure PCTCN2021135758-appb-000001
其中,w为所述松弛变量,J为所述机器人的速度雅可比矩阵,
Figure PCTCN2021135758-appb-000002
为所述机器人所有关节的关节角速度向量;
Figure PCTCN2021135758-appb-000003
为所述机器人的关节末端速度向量;
Figure PCTCN2021135758-appb-000004
Figure PCTCN2021135758-appb-000005
分别为第i个关节的关节角速度上限和下限;
Figure PCTCN2021135758-appb-000006
Figure PCTCN2021135758-appb-000007
分别为第i个关节的所述角度约束上限和下限;
Figure PCTCN2021135758-appb-000008
为第i个关节的关节角速度;T为所述机器人的控制指令周期;
Figure PCTCN2021135758-appb-000009
为第i个关节在t时刻的关节角度。
Wherein, w is the slack variable, J is the speed Jacobian matrix of the robot,
Figure PCTCN2021135758-appb-000002
is the joint angular velocity vector of all joints of the robot;
Figure PCTCN2021135758-appb-000003
is the joint terminal velocity vector of the robot;
Figure PCTCN2021135758-appb-000004
and
Figure PCTCN2021135758-appb-000005
are the upper limit and lower limit of the joint angular velocity of the i-th joint, respectively;
Figure PCTCN2021135758-appb-000006
and
Figure PCTCN2021135758-appb-000007
are the upper limit and lower limit of the angle constraints of the i-th joint, respectively;
Figure PCTCN2021135758-appb-000008
is the joint angular velocity of the i-th joint; T is the control command period of the robot;
Figure PCTCN2021135758-appb-000009
is the joint angle of the i-th joint at time t.
本申请的实施例还提供一种机器人避障装置,包括:Embodiments of the present application also provide a robot obstacle avoidance device, including:
碰撞检测模块,用于根据障碍物的位置检测对应关节轴沿机器人末端方向的所有连杆是否存在预测碰撞点,并在存在预测碰撞点时,计算对应连杆上的所述预测碰撞点与 所述障碍物之间的旋转角度,所述旋转角度作为所述对应关节轴所在关节的防碰撞角度限位;The collision detection module is used to detect, according to the position of the obstacle, whether there is a predicted collision point on all the connecting rods corresponding to the joint axis along the direction of the end of the robot, and when there is a predicted collision point, calculate the relationship between the predicted collision point on the corresponding connecting rod and the predicted collision point. The rotation angle between the obstacles, the rotation angle is used as the anti-collision angle limit of the joint where the corresponding joint axis is located;
角度约束确定模块,用于基于所述关节的物理角度限位和所述防碰撞角度限位确定所述关节的角度约束;An angle constraint determination module, configured to determine the angle constraint of the joint based on the physical angle limit of the joint and the anti-collision angle limit;
优化求解模块,用于根据所述机器人各个关节的所述角度约束和各个关节角速度的自身约束对以关节角速度为优化变量、末端速度为控制目标的避障优化函数进行求解,得到所述关节角速度的最优解;The optimization solution module is used to solve the obstacle avoidance optimization function with the joint angular velocity as the optimization variable and the terminal velocity as the control target according to the angular constraints of each joint of the robot and the self-constraints of each joint angular velocity, to obtain the joint angular velocity the optimal solution;
运动控制模块,用于利用所述关节角速度的最优解对所述机器人进行运动控制。The motion control module is used to control the motion of the robot by using the optimal solution of the joint angular velocity.
本申请的实施例还提供一种机器人,所述机器人包括处理器和存储器,所述存储器存储有计算机程序,所述处理器用于执行所述计算机程序以实施上述的机器人避障方法。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 robot obstacle avoidance method.
本申请的实施例还提供一种可读存储介质,其存储有计算机程序,所述计算机程序被处理器执行时,实施上述的机器人避障方法。The embodiment of the present application also provides a readable storage medium, which stores a computer program, and when the computer program is executed by a processor, implements the above-mentioned robot obstacle avoidance method.
本申请的实施例具有如下有益效果:Embodiments of the application have the following beneficial effects:
本申请实施例的机器人避障方法通过将障碍物作为机器人的关节位置或角度约束,同时考虑机器人关节的自身限位来确定关节的角度限位,还结合关节角速度的自身约束等来对避障优化问题进行关节角速度求解,以保证得到的解能够完成避障;并且由于该避障优化问题以末端速度为控制目标,在进行避障的同时,还尽可能地完成末端速度跟随的任务。The obstacle avoidance method of the robot in the embodiment of the present application uses obstacles as the joint position or angle constraints of the robot, and at the same time considers the self-limiting of the robot joints to determine the joint angle limit, and also combines the self-constraints of the joint angular velocity to control the obstacle avoidance. The optimization problem solves the joint angular velocity to ensure that the obtained solution can complete obstacle avoidance; and because the obstacle avoidance optimization problem takes the terminal velocity as the control target, it also completes the task of following the terminal velocity as much as possible while performing obstacle avoidance.
附图说明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 shows the schematic flow chart of the robot obstacle avoidance method of the embodiment of the present application;
图2示出了本申请实施例机器人避障方法的平面机器人检测预测碰撞点的流程示意图;FIG. 2 shows a schematic flow diagram of a planar robot detecting and predicting a collision point in a robot obstacle avoidance method according to an embodiment of the present application;
图3a和图3b分别示出了本申请实施例机器人避障方法的平面机器人与一个障碍物 和多个障碍物发生碰撞的示意图;Fig. 3 a and Fig. 3 b respectively show the schematic diagram that the planar robot of the robot obstacle avoidance method of the embodiment of the present application collides with an obstacle and a plurality of obstacles;
图4示出了本申请实施例机器人避障方法的空间运动型机器人检测预测碰撞点的流程示意图;FIG. 4 shows a schematic flow chart of detecting and predicting a collision point for a space-moving robot in a robot obstacle avoidance method according to an embodiment of the present application;
图5示出了本申请实施例机器人避障方法的空间机器人与一个障碍物发生碰撞的示意图;Fig. 5 shows a schematic diagram of a space robot colliding with an obstacle in the robot obstacle avoidance method of the embodiment of the present application;
图6示出了本申请实施例机器人避障装置的结构示意图。Fig. 6 shows a schematic structural diagram of a robot obstacle avoidance 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 PCTCN2021135758-appb-000010
Figure PCTCN2021135758-appb-000010
Figure PCTCN2021135758-appb-000011
Figure PCTCN2021135758-appb-000011
其中,
Figure PCTCN2021135758-appb-000012
为优化指标,H为海森矩阵;x为n维优化变量;f为行向量;A eq·x=b eq为等式约束,A eq为mxn(m≤n)维矩阵,b eq为m行列向量;Ax≤b为不等式约束,A为n列矩阵,b为列向量。
in,
Figure PCTCN2021135758-appb-000012
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 this application will use the quadratic programming problem to solve the obstacle avoidance optimization.
本申请实施例提出的机器人避障方法通过构建一个以关节角速度为优化变量、末端速度为控制目标的避障优化函数,将障碍物添加为机器人的位置或角度限位并考虑机器人关节的自身物理限位来得到对应关节的角度约束,然后将关节的角度约束和关节角速度的自身约束添加作为避障优化函数的约束条件,以用于对避障优化函数进行最优求解,这样得到的解使得机器人在完成避障的同时,还尽可能地完成末端速度跟随任务。下面结合具体的实施例来进行说明。The robot obstacle avoidance method proposed in the embodiment of this application constructs an obstacle avoidance optimization function with the joint angular velocity as the optimization variable and the terminal velocity as the control target, adding obstacles as the position or angle limit of the robot and considering the physical properties of the robot joints. limit to obtain the angle constraints of the corresponding joints, and then add the joint angle constraints and the joint angular velocity's own constraints as the constraints of the obstacle avoidance optimization function to optimally solve the obstacle avoidance optimization function. The solution obtained in this way makes While avoiding obstacles, the robot also completes the terminal speed following task as much as possible. The following will be described in conjunction with specific embodiments.
实施例1Example 1
请参照图1,本实施例提出一种机器人避障方法,可用于具有一个或多个障碍物等不同场景下进行避障。Referring to FIG. 1 , this embodiment proposes an obstacle avoidance method for a robot, which can be used for obstacle avoidance in different scenarios with one or more obstacles.
示范性地,该机器人避障方法包括:Exemplarily, the robot obstacle avoidance method includes:
步骤S110,根据障碍物的位置检测对应关节轴沿机器人末端方向的所有连杆是否存在预测碰撞点,并在存在预测碰撞点时,计算对应连杆上的该预测碰撞点与障碍物之间的旋转角度。其中,该旋转角度作为该对应关节轴所在关节的防碰撞角度限位。Step S110, according to the position of the obstacle, detect whether there is a predicted collision point on all the links of the corresponding joint axis along the direction of the end of the robot, and if there is a predicted collision point, calculate the distance between the predicted collision point on the corresponding link and the obstacle Rotation angle. Wherein, the rotation angle is used as the anti-collision angle limit of the joint where the corresponding joint axis is located.
其中,上述的预测碰撞点位置是指预测的机器人与障碍物将产生接触的位置。本实施例中,通过将障碍物的位置转变成对关节角度的约束,进而将其作为避障优化函数的约束条件,这样使得求解得到的解能够避免与障碍物发生碰撞。Wherein, the above-mentioned predicted collision point position refers to the predicted position where the robot will come into contact with the obstacle. In this embodiment, the position of the obstacle is transformed into a constraint on the joint angle, and then used as a constraint condition of the obstacle avoidance optimization function, so that the obtained solution can avoid collision with the obstacle.
若按照机器人的运动类型分类,主要分为平面运动型机器人(简称平面机器人)和空间运动型机器人(简称空间机器人),例如,一些用于平面打磨的机械臂通常为平面机器人;而对于一些能够在三维空间中执行比较复杂操作的车间加工机械臂、双足机器人等通常为空间机器人,当然并不限于此。According to the type of motion of the robot, it is mainly divided into planar motion robots (abbreviated as planar robots) and space motion robots (referred to as space robots). For example, some mechanical arms used for plane grinding are usually planar robots; Workshop processing manipulators, biped robots, etc. that perform relatively complex operations in three-dimensional space are usually space robots, but of course they are not limited thereto.
以平面机器人为例,在一种实施方式中,示范性地,如图2所示,上述步骤S110中的是否存在预测碰撞点的检测过程,包括:Taking a planar robot as an example, in one embodiment, as shown in Figure 2, the detection process of whether there is a predicted collision point in the above step S110 includes:
子步骤S210,根据障碍物的位置计算对应关节轴到障碍物的距离。Sub-step S210, calculating the distance from the corresponding joint axis to the obstacle according to the position of the obstacle.
通常地,对于位置固定的障碍物,机器人可以提前获得;而对于位置不定的动态障碍物,机器人可以通过与外界设备实时通信或利用感知传感器等实时检测获得,这里并不作限定。可以理解,本实施例的避障方法可以适用于静态障碍物的避障,也适用于动态障碍物的避障,原理相同。Usually, for fixed obstacles, the robot can obtain them in advance; for dynamic obstacles with indefinite positions, the robot can obtain them through real-time communication with external devices or real-time detection using sensory sensors, etc., which is not limited here. It can be understood that the obstacle avoidance method of this embodiment may be applicable to obstacle avoidance of static obstacles and also applicable to obstacle avoidance of dynamic obstacles, and the principle is the same.
为了将障碍物的位置转换为对应关节的关节约束,本实施例通过计算该障碍物到该机器人的每个关节轴的距离,并判断对应关节轴所在关节是否需要添加相应的障碍物约 束。示范性地,可视为已知的障碍物为平面内的一点,对于一关节轴,记为原点,此时利用两点的坐标即计算出该障碍点到当前关节轴原点的距离。In order to convert the position of the obstacle into the joint constraint of the corresponding joint, this embodiment calculates the distance from the obstacle to each joint axis of the robot, and judges whether the joint where the corresponding joint axis is located needs to add the corresponding obstacle constraint. Exemplarily, a known obstacle can be regarded as a point in the plane, and for a joint axis, it is recorded as the origin, and the coordinates of the two points are used to calculate the distance from the obstacle point to the origin of the current joint axis.
子步骤S220,在锁定该对应关节轴沿机器人基座方向的所有关节时,以该对应关节轴为原点、上述距离为半径,计算障碍物沿该对应关节轴连接的连杆运动平面进行虚拟旋转的旋转轨迹。Sub-step S220, when locking all the joints of the corresponding joint axis along the direction of the robot base, take the corresponding joint axis as the origin and the above-mentioned distance as the radius, calculate the virtual rotation of the obstacle along the link motion plane connected by the corresponding joint axis rotation trajectory.
本实施例中,对于一个关节轴所在关节的障碍物约束添加,仅需检测该关节后续连杆和障碍物的碰撞情况。例如,如图3a所示,对于待添加障碍物约束的一关节,其对应的关节轴记为原点O,P为障碍物的位置,示范性地,在锁定该对应关节轴沿机器人基座方向的所有关节的情况下,即在基座到该关节之间的所有关节的角度都因定在当前位置时,以O为原点,OP为半径,在连杆运动平面内进行虚拟旋转,得到相应的旋转轨迹。In this embodiment, for the obstacle constraint addition of the joint where a joint axis is located, it is only necessary to detect the collision between the subsequent link of the joint and the obstacle. For example, as shown in Figure 3a, for a joint to be constrained by an obstacle, the corresponding joint axis is marked as the origin O, and P is the position of the obstacle. Exemplarily, when the corresponding joint axis is locked along the direction of the robot base In the case of all joints, that is, when the angles of all joints between the base and the joint are fixed at the current position, with O as the origin and OP as the radius, virtual rotation is performed in the connecting rod motion plane to obtain the corresponding rotation trajectory.
可以理解,若该虚拟的旋转轨迹与机器人的当前关节到末端之间的任意一连杆存在交点时,即表明在该当前关节轴所在关节在转动时会与障碍物发生碰撞。反之,如果没有一个交点,则表示该关节转动时始终不会碰到障碍物,此时不用对该关节添加障碍物约束。It can be understood that if there is an intersection point between the virtual rotation trajectory and any connecting rod between the current joint and the end of the robot, it means that the joint where the current joint axis is located will collide with an obstacle when rotating. Conversely, if there is no intersection point, it means that the joint will never encounter obstacles when it rotates, and there is no need to add obstacle constraints to the joint at this time.
子步骤S230,当旋转轨迹与任意一连杆存在交点时,则确定该交点为预测碰撞点。Sub-step S230, when there is an intersection point between the rotation track and any connecting rod, determine the intersection point as the predicted collision point.
示范性地,若存在一个预测碰撞点,如图3a所示的交点C,则在计算对应连杆上的预测碰撞点C与障碍物P之间的旋转角度时,可根据该关节轴O到障碍物P的距离和预测碰撞点C的位置利用三角形原理计算出障碍物到该预测碰撞点之间的旋转角度。其中,该旋转角度将作为该关节轴O所在关节的防碰撞角度限位。Exemplarily, if there is a predicted collision point, such as the intersection point C shown in Figure 3a, when calculating the rotation angle between the predicted collision point C on the corresponding link and the obstacle P, the joint axis O can be used to The distance of the obstacle P and the position of the predicted collision point C are calculated using the triangle principle to calculate the rotation angle between the obstacle and the predicted collision point. Wherein, the rotation angle will be used as the anti-collision angle limit of the joint where the joint axis O is located.
其中,上述的旋转可包括顺时针旋转和逆时针旋转,在一种实施方式中,将障碍物顺时针旋转到该预测碰撞点的第一旋转角度
Figure PCTCN2021135758-appb-000013
作为防碰撞角度限位的上限;以及,根据该第一旋转角度
Figure PCTCN2021135758-appb-000014
计算障碍物逆时针旋转到该预测碰撞点的第二旋转角度
Figure PCTCN2021135758-appb-000015
以作为该防碰撞角度限位的下限。于是,该关节轴O所在关节的防碰撞角度限位可表示为
Figure PCTCN2021135758-appb-000016
Wherein, the above-mentioned rotation may include clockwise rotation and counterclockwise rotation. In one embodiment, the obstacle is rotated clockwise to the first rotation angle of the predicted collision point
Figure PCTCN2021135758-appb-000013
As the upper limit of the anti-collision angle limit; and, according to the first rotation angle
Figure PCTCN2021135758-appb-000014
Calculate the counterclockwise rotation of the obstacle to the second rotation angle of the predicted collision point
Figure PCTCN2021135758-appb-000015
Take it as the lower limit of the anti-collision angle limit. Therefore, the anti-collision angle limit of the joint where the joint axis O is located can be expressed as
Figure PCTCN2021135758-appb-000016
可选地,一个障碍物有可能与多个连杆同时相交,此时可针对每个预测碰撞点都计算出对应的旋转角度,以作为添加障碍物约束的当前关节的多个防碰撞角度限位。或者,当障碍物存在多个的情况下,若存在两个或两个以上的预测碰撞点,如图3b所示,则 计算每个预测碰撞点与障碍物之间的旋转角度,计算得到的各组旋转角度将作为该对应关节轴所在关节的多个防碰撞角度限位。Optionally, an obstacle may intersect with multiple links at the same time. At this time, the corresponding rotation angle can be calculated for each predicted collision point as the multiple anti-collision angle limits bit. Alternatively, when there are multiple obstacles, if there are two or more predicted collision points, as shown in Figure 3b, the rotation angle between each predicted collision point and the obstacle is calculated, and the calculated Each group of rotation angles will be used as multiple anti-collision angle limits for the joint where the corresponding joint axis is located.
在另一种实施方式中,若该机器人为空间运动型机器人,示范性地,如图4所示,上述步骤S110中的是否存在预测碰撞点的检测过程,包括:In another embodiment, if the robot is a space-moving robot, as shown in FIG. 4 , the detection process of whether there is a predicted collision point in the above step S110 includes:
子步骤S310,根据障碍物的位置计算对应关节轴到障碍物的垂距。示范性地,具体可参见上述步骤S210,在此不再重复描述。Sub-step S310, calculating the vertical distance from the corresponding joint axis to the obstacle according to the position of the obstacle. Exemplarily, reference may be made to the above-mentioned step S210 for details, and the description will not be repeated here.
子步骤S320,对障碍物在平行于该对应关节轴的方向上进行预设长度扩张以得到该障碍物的膨胀区域。In sub-step S320, the obstacle is expanded to a preset length in a direction parallel to the corresponding joint axis to obtain an expanded area of the obstacle.
考虑到在三维空间下,障碍物通常具有一定的形态,为了更加准确地反映机器人与具有一定形态的障碍物的碰撞情况,本实施例将对该障碍物进行膨胀处理,示范性地,可在平行于该对应关节轴的方向上按照预设的长度进行膨胀,得到对应的膨胀区域,如图5所示。进而,可利用该障碍物的膨胀区域来进行碰撞检测。可以理解,该预设的长度可通过障碍物的实际形态来确定。Considering that obstacles usually have a certain shape in three-dimensional space, in order to more accurately reflect the collision between the robot and the obstacle with a certain shape, this embodiment will expand the obstacle. The expansion is performed according to a preset length in a direction parallel to the corresponding joint axis to obtain a corresponding expansion area, as shown in FIG. 5 . Furthermore, the expanded region of the obstacle can be used for collision detection. It can be understood that the preset length can be determined by the actual shape of the obstacle.
子步骤S330,在锁定该对应关节轴沿机器人基座方向的所有关节时,以该对应关节轴为原点、上述垂距为半径,计算该膨胀区域绕所对应关节轴进行虚拟旋转的旋转轨迹。Sub-step S330, when locking all the joints with the corresponding joint axis along the direction of the robot base, take the corresponding joint axis as the origin and the above-mentioned vertical distance as the radius, and calculate the virtual rotation trajectory of the expansion area around the corresponding joint axis.
子步骤S330与上述步骤S120原理类似,两者区别仅在于子步骤S120是一个障碍点在连杆运动平面内转动,而子步骤S330是一个膨胀区域绕一个关节轴进行旋转,如图5所示。The principle of sub-step S330 is similar to that of the above-mentioned step S120. The only difference between them is that in sub-step S120, an obstacle point rotates in the plane of motion of the connecting rod, while in sub-step S330, an expansion area rotates around a joint axis, as shown in Figure 5 .
子步骤S340,当该旋转轨迹与任意一连杆存在交点时,则确定该交点为预测碰撞点。Sub-step S340, when there is an intersection point between the rotation trajectory and any connecting rod, then determine the intersection point as the predicted collision point.
示范性地,若该旋转轨迹与当前关节轴所在关节到末端之间的任意一连杆存在交点时,如图5所示的交点C,此时交点C即为预测的碰撞点。进而,同样可根据垂距R、预设的长度L等利用三角形原理计算出对应的旋转角度
Figure PCTCN2021135758-appb-000017
原理同上述平面运动型机器人的旋转角度的计算方式类似,这里不再重复描述。
Exemplarily, if there is an intersection point between the rotation track and any link between the joint where the current joint axis is located and the end, such as intersection point C shown in FIG. 5 , the intersection point C is the predicted collision point. Furthermore, the corresponding rotation angle can also be calculated by using the triangle principle according to the vertical distance R, the preset length L, etc.
Figure PCTCN2021135758-appb-000017
The principle is similar to the calculation method of the rotation angle of the above-mentioned planar motion robot, and will not be described again here.
可以理解,通过将该障碍物到预测碰撞点之间的旋转角度作为该对应关节轴所在关节的防碰撞角度限位,可以实现将障碍物位置添加为机器人关节的角度约束。可知,该方法不仅适用于平面运动型的机器人,也适用于空间运动型机器人,具有较好的通用性。It can be understood that by using the rotation angle between the obstacle and the predicted collision point as the anti-collision angle limit of the joint where the corresponding joint axis is located, the position of the obstacle can be added as the angle constraint of the robot joint. It can be seen that this method is not only suitable for plane-moving robots, but also suitable for space-moving robots, and has good versatility.
步骤S120,基于该关节的物理角度限位和防碰撞角度限位确定该关节的角度约束。Step S120, determining the angle constraint of the joint based on the physical angle limit and the anti-collision angle limit of the joint.
本实施例中,通过将障碍物作为机器人的角度约束,同时考虑机器人的关节自身物理限位来共同确定关节的角度约束,并将其添加到构建的避障优化函数的约束条件中,这样可以保证得到的运动学逆解不会与障碍物发生碰撞,并且能够满足自身的结构限制。可以理解,如果对应关节不存在上述的防碰撞角度限位约束,则该关节的角度约束只需考虑该关节的物理角度限位即可。In this embodiment, the angle constraint of the joint is jointly determined by taking the obstacle as the angle constraint of the robot and considering the physical limit of the robot's joint itself, and adding it to the constraints of the constructed obstacle avoidance optimization function, so that It is guaranteed that the obtained kinematic inverse solution will not collide with obstacles and can satisfy its own structural constraints. It can be understood that if the corresponding joint does not have the above-mentioned anti-collision angle limit constraint, then the angle constraint of the joint only needs to consider the physical angle limit of the joint.
关于关节的角度自身约束,由于机器人关节结构的限制而使得一些关节位置或角度不可达,因此会存在关节物理限位。对于机器人的平动关节,由于不存在转动,故关节物理限位主要是指对关节位置的限位;而对于转动关节,关节物理限位主要是指对关节角度的限位。可以理解,本实施例的避障方法可以适用于转动关节类型的机器人,也适用于平动关节类型的机器人,原理类似。Regarding the joint angle self-constraint, due to the limitation of the joint structure of the robot, some joint positions or angles are unreachable, so there will be joint physical limitations. For the translational joints of the robot, since there is no rotation, the physical limit of the joint mainly refers to the limit of the joint position; for the rotational joint, the physical limit of the joint mainly refers to the limit of the joint angle. It can be understood that the obstacle avoidance method in this embodiment can be applied to a robot of a rotary joint type and a robot of a translational joint type, and the principle is similar.
通常地,一个关节的角度物理限位包括物理角度上限和物理角度下限。同样地,该角度约束包括上述的角度约束上限和角度约束下限,对于上述步骤S120,示范性地,包括:Generally, the angle physical limit of a joint includes a physical angle upper limit and a physical angle lower limit. Likewise, the angle constraint includes the upper limit of the above-mentioned angle constraint and the lower limit of the angle constraint, and for the above-mentioned step S120, exemplarily, includes:
从该物理角度上限、和当前时刻的关节角度与该防碰撞角度上限之和中选取出最小值作为角度约束的上限;以及,从物理角度下限、和当前时刻的关节角度与防碰撞角度下限之差中选取出最大值作为角度约束的下限。Select the minimum value from the upper limit of the physical angle, the sum of the joint angle at the current moment and the upper limit of the anti-collision angle as the upper limit of the angle constraint; and, from the lower limit of the physical angle, the joint angle at the current moment and the lower limit of the anti-collision angle The maximum value is selected from the difference as the lower limit of the angle constraint.
例如,对于存在一个预测碰撞点的情况,则对于当前关节轴所对应的关节i的角度约束,可按照如下方式确定:可从该关节i的物理角度上限
Figure PCTCN2021135758-appb-000018
以及关节i在t时刻的关节角度
Figure PCTCN2021135758-appb-000019
与防碰撞角度上限
Figure PCTCN2021135758-appb-000020
之和这两个值中,选取最小值作为该关节i的角度约束的上限;以及,从关节i的物理角度下限
Figure PCTCN2021135758-appb-000021
以及关节i在t时刻的关节角度
Figure PCTCN2021135758-appb-000022
与防碰撞角度下限
Figure PCTCN2021135758-appb-000023
之差这两个值中,选取最大值作为该关节i的角度约束的下限。示范性地,若用公式表达,则有:
For example, if there is a predicted collision point, the angle constraint of joint i corresponding to the current joint axis can be determined as follows: from the upper limit of the physical angle of the joint i
Figure PCTCN2021135758-appb-000018
And the joint angle of joint i at time t
Figure PCTCN2021135758-appb-000019
Upper limit of anti-collision angle
Figure PCTCN2021135758-appb-000020
The sum of these two values, choose the minimum value as the upper limit of the angle constraint of the joint i; and, from the lower limit of the physical angle of the joint i
Figure PCTCN2021135758-appb-000021
And the joint angle of joint i at time t
Figure PCTCN2021135758-appb-000022
and anti-collision angle lower limit
Figure PCTCN2021135758-appb-000023
The difference between these two values, the maximum value is selected as the lower limit of the angle constraint of the joint i. Exemplarily, if expressed in a formula, then:
Figure PCTCN2021135758-appb-000024
Figure PCTCN2021135758-appb-000024
Figure PCTCN2021135758-appb-000025
Figure PCTCN2021135758-appb-000025
其中,
Figure PCTCN2021135758-appb-000026
Figure PCTCN2021135758-appb-000027
分别为该预测碰撞点对应的防碰撞角度上限和下限;
Figure PCTCN2021135758-appb-000028
Figure PCTCN2021135758-appb-000029
分别为关节i的物理角度的上限和下限;
Figure PCTCN2021135758-appb-000030
为关节i在t时刻的关节角度;
Figure PCTCN2021135758-appb-000031
Figure PCTCN2021135758-appb-000032
分别为关节i的角度约束的上限和下限。
in,
Figure PCTCN2021135758-appb-000026
and
Figure PCTCN2021135758-appb-000027
are the upper limit and lower limit of the anti-collision angle corresponding to the predicted collision point;
Figure PCTCN2021135758-appb-000028
and
Figure PCTCN2021135758-appb-000029
are the upper and lower limits of the physical angle of joint i, respectively;
Figure PCTCN2021135758-appb-000030
is the joint angle of joint i at time t;
Figure PCTCN2021135758-appb-000031
and
Figure PCTCN2021135758-appb-000032
are the upper and lower bounds of the angle constraints of joint i, respectively.
在另一种实施方式中,若存在两个或两个以上的预测碰撞点,则计算每个预测碰撞点与障碍物之间的旋转角度,计算得到的各组旋转角度将作为该关节轴所在关节的多个防碰撞角度限位。于是,利用该多个防碰撞角度限位与对应关节的物理角度限位来共同确定对应关节的角度约束。In another embodiment, if there are two or more predicted collision points, the rotation angle between each predicted collision point and the obstacle is calculated, and each set of calculated rotation angles will be used as the joint axis where the joint axis is located. Multiple anti-collision angle limits for joints. Therefore, the multiple anti-collision angle limits and the physical angle limits of the corresponding joints are used to jointly determine the angle constraints of the corresponding joints.
例如,若某一关节i存在k个预测碰撞点,对应地,存在k组防碰撞角度限位,参照上述的存在一个预测碰撞点的方式来确定,同理,对于第i个关节的角度约束的上限,可先确定k个防碰撞角度的上限中的最小值,然后从该上限的最小值与关节在t时刻的关节角度之和、及关节i的物理角度上限
Figure PCTCN2021135758-appb-000033
中选取更小的那个值作为该角度约束的上限。而对于第i个关节的角度约束的下限,可先确定k个防碰撞角度的下限中的最大值,然后从关节在t时刻的关节角度与该下限的最大值之差、及关节i的物理角度下限
Figure PCTCN2021135758-appb-000034
中选取更大的那个值作为该角度约束的下限。若通过公式表示,则有:
For example, if there are k predicted collision points for a certain joint i, correspondingly, there are k groups of anti-collision angle limits, which are determined by referring to the above-mentioned method of having one predicted collision point. Similarly, for the angle constraint of the i-th joint The upper limit of the upper limit of the k anti-collision angle can be determined first, and then from the minimum value of the upper limit and the sum of the joint angle of the joint at time t, and the upper limit of the physical angle of joint i
Figure PCTCN2021135758-appb-000033
The smaller value is selected as the upper limit of the angle constraint. As for the lower limit of the angle constraint of the i-th joint, the maximum value of the lower limits of the k anti-collision angles can be determined first, and then from the difference between the joint angle of the joint at time t and the maximum value of the lower limit, and the physical Angle lower limit
Figure PCTCN2021135758-appb-000034
The larger value is selected as the lower limit of the angle constraint. If expressed by the formula, there are:
Figure PCTCN2021135758-appb-000035
Figure PCTCN2021135758-appb-000035
Figure PCTCN2021135758-appb-000036
Figure PCTCN2021135758-appb-000036
其中,
Figure PCTCN2021135758-appb-000037
Figure PCTCN2021135758-appb-000038
分别为第j个障碍物对应的防碰撞角度的上限和下限;k为预测碰撞点的数目;
Figure PCTCN2021135758-appb-000039
Figure PCTCN2021135758-appb-000040
分别为第i个关节的物理角度的上限和下限;
Figure PCTCN2021135758-appb-000041
为第i个关节在t时刻的关节角度;
Figure PCTCN2021135758-appb-000042
Figure PCTCN2021135758-appb-000043
分别为第i个关节的角度约束的上限和下限。
in,
Figure PCTCN2021135758-appb-000037
and
Figure PCTCN2021135758-appb-000038
are the upper limit and lower limit of the anti-collision angle corresponding to the jth obstacle; k is the number of predicted collision points;
Figure PCTCN2021135758-appb-000039
and
Figure PCTCN2021135758-appb-000040
are the upper and lower limits of the physical angle of the i-th joint, respectively;
Figure PCTCN2021135758-appb-000041
is the joint angle of the i-th joint at time t;
Figure PCTCN2021135758-appb-000042
and
Figure PCTCN2021135758-appb-000043
are the upper and lower bounds of the angle constraints of the i-th joint, respectively.
步骤S130,根据机器人各个关节的该角度约束和各个关节角速度的自身约束对以关节角速度为优化变量、末端速度为控制目标的避障优化函数进行求解,得到该关节角速度的最优解。Step S130, according to the angular constraints of each joint of the robot and the self-constraints of each joint angular velocity, solve the obstacle avoidance optimization function with the joint angular velocity as the optimization variable and the terminal velocity as the control target to obtain the optimal solution of the joint angular velocity.
为了保证机器人的末端在多个约束条件下能够优先执行笛卡尔空间中的任务,本实施例将预先构建出一个以关节角速度为控制变量,以末端速度为控制目标的避障优化函数,其中,该避障优化函数将添加包含与障碍物有关的相应约束条件,当然还可添加其他的约束,例如,可包括但不限于包括机器人的关节角度或关节位置的自身物理约束,关节角速度的自身物理约束等,具体可根据实际需求来添加更多的约束。In order to ensure that the end of the robot can preferentially perform tasks in the Cartesian space under multiple constraints, this embodiment will pre-build an obstacle avoidance optimization function with the joint angular velocity as the control variable and the end speed as the control target. Among them, The obstacle avoidance optimization function will add corresponding constraints related to obstacles, of course, other constraints can also be added, for example, it can include but not limited to the robot's own physical constraints including the joint angle or joint position, the joint angular velocity's own physical constraints Constraints, etc. More constraints can be added according to actual needs.
以转动关节类型的机器人为例,下面以该机器人的关节角度约束添加为该避障 优化函数的约束条件进行说明。假设第i个关节的角度约束上限为
Figure PCTCN2021135758-appb-000044
角度约束下限为
Figure PCTCN2021135758-appb-000045
机器人的控制指令周期为T,
Figure PCTCN2021135758-appb-000046
为第i个关节在t时刻的关节角度,
Figure PCTCN2021135758-appb-000047
为第i个关节的关节角速度,则t+1时刻的关节角度
Figure PCTCN2021135758-appb-000048
应当满足关节角度约束,具体如下:
Taking a robot with rotary joints as an example, the following is an illustration of adding the robot's joint angle constraints as the constraints of the obstacle avoidance optimization function. Assume that the upper limit of the angle constraint of the i-th joint is
Figure PCTCN2021135758-appb-000044
The lower limit of the angle constraint is
Figure PCTCN2021135758-appb-000045
The control command period of the robot is T,
Figure PCTCN2021135758-appb-000046
is the joint angle of the i-th joint at time t,
Figure PCTCN2021135758-appb-000047
is the joint angular velocity of the i-th joint, then the joint angle at time t+1
Figure PCTCN2021135758-appb-000048
The joint angle constraints should be satisfied, as follows:
Figure PCTCN2021135758-appb-000049
Figure PCTCN2021135758-appb-000049
值得注意的是,这里是以考虑了障碍物在内的关节角度约束,若关节i不存在上述的防碰撞角度限位,即不会与障碍物发生碰撞,则此时公式中的
Figure PCTCN2021135758-appb-000050
Figure PCTCN2021135758-appb-000051
可替换为
Figure PCTCN2021135758-appb-000052
Figure PCTCN2021135758-appb-000053
It is worth noting that here is the joint angle constraint that considers obstacles. If joint i does not have the above-mentioned anti-collision angle limit, that is, it will not collide with obstacles, then in the formula
Figure PCTCN2021135758-appb-000050
and
Figure PCTCN2021135758-appb-000051
can be replaced by
Figure PCTCN2021135758-appb-000052
and
Figure PCTCN2021135758-appb-000053
进一步地,由于机器人的关节角度与关节角速度之间存在转换关系,为了方便计算,这里将其转换为以关节角速度为变量的约束方程。示范性地,将关节角度约束转换为关节角速度约束时,则有:Furthermore, since there is a conversion relationship between the joint angle and the joint angular velocity of the robot, for the convenience of calculation, it is converted into a constraint equation with the joint angular velocity as a variable. Exemplarily, when converting joint angle constraints into joint angular velocity constraints, there are:
Figure PCTCN2021135758-appb-000054
Figure PCTCN2021135758-appb-000054
此外,对于各个关节角速度的自身约束条件,示范性地,若第i个关节角速度的上限为
Figure PCTCN2021135758-appb-000055
下限为
Figure PCTCN2021135758-appb-000056
则第i个关节角速度
Figure PCTCN2021135758-appb-000057
应当满足:
In addition, for the self-constraint conditions of each joint angular velocity, for example, if the upper limit of the i-th joint angular velocity is
Figure PCTCN2021135758-appb-000055
The lower limit is
Figure PCTCN2021135758-appb-000056
Then the i-th joint angular velocity
Figure PCTCN2021135758-appb-000057
Should meet:
Figure PCTCN2021135758-appb-000058
Figure PCTCN2021135758-appb-000058
本实施例中,由于同一时刻的各个关节角速度需要同时满足多种限制,为了方便避障优化函数的优化求解,这里将对多个约束条件进行约束合成,以便与其他的约束方程共同作为上述避障优化函数的不同约束条件。In this embodiment, since the angular velocity of each joint at the same time needs to satisfy multiple constraints at the same time, in order to facilitate the optimal solution of the obstacle avoidance optimization function, multiple constraint conditions will be synthesized here so as to be used together with other constraint equations as the above-mentioned avoidance Different constraints for barrier optimization functions.
示范性地,以上述添加的含障碍物限制的关节角度和关节角速度的约束条件为例,可得到如下的关节角速度的合成约束方程:Exemplarily, taking the constraint conditions of joint angle and joint angular velocity added above including obstacles as an example, the following synthetic constraint equation for joint angular velocity can be obtained:
Figure PCTCN2021135758-appb-000059
Figure PCTCN2021135758-appb-000059
本实施例中,上述的避障优化函数将引入一松弛变量,并基于该松弛变量得到待优化的指标。例如,该优化指标可为松弛变量的平方等,当然也可以取与松弛变量有关的其他形式,这里不作限定。In this embodiment, the above-mentioned obstacle avoidance optimization function will introduce a slack variable, and an index to be optimized is obtained based on the slack variable. For example, 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.
可以理解,以松弛变量为优化指标,可以保证即便该避障优化函数在约束条件存在冲突的情况下,依然会求解出该约束方程的接近解,从而保证在优先避障的同时,尽可能地使末端能够完成对应的末端速度跟随任务。It can be understood that taking the slack variable as the optimization index can ensure that even if the obstacle avoidance optimization function conflicts with the constraint conditions, it will still solve the approximate solution of the constraint equation, so as to ensure that while giving priority to obstacle avoidance, Enable the terminal to complete the corresponding terminal speed following task.
在一种实施方式中,以松弛变量的平方作为优化指标,并以上述的考虑障碍物在内的关节角速度的合成约束为例,此时该避障优化函数的表达式如下:In one embodiment, the square of the slack variable is used as the optimization index, and the above-mentioned composite constraint of joint angular velocity including obstacles is taken as an example. At this time, the expression of the obstacle avoidance optimization function is as follows:
Figure PCTCN2021135758-appb-000060
Figure PCTCN2021135758-appb-000060
示范性地,可利用一些开源的求解器进行二次规划求解,从而得到最优的关节角速度。可以理解,当||w|| 2=0时,表示
Figure PCTCN2021135758-appb-000061
有解,即在约束条件下存在关节角速度
Figure PCTCN2021135758-appb-000062
使得机器人末端速度为
Figure PCTCN2021135758-appb-000063
而当||w|| 2>0是,
Figure PCTCN2021135758-appb-000064
无解,求解出来的关节角速度
Figure PCTCN2021135758-appb-000065
Figure PCTCN2021135758-appb-000066
的最接近解,即是
Figure PCTCN2021135758-appb-000067
的解。通过引入松弛量可以保证该避障优化函数不会出现求解出错的情况。
Exemplarily, some open source solvers can be used to solve the quadratic programming, so as to obtain the optimal joint angular velocity. It can be understood that when ||w|| 2 =0, it means
Figure PCTCN2021135758-appb-000061
has a solution, that is, there are joint angular velocities under the constraints
Figure PCTCN2021135758-appb-000062
The terminal velocity of the robot is
Figure PCTCN2021135758-appb-000063
And when ||w|| 2 >0,
Figure PCTCN2021135758-appb-000064
No solution, the joint angular velocity obtained from the solution
Figure PCTCN2021135758-appb-000065
yes
Figure PCTCN2021135758-appb-000066
The closest solution of is
Figure PCTCN2021135758-appb-000067
solution. By introducing slack, it can be guaranteed that the obstacle avoidance optimization function will not appear to be wrong.
步骤S140,利用该关节角速度的最优解对机器人进行运动控制。Step S140, using the optimal solution of the joint angular velocity to control the motion of the robot.
示范性地,在求解得到一个最优的关节角速度后,可以利用该关节角速度进行积分处理,得到最优的关节角度或关节位置。进而,将计算到的关节角度或关节位置作为控制指令并发送到对应的关节电机,使得机器人能够实现避障运动。与此同时,机器人末端也能够执行相应的速度跟随任务。Exemplarily, after obtaining an optimal joint angular velocity, the joint angular velocity may be used for integral processing to obtain an optimal joint angle or joint position. Furthermore, the calculated joint angles or joint positions are used as control commands and sent to the corresponding joint motors, so that the robot can realize obstacle avoidance motion. At the same time, the end of the robot can also perform corresponding speed following tasks.
本实施例的机器人避障方法通过将障碍物作为机器人的关节角度或位置约束,并结合关节角度或位置、关节角速度的自身约束来对构建的避障优化问题进行关节角速度求解,以保证得到的解能够完成避障;同时由于该避障优化问题以末端速度为控制目标,在进行避障的同时,还可尽可能地完成末端速度跟随任务。该避障方法可以适用于一个或多个障碍物、动态或静态的障碍物等多种场景,具有通用性。此外,该方法与机器人的关节类型及运动类型无关,具有普适性,无论是转动型关节还是平动型关节的机器人,或是平面运动型机器人或空间运动型机器人都可以采用该方法进行关节角速度寻优,进而达到避障控制目的。The robot obstacle avoidance method of this embodiment uses obstacles as the joint angle or position constraints of the robot, and combines the joint angle or position, and the joint angular velocity's own constraints to solve the joint angular velocity of the constructed obstacle avoidance optimization problem to ensure that the obtained The solution can complete obstacle avoidance; at the same time, because the obstacle avoidance optimization problem takes the terminal speed as the control target, it can also complete the terminal speed following task as much as possible while avoiding obstacles. The obstacle avoidance method can be applied to various scenarios such as one or more obstacles, dynamic or static obstacles, etc., and has universality. In addition, this method has nothing to do with the joint type and motion type of the robot, and it is universal. Whether it is a robot with rotational joints or translational joints, or a planar motion robot or a space motion robot, this method can be used for joint The angular velocity is optimized to achieve the purpose of obstacle avoidance control.
实施例2Example 2
请参照图6,基于上述实施例1的方法,本实施例提出一种机器人避障装置100,示范性地,该机器人避障装置100包括:Please refer to FIG. 6. Based on the method of the above-mentioned embodiment 1, this embodiment proposes a robot obstacle avoidance device 100. Exemplarily, the robot obstacle avoidance device 100 includes:
碰撞检测模块110,用于根据障碍物的位置检测对应关节轴沿机器人末端方向的所有连杆是否存在预测碰撞点,并在存在预测碰撞点时,计算对应连杆上的所述预测碰撞 点与所述障碍物之间的旋转角度,所述旋转角度作为所述对应关节轴所在关节的防碰撞角度限位。The collision detection module 110 is used to detect, according to the position of the obstacle, whether there is a predicted collision point on all the links of the corresponding joint axis along the direction of the end of the robot, and when there is a predicted collision point, calculate the relationship between the predicted collision point on the corresponding link and The rotation angle between the obstacles, the rotation angle is used as the anti-collision angle limit of the joint where the corresponding joint axis is located.
角度约束确定模块120,用于基于所述关节的所述防碰撞角度限位和对应关节的物理角度限位确定所述对应关节的角度约束。An angle constraint determining module 120, configured to determine the angle constraint of the corresponding joint based on the anti-collision angle limit of the joint and the physical angle limit of the corresponding joint.
优化求解模块130,用于根据所述机器人各个关节的所述角度约束和各个关节角速度的自身约束对以关节角速度为优化变量、末端速度为控制目标的避障优化函数进行求解,得到所述关节角速度的最优解。The optimization solving module 130 is used to solve the obstacle avoidance optimization function with the joint angular velocity as the optimization variable and the terminal velocity as the control target according to the angular constraints of each joint of the robot and the self-constraints of each joint angular velocity, to obtain the joint Optimal solution for angular velocity.
运动控制模块140,用于利用所述关节角速度的最优解对所述机器人进行运动控制。The motion control module 140 is configured to use the optimal solution of the joint angular velocity to control the motion 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, for example, the robot may be a robot with multiple degrees of freedom. Exemplarily, the robot includes a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to enable the mobile terminal to execute the above robot obstacle avoidance method or the various modules in the above robot obstacle avoidance device function.
本申请还提供了一种可读存储介质,用于储存上述机器人中使用的所述计算机程序。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 described are realized 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 medium includes: 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 (11)

  1. 一种机器人避障方法,其特征在于,包括:A robot obstacle avoidance method is characterized in that, comprising:
    根据障碍物的位置检测对应关节轴沿机器人末端方向的所有连杆是否存在预测碰撞点,并在存在预测碰撞点时,计算对应连杆上的所述预测碰撞点与所述障碍物之间的旋转角度,所述旋转角度作为所述对应关节轴所在关节的防碰撞角度限位;According to the position of the obstacle, detect whether there is a predicted collision point in all the links corresponding to the joint axis along the direction of the end of the robot, and when there is a predicted collision point, calculate the distance between the predicted collision point on the corresponding link and the obstacle. Rotation angle, the rotation angle is used as the anti-collision angle limit of the joint where the corresponding joint axis is located;
    基于所述关节的物理角度限位和所述防碰撞角度限位确定所述关节的角度约束;determining an angle constraint of the joint based on the physical angle limit of the joint and the anti-collision angle limit;
    根据所述机器人各个关节的所述角度约束和各个关节角速度的自身约束对以关节角速度为优化变量、末端速度为控制目标的避障优化函数进行求解,得到所述关节角速度的最优解;According to the angular constraints of each joint of the robot and the self-constraints of each joint angular velocity, the obstacle avoidance optimization function with the joint angular velocity as the optimization variable and the terminal velocity as the control target is solved to obtain the optimal solution of the joint angular velocity;
    利用所述关节角速度的最优解对所述机器人进行运动控制。The motion control of the robot is performed by using the optimal solution of the joint angular velocity.
  2. 根据权利要求1所述的机器人避障方法,其特征在于,所述机器人为平面运动型机器人时,所述根据障碍物的位置检测对应关节轴沿机器人末端方向的所有连杆是否存在预测碰撞点,包括:The robot obstacle avoidance method according to claim 1, wherein when the robot is a planar motion robot, detecting whether there is a predicted collision point for all the connecting rods whose corresponding joint axes are along the direction of the end of the robot according to the position of the obstacle ,include:
    根据障碍物的位置计算所述对应关节轴到所述障碍物的距离;calculating the distance from the corresponding joint axis to the obstacle according to the position of the obstacle;
    在锁定所述对应关节轴沿机器人基座方向的所有关节时,以所述对应关节轴为原点、所述距离为半径,计算所述障碍物沿所述对应关节轴连接的连杆运动平面进行虚拟旋转的旋转轨迹;When locking all the joints of the corresponding joint axis along the direction of the robot base, with the corresponding joint axis as the origin and the distance as the radius, calculate the movement plane of the obstacle along the connecting rod connected to the corresponding joint axis Rotation trajectory of virtual rotation;
    当所述旋转轨迹与任意一连杆存在交点时,则确定所述交点为预测碰撞点。When there is an intersection point between the rotation track and any connecting rod, the intersection point is determined to be a predicted collision point.
  3. 根据权利要求1所述的机器人避障方法,其特征在于,所述机器人为空间运动型机器人时,所述根据障碍物的位置检测对应关节轴沿机器人末端方向的所有连杆是否存在预测碰撞点,包括:The robot obstacle avoidance method according to claim 1, wherein when the robot is a space-moving robot, detecting whether there is a predicted collision point for all the connecting rods corresponding to the joint axis along the direction of the robot end according to the position of the obstacle ,include:
    根据障碍物的位置计算所述对应关节轴到所述障碍物的垂距;calculating the vertical distance from the corresponding joint axis to the obstacle according to the position of the obstacle;
    对所述障碍物在平行于所述对应关节轴的方向上进行预设长度扩张以得到所述障碍物的膨胀区域;expanding the obstacle to a preset length in a direction parallel to the corresponding joint axis to obtain an expanded area of the obstacle;
    在锁定所述对应关节轴沿机器人基座方向的所有关节时,以所述对应关节轴为原点、所述垂距为半径,计算所述膨胀区域绕所对应关节轴进行虚拟旋转的旋转轨迹;When locking all the joints of the corresponding joint axis along the direction of the robot base, using the corresponding joint axis as the origin and the vertical distance as the radius, calculate the rotation trajectory of the virtual rotation of the expansion area around the corresponding joint axis;
    当所述旋转轨迹与任意一连杆存在交点时,则确定所述交点为预测碰撞点。When there is an intersection point between the rotation track and any connecting rod, the intersection point is determined to be a predicted collision point.
  4. 根据权利要求2或3所述的机器人避障方法,其特征在于,所述计算对应连杆上的所述预测碰撞点与所述障碍物之间的旋转角度,包括:The robot obstacle avoidance method according to claim 2 or 3, wherein the calculation of the rotation angle between the predicted collision point on the corresponding link and the obstacle includes:
    根据所述对应关节轴到所述障碍物的所述距离和所述预测碰撞点的位置计算所述 障碍物顺时针旋转到所述预测碰撞点的第一旋转角度,所述第一旋转角度作为防碰撞角度上限;Calculate a first rotation angle at which the obstacle rotates clockwise to the predicted collision point according to the distance from the corresponding joint axis to the obstacle and the position of the predicted collision point, and the first rotation angle is used as Anti-collision angle upper limit;
    根据所述第一旋转角度计算所述障碍物逆时针旋转到所述预测碰撞点的第二旋转角度,所述第二旋转角度作为防碰撞角度下限。A second rotation angle at which the obstacle rotates counterclockwise to the predicted collision point is calculated according to the first rotation angle, and the second rotation angle is used as a lower limit of an anti-collision angle.
  5. 根据权利要求4所述的机器人避障方法,其特征在于,所述关节的物理角度限位包括所述关节的物理角度上限和物理角度下限,所述基于所述机器人对应关节的物理角度限位和所述防碰撞角度限位确定所述对应关节的角度约束,包括:The robot obstacle avoidance method according to claim 4, wherein the physical angle limit of the joint includes an upper limit and a lower limit of the physical angle of the joint, and the physical angle limit based on the corresponding joint of the robot Determining the angle constraints of the corresponding joints with the anti-collision angle limit, including:
    从所述物理角度上限、和当前时刻的关节角度与所述防碰撞角度上限之和中选取出最小值作为所述关节的角度约束上限;Selecting a minimum value from the upper limit of the physical angle and the sum of the joint angle at the current moment and the upper limit of the anti-collision angle as the upper limit of the joint angle constraint;
    从所述物理角度下限、和当前时刻的关节角度与所述防碰撞角度下限之差中选取出最大值作为所述关节的角度约束下限。A maximum value is selected from the lower limit of the physical angle and the difference between the joint angle at the current moment and the lower limit of the anti-collision angle as the lower limit of the joint angle constraint.
  6. 根据权利要求1所述的机器人避障方法,其特征在于,当所述障碍物存在多个的情况下,若存在两个或两个以上的预测碰撞点,则计算每个所述预测碰撞点与所述障碍物之间的旋转角度,各组所述旋转角度作为所述对应关节轴所在关节的多个防碰撞角度限位;所述多个防碰撞角度限位用于与对应关节的所述物理角度限位确定所述对应关节的角度约束。The robot obstacle avoidance method according to claim 1, wherein when there are multiple obstacles, if there are two or more predicted collision points, then calculate each predicted collision point The rotation angle between the obstacle and each group of rotation angles is used as a plurality of anti-collision angle limits of the joint where the corresponding joint axis is located; the plurality of anti-collision angle limits are used for all joints with the corresponding joint The physical angle limit determines the angle constraint of the corresponding joint.
  7. 根据权利要求6所述的机器人避障方法,其特征在于,所述多个防碰撞角度限位与对应关节的所述物理角度限位按照如下规则来确定所述对应关节的角度约束:The robot obstacle avoidance method according to claim 6, wherein the plurality of anti-collision angle limits and the physical angle limits of the corresponding joints determine the angle constraints of the corresponding joints according to the following rules:
    从所述多个防碰撞角度的上限中选取出上限最小值,并从对应关节在当前时刻的关节角度与所述上限最小值之和、以及所述对应关节的物理角度上限中选取出最小值,以作为所述对应关节的角度约束的上限;Select an upper minimum value from the upper limits of the multiple anti-collision angles, and select a minimum value from the sum of the joint angle of the corresponding joint at the current moment and the upper minimum value, and the upper limit of the physical angle of the corresponding joint. , as the upper limit of the angle constraint of the corresponding joint;
    从所述多个防碰撞角度的下限中选取出下限最大值,并从对应关节在当前时刻的关节角度与所述下限最大值之差、以及所述对应关节的物理角度下限中选取出最大值,以作为所述对应关节的角度约束的下限。Select the maximum value of the lower limit from the lower limits of the multiple anti-collision angles, and select the maximum value from the difference between the joint angle of the corresponding joint at the current moment and the maximum value of the lower limit, and the lower limit of the physical angle of the corresponding joint. , as the lower limit of the angle constraints of the corresponding joints.
  8. 根据权利要求1所述的机器人避障方法,其特征在于,所述避障优化函数以松弛变量的平方为优化指标;The robot obstacle avoidance method according to claim 1, wherein the obstacle avoidance optimization function takes the square of the slack variable as the optimization index;
    所述避障优化函数的表达式如下:The expression of the obstacle avoidance optimization function is as follows:
    min  ||w|| 2 min ||w|| 2
    Figure PCTCN2021135758-appb-100001
    Figure PCTCN2021135758-appb-100001
    其中,w为所述松弛变量,J为所述机器人的速度雅可比矩阵,
    Figure PCTCN2021135758-appb-100002
    为所述机器人所有 关节的关节角速度向量;
    Figure PCTCN2021135758-appb-100003
    为所述机器人的关节末端速度向量;
    Figure PCTCN2021135758-appb-100004
    Figure PCTCN2021135758-appb-100005
    分别为第i个关节的关节角速度上限和下限;
    Figure PCTCN2021135758-appb-100006
    Figure PCTCN2021135758-appb-100007
    分别为第i个关节的所述角度约束上限和下限;
    Figure PCTCN2021135758-appb-100008
    为第i个关节的关节角速度;T为所述机器人的控制指令周期;
    Figure PCTCN2021135758-appb-100009
    为第i个关节在t时刻的关节角度。
    Wherein, w is the slack variable, J is the speed Jacobian matrix of the robot,
    Figure PCTCN2021135758-appb-100002
    is the joint angular velocity vector of all joints of the robot;
    Figure PCTCN2021135758-appb-100003
    is the joint terminal velocity vector of the robot;
    Figure PCTCN2021135758-appb-100004
    and
    Figure PCTCN2021135758-appb-100005
    are the upper limit and lower limit of the joint angular velocity of the i-th joint, respectively;
    Figure PCTCN2021135758-appb-100006
    and
    Figure PCTCN2021135758-appb-100007
    are the upper limit and lower limit of the angle constraints of the i-th joint, respectively;
    Figure PCTCN2021135758-appb-100008
    is the joint angular velocity of the i-th joint; T is the control command cycle of the robot;
    Figure PCTCN2021135758-appb-100009
    is the joint angle of the i-th joint at time t.
  9. 一种机器人避障装置,其特征在于,包括:A robot obstacle avoidance device, characterized in that it comprises:
    碰撞检测模块,用于根据障碍物的位置检测对应关节轴沿机器人末端方向的所有连杆是否存在预测碰撞点,并在存在预测碰撞点时,计算对应连杆上的所述预测碰撞点与所述障碍物之间的旋转角度,所述旋转角度作为所述对应关节轴所在关节的防碰撞角度限位;The collision detection module is used to detect, according to the position of the obstacle, whether there is a predicted collision point on all the connecting rods corresponding to the joint axis along the direction of the end of the robot, and when there is a predicted collision point, calculate the relationship between the predicted collision point on the corresponding connecting rod and the predicted collision point. The rotation angle between the obstacles, the rotation angle is used as the anti-collision angle limit of the joint where the corresponding joint axis is located;
    角度约束确定模块,用于基于所述关节的物理角度限位和所述防碰撞角度限位确定所述关节的角度约束;An angle constraint determination module, configured to determine the angle constraint of the joint based on the physical angle limit of the joint and the anti-collision angle limit;
    优化求解模块,用于根据所述机器人各个关节的所述角度约束和各个关节角速度的自身约束对以关节角速度为优化变量、末端速度为控制目标的避障优化函数进行求解,得到所述关节角速度的最优解;The optimization solution module is used to solve the obstacle avoidance optimization function with the joint angular velocity as the optimization variable and the terminal velocity as the control target according to the angular constraints of each joint of the robot and the self-constraints of each joint angular velocity, to obtain the joint angular velocity the optimal solution;
    运动控制模块,用于利用所述关节角速度的最优解对所述机器人进行运动控制。The motion control module is used to control the motion of the robot by using the optimal solution of the joint angular velocity.
  10. 一种机器人,其特征在于,所述机器人包括处理器和存储器,所述存储器存储有计算机程序,所述处理器用于执行所述计算机程序以实施权利要求1-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-8 Obstacle avoidance method.
  11. 一种可读存储介质,其特征在于,其存储有计算机程序,所述计算机程序被处理器执行时,实施根据权利要求1-8中任一项所述的机器人避障方法。A readable storage medium, characterized in that it stores a computer program, and when the computer program is executed by a processor, implements the robot obstacle avoidance method according to any one of claims 1-8.
PCT/CN2021/135758 2021-08-24 2021-12-06 Robot obstacle avoidance method and apparatus, and robot WO2023024317A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110977027.6 2021-08-24
CN202110977027.6A CN113618742B (en) 2021-08-24 2021-08-24 Robot obstacle avoidance method and device and robot

Publications (1)

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

Family

ID=78387597

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/135758 WO2023024317A1 (en) 2021-08-24 2021-12-06 Robot obstacle avoidance method and apparatus, and robot

Country Status (2)

Country Link
CN (1) CN113618742B (en)
WO (1) WO2023024317A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113618742B (en) * 2021-08-24 2022-07-29 深圳市优必选科技股份有限公司 Robot obstacle avoidance method and device and robot
CN114147703B (en) * 2021-11-16 2023-11-17 深圳市优必选科技股份有限公司 Robot obstacle avoidance method and device, computer readable storage medium and robot
CN114227686A (en) * 2021-12-28 2022-03-25 深圳市优必选科技股份有限公司 Robot obstacle avoidance control method and device, terminal equipment and storage medium
CN114326769B (en) * 2021-12-28 2024-03-29 深圳市优必选科技股份有限公司 Robot motion correction method and device, robot control equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011056646A (en) * 2009-09-14 2011-03-24 Canon Inc Method for controlling robot arm
CN104392081A (en) * 2014-06-30 2015-03-04 管小清 Redundant mechanical arm moving obstacle avoiding algorithm
CN106426164A (en) * 2016-09-27 2017-02-22 华南理工大学 Redundancy dual-mechanical-arm multi-index coordinate exercise planning method
CN109927035A (en) * 2019-04-08 2019-06-25 济南大学 A kind of mapping method of multi-arm robot C- space line obstacle
CN113618739A (en) * 2021-08-24 2021-11-09 深圳市优必选科技股份有限公司 Robot dynamic obstacle avoidance method and device and robot
CN113618742A (en) * 2021-08-24 2021-11-09 深圳市优必选科技股份有限公司 Robot obstacle avoidance method and device and robot

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5150026A (en) * 1990-11-19 1992-09-22 The United States Of America As Represented By The Administrator Of The National Aeronautics And Space Administration Obstacle avoidance for redundant robots using configuration control
US8406989B1 (en) * 2009-02-13 2013-03-26 Hrl Laboratories, Llc Method for adaptive obstacle avoidance for articulated redundant robot arm
CN104842355B (en) * 2015-01-20 2016-08-17 西北工业大学 The MIXED INTEGER forecast Control Algorithm of the lower redundant space robot of avoidance constraint
CN106335062B (en) * 2016-11-11 2018-12-04 清研同创机器人(天津)有限公司 A kind of general seven axis redundancy industrial robot manipulating task planing method
CN110682286B (en) * 2019-05-28 2020-07-28 广东省智能制造研究所 Real-time obstacle avoidance method for cooperative robot
CN110561440B (en) * 2019-09-27 2022-06-07 华侨大学 Multi-objective planning method for acceleration layer of redundant manipulator
CN111309002A (en) * 2019-11-26 2020-06-19 华南理工大学 Wheel type mobile robot obstacle avoidance method and system based on vector
CN110977989B (en) * 2019-12-27 2021-04-23 广东省智能制造研究所 Motion planning and real-time obstacle avoidance method and system for cooperative robot
CN112605996B (en) * 2020-12-16 2021-12-24 中山大学 Model-free collision avoidance control method for redundant mechanical arm
CN113070881B (en) * 2021-04-02 2022-11-11 深圳市优必选科技股份有限公司 Robot motion control method and device and robot

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011056646A (en) * 2009-09-14 2011-03-24 Canon Inc Method for controlling robot arm
CN104392081A (en) * 2014-06-30 2015-03-04 管小清 Redundant mechanical arm moving obstacle avoiding algorithm
CN106426164A (en) * 2016-09-27 2017-02-22 华南理工大学 Redundancy dual-mechanical-arm multi-index coordinate exercise planning method
CN109927035A (en) * 2019-04-08 2019-06-25 济南大学 A kind of mapping method of multi-arm robot C- space line obstacle
CN113618739A (en) * 2021-08-24 2021-11-09 深圳市优必选科技股份有限公司 Robot dynamic obstacle avoidance method and device and robot
CN113618742A (en) * 2021-08-24 2021-11-09 深圳市优必选科技股份有限公司 Robot obstacle avoidance method and device and robot

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LI, ZEXIN: "Research on Motion Planning of Redundant Manipulator in Noisy Environment", INFORMATION SCIENCE & TECHNOLOGY, CHINA DOCTORAL DISSERTATIONS/MASTER'S THESES TULL-TEXT DATABASE (MASTER), no. 01, 30 May 2020 (2020-05-30), CN, pages 1 - 81, XP009544023, DOI: 10.27155/d.cnki.ghqiu.2020.001070 *

Also Published As

Publication number Publication date
CN113618742A (en) 2021-11-09
CN113618742B (en) 2022-07-29

Similar Documents

Publication Publication Date Title
WO2023024317A1 (en) Robot obstacle avoidance method and apparatus, and robot
WO2023024279A1 (en) Dynamic obstacle avoidance method and apparatus for robot, and robot
CN108908331B (en) Obstacle avoidance method and system for super-redundant flexible robot and computer storage medium
US9827675B2 (en) Collision avoidance method, control device, and program
CN105773620B (en) The trajectory planning control method of industrial robot free curve based on Double quaternions
JP5261495B2 (en) Real-time self-collision and obstacle avoidance using weight matrix
Gong et al. Analytical inverse kinematics and self-motion application for 7-DOF redundant manipulator
US8560122B2 (en) Teaching and playback method based on control of redundancy resolution for robot and computer-readable medium controlling the same
CN113352319B (en) Redundant mechanical arm obstacle avoidance trajectory planning method based on improved fast expansion random tree
CN109397271B (en) 7-degree-of-freedom anthropomorphic mechanical arm and control method and system thereof
CN108638055B (en) Autonomous obstacle avoidance planning method for seven-degree-of-freedom space manipulator
CN106202713A (en) A kind of biasing mechanism arm inverse kinematics method
WO2020093253A1 (en) Robot motion control method, control system and storage device
CN111791234A (en) Anti-collision control algorithm for working positions of multiple robots in narrow space
CN110561419A (en) arm-shaped line constraint flexible robot track planning method and device
CN113858205A (en) Seven-axis redundant mechanical arm obstacle avoidance algorithm based on improved RRT
CN109807933B (en) Capability map point cloud updating method, device, equipment and storage medium
CN116061173A (en) Six-degree-of-freedom redundant task track planning method for mechanical arm for live working
Gharahsofloo et al. An efficient algorithm for workspace generation of delta robot
WO2023024278A1 (en) Robot joint pose optimization method, robot control method, and robot
US20220105627A1 (en) Singularity-free kinematic parameterization of soft robot manipulators
Dai et al. Manipulator path-planning avoiding obstacle based on screw theory and ant colony algorithm
CN113146637B (en) Robot Cartesian space motion planning method
CN113084797B (en) Dynamic cooperative control method for double-arm redundant mechanical arm based on task decomposition
Zhang et al. Kuka youBot arm shortest path planning based on geodesics

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: 21954833

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE