Dragging teaching method and device and electronic equipment
Through the combination of six-dimensional force sensors and preset control laws, the problems of friction recognition and environmental stiffness adaptation in collaborative robot drag teaching are solved, and an efficient and stable drag teaching process is achieved.
Patent Information
- Application Number
- CN202411099132.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-11-15
AI Technical Summary
The prior art requires identification and compensation of friction during the collaborative robot drag teaching process, and rebound phenomena and singular positions are prone to occur under different environmental stiffness, which affects drag efficiency and safety.
The initial force information is obtained through the six-dimensional force sensor, the tool gravity and zero point information compensation is performed, and the target output torque of the motor is calculated in combination with the preset control law to avoid friction recognition and adapt to different environmental stiffness.
It realizes reducing rebound phenomena in different environments, avoiding singular positions, improving drag efficiency and safety, and enhancing the stability and accuracy of collaborative robot drag teaching.
Smart Images

Figure CN118952170A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of robotics technology, and more specifically, to a dragging teaching method, device and electronic equipment. Background Art
[0002] With the introduction of the "Robot+" concept, robots have begun to be popularized in various scenarios of life. Among them, industrial robots and collaborative robots are widely used in the field of production and manufacturing. Since collaborative robots have the advantages of small size, low power, high safety factor, and can directly interact with workers in the collaborative area, they are favored by manufacturers.
[0003] Before the collaborative robot is used, it is necessary to record data point information, that is, to complete the teaching work. At present, for robots, the commonly used teaching methods include drag teaching, remote control teaching and visual guidance. Visual guidance requires the use of cameras and the introduction of machine vision, which is expensive and complicated to operate. Compared with remote control teaching, drag teaching is more efficient and can drag the robot to any position in the workspace at will.
[0004] At present, teaching is generally carried out through the current loop teaching method. The current loop-based teaching method not only requires modeling of the robot's dynamics, but also requires identification and compensation of joint friction, so that the robot is in zero torque mode, which is convenient for the operator to drag easily. However, the friction model is a problem recognized by scholars and is easily affected by temperature, etc. There is currently no unified model for friction identification. Therefore, providing a dragging teaching method that avoids friction identification is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention
[0005] The embodiments of the present application provide a dragging teaching method, device, electronic device and readable storage medium, which can avoid friction force identification, can reduce rebound phenomenon by different environmental stiffness, and at the same time avoid singular posture by transforming the perceived external force information into the joint space and then calculating the torque acting on the motor.
[0006] The embodiments of the present application can be implemented as follows:
[0007] In a first aspect, an embodiment of the present application provides a drag teaching method, the method comprising:
[0008] According to the stored gravity information and zero point information of the collaborative robot's tool, initial force information obtained by the six-dimensional force sensor is compensated to obtain first drag force information, wherein the initial force information includes force and torque;
[0009] Converting the first drag force information into a joint space to obtain second drag force information;
[0010] Calculate a first target output torque of the motor according to a preset control law and the second traction force information, wherein the preset control law includes a relationship between the output torque of the motor, the torque of the Coriolis force and the centrifugal force, the gravity torque, and the traction force information;
[0011] The collaborative robot is moved based on the first target output torque in a torque mode.
[0012] In a second aspect, an embodiment of the present application provides a drag teaching device, the device comprising:
[0013] A compensation module, used to compensate the initial force information obtained by the six-dimensional force sensor according to the stored gravity information and zero point information of the tool of the collaborative robot, so as to obtain the first drag force information, wherein the initial force information includes force and torque;
[0014] A conversion module, used for converting the first drag force information into a joint space to obtain second drag force information;
[0015] a calculation module, configured to calculate a first target output torque of the motor according to a preset control law and the second traction force information, wherein the preset control law includes a relationship between the output torque of the motor, the torque of the Coriolis force and the centrifugal force, the gravity torque, and the traction force information;
[0016] A control module is used to move the collaborative robot based on the first target output torque in a torque mode.
[0017] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the drag teaching method described in the aforementioned embodiment.
[0018] In a fourth aspect, an embodiment of the present application provides a readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the drag teaching method as described in the aforementioned embodiment is implemented.
[0019] The dragging teaching method, device, electronic device and readable storage medium provided by the embodiment of the present application first compensate the initial force information obtained by the six-dimensional force sensor according to the saved gravity information and zero point information of the tool of the collaborative robot to obtain the first dragging force information, which includes force and torque; then, the first dragging force information is converted to the joint space to obtain the second dragging force information, and then the first target output torque of the motor is calculated according to the preset control law and the second dragging force information, wherein the preset control law includes the relationship between the output torque of the motor, the torque of the Coriolis force and the centrifugal force, the gravity torque, and the dragging force information; finally, the collaborative robot is moved based on the first target output torque in the torque mode. In this way, when implementing dragging teaching, friction identification can be avoided, different environmental stiffness can be adapted to reduce rebound phenomenon, and at the same time, by transforming the sensed external force information to the joint space and then calculating the torque acting on the motor, singular posture can be avoided. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0021] Figure 1 A block diagram of an electronic device provided in an embodiment of the present application;
[0022] Figure 2 One of the flowcharts of the drag teaching method provided in the embodiment of the present application;
[0023] Figure 3 The second flowchart of the drag teaching method provided in the embodiment of the present application;
[0024] Figure 4 A schematic diagram of the end coordinate system of the collaborative robot and the sensor coordinate system of the six-dimensional force sensor provided in an embodiment of the present application;
[0025] Figure 5 for Figure 3 One of the flowchart diagrams of the sub-steps included in step S110;
[0026] Figure 6 for Figure 3 2 is a flow chart of the sub-steps included in step S110;
[0027] Figure 7 for Figure 2 A schematic flow chart of the sub-steps included in step S140;
[0028] Figure 8 for Figure 2 A schematic flow chart of the sub-steps included in step S150;
[0029] Fig. 9 One of the block diagrams of the drag teaching device provided in the embodiment of the present application;
[0030] Fig.10 The second block diagram of the dragging teaching device provided in the embodiment of the present application.
[0031] Icon: 100 - electronic device; 110 - memory; 120 - processor; 130 - communication unit; 200 - drag teaching device; 210 - information acquisition module; 220 - compensation module; 230 - conversion module; 240 - calculation module; 250 - control module. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.
[0033] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0034] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0035] The current dragging teaching methods include the current loop teaching method and the admittance control method. The current loop-based teaching method not only requires modeling of the robot's dynamics, but also requires identification and compensation of joint friction to put the robot in zero torque mode, making it easy for the operator to drag. The admittance control method based on a six-dimensional force sensor requires the installation of a six-dimensional force sensor at the end of the robot. When the force sensor senses an external force, the robot will move in the direction of the external force; without an external force, the robot will remain stationary.
[0036] Both of the above methods can be quickly applied to collaborative robot dragging, but both have some shortcomings. The dragging teaching method based on the current loop requires accurate modeling of the dynamics. The modeling needs to consider the torque to overcome the four parts of the robot: inertia, Coriolis force and centrifugal force, gravity, and friction. Most of the existing modeling methods are completed through theoretical parameters. Factors such as actual assembly and processing will affect the accuracy of modeling. Moreover, this method requires the identification of joint friction. The friction model is a problem recognized by scholars and is easily affected by temperature. There is currently no unified model for friction identification.
[0037] The admittance control method based on force sensors generates position changes due to force, and the admittance parameters need to be adjusted to optimize the dragging experience. However, this method has a singular posture, and when in contact with the external environment, if the environmental stiffness changes greatly, rebound will occur, reducing the dragging experience. For some installation operations, the collaborative robot will not be able to complete them due to rebound.
[0038] In general, a dragging teaching method that adapts to different environmental stiffness and avoids friction force identification is of great significance for collaborative robot assisted dragging.
[0039] In response to the above situation, the embodiments of the present application provide a dragging teaching method, device, electronic device and readable storage medium. When implementing dragging teaching of a collaborative robot, friction force identification can be avoided, and the rebound phenomenon can be reduced by different environmental stiffnesses; at the same time, by transforming the sensed external force information into the joint space and then calculating the torque acting on the motor, singular postures can be avoided.
[0040] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0041] Please refer to Figure 1 , Figure 1A block diagram of an electronic device 100 provided in an embodiment of the present application. The electronic device 100 is used to control a collaborative robot to implement drag teaching. The electronic device may include a memory 110, a processor 120, and a communication unit 130. The memory 110, the processor 120, and the communication unit 130 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.
[0042] The memory 110 is used to store programs or data. The memory 110 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc.
[0043] The processor 120 is used to read / write data or programs stored in the memory 110 and execute corresponding functions. For example, the memory 110 stores a drag teaching device 200, and the drag teaching device 200 includes at least one software function module that can be stored in the memory 110 in the form of software or firmware. The processor 120 executes various functional applications and data processing by running software programs and modules stored in the memory 110, such as the drag teaching device 200 in the embodiment of the present application, that is, realizing the drag teaching method in the embodiment of the present application.
[0044] The communication unit 130 is used to establish a communication connection between the electronic device 100 and other communication terminals through a network, and to send and receive data through the network.
[0045] It should be understood that Figure 1 The structure shown is only a schematic diagram of the structure of the electronic device 100. The electronic device 100 may also include Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown. Figure 1 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0046] Please refer to Figure 2 , Figure 2This is one of the flow diagrams of the drag teaching method provided in the embodiment of the present application. The method can be applied to the above-mentioned electronic device. The specific process of the drag teaching method is described in detail below. In this embodiment, the drag teaching method may include steps S120 to S150.
[0047] Step S120, based on the saved gravity information and zero point information of the collaborative robot's tool, the initial force information obtained by the six-dimensional force sensor is compensated to obtain the first drag force information.
[0048] In this embodiment, a six-dimensional force sensor and a tool are installed at the end of the collaborative robot, and the six-dimensional force sensor is located between the end of the collaborative robot and the tool. The tool is determined by the actual application scenario. For example, if it is applied to a welding scenario, the tool may be a welding gun. The six-dimensional force sensor is used to detect the force condition at the end of the collaborative robot. The gravity information and zero point information of the tool of the collaborative robot can be obtained and saved in advance. Among them, the gravity information is used to describe the influence of the mass and position of the tool on the detection information of the six-dimensional force sensor. The collaborative robot may be a six-degree-of-freedom collaborative robot, or other types of collaborative robots, such as a three-degree-of-freedom collaborative robot, which may be determined according to actual conditions.
[0049] In the case where the collaborative robot needs to be used for dragging teaching, the initial force information detected by the six-dimensional force sensor can be obtained. The initial force information includes the force and torque detected by the six-dimensional force sensor in the three axis directions of the sensor coordinate system of the six-dimensional force sensor. The gravity information and zero point information can be used to compensate the initial force information to obtain the first drag force information. The first drag force information is used to describe the external force, that is, to describe the external force applied by a person. The first drag force information includes force and torque.
[0050] Step S130: convert the first drag force information into the joint space to obtain second drag force information.
[0051] In this embodiment, when the first drag force information is obtained, the first drag force information can be converted from the sensor coordinate system to the base coordinate system according to the coordinate system conversion relationship, and then converted to the joint space based on the Jacobian matrix to obtain the second drag force information corresponding to the first drag force information.
[0052] Step S140: calculating a first target output torque of the motor according to a preset control law and the second traction force information.
[0053] In this embodiment, a preset control law is pre-saved. The preset control law includes the relationship between the output torque of the motor, the torque of the Coriolis force and the centrifugal force, the gravity torque, and the drag force information, but does not include the torque of the inertia force and the torque of the friction force. The current robot-assisted dragging (i.e., the teaching method based on the current loop) needs to overcome the torque of the robot's four forces, where the four forces are: inertia, Coriolis force and centrifugal force, gravity, and friction. In this solution, only the Coriolis force, centrifugal force, and gravity are used, plus the data of the compensated six-dimensional force sensor, and the remaining inertia and friction parts are used to adapt to different environmental stiffness. When the second drag force information is obtained, the second drag force information can be substituted into the preset control law to calculate the first target output torque of the motor.
[0054] Step S150: moving the collaborative robot based on the first target output torque in a torque mode.
[0055] Finally, according to the calculated first target output torque, the corresponding motor is controlled so that the protocol robot moves to achieve drag teaching.
[0056] Motor control is divided into three loops: position loop, speed loop and current loop, which are performed in sequence. Admittance control combines the generated position increment with the position of the robot when the admittance control is turned on, and uses it as the output position of the robot for movement. This output position (referring to the position in Cartesian space or workspace) needs to be inversely solved by the robot to find the corresponding joint position, and finally act on the position loop of the motor. However, when a singular posture occurs, there is a phenomenon of no inverse solution.
[0057] In this embodiment, since the data of the joint space is used in the modeling (i.e., the preset control law) and data processing process, the torque finally generated also acts directly on the current loop of the motor to directly drive the motor, so there is no singular posture.
[0058] Therefore, the above-mentioned dragging teaching method provided in the embodiment of the present application can avoid modeling and identifying joint friction, adapt to different environmental stiffnesses to reduce rebound phenomena; and can avoid the occurrence of singular postures.
[0059] In this embodiment, the gravity information is determined based on the center of mass and mass of the tool, and the zero point information includes a zero point drift value, wherein the zero point drift value is used to describe the zero point condition of the six-position force sensor after the collaborative robot is equipped with the tool.
[0060] Please refer to Figure 3 , Figure 3The second flowchart of the drag teaching method provided in the embodiment of the present application is as follows. In this embodiment, before performing the drag teaching, the method may further include step S110 to obtain the gravity information and the zero point information.
[0061] Step S110, when the tool is installed at the end of the collaborative robot, the zero drift value corresponding to the six-axis force sensor, the mass and the center of mass of the tool are obtained according to the multiple collected data obtained by the six-axis force sensor and the corresponding end posture.
[0062] First, install the six-dimensional force sensor on the end flange of the collaborative robot to fix the six-dimensional force sensor. During installation, it is necessary to keep the direction of the sensor coordinate system of the six-dimensional force sensor consistent with the direction of the end coordinate system of the end. Due to the contact of the object, the sensor coordinate system and the end coordinate system will not overlap, but the coordinate system directions are consistent. Figure 4 As shown, on the horizontal plane, the positions of the terminal coordinate system and the sensor coordinate system are the same, and the terminal coordinate system and the sensor coordinate system differ only in height.
[0063] Next, the tool can be installed at the end flange of the collaborative robot, and then the mass and center of mass of the tool can be identified using the data of the six-dimensional force sensor, and the zero drift value τ can be obtained. offset .
[0064] In this embodiment, the end person of the collaborative robot can be moved to the initial position, with the end facing horizontally downward. Then, according to the initial position, it moves to position 1, and records the end position 1 and force sensor data (i.e., the corresponding collected data 1) of the current collaborative robot; then, by analogy, multiple end position postures and corresponding collected data are obtained. After that, multiple end position postures can be added together, and the corresponding multiple collected data can be added together, and then the zero drift value τ can be obtained by fitting. offset , the mass and center of mass of the tool. It can be understood that the above addition indicates an increase in dimension. For example, if the dimension of a matrix is 6*3, if two such matrices are added, the dimension of the new matrix obtained is 6*6.
[0065] The number of acquired data and corresponding terminal postures can be determined in combination with actual needs. For example, if three are needed, in the above example, after acquiring terminal posture 1 and corresponding acquired data 1, the robot moves to posture 2 according to posture 1, and records the terminal posture 2 and force sensor data (i.e., corresponding acquired data 2) of the current collaborative robot; after that, the robot moves to posture 3 according to posture 2, and records the terminal posture 3 and force sensor data (i.e., corresponding acquired data 3) of the current collaborative robot.
[0066] As a possible implementation, Figure 5 The centroid is calculated as shown. Figure 5 , Figure 5 for Figure 3 One of the flowchart diagrams of the sub-steps included in step S110. In this embodiment, step S110 may include sub-steps S111 to S112.
[0067] Sub-step S111, obtaining a first relationship between a plurality of reference numbers, the center of mass of the tool, and the forces and moments in the collected data of the six-dimensional force sensor.
[0068] Sub-step S112, obtaining the position of the center of mass in the coordinate system of the six-dimensional force sensor and the values of multiple reference numbers through fitting according to the obtained collected data and the first relationship.
[0069] In this embodiment, a pre-established first relationship can be obtained, and the first relationship is used to describe the relationship between multiple reference numbers, the center of mass of the tool, and the force and torque in the collected data of the six-dimensional force sensor. Among them, there is a second relationship between the multiple reference numbers, the zero drift value, and the center of mass. Afterwards, according to the obtained first relationship and the multiple collected data obtained by the six-dimensional force sensor after the tool is installed at the end of the collaborative robot, the position of the center of mass in the coordinate system of the six-dimensional force sensor and the values of the multiple reference numbers can be obtained by fitting. Among them, the fitting method used can be determined in combination with actual needs. For example, the least squares method can be used for fitting.
[0070] The following specifically describes how to obtain the first relationship, how to obtain the center of mass position and the values of multiple reference numbers.
[0071] Since the force sensor data is affected by the load gravity and zero drift value, the relationship between the force and torque directly measured by the force sensor can be established as shown below:
[0072]
[0073] Among them, F x 、F y 、F z represents the force detected by the six-dimensional force sensor, M x 、M y 、M z F represents the torque detected by the six-dimensional force sensor; x0 、F y0 、F z0 M represents the zero drift value of the force of the six-dimensional force sensor; x0 、M y0 、M z0It represents the zero-point drift value of the torque of the six-axis force sensor; x, y, z represent the position of the center of mass of the load (i.e., the tool) relative to the six-axis force sensor, that is, the position of the center of mass of the tool in the sensor coordinate system, and the unit can be millimeter (mm).
[0074] make This formula includes the second relationship between multiple reference numbers, zero drift values and centroids. Based on the above formula, formula (1) can be written as a matrix, which can be expressed as:
[0075]
[0076] make Then formula (2) is simplified to:
[0077] m=Fp (3)
[0078] The above formula (3) is the first relationship, the above k1, k2, k3 are the multiple reference numbers, and m represents the center of mass of the tool.
[0079] The least squares method can be used to establish the equation, which can identify the position of the load center of mass in the force sensor coordinate system and the constants k1, k2, k3 (i.e., multiple reference numbers):
[0080] p 6*1 =(F T 6*3 F 3*6 ) -1 F T 6* m 3*1 (4)
[0081] It can be understood that when three pieces of collected data are used for fitting, the three pieces of collected data can be added together. In this case, F in the above formula (4) is 3*6 The addition result is F sum , F sum The dimension is 9*6.
[0082] As a possible implementation, Figure 6 The mass and zero drift value τ are calculated by the method shown offset Please refer to Figure 6 , Figure 6 for Figure 3 2 is a flow chart of sub-steps included in step S110. In this embodiment, step S110 may further include sub-steps S113 to S115.
[0083] Sub-step S113, obtaining a third relationship among the force in the collected data of the six-dimensional force sensor, the zero drift value of the force, the end position of the robot and the gravity of the tool.
[0084] Sub-step S114, according to the forces in each acquired data, the corresponding end position and the third relationship, the zero drift value of the force of the six-dimensional force sensor and the gravity of the tool are calculated by fitting.
[0085] Wherein, the mass is calculated from the gravity of the tool.
[0086] Sub-step S115, calculating the zero drift value of the torque of the six-dimensional force sensor according to the second relationship, the center of mass, the zero drift value and the values of each of a plurality of reference numbers.
[0087] In this embodiment, a pre-established third relationship can be obtained, which is used to describe the relationship between the force in the collected data of the six-dimensional force sensor, the zero drift value of the force, the terminal posture of the robot and the gravity of the tool. After that, the zero drift value of the force of the six-dimensional force sensor and the gravity of the tool can be obtained by fitting according to the above-mentioned third relationship, the force in the multiple collected data obtained by the six-dimensional force sensor after the tool is installed at the end of the collaborative robot, and the terminal posture corresponding to each collected data. After obtaining the gravity of the tool, the mass of the tool can be calculated based on the gravity. Due to the existence of the second relationship, when the center of mass, the zero drift value and the respective values of multiple reference numbers are obtained, the zero drift value of the torque of the six-dimensional force sensor can be calculated in combination with the second relationship. Among them, the fitting method used can be determined in combination with actual needs. For example, the least squares method can be used for fitting.
[0088] The following specifically describes how to obtain the third relationship, and how to obtain the mass and zero drift values.
[0089] Establish the zero drift value τ of the six-dimensional force sensor offset Relationship with the collaborative robot end pose:
[0090]
[0091] Among them, U represents the rotation angle of the robot base coordinate system around the x-axis of the world coordinate system, and V is the rotation angle of the robot base coordinate system around the y-axis of the world coordinate system; Represents the rotation matrix of the sensor coordinate system relative to the base coordinate system; G represents the load gravity (i.e., tool gravity); for common scenarios of collaborative robots, U and V are 0 degrees.
[0092] make Then formula (5) can be written as:
[0093]
[0094] The above formula (6) is the second relationship.
[0095] The zero drift value F of the three-direction force components of the six-dimensional force sensor can be obtained by the least square method: x0 、F y0 、F z0 , and the constant L x , L y , L z .
[0096] l 6*1 =(R T 6*3 R 3*6 ) -1 R T 6*3 f 3*1 (7)
[0097] Among them, R represents I represents the identity matrix, l 6*1 express
[0098] [L x L y L z F x0 F y0 F z0 ] T ;f 3*1 express
[0099] Combined with the second relationship As well as the identified centroid position (x, y, z), the values of multiple parameters k1, k2, k3, and F obtained by formula (7) x0 、F y0 、F z0 , we can get [M x0 M y0 M z0 ]:
[0100]
[0101] Then the load gravity G is:
[0102]
[0103] Then, the mass of the load is:
[0104] In this embodiment, in order to accurately sense the magnitude of the external force (i.e., the dragging force), the tool's gravity torque and the zero drift value of the six-dimensional force sensor need to be removed to achieve a new sensor zero point calibration. In other words, the artificially applied external force can be clearly determined. The process can be expressed as:
[0105] τ ext =τ ori -τ loadG -τ offset (10)
[0106] Among them, τ ori represents the original data of the six-dimensional force sensor, that is, the initial force information; τ loadG represents the gravity of the tool under the six-dimensional force sensor, τ loadG =[ s F Gx S F Gy S F Gz S M Gx S M Gy S M Gz ]; τ offset represents the zero drift value of the six-axis force sensor, τ offset =[F x0 F y0 F z0 M x0 M y0 M z0 ]; τ ext It represents the magnitude and torque of the external force sensed by the six-dimensional force sensor, that is, the aforementioned first drag force information.
[0107] Regarding the gravity moment data, it is necessary to consider the 360-degree installation of the robot. In the world coordinate system {O}, the direction vector of gravity is [0 0 -1] T ; When the robot base is tilted, the direction vector of gravity in the force sensor coordinate system {S} is:
[0108]
[0109] Where {B} represents the base coordinate system of the collaborative robot.
[0110] At this time, the moment data and force data of gravity under the six-dimensional force sensor are:
[0111]
[0112] Wherein, x, y, and z in formula (13) represent the position of the load center of mass relative to the six-dimensional force sensor.
[0113] When operating a robot, there is usually a tool load at the end, and the influence of the load gravity needs to be avoided. The zero-point calibration of the six-dimensional force sensor data can be achieved through the above step S110. Through the above processing, the calibrated six-dimensional force sensor data can be reduced to 1 / 10-1 / 20 of the load gravity, thereby improving the accuracy of data calibration. This method can ensure that the magnitude of the external force acting on the six-dimensional force sensor can be directly reflected through the data, reducing the impact of external factors on the sensor data. Among them, the above reduction to 1 / 10-1 / 20 of the load gravity means: assuming that the load is 1kg, when the end of the robot is horizontally facing downward, the Z-direction data is 10N; after zero-point calibration, the Z-direction data is 0.5-1N; and, after the above calibration, the force sensor data of the robot in different postures will not exceed 0.5-1N.
[0114] In this embodiment, when the first dragging force information is obtained, the first dragging force information may be first converted to a robot base coordinate system and then converted to a joint space, thereby obtaining the second dragging force information.
[0115] The six-dimensional force sensor is located at the end flange. In this embodiment, the first drag force information can be transformed into the base coordinate system. This process can be expressed by formula (14):
[0116]
[0117] in, Represents the rotation matrix of the robot end flange coordinates relative to the base; represents the rotation matrix of the six-dimensional force sensor relative to the end flange.
[0118] Afterwards, the external force information converted by formula (14) is converted to the joint space to obtain the second drag force information:
[0119] τ J =J(q)τ B (15)
[0120] As a possible implementation, when the second dragging force information is obtained, it can be determined whether to turn on the six-dimensional assisted dragging mode. If it is turned on, the sensed external force is added to the dynamic compensation torque (i.e., the torque of the Coriolis force and the centrifugal force, and the torque of gravity), that is, based on the preset control law, the robot is dragged; if it is not turned on, the robot is dragged based on the conventional power model, that is, the dynamic compensation torque (i.e., the torque of the Coriolis force and the centrifugal force, the torque of the inertia force, and the torque of gravity) is added to the friction compensation torque to drag the robot. Among them, whether to turn on the six-dimensional assisted dragging mode can be determined according to the operation input by the user to indicate whether to turn on the six-dimensional assisted dragging mode.
[0121] In this embodiment, the preset control law also includes a preset drag gain λ corresponding to the collaborative robot. τ , the preset drag gain λ τ is greater than or equal to 0; the preset control law is used to indicate the relationship between the output torque of the motor, the torque of the Coriolis force and the centrifugal force, the gravity torque, and the target product. The target product is the product of the target factor and the first difference, the first difference is the difference between 1 and the preset drag gain, the target factor includes the drag force, and under the same drag effect, the larger the preset drag gain, the smaller the drag force required, so when the preset drag gain λ τ Different values correspond to different dragging experiences.
[0122] As a possible implementation, the preset control law can be expressed as: Among them, τ m represents the output torque of the motor, q represents the rotation angle of the motor connecting rod end, represents the Coriolis force and centrifugal force, G(q) represents the gravity term, τ pext It represents the external force applied in the joint space. It can be understood that different joints correspond to different joint spaces, and different joints correspond to preset drag gains λ τ The specific value of can be the same or different, and is determined in combination with actual needs. The first target output torque corresponding to different joints can be obtained through the above processing.
[0123] How to obtain the preset control law is described below.
[0124] Establish the robot's link dynamics model and joint dynamics model:
[0125]
[0126] Among them, θ represents the rotation angle of the joint motor end, q represents the rotation angle of the joint link end; M(q) represents the inertia matrix, represents the Coriolis force and centrifugal force, G(q) represents the gravity term; I m Represents the moment of inertia of the joint module transmission system; τ f represents the joint friction torque; τ m Represents the output torque of the motor; τ pext Indicates the external force applied (i.e. drag force).
[0127] It can be seen that if the collaborative robot is to be dragged with zero force, the output torque of the motor must first overcome the friction of the joint (i.e., τ f ) and moment of inertia (i.e. ) factor, and then overcome the torque that maintains the current posture of the robot (the torque is G(q) when stationary and the torque is ), the last external force applied (i.e., τ pext ) before you can drag the robot.
[0128] There are two problems with this method. First, during the dragging process of the collaborative robot, the inertia moment needs to be overcome. The greater the load capacity of the robot, the greater the inertia moment, and the less likely it is to be dragged. Therefore, the inertia moment needs to be calculated. However, for dynamic modeling, since the joint acceleration is obtained by the secondary difference of the joint position, the joint acceleration obtained in this way cannot be used to calculate the inertia moment of the robot. Second, the joint friction model is difficult to identify, and there is no unified friction model.
[0129] make Transform formula (16) into:
[0130]
[0131] Based on the above content, the inventor of this application starts from dynamic modeling and integrates the parts that are difficult to model (inertia force + friction force + joint characteristics, etc.) together, and the remaining parts are one piece (centrifugal force + Coriolis force); the output τ is adjusted by using the weighted idea m Thus, by substituting equation (17) into the designed control law, the following dynamic equation (i.e., the preset control law) can be obtained:
[0132]
[0133] When the second traction force information is obtained, the second traction force information can be substituted into formula (18) to calculate the first target output torque of the motor. It can be understood that the second traction force information is τ calculated in formula (15): J .
[0134] In this embodiment, the preset drag gain λ τ It can be set by the staff who designs the preset control law, or by the staff who operates the collaborative robot to perform dragging teaching, and can be determined in combination with actual needs. As a possible implementation method, the preset dragging gain λ τ It is set by the drag instructor based on his own needs.
[0135] In λ τ =0, the dragging force is resisted, the robot joints cannot be dragged, and the joint locking effect is achieved; when 0<λ τ When <1, the robot is difficult to drag, and λ τ The smaller it is, the harder it is to drag; τ =1, there is no compensation effect, which is equivalent to the drag effect in normal torque mode; τ >1, the drag force is compensated to improve the dragging experience, and λτ The larger the value, the easier it is to drag. The above information can be displayed to the drag instructor so that the instructor can set the λ according to his / her own needs. τ The specific value of .
[0136] In this way, the external force data sensed by the six-dimensional force sensor is transformed to the joint space through the Jacobian matrix, and added to the Coriolis term and gravity term of the dynamic model, and jointly acted on the dragging teaching of the collaborative robot in the joint space. The accuracy of teaching can be improved, and at the same time, the smoothness of teaching can be improved because no singular posture will occur.
[0137] As another possible implementation, the target factor also includes the product of the stiffness matrix and damping matrix of the joint space and the value of the expected joint velocity minus the actual joint velocity. The preset drag gain is greater than 1, which can be obtained by Figure 7 The first target output torque is calculated by the method shown. Figure 7 , Figure 7 for Figure 2 Schematic diagram of the flow of sub-steps included in step S140. In this embodiment, step S140 may include sub-steps S141 to S145.
[0138] Sub-step S141 , subtracting the obtained expected joint speed from the obtained actual joint speed to obtain a speed difference.
[0139] Sub-step S142, determining whether the speed difference is greater than a preset speed difference.
[0140] If the speed difference is greater than the preset speed difference, sub-step S153 is executed.
[0141] Sub-step S143, increasing the damping matrix to reduce the output torque of the motor;
[0142] If the speed difference is not greater than the preset speed difference, sub-step S154 is executed.
[0143] Sub-step S144: do not adjust the damping matrix.
[0144] Sub-step S145, calculating the first target output torque according to the damping matrix determined based on the speed difference.
[0145] In this embodiment, the target factor also includes the stiffness matrix of the joint space and the product of the damping matrix and the value of the desired joint velocity minus the actual joint velocity. At this time, the preset control law is:
[0146]
[0147] Among them, qd represents the desired joint position, represents the desired joint velocity; q represents the actual joint position, represents the actual joint velocity; K represents the stiffness matrix of the joint space, B represents the damping matrix of the joint space, both are positive numbers; λ τ >1, so in When the damping matrix B is larger, the corresponding first target output torque is smaller. When the drag teaching changes from static to dynamic, the joint position at that moment (converted by the motor encoder) is the expected joint position, and the expected joint speed is generally 0.
[0148] First, the actual joint speed can be subtracted from the corresponding expected joint speed to obtain the speed difference. The opposite of the speed difference is Then, it is determined whether the speed difference is greater than a preset speed difference, which is greater than 0 and can be set in combination with actual needs. If the speed difference is not greater than the preset speed difference, it means that the joint speed has not changed much, and no amplitude limiting process is required at this time. In this case, the damping matrix can be guaranteed to remain unchanged. That is, when the actual joint speed is less than the expected joint speed, no process is performed.
[0149] If the speed difference is greater than the preset speed difference, it means that the joint speed changes too much, and limiting processing is required at this time. The damping matrix in the preset control law can be increased to reduce the output torque of the motor, thereby reducing the teaching speed of the collaborative robot and achieving the purpose of limiting the dragging speed. The specific method of increasing the damping matrix can be determined in combination with actual needs. As a possible implementation method, the damping matrix is increased according to the absolute value of the speed difference, wherein the larger the absolute value of the speed difference, the larger the value in the increased damping matrix. For example, the damping matrix can be increased in the following ways:
[0150]
[0151] Wherein, B0 represents a preset damping matrix, k represents a preset differential gain, and k>1. It can be understood that when the damping matrix does not need to be adjusted, the damping matrix used in the preset control law is B0; when the damping matrix is to be increased, after the increase, the damping matrix used in the preset control law is B0+k|Δq|.
[0152] In this way, by adding damping control and setting the expected joint speed, when the actual joint speed exceeds the expected joint speed, the output torque of the motor is reduced to increase the dragging experience, thereby limiting the dragging speed of the collaborative robot.
[0153] Optionally, before executing sub-step S141, it can also be determined whether the impedance control mode is turned on. If it is turned on, sub-steps S141 to S143 are executed to modify the impedance parameters, reduce the compensation torque, and make the dragging heavier; if it is not turned on, the impedance parameter is 0, and the dragging experience remains unchanged. Among them, whether the impedance control mode is turned on can be determined according to the operation input by the user to indicate the start of the impedance control mode.
[0154] The inventor of the present application has also found through research that the Coriolis force and centrifugal force, gravity moment and Jacobian matrix in the dynamic model are generally calculated based on the feedback position and feedback speed, but the feedback information used will introduce a large error, which will lead to errors in the first target output torque calculated based on the Coriolis force and centrifugal force, gravity moment and Jacobian matrix. In order to reduce the above influence, in this embodiment, it can be Figure 8 The collaborative robot moves in the manner shown. Figure 8 , Figure 8 for Figure 2 Schematic diagram of the flow of sub-steps included in step S150. In this embodiment, step S150 may include sub-steps S151 to S153.
[0155] Sub-step S151, updating the stored torque array according to the first target output torque to obtain a current torque array.
[0156] Sub-step S152, filtering the current torque array to obtain a second target output torque;
[0157] Sub-step S153, moving the collaborative robot according to the second target output torque in the torque mode.
[0158] In this embodiment, the size of the moment array is fixed. After the first target output torque is calculated this time, the saved moment array can be updated by removing the head and updating the tail to obtain the current moment array. Among them, the first target output torque can be a torque calculated based on formula (18) or based on formula (19) and formula (20). The current moment array includes the first target output torque and multiple first historical target output torques calculated before this time. For example, the saved moment array is: [1, 2, 3, 4, 5, 6], and the value calculated this time is 7, then the current moment array obtained after the update is [2, 3, 4, 5, 6, 7]. In addition, the current moment array of this time will be used as the saved moment array in the next time.
[0159] The current moment array is filtered to obtain the second target output moment. As a possible implementation method, an N-order filter as shown in formula (21) can be performed:
[0160] a(1)y(n)=b(1)x(n)+b(2)x(n-1)+...+b(nb+1)x(n-nb)+...+b(n)x(1)-a(2)y(n-1)-...-a(na-1)y(n-na)-...-a(n)y(1) (21)
[0161] Among them, x(n-nb) represents the moment in the current moment array; y(n) represents the filtered data, that is, the second target output moment; a(na-1) and b(nb+1) represent the coefficients of the transfer function of the filter function; n is the order of the filter.
[0162] After the second target output torque is obtained through filtering, the motor is controlled according to the second target output torque, so that the mechanical arm of the collaborative robot moves.
[0163] Through the above filtering of the motor output torque data, the system oscillation problem caused by the fluctuation of the six-dimensional force sensor data and the joint feedback position data during the dragging process can be eliminated, and the teaching process can be smooth and stable. Even when contacting a rigid object, it can still be in stable contact. In this way, the dragging experience can be further improved.
[0164] Compared with the drag teaching method based on the current loop, the above-mentioned drag teaching method provided in the embodiment of the present application does not need to model the inertia torque and friction torque of the dynamic model, which can reduce the complexity of the model; moreover, this method makes drag teaching easier and can improve the speed and accuracy of the teaching points.
[0165] Compared with the admittance control method based on the six-dimensional force sensor, the above-mentioned drag teaching method provided in the embodiment of the present application also requires the use of a six-dimensional force sensor, but the drag teaching method provided in the embodiment of the present application can drag the teaching robot to any position in the workspace without the problem of singular posture. At the same time, due to the preset drag gain and the filtering processing of the moment array set in the embodiment of the present application, the dragging process can be made more stable, and there will be no rebound phenomenon when contacting with a rigid object, thereby improving the stability of human-computer interaction.
[0166] In this embodiment, friction compensation is not performed. Even when the external force fluctuates, friction and inertia can offset part of the external force and achieve a stabilizing effect. Moreover, in view of the inconsistent load capacity and friction characteristics of different robots, gain parameters are developed in the model designed in this application (i.e., the preset control law) to adjust the dragging teaching effect of different robots to ensure that the teaching process is fast, stable and accurate. In this way, the operator's experience of using collaborative robots can be improved.
[0167] In order to execute the corresponding steps in the above embodiments and various possible methods, a method for implementing the drag teaching device 200 is given below. Optionally, the drag teaching device 200 can adopt the above Figure 1 The device structure of the electronic device 100 is shown. Fig. 9 , Fig. 9 This is one of the block diagrams of the drag teaching device 200 provided in the embodiment of the present application. It should be noted that the basic principle and technical effects of the drag teaching device 200 provided in this embodiment are the same as those of the above embodiments. For the sake of brief description, for the parts not mentioned in this embodiment, reference can be made to the corresponding contents in the above embodiments. In this embodiment, the drag teaching device 200 may include: a compensation module 220, a conversion module 230, a calculation module 240 and a control module 250.
[0168] The compensation module 220 is used to compensate the initial force information obtained by the six-dimensional force sensor according to the stored gravity information and zero point information of the collaborative robot's tool to obtain the first drag force information, wherein the initial force information includes force and torque.
[0169] The conversion module 230 is used to convert the first drag force information into a joint space to obtain second drag force information.
[0170] The calculation module 240 is used to calculate the first target output torque of the motor according to the preset control law and the second drag force information, wherein the preset control law includes the relationship between the output torque of the motor, the torque of the Coriolis force and the centrifugal force, the gravity torque, and the drag force information.
[0171] The control module 250 is used to make the collaborative robot move based on the first target output torque in the torque mode.
[0172] Please refer to Fig.10 , Fig.10 The second block diagram of the dragging teaching device 200 provided in the embodiment of the present application. In this embodiment, the gravity information is determined based on the center of mass and mass of the tool, the zero point information includes a zero point drift value, and the dragging teaching device 200 may further include an information acquisition module 210.
[0173] The information acquisition module 210 is used to: when the tool is installed at the end of the collaborative robot, obtain the zero drift value corresponding to the six-axis force sensor, the mass and the center of mass of the tool based on the multiple collected data obtained by the six-axis force sensor and the corresponding end posture.
[0174] Optionally, the above modules can be stored in the form of software or firmware. Figure 1The memory 110 shown in the figure may be fixed in the operating system (OS) of the electronic device 100 and may be Figure 1 Meanwhile, the data and program codes required for executing the above modules may be stored in the memory 110.
[0175] An embodiment of the present application also provides a readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the drag teaching method is implemented.
[0176] In summary, the embodiment of the present application provides a drag teaching method, device, electronic device and readable storage medium. First, according to the gravity information and zero point information of the tool of the collaborative robot saved, the initial force information obtained by the six-dimensional force sensor is compensated to obtain the first drag force information, which includes force and torque; then, the first drag force information is converted to the joint space to obtain the second drag force information, and then the first target output torque of the motor is calculated according to the preset control law and the second drag force information, wherein the preset control law includes the relationship between the output torque of the motor, the torque of the Coriolis force and the centrifugal force, the gravity torque, and the drag force information; finally, the collaborative robot is moved based on the first target output torque in the torque mode. In this way, when implementing drag teaching, friction identification can be avoided, different environmental stiffness can be adapted to reduce rebound phenomenon, and at the same time, by transforming the sensed external force information to the joint space and then calculating the torque acting on the motor, singular posture can be avoided.
[0177] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0178] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0179] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0180] The above description is only an optional embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A drag teaching method, characterized in that: The method comprises: According to the stored gravity information and zero point information of the collaborative robot's tool, initial force information obtained by the six-dimensional force sensor is compensated to obtain first drag force information, wherein the initial force information includes force and torque; Converting the first drag force information into a joint space to obtain second drag force information; Calculate a first target output torque of the motor according to a preset control law and the second traction force information, wherein the preset control law includes a relationship between the output torque of the motor, the torque of the Coriolis force and the centrifugal force, the gravity torque, and the traction force information; The collaborative robot is moved based on the first target output torque in a torque mode.
2. The method according to claim 1, characterized in that The gravity information is determined based on the center of mass and mass of the tool, the zero point information includes a zero point drift value, and before the initial force information obtained by the six-dimensional force sensor is compensated according to the stored gravity information and zero point information of the tool of the collaborative robot to obtain the first drag force information, the method further includes: When the tool is installed at the end of the collaborative robot, the zero drift value corresponding to the six-axis force sensor, the mass and the center of mass of the tool are obtained according to the multiple collected data obtained by the six-axis force sensor and the corresponding end posture.
3. The method according to claim 2, characterized in that The centroid is obtained by: Obtaining a first relationship between a plurality of reference numbers, the center of mass of the tool, and forces and moments in the collected data of the six-dimensional force sensor, wherein a second relationship exists between the plurality of reference numbers, the zero drift value, and the center of mass; According to the acquired data and the first relationship, the position of the center of mass in the coordinate system of the six-dimensional force sensor and the respective values of a plurality of reference numbers are obtained by fitting.
4. The method according to claim 3, characterized in that The mass and zero drift values are obtained in the following manner: Obtaining a third relationship among the force in the collected data of the six-dimensional force sensor, the zero drift value of the force, the end position of the robot, and the gravity of the tool; According to the forces in each acquired data and the corresponding end position and the third relationship, the zero drift value of the force of the six-dimensional force sensor and the gravity of the tool are calculated by fitting, wherein the mass is calculated by the gravity of the tool; The zero drift value of the torque of the six-dimensional force sensor is calculated according to the second relationship, the center of mass, the zero drift value and the values of each of the plurality of reference numbers.
5. The method according to claim 1, characterized in that The preset control law also includes a preset drag gain corresponding to the collaborative robot, and the preset drag gain is greater than or equal to 0; the preset control law is used to indicate the relationship between the output torque of the motor, the torque of the Coriolis force and the centrifugal force, the gravity torque, and the target product, wherein the target product is the product of the target factor and the first difference, and the first difference is 1 minus the preset drag gain. The target factor includes the drag force, and under the same drag effect, the larger the preset drag gain, the smaller the drag force required.
6. The method according to claim 5, characterized in that The target factor also includes the product of the stiffness matrix and the damping matrix of the joint space and the value of the expected joint speed minus the actual joint speed, the preset drag gain is greater than 1, and the first target output torque of the motor is calculated according to the preset control law and the second drag force information, including: Subtract the obtained actual joint velocity from the obtained expected joint velocity to obtain the velocity difference; Determine whether the speed difference is greater than a preset speed difference, wherein the preset speed difference is greater than 0; If it is greater than, increasing the damping matrix to reduce the output torque of the motor; If it is not greater than, the damping matrix is not adjusted; The first target output torque is calculated according to a damping matrix determined based on the speed difference.
7. The method according to claim 6, characterized in that The step of increasing the damping matrix to reduce the output torque of the motor includes: The damping matrix is increased according to the absolute value of the speed difference, wherein the larger the absolute value of the speed difference is, the larger the value in the increased damping matrix is.
8. The method according to any one of claims 1 to 7, characterized in that: The step of causing the collaborative robot to move based on the first target output torque in the torque mode includes: The stored moment array is updated according to the first target output moment to obtain a current moment array, wherein the current moment array includes the first target output moment and a plurality of first historical target output moments calculated before this time; Filtering the current torque array to obtain a second target output torque; The collaborative robot is moved according to the second target output torque in the torque mode.
9. A drag teaching device, characterized in that: The device comprises: A compensation module, used to compensate the initial force information obtained by the six-dimensional force sensor according to the stored gravity information and zero point information of the tool of the collaborative robot, so as to obtain the first drag force information, wherein the initial force information includes force and torque; A conversion module, used for converting the first drag force information into a joint space to obtain second drag force information; a calculation module, configured to calculate a first target output torque of the motor according to a preset control law and the second traction force information, wherein the preset control law includes a relationship between the output torque of the motor, the torque of the Coriolis force and the centrifugal force, the gravity torque, and the traction force information; A control module is used to move the collaborative robot based on the first target output torque in a torque mode.
10. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the drag teaching method described in any one of claims 1-8.
