Self-collision avoidance method, device and robot system during robot dragging process

By introducing a self-collision avoidance control device into the robot system, using model fitting, collision detection and zero force compensation modules to calculate the joint repulsion torque and drag compensation torque, and generate drag avoidance motion instructions, it solves the problem of automatic dragging during the robot dragging process. Collision issues improve efficiency and safety.

CN118514082BActive Publication Date: 2024-09-13PAXINI TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410969208.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-09-13
Estimated Expiration
2044-07-19

AI Technical Summary

Technical Problem

During the robot dragging process, the robot joints collide with each other due to the operator's operations, causing self-collision, which affects the dragging efficiency and safety.

Method used

A robot system is designed, including an encoder, a robot and a controller. The controller contains a self-collision avoidance control device, which calculates joint repulsive moments and drag compensation through model fitting, collision detection, collision avoidance and zero force compensation modules. Moment, generate drag avoidance motion instructions to achieve self-collision avoidance.

Benefits of technology

It effectively avoids self-collision, ensures that the dragging posture is within the feasible range of robot motion, and improves the efficiency of user dragging teaching and the safety of the dragging process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118514082B
    Figure CN118514082B
Patent Text Reader

Abstract

The embodiments of the present application belong to the field of robot technology, and relate to a method, device and robot system for self-collision avoidance during robot dragging. The robot system includes an encoder, a robot and a controller; the controller includes a self-collision avoidance control device and a robot control device; the self-collision avoidance control device is used to obtain joint repulsion torque and drag compensation torque respectively based on the robot's motion data; the robot control device is used to generate a drag avoidance motion instruction by combining the total joint repulsion torque and the drag compensation torque. The technical solution of the present application can improve the efficiency of the dragging teaching process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of robotics technology, and in particular to a self-collision avoidance method, device and robot system during robot dragging process. Background Technology

[0002] With the development of technology, the application of robots such as robotic arms is becoming more and more widespread. In some cases, in order to improve the robot's ability to imitate human operation and movement, the operator can drag the robot to perform teaching.

[0003] However, during the existing process of operators dragging and teaching the robot, the robot often experiences self-collision due to the operator's dragging operation, that is, the links of the robot come into contact and collide with each other. Summary of the Invention

[0004] The purpose of this application is to provide a self-collision avoidance method, device and robot system in the process of robot dragging, so as to improve the efficiency of the dragging teaching process.

[0005] In a first aspect, embodiments of this application provide a robot system that employs the technical solutions described below:

[0006] A robot system includes an encoder, a robot, and a controller; the encoder is fixed to the joints of the robot; the controller includes a self-collision avoidance control device and a robot control device; the self-collision avoidance control device includes a model fitting module, a collision detection module, a collision avoidance module, and a zero-force compensation module.

[0007] The model fitting module is used to perform primitive fitting based on the robot model and generate primitive fitting results.

[0008] The collision detection module is used to calculate the minimum distance between geometric primitives of each collision detection pair or the minimum distance representative between primitives based on the primitive fitting results and the joint positions of the robot, so as to obtain the distance set under each collision detection pair; and to extract the minimum distance and the spatial coordinates of the endpoint corresponding to the minimum distance in each distance set; wherein any two joints of the robot constitute a collision detection pair;

[0009] The collision avoidance module is used to calculate the joint repulsion torque of each collision detection pair based on the minimum distance and the spatial coordinates of the endpoints corresponding to the minimum distance, respectively; and to sum the joint repulsion torques of all collision detection pairs to obtain the total joint repulsion torque.

[0010] The zero-force compensation module is used to calculate the drag compensation torque based on the robot's joint motion data;

[0011] The robot control device is used to combine the total joint repulsion torque and the drag compensation torque to generate a dragging avoidance motion command, so as to instruct the robot to achieve self-collision avoidance during the dragging process.

[0012] Furthermore, in one embodiment, the model fitting module includes: a link extraction submodule and a position determination submodule;

[0013] The link extraction submodule is used to extract each link representing a robot joint based on the robot model;

[0014] The position determination submodule is used to extract the position description of the fitted geometric primitives; or,

[0015] The model fitting module includes: a link extraction submodule, a primitive fitting submodule, and a position determination submodule;

[0016] The link extraction submodule is used to extract each link representing a robot joint based on the robot model;

[0017] The primitive fitting submodule is used to perform geometric primitive fitting on each of the links;

[0018] The position determination submodule is used to extract the position description of the fitted geometric primitives.

[0019] Furthermore, in one embodiment, the collision detection module includes:

[0020] The first collision detection submodule is used to calculate the minimum distance or minimum distance representative of each geometric element of one link in each collision detection pair relative to each geometric element of the other link, so as to obtain the distance set under each collision detection pair.

[0021] The data extraction submodule is used to extract the minimum distance and the spatial coordinates of the endpoint corresponding to the minimum distance in each of the distance sets; or,

[0022] When the geometric primitive is a sphere, the collision detection module includes:

[0023] The second collision detection submodule is used to calculate the distance between the center of each geometric primitive of one link in each collision detection pair and the center of each geometric primitive of the other link, so as to obtain the distance set under each collision detection pair;

[0024] The data extraction submodule is used to extract the minimum distance and the spatial coordinates of the endpoint corresponding to the minimum distance in each of the distance sets.

[0025] Furthermore, in one embodiment, the collision avoidance module includes:

[0026] The matrix retrieval submodule is used to retrieve the Jacobian matrix corresponding to the endpoint with the minimum distance in each of the distance sets.

[0027] The safety judgment submodule is used to determine whether the minimum distance in the distance set meets the preset requirements relative to the preset safety threshold.

[0028] The exclusion calculation submodule is used to calculate a link for each collision detection pair based on formula (3) if preset requirements are met. Acting on another link The repulsive force on the surface;

[0029] (3)

[0030] Among them, All are coefficients; Indicates the minimum distance; This represents the security threshold; The minimum distance is located at the link. endpoints Speed ​​in the workspace; This indicates that the minimum distance is located on the link. The coordinates of the endpoint in the robot coordinate system; The minimum distance is located at the link The coordinates of the endpoint in the robot coordinate system;

[0031] The torque mapping submodule is used to calculate the joint repulsion torque mapped by the repulsion force in the joint space in combination with the Jacobian matrix;

[0032] The torque summation submodule is used to sum the joint repulsion torques of all the collision detection pairs to obtain the total joint repulsion torque.

[0033] Furthermore, in one embodiment, the joint motion data includes: joint position and joint velocity; and / or,

[0034] The zero-force compensation module includes:

[0035] The gravitational torque calculation submodule is used to calculate the gravitational torque of the robot joint based on the joint angle;

[0036] The friction torque calculation submodule is used to calculate the friction torque of the robot joint based on the joint angular velocity;

[0037] The zero-force calculation submodule is used to calculate the drag compensation torque by combining the gravitational torque and the friction torque.

[0038] Furthermore, in one embodiment, the robot control device includes: a data summation submodule and a motion control submodule;

[0039] The data summation submodule is used to sum the total joint repulsion force and the drag compensation torque to obtain the result control quantity;

[0040] The motion control submodule is used to use the resulting control quantity as the drag avoidance motion command.

[0041] Secondly, embodiments of this application provide a self-collision avoidance method during robot dragging, applied to a robot system, the system including a robot and a controller; the self-collision avoidance method during robot dragging includes the following steps:

[0042] Obtain the primitive fitting results of the robot model;

[0043] Based on the primitive fitting results and the robot's joint positions, the minimum primitive distance or the minimum primitive distance representative between each geometric primitive of each collision detection pair is calculated to obtain the distance set under each collision detection pair; the minimum distance and the spatial coordinates of the endpoint corresponding to the minimum distance in each distance set are extracted respectively; wherein, any two joints of the robot constitute a collision detection pair;

[0044] Based on the minimum distance and the spatial coordinates of the endpoints corresponding to the minimum distance, the joint repulsion torque of each collision detection pair is calculated; the joint repulsion torque of all collision detection pairs is summed to obtain the total joint repulsion torque.

[0045] Calculate drag compensation torque based on robot joint motion data;

[0046] By combining the total joint repulsion torque and the drag compensation torque, a dragging avoidance motion command is generated to instruct the robot to achieve self-collision avoidance during dragging.

[0047] Thirdly, embodiments of this application provide a self-collision avoidance device during robot dragging, the device comprising:

[0048] The result acquisition module is used to obtain the primitive fitting results of the robot model;

[0049] The collision detection module is used to calculate the minimum distance between geometric primitives of each collision detection pair or the minimum distance representative between primitives based on the primitive fitting results and the joint positions of the robot, so as to obtain the distance set under each collision detection pair; and to extract the minimum distance and the spatial coordinates of the endpoints corresponding to the minimum distance in each distance set; wherein any two joints of the robot constitute a collision detection pair;

[0050] The collision avoidance module is used to calculate the joint repulsion torque of each collision detection pair based on the minimum distance and the spatial coordinates of the endpoints corresponding to the minimum distance, respectively; and to sum the joint repulsion torques of all collision detection pairs to obtain the total joint repulsion torque.

[0051] The zero-force compensation module is used to calculate the drag compensation torque based on the robot's joint motion data; the joint motion data includes: joint angles and angular velocities;

[0052] A robot control device is used to combine the total joint repulsion torque and the drag compensation torque to generate a dragging avoidance motion command, so as to instruct the robot to achieve self-collision avoidance during being dragged.

[0053] Fourthly, embodiments of this application provide a controller, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the steps of the self-collision avoidance method during the robot dragging process described above.

[0054] Fifthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the self-collision avoidance method during the robot dragging process described above.

[0055] Compared with the prior art, the embodiments of this application have the following main advantages:

[0056] This application's embodiments automatically avoid self-collisions during robot dragging, ensuring the dragging pose remains within the robot's feasible motion domain. This avoids the problem of repeated teaching due to encountering self-collision poses during dragging. It improves the efficiency of user dragging and teaching, as well as the safety during dragging and reproduction. Attached Figure Description

[0057] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0058] Figure 1 This is an architectural diagram of one embodiment of the robot system to which this application can be applied.

[0059] Figure 2 This is a flowchart illustrating one embodiment of the self-collision avoidance method during robot dragging in this application.

[0060] Figure 3 This is a schematic diagram of one embodiment of the self-collision avoidance device for robot dragging process of this application.

[0061] Figure 4 This is a schematic diagram of the structure of one embodiment of the computer device of this application. Detailed Implementation

[0062] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.

[0063] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0064] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0065] like Figure 1 , Figure 1 This is an architectural diagram of one embodiment of the robot system to which this application can be applied.

[0066] This application provides a robot system 100, which includes a robot and a controller.

[0067] The controller and the robot communicate with each other via wired or wireless means.

[0068] It should be noted that the aforementioned wireless connection methods may include, but are not limited to, 3G / 4G / 5G connections, WiFi connections, Bluetooth connections, WiMAX connections, Zigbee connections, UWB (ultra wideband) connections, and other currently known or future wireless connection methods.

[0069] A robot is used to perform self-collision avoidance movements based on instructions sent by a controller, such as dragging and avoiding motions, while being dragged.

[0070] Specifically, the robot can be any type of robot that is currently existing or will be developed in the future, such as a six-axis or seven-axis robotic arm. The robotic arm can be set up independently or as part of the overall robot structure (e.g., a single or dual arm of a humanoid robot). For ease of understanding, this application mainly uses the robotic arm 110 as an example for detailed description.

[0071] The controller 120 includes: a self-collision avoidance control device and a robot control device.

[0072] It should be noted that the self-collision avoidance control device and robot control device described in the embodiments of this application can be integrated into the same controller or integrated into different controllers, both of which are within the scope of protection of this application.

[0073] For example, continue as follows Figure 1 As shown, the robotic arm control device (i.e., robot control device) 111 is integrated into the robotic arm 110, while the self-collision avoidance control device 120 is integrated into another independent controller.

[0074] The controller described in this embodiment of the invention can be, but is not limited to, a computer terminal (PC); an industrial personal computer (IPC); a mobile terminal; a server; a system including a terminal and a server, implemented through interaction between the terminal and the server; a programmable logic controller (PLC); a field-programmable gate array (FPGA); a digital signal processor (DSP) or microcontroller unit (MCU), and similar controllers. The controller generates program instructions based on a pre-defined program and data signals collected by the robot, etc. Specifically, it can be applied to, for example... Figure 4In the computer device shown, for example, the robotic arm control unit is integrated into the robotic arm, while the collision avoidance control unit is integrated into another separate controller.

[0075] It should be noted that the robots and other similar objects mentioned in the embodiments of this application can be real objects in a real environment or virtual objects in a simulation platform, achieving the effect of connecting to real objects through the simulation environment. Controllers trained in a virtual environment can be ported to a real environment to control or retrain real objects, saving resources and time in the training process.

[0076] Further reference Figure 1 For ease of understanding, the following provides a more detailed description of the self-collision avoidance control device and the robot control device included in the controller.

[0077] The self-collision avoidance control device 120 and the robot control device 111 communicate with each other via wired or wireless means.

[0078] The self-collision avoidance control device 120 includes: a model fitting module 121, a collision detection module 122, a collision avoidance module 123, and a zero-force compensation module 124.

[0079] The model fitting module 121 is used to perform primitive fitting based on the robot model and generate primitive fitting results.

[0080] The collision detection module 122 is used to calculate the minimum distance between geometric primitives of each collision detection pair or the minimum distance representative between primitives based on the primitive fitting results and the joint positions of the robot, so as to obtain the distance set under each collision detection pair; and to extract the minimum distance and the spatial coordinates of the endpoints corresponding to the minimum distance in each distance set; wherein any two joints of the robot constitute a collision detection pair.

[0081] The collision avoidance module 123 is used to calculate the joint repulsion torque of each collision detection pair based on the minimum distance and the spatial coordinates of the endpoints corresponding to the minimum distance, respectively; and to sum the joint repulsion torques of all collision detection pairs to obtain the total joint repulsion torque.

[0082] The zero-force compensation module 124 is used to calculate the drag compensation torque based on the robot's joint motion data.

[0083] The embodiments of this application can use a self-collision avoidance control device to calculate the total joint repulsion torque and drag compensation torque based on the robot's motion data.

[0084] The robot control device 111 is used to combine the total joint repulsion torque and the drag compensation torque to generate drag avoidance motion commands, so as to instruct the robot to achieve self-collision avoidance during dragging.

[0085] This application's embodiments automatically avoid self-collisions during robot dragging, ensuring the dragging pose remains within the robot's feasible motion domain. This avoids the problem of repeated teaching due to encountering self-collision poses during dragging. It improves the efficiency of user dragging and teaching, as well as the safety during dragging and reproduction.

[0086] For ease of understanding, the self-collision avoidance control device 120 and robot control device 111 will be described in further detail below.

[0087] The self-collision avoidance control device 120 includes:

[0088] The model fitting module 121 is used to perform primitive fitting based on the robot model and generate primitive fitting results.

[0089] In one embodiment, the model fitting module 121 may include: a link extraction submodule 1211, an elementary fitting submodule 1212, and a position determination submodule 1213.

[0090] The link extraction submodule 1211 is used to extract individual links representing robot joints based on the robot model.

[0091] In one embodiment, the link extraction submodule 1211 can access the file containing the robot's 3D model and physical attributes from a memory or server in advance, either offline or in real time, according to a preset address; obtain the robot's 3D model; and then extract each link from the 3D model based on various existing or future methods, such as extracting links based on Isaac Sim URDF Importer or extracting links based on a link extraction network model.

[0092] It should be noted that the robot models mentioned above are usually three-dimensional or higher-dimensional models, such as CAD models or point cloud models generated from object images.

[0093] For example, taking a six-axis robotic arm as an example, six links representing the sequential connection of the six joints of the six-axis robotic arm can be extracted based on the CAD model of the six-axis robotic arm.

[0094] The primitive fitting submodule 1212 is used to perform geometric primitive fitting on each link.

[0095] In one embodiment, taking a sphere as an example, the element fitting submodule 1212 can set the parameters of each fitted sphere for each link in combination with the link length (e.g., sphere radius, sphere center position in the link coordinate system), and then perform sphere fitting on the link in combination with the link length and the parameters of the fitted sphere (so that each link has multiple spheres with the same radius arranged in sequence along the link length direction).

[0096] In this embodiment of the application, geometric primitive fitting can be performed on each link by using the primitive fitting submodule 1212 to perform geometric primitive fitting.

[0097] The position determination submodule 1213 is used to determine the position description of the fitted geometric primitives.

[0098] In one embodiment, based on the fitted geometric primitives, the coordinates of each geometric primitive in the link coordinate system (e.g., the coordinates of the center of each geometric primitive or other points of the geometric primitive in the link coordinate system) can be extracted, and these coordinates can be used as the position description of the geometric primitive. Subsequently, in the robot control device, the coordinates of the geometric primitives in the link coordinate system are transformed to the robot coordinate system to facilitate the generation of drag avoidance motion commands.

[0099] In another embodiment, the coordinates of each geometric primitive in the link coordinate system can be extracted first; then, through coordinate system transformation, the coordinates of the geometric primitives in the link coordinate system can be transformed to the robot coordinate system, thereby obtaining the position description in the robot coordinate system. The robot coordinate system can be any part of the robot as its origin, as needed. For ease of understanding, this embodiment selects the robot's base as the origin of the robot coordinate system; that is, obtaining the position description of each geometric primitive in the robot coordinate system can be equivalent to obtaining the coordinates of each geometric primitive in the robot's base coordinate system.

[0100] It should be noted that the geometric primitives in the embodiments of this application can be of various types as needed, such as spheres, capsules and cylinders.

[0101] A sphere is preferred as the fitting unit; typically, multiple spheres with the same radius can be fitted to each link. Further explanation will follow in later embodiments.

[0102] In a preferred embodiment, the position determination submodule 1213 is further described using a sphere (also known as a "fitted sphere") as an example of a geometric primitive.

[0103] In one embodiment, the position determination submodule 1213 can calculate the position of each sphere based on formula (1). The center of the sphere lies in the robot's base coordinate system. The following location description That is, the coordinates of the center of the fitted sphere in the robot's base coordinate system;

[0104] (1)

[0105] in, Indicates the link Any fitted sphere The center of the ball in the link coordinate system Location description in the middle; Represents the link coordinate system Relative to the robot's base coordinate system The transformation relationship; the robot is composed of It consists of a series of links, and the links are... The upper fixed coordinate system has a connecting rod. ;link corresponding spheres with the same fitted radius The assembly of these spheres forms the connecting rod. Corresponding fitted sphere set .

[0106] It should be noted that the above-mentioned "fitting geometric primitives of the link" can be done manually or automatically using programming or neural networks to generate the fitting results. Therefore, in another embodiment, when performing geometric primitive fitting manually, the model fitting module 121 may further include: a link extraction submodule 1211 and a position determination submodule 1213. For details on the link extraction submodule 1211 and the position determination submodule 1213, please refer to the description of the above embodiment, which will not be repeated here.

[0107] In one embodiment, the model fitting module 121 may further include:

[0108] The result storage submodule 1214 is used to store the parameters of the geometric primitives and / or the position description of each geometric primitive in the robot coordinate system, etc., according to a preset address.

[0109] This application embodiment uses multiple spheres as geometric primitives for fitting, which achieves higher fitting accuracy compared to primitives such as capsules or cylinders. In addition, for the calculation of the distance between two spheres corresponding to the minimum distance described in the later embodiment, it is only necessary to calculate the distance between the centers of the spheres and then subtract the radii of the two spheres, making the calculation simpler. Furthermore, this application embodiment sets all spheres to be of the same size, making the data structure simpler.

[0110] The collision detection module 122 is used to calculate the minimum distance between geometric primitives of each collision detection pair or the minimum distance representative between primitives based on the primitive fitting results and the joint positions of the robot, so as to obtain the distance set under each collision detection pair; and to extract the minimum distance and the spatial coordinates of the endpoints corresponding to the minimum distance in each distance set; wherein any two joints of the robot constitute a collision detection pair.

[0111] In this system, any two joints of the robot constitute a collision detection pair; each link corresponds to one joint of the robot. It should be noted that, taking a humanoid robot with two arms as an example, any two joints can belong to the same arm or to two different arms, thus enabling collision detection between links of a single arm as well as collision detection between the two arms.

[0112] It should be noted that the motion joints of the robot described above can be either linear motion joints or rotational motion joints; this application does not impose any limitations. An encoder is installed at the motion joint to measure the joint position (e.g., joint angle value or linear motion position).

[0113] In one embodiment, the collision detection module can retrieve the robot's joint positions, measured by the encoders of the servo drive modules for each motion joint of the robot, from a memory or server according to a preset address.

[0114] In one embodiment, the collision detection module 122 may include:

[0115] The first collision detection submodule 1221 is used to calculate the minimum distance or minimum distance representation of each geometric element of one link in each collision detection pair relative to each geometric element of the other link, so as to obtain the distance set under each collision detection pair.

[0116] It should be noted that the minimum distance between the basic elements mentioned above in the embodiments of this application can refer to the minimum distance between geometric basic elements with a straight line segment as a reference, or it can be measured by other references. For ease of understanding, the embodiments of this application mainly use a straight line segment as a reference to measure the minimum distance between the two as an example for detailed explanation.

[0117] Furthermore, the method for determining the minimum distance between different geometric primitives differs. For example, with a cube geometric primitive, it's necessary to iterate through every point on the outer contour of both primitives to obtain the minimum distance between their surfaces. In a preferred embodiment, a spherical geometric primitive is preferred, as this facilitates the calculation of the minimum distance between two geometric primitives. Specifically, the minimum distance is the line connecting the center points (centers of the two spheres) of each sphere minus the radii of the two spheres. Alternatively, the line connecting the center points of the two spheres can be directly considered as the representative of the minimum distance, reducing calculation steps and improving efficiency.

[0118] The embodiments of this application can obtain the minimum distance of all primitives or the set of distances represented by the minimum distance of primitives for each collision detection pair through the above method.

[0119] The data extraction submodule 1222 is used to extract the minimum distance in each distance set and the spatial coordinates of the endpoint corresponding to the minimum distance.

[0120] In one embodiment, the smallest value is selected from the above distance set as the minimum distance for the collision detection pair.

[0121] Continuing with the example of a fitted sphere as the geometric primitive, the minimum distance between each joint collision detection pair is... It can be the minimum value within the ball center distance set; the ball center distance set is the set of ball center distances between all fitted balls of one link and all fitted balls of the other link in each collision detection pair (also called the "ball center distance set"). (”).

[0122] In one embodiment, continuing to use a sphere as the geometric primitive, if the connecting rod... With connecting rod Forming a collision detection pair, and satisfying < ,link Above There are three fitted spheres, all with the same radius. ,link Above There are three fitted spheres, all with the same radius. .

[0123] For example, if there are two spatial center points p1=(x1,y1,z1) and p2=(x2,y2,z2), then the distance between the two points in space can be calculated as d=sqrt((x1-x2)). 2 +(y1-y2) 2 +(z1-z2) 2 ); where sqrt represents finding the square root.

[0124] Among them, the set of distances from the center of the sphere The minimum value in the range is called the minimum center-to-center distance. The minimum distance between the centers of the balls corresponds to the distances on the connecting rods. With connecting rod The center of the upper sphere lies in the robot's base coordinate system. The coordinates in are and These are the spatial coordinates of the endpoints corresponding to the minimum distance mentioned above.

[0125] This application embodiment calculates the linkage. Fitting sphere relative to connecting rod The algorithm fits the set of center distances of the sphere to the top, extracts the minimum distance and the spatial coordinates of the endpoints corresponding to the minimum distance from the set of center distances, which makes the overall calculation simple, fast and resource-efficient.

[0126] The collision avoidance module 123 is used to calculate the joint repulsion torque of each collision detection pair based on the minimum distance and the spatial coordinates of the endpoints corresponding to the minimum distance, respectively; and to sum the joint repulsion torques of all collision detection pairs to obtain the total joint repulsion torque.

[0127] In one embodiment, the collision avoidance module 123 may include: a matrix calculation submodule 1231, a safety judgment submodule 1232, a repulsion calculation submodule 1233, a torque mapping submodule 1234, and a torque summation submodule 1235.

[0128] The matrix retrieval submodule 1231 is used to retrieve the Jacobian matrix corresponding to the endpoints with the minimum distance in each distance set.

[0129] The safety judgment submodule 1232 is used to determine whether the minimum distance relative to the preset safety threshold meets the preset requirements;

[0130] The exclusion calculation submodule 1233 is used to calculate a link of each collision detection pair based on formula (3) if the preset requirements are met. Acting on another link The repulsive force on the surface;

[0131] (3)

[0132] Among them, All are coefficients; Indicates the minimum distance; This represents the security threshold; The minimum distance is located at the link. endpoints Speed ​​in the workspace; This indicates that the minimum distance is located at the link. The coordinates of the endpoint in the robot coordinate system; The minimum distance is located at the link The coordinates of the endpoint in the robot coordinate system;

[0133] The torque mapping submodule 1234 is used to calculate the joint repulsion torque mapped by the repulsion force in the joint space in combination with the Jacobi matrix;

[0134] The torque summation submodule 1235 is used to sum the joint repulsion torques of all the collision detection pairs to obtain the total joint repulsion torque.

[0135] To facilitate understanding, we will continue to use a sphere as an example to further explain the above modules in detail.

[0136] The matrix retrieval submodule 1231 is used to retrieve the Jacobian matrix corresponding to the center of the fitted sphere.

[0137] In one embodiment, the collision detection centering link corresponding to the minimum distance is calculated respectively. The center coordinates of the fitted sphere The corresponding Jacobi matrix and connecting rods The center coordinates of the fitted sphere The corresponding Jacobi matrix .

[0138] The safety judgment submodule 1232 is used to determine whether the minimum distance meets the preset requirements relative to the preset safety threshold. That is, to determine the minimum center distance of the sphere. With the set security threshold Does it satisfy formula (2)?

[0139] (2)

[0140] in, Representative link The radius of each fitted sphere on the surface; Representative link The radius of each fitted sphere; This represents the minimum distance between the centers of the spheres.

[0141] The exclusion calculation submodule 1233 is used to calculate the connection based on formula (3) if formula (2) is satisfied. The resulting effect on the connecting rod Repulsive force on ;

[0142] (3)

[0143] Among them, All are coefficients; For the center of the ball Speed ​​in the workspace;

[0144] Specifically, the center of the sphere, c, is located in the workspace, which is the three-dimensional space we inhabit. v is the velocity of the center of the sphere, c, in the workspace, which can be obtained by transforming the joint space velocity and the Jacobian matrix corresponding to the center of the sphere, c.

[0145] The torque mapping submodule 1234 is used to calculate the joint repulsion torque mapped in joint space based on the Jacobi matrix.

[0146] Based on the above method steps, the joint repulsion torque of each collision detection pair can be obtained in the embodiments of this application.

[0147] The torque summation submodule 1235 is used to sum the joint repulsion torques of all collision detection pairs to obtain the total joint repulsion torque.

[0148] This application embodiment, based on the Jacobian matrix, can map the repulsive force in the workspace into the joint repulsive torque in the joint space. This application embodiment traverses all collision detection pairs, thereby obtaining the sum of the joint repulsive torques Tvir for each collision detection pair based on the aforementioned submodules 1231 to 1234.

[0149] It should be noted that, in addition to including the various sub-modules described in the above embodiments to realize the corresponding functions of the module 123, the collision avoidance module 123 may also include any other sub-modules that are currently available or will be developed in the future that can realize the corresponding functions. For example, it may include a torque calculation sub-module based on a neural network, which is used to take the minimum distance between each joint collision detection pair and the spatial coordinates of the endpoints corresponding to the minimum distance as input to the torque recognition model, and can output the total joint repulsion torque.

[0150] The zero-force compensation module 124 is used to calculate the drag compensation torque based on the robot's joint motion data.

[0151] In one embodiment, the joint motion data includes: joint position (e.g., joint angle or position in linear motion) and joint velocity (e.g., angular velocity or linear motion velocity).

[0152] In one embodiment, the zero-force compensation module 124 may include:

[0153] The gravitational torque calculation submodule 1241 is used to calculate the gravitational torque of the robot joints based on the joint position.

[0154] The friction torque calculation submodule 1242 is used to calculate the friction torque of the robot joints based on the joint velocity.

[0155] The zero-force calculation submodule 1243 is used to calculate the drag compensation torque by combining the gravitational torque and the friction torque.

[0156] For example, the drag compensation torque of each joint of the robot can be obtained based on formula (4) to achieve zero-force drag of the robot by the operator.

[0157] (4)

[0158] in, This represents the total torque of the robot's joints; This represents the gravitational torque of the robot's joints; This represents the frictional torque at the robot's joints. Indicates joint angle; This indicates the joint angular velocity.

[0159] In one embodiment, the joint angle and joint angular velocity can be substituted into the formulas for G and F to solve for these two torques. The formulas for G and F are components of the robotic arm dynamics model. The robotic arm dynamics model can be solved using methods such as the Lagrange method or the Newton-Euler method.

[0160] This application embodiment calculates the drag compensation torque of each joint of the robot by combining the gravitational torque and the frictional torque of each joint of the robot.

[0161] It should be noted that, in addition to the zero-force compensation module including the above-mentioned sub-modules described in the above embodiments, any existing or future zero-force compensation module that can realize zero-force drag torque compensation is within the scope of this application. For example, the zero-force drag compensation function can also be realized by using narrow impedance control methods, neural network models, etc.

[0162] The zero-force compensation module described in this application has the advantages of simple calculation, short time consumption, and low resource consumption.

[0163] The robot control device 111 is used to combine the total joint repulsion torque and the drag compensation torque to generate drag avoidance motion commands, so as to instruct the robot to achieve self-collision avoidance during dragging.

[0164] In this embodiment, the drag compensation torque generated by the zero-force compensation module can keep the robot in a near-suspended state, allowing the operator to drag it. The joint repulsion torque generated by the collision avoidance module can prevent the robot from self-collision. By controlling the robot using the sum of these two torques, the operator can both drag the robot and avoid collisions in real time during the dragging process. This enables the robot operating in torque control mode to achieve self-collision avoidance during dragging.

[0165] In one embodiment, the robot control device 111 may include a data summation submodule and a motion control submodule.

[0166] The data summation submodule is used to sum the total joint repulsion force and the drag compensation torque to obtain the result control quantity.

[0167] The motion control submodule is used to take the resulting control quantity as a drag-avoidance motion command to instruct the robot to achieve self-collision avoidance during dragging.

[0168] In this embodiment, the drag compensation torque calculated by the drag compensation module of the self-collision avoidance control device compensates for the gravity and friction forces acting on the robot, allowing the user to drag the robot without any restrictions. However, this may result in the user dragging the robot into a self-collision posture. Conversely, the joint repulsion torque calculated by the collision avoidance module of the self-collision avoidance control device will prevent the operator from dragging the robot in the direction of the self-collision. Using the resulting control quantity as the drag avoidance motion command enables the robot operating in torque control mode to achieve self-collision avoidance during the dragging process.

[0169] For example, taking a multi-joint robot as an example, the torque generated by the drag compensation module can compensate for the robot's gravity and friction, allowing the operator to drag the robot within a 360° range. Furthermore, if two joints of the robot might collide when they simultaneously move to their respective collision angles (e.g., if the first joint moves to 90 degrees and the fifth joint moves to 45 degrees simultaneously, a collision is possible), the collision avoidance module generates a larger repulsive torque as the two joints synchronously approach their respective collision angles. Based on the sum of the drag compensation torque and the joint repulsive torque, a drag avoidance motion command is generated to control the robot. When the operator drags the robot, as the joint angles of two joints approach the collision angle, the user will feel resistance due to the repulsive force, preventing further dragging in that direction. This avoids a collision between one joint and another.

[0170] This application embodiment employs a collision avoidance module including the aforementioned sub-modules. On the one hand, the servo drive mode is always kept in torque control mode, avoiding frequent mode switching and thus improving safety. On the other hand, self-collision avoidance is achieved through joint repulsion torque, rather than by switching servo control modes, thus avoiding sudden changes in system stiffness during mode switching and the resulting jerking sensation, resulting in a better user experience.

[0171] It should be noted that, in addition to controlling the robot by summing the joint repulsion torque and drag compensation torque as described in the above embodiment, other methods can also be used. For example, when the system detects that the robot is about to collide, the servo drive mode is switched from torque control mode to position control mode, and the current joint angle is maintained. In this way, the operator can no longer drag the robot freely, and the robot remains stationary, thus avoiding the occurrence of a collision.

[0172] Based on the robot system described in the above embodiments, this application provides a self-collision avoidance method during robot dragging, which is generally executed by the controller 120.

[0173] like Figure 2 As shown, Figure 2 This is a flowchart of an embodiment of the self-collision avoidance method during robot dragging according to this application; the self-collision avoidance method during robot dragging may include the following method steps:

[0174] Step 210: Obtain the primitive fitting results of the robot model.

[0175] Step 220: Based on the primitive fitting results and the robot's joint positions, calculate the minimum primitive distance or the minimum primitive distance representative between each geometric primitive of each collision detection pair to obtain the distance set under each collision detection pair; extract the minimum distance and the spatial coordinates of the endpoints corresponding to the minimum distance in each distance set; wherein, any two joints of the robot constitute a collision detection pair.

[0176] Step 230: Calculate the joint repulsion torque of each collision detection pair based on the minimum distance and the spatial coordinates of the endpoints corresponding to the minimum distance; sum the joint repulsion torques of all collision detection pairs to obtain the total joint repulsion torque.

[0177] Step 240 calculates the drag compensation torque based on the robot's joint motion data; the joint motion data includes the joint angle and angular velocity.

[0178] Step 250 combines the total joint repulsion torque and the drag compensation torque to generate a dragging avoidance motion command, instructing the robot to achieve self-collision avoidance during the dragging process.

[0179] This application's embodiments automatically avoid self-collisions during robot dragging, ensuring the dragging pose remains within the robot's feasible motion domain. This avoids the problem of repeated teaching due to encountering self-collision poses during dragging. It improves the efficiency of user dragging and teaching, as well as the safety during dragging and reproduction.

[0180] In one embodiment, before step 210 obtains the primitive fitting result of the robot model, the method may further include the following steps:

[0181] Step 260: Perform primitive fitting based on the robot model; and generate primitive fitting results.

[0182] Specifically, the controller can generate primitive fitting results based on the robot model, either offline or online.

[0183] In one embodiment, step 260 may include the following method steps:

[0184] Step 261: Based on the robot model, extract the links that represent the robot joints.

[0185] Step 263: Extract the position descriptions of the fitted geometric primitives.

[0186] In another embodiment, step 260 may include the following method steps:

[0187] Step 261: Based on the robot model, extract the links that represent the robot joints.

[0188] Step 262 involves fitting geometric primitives to each link.

[0189] Step 263: Extract the position descriptions of the fitted geometric primitives.

[0190] In one embodiment, step 220 may include the following method steps:

[0191] Step 221 calculates the minimum primitive distance between each geometric primitive of one link in each collision detection pair and each geometric primitive of the other link, to obtain the distance set under each collision detection pair;

[0192] Step 223 extracts the minimum distance and the spatial coordinates of the endpoint corresponding to the minimum distance from each of the distance sets.

[0193] In another embodiment, when the geometric primitive is a sphere, step 220 may include the following method steps:

[0194] Step 222: Calculate the distance between the center of each fitted geometric primitive of one link in each collision detection pair and the center of each fitted geometric primitive of the other link, to obtain the distance set for each collision detection pair.

[0195] Step 224, the data extraction submodule, is used to extract the minimum distance and the spatial coordinates of the endpoints corresponding to the minimum distance in each distance set.

[0196] In one embodiment, step 230 may include the following method steps:

[0197] Step 231: Calculate the Jacobian matrix corresponding to the endpoint of the minimum distance in each distance set.

[0198] Step 232 determines whether the minimum distance meets the preset requirements relative to the preset safety threshold.

[0199] If the preset requirements are met in step 233, calculate a link for each collision detection pair based on formula (3). Acting on another link The repulsive force on the surface;

[0200] (3)

[0201] Among them, All are coefficients; Indicates the minimum distance; This represents the security threshold; The minimum distance is located at the link. endpoints Speed ​​in the workspace; This indicates that the minimum distance is located at the link. The coordinates of the endpoint in the robot coordinate system; The minimum distance is located at the link The coordinates of the endpoint in the robot coordinate system.

[0202] Step 234 combines the Jacobi matrix to calculate the joint repulsion torque mapped in the joint space by the joint repulsion force.

[0203] Step 235 sums the joint repulsion moments of all collision detection pairs to obtain the total joint repulsion moment.

[0204] In one embodiment, the motion data includes joint position and joint velocity. Therefore, step 240, calculating the drag compensation torque based on the robot's joint motion data, may include the following method steps:

[0205] Step 241: Calculate the gravitational torque of the robot joints based on their positions;

[0206] Step 242: Calculate the frictional torque of the robot joints based on the joint velocities;

[0207] Step 243 combines the gravitational torque and the frictional torque to calculate the drag compensation torque.

[0208] For example, the drag compensation torque of each joint of the robot can be obtained based on formula (4) to achieve zero-force drag of the robot by the operator.

[0209] (4)

[0210] in, This represents the total torque of the robot's joints; This represents the gravitational torque of the robot's joints; This represents the frictional torque of a robot joint; Indicates joint angle; This indicates the joint angular velocity.

[0211] This application embodiment can calculate the gravitational torque and frictional torque separately based on the robot's joint motion data, and combine the two to obtain the final drag compensation torque. In addition to calculating the drag compensation torque based on the method steps 241 to 243, it can also be calculated based on various existing or future developed methods, such as using joint motion data as the input of a torque calculation neural network model and outputting the drag compensation torque.

[0212] In one embodiment, step 250, which combines the total joint repulsion torque and the drag compensation torque to generate a dragging avoidance motion command to instruct the robot to achieve self-collision avoidance during dragging, may include the following method steps:

[0213] Step 251 sums the joint repulsion force and the drag compensation torque to obtain the result control quantity.

[0214] Step 252 uses the result control quantity as the drag avoidance motion command to instruct the robot to achieve self-collision avoidance during the dragging process.

[0215] Other relevant descriptions of the self-collision avoidance method during robot dragging can be found in the relevant descriptions in the above embodiments, and will not be repeated here.

[0216] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).

[0217] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0218] Further reference Figure 3 As a response to the above Figure 2 The implementation of the method shown in this application provides an embodiment of a self-collision avoidance device during robot dragging. This device embodiment is similar to... Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to a controller.

[0219] The self-collision avoidance device 300 for robot dragging in this embodiment may include:

[0220] The result acquisition module 310 is used to acquire the primitive fitting results of the robot model.

[0221] The collision detection module 320 is used to calculate the minimum distance between geometric primitives of each collision detection pair or the minimum distance representative between primitives based on the primitive fitting results and the joint positions of the robot, so as to obtain the distance set under each collision detection pair; and to extract the minimum distance and the spatial coordinates of the endpoints corresponding to the minimum distance in each distance set; wherein any two joints of the robot constitute a collision detection pair.

[0222] The collision avoidance module 330 is used to calculate the joint repulsion torque of each collision detection pair based on the minimum distance and the spatial coordinates of the endpoints corresponding to the minimum distance, respectively; and to sum the joint repulsion torques of all collision detection pairs to obtain the total joint repulsion torque.

[0223] The zero-force compensation module 340 is used to calculate the drag compensation torque based on the robot's joint motion data; the joint motion data includes the joint angle and angular velocity.

[0224] The robot control unit 350 is used to combine the total joint repulsion torque and the drag compensation torque to generate drag avoidance motion commands, so as to instruct the robot to achieve self-collision avoidance during dragging.

[0225] In one embodiment, the self-collision avoidance device 300 during robot dragging according to this application embodiment may further include:

[0226] The model fitting module is used to generate primitive fitting results based on the robot model.

[0227] Furthermore, in one embodiment, the model fitting module may include:

[0228] The link extraction submodule is used to extract the links that represent the robot joints based on the robot model.

[0229] The position acquisition submodule is used to extract the position description of the fitted geometric primitives in the robot coordinate system; the fitted geometric primitives are the geometric primitives obtained by fitting the links; or...

[0230] Furthermore, in another embodiment, the model fitting module may include:

[0231] The link extraction submodule is used to extract the links that represent the robot joints based on the robot model.

[0232] The primitive fitting submodule is used to perform geometric primitive fitting for each link;

[0233] The position acquisition submodule is used to extract the position description of the fitted geometric primitives in the robot coordinate system; the fitted geometric primitives are the geometric primitives obtained by fitting the geometric primitives of the link.

[0234] In one embodiment, the collision detection module 320 may include:

[0235] The first collision detection submodule is used to calculate the minimum distance or minimum distance representative of each geometric element of one link in each collision detection pair relative to each geometric element of the other link, so as to obtain the distance set under each collision detection pair.

[0236] The data extraction submodule is used to extract the minimum distance and the spatial coordinates of the endpoint corresponding to the minimum distance in each of the distance sets.

[0237] In one embodiment, the collision detection module 320 may include:

[0238] The second collision detection submodule is used to calculate the distance between the center of each fitted geometric primitive of one link in each collision detection pair and the center of each fitted geometric primitive of the other link, so as to obtain the distance set under each collision detection pair.

[0239] The data extraction submodule is used to extract the minimum distance and the spatial coordinates of the endpoints corresponding to the minimum distance from each distance set.

[0240] In one embodiment, the collision avoidance module 330 may include:

[0241] The matrix retrieval submodule is used to retrieve the Jacobian matrix corresponding to the endpoints with the minimum distance in each distance set.

[0242] The safety judgment submodule is used to determine whether the minimum distance relative to the preset safety threshold meets the preset requirements;

[0243] The exclusion calculation submodule is used to calculate a link for each collision detection pair based on formula (3) if preset requirements are met. Acting on another link The repulsive force on the surface;

[0244] (3)

[0245] Among them, All are coefficients; Indicates the minimum distance; This represents the security threshold; The minimum distance is located at the link. endpoints Speed ​​in the workspace; This indicates that the minimum distance is located at the link. The coordinates of the endpoint in the robot coordinate system; The minimum distance is located at the link The coordinates of the endpoint in the robot coordinate system;

[0246] The torque mapping submodule is used to calculate the joint repulsion torque mapped by the repulsion force in the joint space in combination with the Jacobian matrix;

[0247] The torque summation submodule is used to sum the joint repulsion torques of all the collision detection pairs to obtain the total joint repulsion torque.

[0248] In one embodiment, the zero-force compensation module 340 may include:

[0249] The gravitational torque calculation submodule is used to calculate the gravitational torque of the robot joints based on the joint position;

[0250] The friction torque calculation submodule is used to calculate the friction torque of the robot joints based on the joint velocity.

[0251] The zero-force calculation submodule is used to calculate the drag compensation torque by combining the gravitational torque and the friction torque.

[0252] In one embodiment, the robot control device 350 may include: a data summation submodule and a motion control submodule;

[0253] The data summation submodule is used to sum the total joint repulsion force and the drag compensation torque to obtain the result control quantity;

[0254] The motion control submodule is used to use the resulting control quantity as a drag-avoidance motion command.

[0255] To address the aforementioned technical problems, this application also provides a controller. Please refer to the following for details. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0256] The computer device can be a terminal or a server.

[0257] The computer device 6 includes a memory 61, a processor 62, and a network interface 63 that are interconnected via a system bus. It should be noted that only the computer device 6 with components 61-63 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0258] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.

[0259] The memory 61 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 61 may be an internal storage unit of the computer device 6, such as the hard disk or memory of the computer device 6. In other embodiments, the memory 61 may also be an external storage device of the computer device 6, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 6. Of course, the memory 61 may also include both the internal storage unit and its external storage device of the computer device 6. In this embodiment, the memory 61 is typically used to store the operating system and various application software installed on the computer device 6, such as the program code for a self-collision avoidance method during robot dragging. In addition, the memory 61 can also be used to temporarily store various types of data that have been output or will be output.

[0260] In some embodiments, the processor 62 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. The processor 62 is typically used to control the overall operation of the computer device 6. In this embodiment, the processor 62 is used to run program code stored in the memory 61 or process data, for example, running program code for a collision avoidance method during robot dragging.

[0261] The network interface 63 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 6 and other electronic devices.

[0262] This application also provides another embodiment, namely, a computer-readable storage medium storing a self-collision avoidance program during robot dragging, the self-collision avoidance program during robot dragging can be executed by at least one processor to cause the at least one processor to perform the steps of the self-collision avoidance method during robot dragging as described above.

[0263] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0264] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.

Claims

1. A robot system, comprising an encoder, a robot and a controller; the encoder is fixed to a joint of the robot; characterized in that: The controller includes: a self-collision avoidance control device and a robot control device; the self-collision avoidance control device includes: a model fitting module, a collision detection module, a collision avoidance module and a zero-force compensation module; The model fitting module is used to perform primitive fitting based on the robot model and generate primitive fitting results; The collision detection module is used to calculate the primitive minimum distance or primitive minimum distance representative between each geometric primitive of each collision detection pair based on the primitive fitting result and the joint position of the robot, and obtain the distance set under each collision detection pair; respectively extract the minimum distance in each distance set and the spatial coordinates of the endpoints corresponding to the minimum distance; wherein any two joints of the robot constitute a collision detection pair; The collision avoidance module is used to obtain the joint repulsion torque of each of the collision detection pairs based on the minimum distance and the spatial coordinates of the endpoints corresponding to the minimum distance; sum the joint repulsion torques of all the collision detection pairs to obtain a total joint repulsion torque; The zero force compensation module is used to calculate the drag compensation torque based on the joint motion data of the robot; The robot control device is used to combine the total joint repulsive torque and the drag compensation torque to generate a drag avoidance motion instruction to instruct the robot to achieve self-collision avoidance during the dragging process; Wherein, the collision avoidance module includes: A matrix obtaining submodule, used for obtaining the Jacobian matrix corresponding to the endpoint of the minimum distance in each distance set; A safety judgment submodule, used to judge whether the minimum distance in the distance set meets the preset requirement relative to the preset safety threshold; The repulsion obtaining submodule is used to obtain a link of each collision detection pair based on formula (3) if the preset requirements are met. Acting on another connecting rod repulsive force on (3) Among them, All are coefficients; represents the minimum distance; represents the safety threshold; The minimum distance is located at the connecting rod Endpoint Speed ​​in the workspace; Indicates that the minimum distance is located at the connecting rod The coordinates of the endpoints in the robot coordinate system; The minimum distance is located at the connecting rod The coordinates of the endpoints in the robot coordinate system; A moment mapping submodule, used for calculating the joint repulsive moment of the repulsive force mapped in the joint space in combination with the Jacobi matrix; The torque summing submodule is used to sum the joint repulsive torques of all the collision detection pairs to obtain the total joint repulsive torque.

2. The robot system according to claim 1, characterized in that: The model fitting module includes: a connecting rod extraction submodule and a position obtaining submodule; The connecting rod extraction submodule is used to extract each connecting rod representing the robot joint based on the robot model; The position obtaining submodule is used to extract the position description of the fitted geometric primitives; or, The model fitting module includes: a connecting rod extraction submodule, a primitive fitting submodule and a position obtaining submodule; The connecting rod extraction submodule is used to extract each connecting rod representing the robot joint based on the robot model; The primitive fitting submodule is used to perform the geometric primitive fitting on each of the connecting rods; The position obtaining submodule is used to extract the position description of the fitted geometric primitives.

3. The robot system according to claim 1 or 2, characterized in that: The collision detection module comprises: A first collision detection submodule is used to calculate the minimum primitive distance or the minimum primitive distance representative of each geometric primitive of one link in each collision detection pair relative to each geometric primitive of another link, to obtain a distance set under each collision detection pair; A data extraction submodule, used to respectively extract the minimum distance in each of the distance sets and the spatial coordinates of the endpoints corresponding to the minimum distance; or, When the geometric primitive is a sphere, the collision detection module includes: A second collision detection submodule is used to calculate the distance between the center of each geometric primitive of one link in each collision detection pair and the center of each geometric primitive of the other link to obtain a distance set under each collision detection pair; The data extraction submodule is used to respectively extract the minimum distance in each of the distance sets and the spatial coordinates of the endpoints corresponding to the minimum distance.

4. The robot system according to claim 1 or 2, characterized in that: The joint motion data includes: joint position and joint velocity; and / or, The zero force compensation module comprises: A gravity moment obtaining submodule, used for obtaining the gravity moment of the robot joint based on the joint position; A friction torque obtaining submodule, used for obtaining the friction torque of the robot joint based on the joint velocity; The zero force obtaining submodule is used to obtain the drag compensation torque by combining the gravity torque and the friction torque.

5. The robot system according to claim 1 or 2, characterized in that: The robot control device comprises: a data summing submodule and a motion control submodule; The data summing submodule is used to sum the total joint repulsive force and the drag compensation torque to obtain a result control amount; The motion control submodule is used to use the result control amount as the drag avoidance motion instruction.

6. A method for avoiding self-collision during robot dragging, applied to a robot system, the system comprising a robot and a controller; characterized in that: The self-collision avoidance method during the robot dragging process comprises the following steps: Get the primitive fitting results of the robot model; Based on the primitive fitting results and the joint positions of the robot, the primitive minimum distance or the primitive minimum distance representative between each geometric primitive of each collision detection pair is calculated respectively to obtain a distance set under each collision detection pair; the minimum distance in each distance set and the spatial coordinates of the endpoints corresponding to the minimum distance are extracted respectively; wherein any two joints of the robot constitute a collision detection pair; Based on the minimum distance and the spatial coordinates of the endpoints corresponding to the minimum distance, respectively, the joint repulsion torque of each of the collision detection pairs is obtained; the joint repulsion torques of all the collision detection pairs are summed to obtain a total joint repulsion torque; Calculate the drag compensation torque based on the robot's joint motion data; Combining the total joint repulsive torque and the drag compensation torque, generating a drag avoidance motion instruction to instruct the robot to achieve self-collision avoidance during the dragging process; Wherein, the steps of respectively obtaining the joint repulsion torque of each of the collision detection pairs based on the minimum distance and the spatial coordinates of the endpoints corresponding to the minimum distance; and summing the joint repulsion torques of all the collision detection pairs to obtain the total joint repulsion torque include the following steps: Obtain the Jacobian matrix corresponding to the endpoint of the minimum distance in each distance set; Determine whether the minimum distance in the distance set meets the preset requirement relative to the preset safety threshold; If the preset requirements are met, a link of each collision detection pair is obtained based on formula (3) Acting on another connecting rod repulsive force on (3) Among them, All are coefficients; represents the minimum distance; represents the safety threshold; The minimum distance is located at the connecting rod Endpoint Speed ​​in the workspace; Indicates that the minimum distance is located at the connecting rod The coordinates of the endpoints in the robot coordinate system; The minimum distance is located at the connecting rod The coordinates of the endpoints in the robot coordinate system; Calculate the joint repulsive moment of the repulsive force mapped in the joint space in combination with the Jacobi matrix; The joint repulsive torques of all the collision detection pairs are summed to obtain the total joint repulsive torque.

7. A self-collision avoidance device during robot dragging, characterized in that: The device comprises: A result acquisition module, used to obtain the primitive fitting results of the robot model; A collision detection module, for calculating the primitive minimum distance or primitive minimum distance representative between each geometric primitive of each collision detection pair based on the primitive fitting result and the joint position of the robot, and obtaining a distance set under each collision detection pair; extracting the minimum distance in each distance set and the spatial coordinates of the endpoints corresponding to the minimum distance; wherein any two joints of the robot constitute a collision detection pair; A collision avoidance module, configured to obtain the joint repulsion torque of each of the collision detection pairs based on the minimum distance and the spatial coordinates of the endpoints corresponding to the minimum distance; and sum the joint repulsion torques of all the collision detection pairs to obtain a total joint repulsion torque; A zero force compensation module is used to calculate the drag compensation torque based on the joint motion data of the robot; the joint motion data includes: the angle and angular velocity of the joint; A robot control device, used for combining the total joint repulsive torque and the drag compensation torque to generate a drag avoidance motion instruction to instruct the robot to achieve self-collision avoidance during the dragging process; Wherein, the collision avoidance module includes: A matrix obtaining submodule, used for obtaining the Jacobian matrix corresponding to the endpoint of the minimum distance in each distance set; A safety judgment submodule, used to judge whether the minimum distance in the distance set meets the preset requirement relative to the preset safety threshold; The repulsion obtaining submodule is used to obtain a link of each collision detection pair based on formula (3) if the preset requirements are met. Acting on another connecting rod repulsive force on (3) Among them, All are coefficients; represents the minimum distance; represents the safety threshold; The minimum distance is located at the connecting rod Endpoint Speed ​​in the workspace; Indicates that the minimum distance is located at the connecting rod The coordinates of the endpoints in the robot coordinate system; The minimum distance is located at the connecting rod The coordinates of the endpoints in the robot coordinate system; A moment mapping submodule, used for calculating the joint repulsive moment of the repulsive force mapped in the joint space in combination with the Jacobi matrix; The torque summing submodule is used to sum the joint repulsive torques of all the collision detection pairs to obtain the total joint repulsive torque.

8. A controller comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the self-collision avoidance method during robot dragging according to claim 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, the steps of the self-collision avoidance method during robot dragging according to claim 6 are implemented.