Drag teaching control method, device and electronic equipment
The drag teaching control method for collaborative robots uses a six-dimensional force sensor to adjust damping, addressing sudden speed changes and improving user experience by preventing robot interference.
Patent Information
- Application Number
- CN202411252774.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2044-09-09
AI Technical Summary
Collaborative robots face issues with sudden speed changes and user experience degradation when approaching workspace boundaries or singular postures, requiring manual intervention to restore functionality.
Implement a drag teaching control method that increases damping when the robot approaches an interference area, using a six-dimensional force sensor to detect movement trends and adjust damping to prevent robot interference.
Enhances user experience by providing tactile feedback, preventing robot interference through increased resistance, and maintaining smooth operation near workspace boundaries.
Smart Images

Figure CN118752497B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of robotics technology, and in particular to a drag teaching control method, device and electronic equipment. Background Art
[0002] Collaborative robots have good human-machine interaction characteristics and usually do not need to be restricted by fences like industrial robots to ensure the safety of operators. With the continuous development of collaborative robot related technologies, collaborative robots are widely used in various industries, such as welding, medical and other fields.
[0003] A six-dimensional force sensor can be installed at the end of the collaborative robot, and the collaborative robot can move according to the human-machine interaction force detected by the six-dimensional force sensor, so as to achieve the purpose of dragging teaching. In the above method, the position of the robot in Cartesian space is calculated based on the force, and the operator can easily drag the robot out of the workspace or reach a singular posture. When the robot is dragged out of the workspace or reaches a singular posture, the robot will stop moving, and the user needs to manually use other operations to move the robot away from the current position, so as to automatically restore the function, which will reduce the user experience of the collaborative robot. Summary of the invention
[0004] The embodiments of the present application provide a dragging teaching control method, device, electronic device and readable storage medium, which enable the operator to be reminded that the operator is about to reach the interference area by increasing the resistance in the direction of movement when the operator is dragging the robot to reach the interference area, thereby reducing the situation where the operator drags the robot into the interference area.
[0005] The embodiments of the present application can be implemented as follows:
[0006] In a first aspect, the present application provides a drag teaching control method, the method comprising:
[0007] Get the current position of the robot end;
[0008] Determine whether the current position is within a buffer area, wherein the global space is divided into: a free motion area, a buffer area, and an interference area to which the robot end is not allowed to move, and the buffer area is located between the free motion area and the interference area;
[0009] If the current position is within the buffer area, judging whether the movement trend is close to the interference area according to the current external force information and the position information of the interference area;
[0010] If the movement trend is close to the interference area, the target damping is calculated based on the method of increasing the damping on the basic damping;
[0011] The target position is calculated according to the current external force information, the current position and the target damping, and the robot end is controlled to move to the target position.
[0012] In a second aspect, an embodiment of the present application provides a drag teaching control device, the device comprising:
[0013] The position acquisition module is used to obtain the current position of the robot end;
[0014] A judgment module, used to judge whether the current position is within a buffer area, wherein the global space is divided into: a free motion area, a buffer area, and an interference area to which the robot end is not allowed to move, and the buffer area is located between the free motion area and the interference area;
[0015] The judging module is further configured to judge whether the movement trend is close to the interference area according to the current external force information and the position information of the interference area when the current position is within the buffer area;
[0016] A damping determination module, configured to calculate a target damping by increasing the damping on the basis of the basic damping when the movement trend is close to the interference area;
[0017] The control module is used to calculate the target position according to the current external force information, the current position and the target damping, and control the robot end to move to the target position.
[0018] 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 control method described in the aforementioned embodiment.
[0019] 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 control method as described in the aforementioned embodiment is implemented.
[0020] The dragging teaching control method, device, electronic device and readable storage medium provided by the embodiment of the present application, after the robot end moves to a position, determine whether the current position of the robot end is located in the buffer area, if so, determine whether the movement trend is close to the interference area based on the current external force information and the position information of the interference area; if the movement area is close to the interference area, the target damping is calculated based on the method of increasing the damping on the basic damping, and then the target position is calculated based on the current external force information, the current position and the target damping, and the robot end is controlled to move to the target position. Among them, the global space is divided into a free movement area, a buffer area and an interference area to which the robot end is not allowed to move, and the buffer area is located between the free movement area and the interference area. In this way, when the operator drags the robot and is about to reach the interference area, the resistance in the direction of movement is increased to remind the operator that it is about to reach the interference area, thereby reducing the situation where the operator drags the robot into the interference area. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] 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.
[0022] Figure 1 A block diagram of an electronic device provided in an embodiment of the present application;
[0023] Figure 2 One of the flow charts of the drag teaching control method provided in the embodiment of the present application;
[0024] Figure 3 A schematic diagram of constructing a rectangular parallelepiped using the two-point method provided in an embodiment of the present application;
[0025] Figure 4 Two area division methods provided in the embodiments of the present application;
[0026] Figure 5 Schematic diagram of the width of the buffer area during range interference;
[0027] Figure 6 for Figure 2 A schematic flow chart of the sub-steps included in step S130;
[0028] Figure 7 A schematic diagram of dividing the buffer area into three types of sub-areas provided in an embodiment of the present application;
[0029] Figure 8A schematic diagram of a process for determining a sub-area where the robot end is located when interfering within a range provided in this embodiment;
[0030] Fig. 9 A schematic diagram of the process of determining the sub-area where the robot end is located when interfering outside the range provided in this embodiment;
[0031] Fig.10 for Figure 2 A schematic flow chart of the sub-steps included in step S140;
[0032] Fig.11 A schematic diagram of the special area that exists when there is out-of-range interference;
[0033] Fig.12 for Fig.10 One of the flow charts of the sub-steps included in sub-step S142;
[0034] Fig.13 for Fig.10 The second schematic flow chart of the sub-steps included in the neutron step S142;
[0035] Fig.14 for Fig.10 The third flow chart of the sub-steps included in the neutron step S142;
[0036] Fig.15 The second flowchart of the drag teaching control method provided in the embodiment of the present application;
[0037] Fig.16 A block diagram of the drag teaching control device provided in an embodiment of the present application.
[0038] Icons: 100 - electronic device; 110 - memory; 120 - processor; 130 - communication unit; 200 - drag teaching control device; 210 - position acquisition module; 220 - judgment module; 230 - damping determination module; 240 - control module. DETAILED DESCRIPTION
[0039] 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.
[0040] 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.
[0041] 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.
[0042] At present, the damping is generally kept at a fixed value. According to the magnitude of the human-machine interaction, the position to which the end of the collaborative robot is to move is determined, and the end is controlled to move to that position. The above control method makes it easy for the operator to drag the robot out of the workspace or reach a singular position. When the end of the robot is about to reach the boundary of the workspace or a singular posture, the torque will suddenly increase (that is, the running speed will accelerate), and then it will stop quickly, causing the human-machine interaction to deteriorate. In addition, when the robot stops moving, the end of the robot can only be manually moved away from the current position to automatically restore the function, resulting in a poor user experience.
[0043] Among them, when the robot approaches a singular posture, the slight movement of the joints may cause a drastic change in the Cartesian velocity of the end effector. That is, the small movement of the robot in the joint space is amplified in the Cartesian space, causing a sudden increase in the speed of the end effector. When the robot approaches the boundary of the workspace, the robot's control system may try to keep it within the effective workspace, resulting in a sudden change in speed or acceleration. Therefore, when the end of the robot is about to reach the boundary of the workspace or a singular posture, the speed will suddenly increase.
[0044] In response to the above situation, the embodiments of the present application provide a dragging teaching control method, device, electronic device and readable storage medium. When the operator uses a force sensor to assist in dragging the robot, when approaching the set interference area, the damping torque becomes larger and the dragging becomes heavier, giving people a feeling of hitting a sponge, similar to a spring mass damping system, thereby reminding the operator that he is about to reach the interference area, thereby reducing the situation where the operator drags the robot into the interference area.
[0045] 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.
[0046] Please refer to Figure 1 , Figure 1 A block diagram of an electronic device 100 provided in an embodiment of the present application. The electronic device 100 may be, but is not limited to, a collaborative robot or a device for controlling a collaborative robot. The electronic device 100 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 may be electrically connected to each other via one or more communication buses or signal lines.
[0047] 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.
[0048] 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 control device 200, and the drag teaching control 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 control device 200 in the embodiment of the present application, that is, realizing the drag teaching control method in the embodiment of the present application.
[0049] 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.
[0050] 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.
[0051] Please refer to Figure 2 , Figure 2 This is one of the flow diagrams of the drag teaching control method provided in the embodiment of the present application. The method can be applied to the above-mentioned electronic device 100. The specific process of the drag teaching control method is described in detail below. In this embodiment, the method may include steps S110 to S150.
[0052] Step S110, obtaining the current position of the robot end.
[0053] The current position of the end of the robot, that is, the current position of the TCP (Tool Center Point) of the robot, can be obtained in any manner. The robot can be a collaborative robot with six degrees of freedom or a collaborative robot with other degrees of freedom.
[0054] Step S120, determining whether the current position is within the buffer area.
[0055] In this embodiment, the global space is pre-divided into three major areas: free motion area, buffer area, and interference area. Among them, the free motion area is the area where the robot end can move freely, and the damping used in the admittance control in this area is the basic damping; the buffer area is the area where the damping used in the calculation needs to be determined in combination with the location, and is located between the free motion area and the interference area; the interference area is a pre-set area that the robot end is not allowed to go to, that is, the location of this area is an unreachable position of the robot, which is used to limit the robot's working space. The specific location distribution of the above three areas is determined in combination with actual needs.
[0056] When the current position of the robot end is obtained, it is determined whether the current position is within the buffer area according to the position information of the buffer area. The specific method of determining whether the current position is within the buffer area can be determined in combination with actual needs and is not specifically limited here.
[0057] Step S130: If the current position is within the buffer area, determine whether the movement trend is close to the interference area based on the current external force information and the position information of the interference area.
[0058] When the current position is within the buffer area, the robot is analyzed based on the current external force information and the position information of the interference area to determine whether the movement trend indicated by the external force information is close to the interference area. The specific method for determining whether the movement trend is close to the interference area can be determined in combination with actual needs and is not specifically limited here. The external force information is used to describe the drag force on the robot, which drags the robot end to move.
[0059] Step S140: If the movement trend is close to the interference area, the target damping is calculated based on the method of increasing the damping on the basis of the basic damping.
[0060] Step S150, calculating a target position according to the current external force information, the current position and the target damping, and controlling the robot end to move to the target position.
[0061] If the current position is within the buffer area and the movement trend is close to the interference area, it means that the operator is pushing the end of the robot toward the inside of the interference area. In this case, the target damping can be calculated based on the method of increasing the damping on the basic damping, and then the target position is calculated by the admittance control method according to the external force information, the current position, and the target damping, and then the end of the robot is controlled to move to the target position. In this way, when the operator drags the robot to reach the interference area, the resistance in the direction of movement is increased to remind the operator that it is about to reach the interference area, thereby reducing the situation where the operator drags the robot into the interference area.
[0062] In this embodiment, it is necessary to pre-install a six-dimensional force sensor at the end of the robot in order to obtain external force information; and, install a tool at the end of the robot, and use the data from the six-dimensional force sensor to identify the mass and center of mass of the tool to complete the zero point calibration of the sensor data.
[0063] In this embodiment, if Figure 3 As shown, the robot can be taught the minimum point and maximum point , so that the above two points use the two-point method to construct the interference area. Optionally, a target coordinate system can be established as a base coordinate system, and the target coordinate system is the minimum point and maximum point That is, the two taught points are regarded as the two vertices of the diagonal line of a cuboid, and the origin of the target coordinate point is the center of the cuboid.
[0064] The interference area can be set in two ways: interference within the range and interference outside the range. Interference within the range means that the internal area is unreachable, that is, the interference area is located inside. Interference outside the range means that the external area is unreachable, that is, the interference area is located outside. You can choose the appropriate interference area setting method according to the actual situation.
[0065] The width of the buffer area can also be determined in combination with the width information of the buffer area, thereby determining the specific position information of the interference area, the buffer area, and the free motion area. The width information of the buffer area is used to indicate the distance between two parallel and close surfaces, one of which belongs to the free motion area and the other belongs to the interference area.
[0066] As a possible implementation method, the global space is divided into three areas based on a parallel first cuboid and a second cuboid, the first cuboid is located inside the second cuboid, the first cuboid is the interference area or the free motion area, and the second cuboid is the buffer area.
[0067] When the interference area is set to range interference, such as Figure 4 As shown in a, the first cuboid serving as the interference area is located in the second cuboid serving as the buffer area, the buffer area is a hollow cuboid, and the hollow part is the interference area, wherein the taught minimum point and maximum point serve as the two vertices of the diagonal of the interference area.
[0068] The width information of the buffer area is used to indicate the distance between the six surfaces of the free motion area and the corresponding surface of the interference area (that is, the width of different parts of the buffer area). The six widths can be the same or different, and can be determined in combination with actual needs. As a possible implementation, the six widths are the same. For example, when the setting mode of the interference area used is interference within the range, then Figure 5 As shown, the six widths are all d (two of which are not shown).
[0069] When the interference area is set to out-of-range interference, such as Figure 4 As shown in b, the first cuboid serving as the free motion area is located within the second cuboid serving as the buffer area, the buffer area is a hollow cuboid, and the hollow part is the free motion area, wherein the taught minimum point and maximum point serve as the two vertices of the diagonal of the buffer area.
[0070] Compared with the method of directly dividing the global space into two areas, an inaccessible area and a reachable area, the above-mentioned interference area construction method provided in this embodiment can not only set the inaccessible position of the robot to limit the working space of the robot; but also set a buffer area on the outside or inside of the interference area to consider whether to increase the damping in combination with the position, thereby effectively avoiding the torque mutation phenomenon caused by direct contact.
[0071] In this embodiment, after obtaining the current position In this case, it can be determined whether the current position is in the free motion area or the interference area, thereby determining whether the current position is in the buffer area.
[0072] In this embodiment, the width information of the buffer area indicates that the distances corresponding to the six surfaces are all width d, and the following examples are given based on this assumption. As a possible implementation, when the interference area mode is interference within the range, it can be determined whether the current position is within the buffer area based on the following principle. When the interference area mode is interference within the range, the current position in the buffer area needs to satisfy formula (1) and not satisfy formula (2):
[0073] (1)
[0074] (2)
[0075] When the interference area mode is the interference within the range, satisfying formula (1) means being within the solid cuboid formed by the buffer area and the interference area, and satisfying formula (2) means being within the interference area.
[0076] As a possible implementation method, when the interference zone mode is out-of-range interference, it can be determined based on a similar principle whether the current position is within the buffer zone. When the interference zone mode is out-of-range interference, the current position in the buffer zone needs to not satisfy formula (3) but satisfy formula (2):
[0077] (3)
[0078] (2)
[0079] When the interference zone mode is out-of-range interference, not satisfying formula (3) means that it is not in the free motion area, and satisfying formula (2) means that it is in the solid cuboid formed by the buffer area and the interference area.
[0080] In this embodiment, the operator's intention can also be judged. When the robot is in the buffer zone and intends to approach the interference zone, the dragging resistance can be increased to prompt the operator.
[0081] As a possible implementation, Figure 6 The method shown determines the operator's intention, that is, determines the movement trend indicated by the external force information. Figure 6 , Figure 6 for Figure 2 Schematic diagram of the flow of sub-steps included in step S130. In this embodiment, step S130 may include sub-steps S131 to S133.
[0082] Sub-step S131, obtaining a target vector corresponding to a target object close to the current position according to the current position and the position information of the interference area.
[0083] In this embodiment, when the current position is within the buffer area, the target object close to the current position can be determined based on the position information of the current position and the interference area, and then the target vector corresponding to the target object is obtained. The target object is a surface, an edge, or a vertex of the first cuboid, and the direction of the line between the center of the target object and the center of the first cuboid is the same as the direction of the target vector, and the direction of the target vector deviates from the interference area.
[0084] In this embodiment, the buffer area is a hollow cuboid. The buffer area is divided into 26 sub-areas based on the planes where the six surfaces of the first cuboid are located, that is, the buffer area is similar to a 3×3 Rubik's Cube with an empty center, and one cube of the Rubik's Cube represents one sub-area. The first cuboid has 6 faces, 8 vertices, and 12 edges, a total of 26 objects, and one object corresponds to one sub-area.
[0085] When a sub-region includes a vertex of the first cuboid, the object corresponding to the sub-region is the vertex. When a plane where a sub-region surface of a sub-region is located is a plane where a surface of the first cuboid is located, the object corresponding to the sub-region is the surface of the first cuboid. The objects corresponding to the remaining sub-regions are the edges of the first cuboid.
[0086] When the interference area setting mode is range interference, the interference area is located inside, and the buffer area space is divided into three types of sub-areas: first-type sub-areas, second-type sub-areas, and third-type sub-areas. Figure 7 As shown, the sub-region with sub-region surface 1 is a first-type sub-region, and each sub-region in the first-type sub-region corresponds to a vertex of the first cuboid, that is, the first-type sub-region includes 8 sub-regions closer to the 8 vertices of the first cuboid; the sub-region with sub-region surface 2 is a second-type sub-region, and each sub-region in the second-type sub-region corresponds to an edge of the first cuboid, that is, the second-type sub-region includes 12 sub-regions closer to the 12 edges of the first cuboid; the sub-region with sub-region surface 3 is a third-type sub-region, and each sub-region in the third-type sub-region corresponds to a surface of the first cuboid, that is, the third-type sub-region includes 6 sub-regions closer to the 6 surfaces of the first cuboid. Sub-region surface 1 is the surface at the two end portions of the 3×3 magic cube, sub-region surface 2 is the surface in the middle of the two sides of the 3×3 magic cube, and sub-region surface 2 is the surface at the center of each magic cube surface of the 3×3 magic cube.
[0087] According to the current position, it can be identified which sub-region of the above 26 sub-regions the current position is in, and the object corresponding to the sub-region where the current position is located is used as the target object. Afterwards, when the interference area setting mode is in-range interference, the body center of the first cuboid can be used as the starting point and the center of the target object can be used as the end point to construct the target vector, that is, the target vector indicates that the body center of the first cuboid points to the center of the target object. When the interference area setting mode is out-of-range interference, the center of the target object can be used as the starting point and the body center of the first cuboid can be used as the end point to construct the target vector, that is, the target vector indicates that the center of the target object points to the body center of the first cuboid.
[0088] As another possible implementation, you can also use Figure 8 , Fig. 9 The target object and target vector are obtained in the manner shown. is the current location, represents the minimum point, Indicates the maximum value point.
[0089] like Figure 8 As shown in the figure, when the interference area is set to interference within the range, that is, when the interference area is located inside, for the X-axis component, determine whether If yes, then the flag bit x+ is assigned, if no, then the flag bit x+ is not assigned. When If yes, then the flag bit y+ is assigned, if no, then the flag bit y+ is not assigned. and When If yes, then the flag bit z+ is assigned, if no, then the flag bit z+ is not assigned. and When If yes, then the flag bit z- is assigned; if no, then the flag bit z- is not assigned.
[0090] exist When If yes, the flag bit y- is assigned, if no, the flag bit y- is not assigned. and When If yes, then the flag bit z+ is assigned, if no, then the flag bit z+ is not assigned. and When If yes, then the flag bit z- is assigned; if no, then the flag bit z- is not assigned.
[0091] exist When If yes, then the flag is z+, if no, then the flag is not y+. When If yes, then the flag bit z- is assigned; if no, then the flag bit z- is not assigned.
[0092] When the interference area setting mode is within the range, the Z-axis component is also used to determine whether , if yes, then the flag bit z+ is assigned, if no, then the flag bit z+ is not assigned; and, If yes, the flag bit z- is assigned, if not, the flag bit z- is not assigned.
[0093] When the interference area setting mode is within the range, the X-axis component is also used to determine whether If yes, then the flag bit x- is assigned, if no, then the flag bit x- is not assigned. When If yes, then the flag bit y+ is assigned, if no, then the flag bit y+ is not assigned. and When If yes, then the flag bit z+ is assigned, if no, then the flag bit z+ is not assigned. and When If yes, then the flag bit z- is assigned; if no, then the flag bit z- is not assigned.
[0094] exist When If yes, the flag bit y- is assigned, if no, the flag bit y- is not assigned. and When If yes, then the flag bit z+ is assigned, if no, then the flag bit z+ is not assigned. and When If yes, then the flag bit z- is assigned; if no, then the flag bit z- is not assigned.
[0095] exist When If yes, then the flag bit z+ is assigned, if no, then the flag bit z+ is not assigned. When If yes, then the flag bit z- is assigned; if no, then the flag bit z- is not assigned.
[0096] When the interference area setting mode is within the range, the Y-axis component is also used to determine whether If yes, then the flag bit y+ is assigned, if no, then the flag bit y+ is not assigned. When If yes, then the flag bit z+ is assigned, if no, then the flag bit z+ is not assigned. When If yes, then the flag bit z- is assigned; if no, then the flag bit z- is not assigned.
[0097] When the interference area setting mode is within the range, the Y-axis component is also used to determine whether If yes, the flag bit y- is assigned, if no, the flag bit y- is not assigned. When If yes, then the flag bit z+ is assigned, if no, then the flag bit z+ is not assigned. When If yes, then the flag bit z- is assigned; if no, then the flag bit z- is not assigned.
[0098] Through the above processing, the flag set of the current position can be obtained, and the flag set includes which flags are assigned to the current position. x+ represents the positive x direction along the base coordinate system, x- represents the negative x direction along the base coordinate system, and so on. If the current position is only assigned one flag, it means that the target object that the current position is close to is a surface of the first cuboid, and when the flag is +, it means that the surface is the face pointed to by the positive semi-axis direction of the target coordinate system. If the current position is assigned two flags, it means that the target object that the current position is close to is an edge of the first cuboid; if the current position is assigned three flags, it means that the target object that the current position is close to is a vertex of the first cuboid.
[0099] The above flag bit + represents 1, and - represents -1. The target vector corresponding to the current position can be determined based on the flag bit set of the current position. For example, if the flag bit set corresponding to the current position is (z+), it means that the robot position is closest to the upper surface in the Z direction at this time, and the corresponding target vector is (0,0,1); if the flag bit set corresponding to the current position is (x+,y+), it means that the robot position is closest to the edge of X+ and Y+ at this time, and the corresponding target vector is (1,1,0); if the flag bit set corresponding to the current position is (x+,y+,z+), it means that the robot position is closest to the point of X+, Y+ and Z+ at this time, and the corresponding target vector is (1,1,1). After determining the target object, the target vector can also be calculated based on the center of the target object and the center of the first cuboid.
[0100] When the interference area is set to out-of-range interference, Figure 8 In a similar way, Fig. 9 The process shown can determine the target object that the current object is close to. Figure 8 In direct , , , , , For comparison, Fig. 9 and Figure 8 The difference is that it is directly related to , , , , , For comparison, other parts are the same, about Fig. 9 The process shown will not be repeated here.
[0101] Sub-step S132, calculating the velocity direction according to the external force information.
[0102] In this embodiment, the speed magnitude and speed direction indicated by the external force information can also be calculated based on the external force information through admittance control. The calculation process is shown in the following formula (4):
[0103] (4)
[0104] in, is the inertia matrix; is the damping matrix; is the stiffness matrix; is the external force sensed by the sensor at the current moment; is the current position, is the position at the previous moment; is the speed at the current moment, is the velocity at the previous moment; is the acceleration generated by the external force at the current moment; is the time interval. is the speed and direction of the robot's upcoming movement. When calculating the speed direction based on formula (4), B used can be the basic damping.
[0105] Sub-step S133, determining whether the movement trend is close to the interference area according to the speed direction and the target vector.
[0106] When the velocity direction and the target vector are obtained, it is possible to determine whether the motion trend at the next moment is close to the interference area according to the angle between the two. Here, the following formula (5) can be used: , calculate the angle, n represents the target vector, if the calculation result If it is less than or equal to 0, it is determined that the movement trend at the next moment is close to the interference area; otherwise, it is determined that the movement trend at the next moment is away from the interference area.
[0107] In this embodiment, when it is determined that the movement trend of the robot is approaching the interference area, the damping can be increased so that the operator feels greater resistance. As a possible implementation method, the damping can be gradually increased as the robot approaches the interference area.
[0108] Please refer to Fig.10 , Fig.10 for Figure 2Schematic diagram of the flow of sub-steps included in step S140. In this embodiment, step S140 may include sub-steps S141 and S142.
[0109] Sub-step S141, calculating a first distance between the current position and the interference area according to the current position and the target object.
[0110] In this embodiment, the first distance between the current position and the interference area can be calculated in any manner. As a possible implementation, in the above sub-area division method, when the interference area is the first cuboid, that is, when there is interference within the range, the distance between the current position and the target object can be calculated as the first distance.
[0111] For example, if the flag bit obtained at the current position is x+, it means that the distance to the surface is the closest. At this time, the vertical vector between the current end of the robot and the corresponding surface is , then the distance (i.e. the first distance) between the current position and the nearest face (i.e. the target object) is the length of the vector: . Indicates the first distance.
[0112] If the flag bit obtained at the current position is x+, y+, it means that the distance line is closest. At this time, the perpendicular vector between the robot position and the line is , the first distance is the length of this vector: .
[0113] If the flag bit obtained at the current position is x+, y+, z+, it means that the distance point is closest, and the vector formed by the two is , the first distance is the length of the vector: .
[0114] Under the above-mentioned sub-area division method, when the interference area is outside the second cuboid, that is, when it is out-of-range interference, the distance between the current position and the target object is calculated as the initial distance, and the width corresponding to the target object indicated by the width information of the buffer area is subtracted from the initial distance to obtain the first distance.
[0115] Assume that the distance between the surface of the free motion region and the corresponding surface of the interference region is d, such as Fig.11 As shown, since the free motion area is located inside when the interference is outside the range, the distance between the current position and the target object is the distance between the current position and the free motion area, and the result obtained by subtracting the distance from d is the distance between the current position and the interference area.
[0116] For example, when the distance between the surface of the free motion area and the corresponding surface of the interference area is d, if the flags obtained at the current position are x+, y+, z+, it means that the distance point is the closest, and the vector formed by the two is , the first distance is: .
[0117] The first distance calculation method can ensure the continuity and flow of the auxiliary dragging process without sudden changes in damping, which would cause the dragging to feel heavy at one moment and light at another.
[0118] Sub-step S142, calculating and obtaining target damping according to the basic damping and the first distance.
[0119] When the first distance is obtained, the target damping can be calculated according to the calculation method of the basic damping based on the setting, wherein the smaller the first distance is, the larger the target damping is.
[0120] As a possible implementation, Fig.12 The target damping is calculated in the manner shown. Fig.12 , Fig.12 for Fig.10 One of the flow diagrams of the sub-steps included in sub-step S142. In this embodiment, sub-step S142 may include sub-steps S1423 to S1425.
[0121] Sub-step S1423, calculating and obtaining the sum of the first distance and a first preset value as a first target value.
[0122] Sub-step S1424, calculating the sum of the second distance and the first preset value as the second target value.
[0123] The second distance is the width of the target object indicated by the width information of the buffer area, that is, the distance between two surfaces where the current position is located, one of which is the interference area surface and the other is the automatic motion area surface, and the two surfaces are parallel and adjacent. For example, if the distance between the surface of the free motion area and the corresponding surface of the interference area is d, then the second distance is d.
[0124] Sub-step S1425, calculates the ratio of the second target value to the first target value, calculates the product of the result obtained by subtracting 1 from the ratio and the second preset value, and takes the sum of the product and the basic damping as the target damping.
[0125] Wherein, the first preset value and the second preset value are both greater than 0.
[0126] The above calculation method can be expressed by the following formula:
[0127] (6)
[0128] in, represents the first distance, i.e., the distance between the TCP position at the end of the robot and the plane of the interference zone; is the basic damping (i.e. initial damping); d is the width of the buffer area; is a small amount (set value, i.e. the first preset value mentioned above), generally , avoid When the damping ; is the second preset value, Greater than 1.
[0129] In the calculation process based on the above formula (6), the target damping may become smaller. To avoid this situation, further processing can be performed based on the above formula (6). Please refer to Fig.13 , Fig.13 for Fig.10 FIG2 is a flow chart of sub-steps included in sub-step S142. In this embodiment, when the interference region is the first cuboid, sub-step S142 may further include sub-step S1421 and sub-step S1426.
[0130] Sub-step S1421, when the interference area is the first cuboid, determining whether the first distance is greater than a width corresponding to the target object indicated by the width information of the buffer area.
[0131] If it is greater than, then execute sub-step S1426. If it is not greater than, then execute sub-step S1423.
[0132] Sub-step S1426: taking the base damping as the target damping.
[0133] In this embodiment, when the interference area is the first cuboid (i.e., interference within the range), if the first distance If it is greater than d, the target damping is not calculated according to formula (6), but the base damping is directly calculated. As the target damping, that is, the damping size is not adjusted. If d is not greater than d, the target damping is calculated according to formula (6), so that a value greater than the basic damping is used as the target damping. When in the free motion area, the target damping is the basic damping. In this way, it is possible to avoid the situation where the target damping becomes smaller when in the buffer area. For example, after entering the buffer area from the free motion area, the first distance may When d is greater than d, if the calculation is directly based on formula (6), the target damping will become smaller, but this situation can be avoided through the above processing.
[0134] Please refer to Fig.14 , Fig.14 for Fig.10 FIG3 is a flow chart of sub-steps included in sub-step S142. Similarly, when the interference region is outside the second cuboid, sub-step S142 may further include sub-step S1422 and sub-step S1427.
[0135] Sub-step S1422, when the interference area is outside the second cuboid, determining whether the first distance is less than 0.
[0136] If the first distance is greater than or equal to 0, execute sub-step S1423.
[0137] If it is less than, execute sub-step S1427.
[0138] Sub-step S1427, setting the target damping to a preset maximum value.
[0139] The preset maximum value is equal to the value calculated as the target damping when the first distance is equal to 0.
[0140] In this embodiment, when the interference area is outside the second cuboid (i.e., out-of-range interference), if the first distance If the target damping is less than 0, the target damping is not calculated according to formula (6), but the preset maximum value is directly set as the target damping. The preset maximum value is the value of the first distance Substitute 0 into formula (6) to calculate the damping. If it is greater than or equal to 0, the target damping is calculated according to formula (6). In this way, the target damping can be made greater than the basic damping through simple processing logic to prompt the operating user to move in the direction close to the interference area.
[0141] Among them, the first distance When it is less than 0, the current position is Fig.11 The special area shown. If you directly set the first distance less than 0 Substituting into the above formula (6) for calculation, it may appear When the target damping is less than 0, the target damping becomes smaller, that is, the target damping becomes smaller when the target damping is very close to the interference area. This situation can be avoided by processing sub-steps S1422 and S1427.
[0142] Please refer to Fig.15 , Fig.15The second flowchart of the drag teaching control method provided in the embodiment of the present application is shown in FIG. 1. In the present embodiment, if it is determined that the movement trend is to move away from the interference area, the method may further include step S160.
[0143] Step S160: taking the basic damping as the target damping.
[0144] In this embodiment, when the current position is within the buffer area and the movement trend is to move away from the interference area, the damping may not be increased and adjusted, and the basic damping may be directly used as the target damping, and then the target position may be obtained through admittance control calculation. In this way, the speed may be increased when moving away from the interference area.
[0145] In this embodiment, when the current position is obtained, it can also be determined whether the current position is within the interference area. If it is determined to be within the interference area, the stiffness matrix can be increased. , and record the position before entering the interference area, using it as the initial position for admittance control, thereby ensuring that the robot can exit the interference area.
[0146] In the above dragging teaching control method provided in this embodiment, the interference zone construction method used adds the setting of the buffer zone. When the operator drags the robot located in the buffer zone and is about to reach the interference zone, the resistance in the movement direction is increased to remind the operator that the interference zone is about to be reached, so that the interference zone can be avoided in advance, and the phenomenon of the robot's movement speed being accelerated when it reaches the interference zone can be avoided. In this way, the operator's experience can be improved without increasing the difficulty of configuring the interference zone.
[0147] In this embodiment, the interference zone mode is divided into interference within the range and interference outside the range, which can avoid the inaccessible area in the workspace, and the robot can be restricted to a certain working area to avoid interference and collision with the staff. In addition, the damping adaptive adjustment strategy is used. When the robot end position is closer to the interference zone, the resistance increases linearly; when reaching the interference zone, the robot can automatically return to the position before entering the interference zone by increasing the stiffness matrix. In addition, based on the target vector corresponding to the target object that the current position of the robot end is close to, and the direction vector of the robot's motion speed at the next moment calculated by the admittance control, the angle between the two vectors is calculated, and then based on the angle, it is determined whether the motion relationship between the robot and the interference zone is close or far away, that is, the operator's intention is determined, and when it is determined to be close to the interference zone, the damping is increased to prompt the operator.
[0148] The above method provided in the embodiment of the present application enables the operator to use the force sensor to assist in dragging the robot. When approaching the set interference zone, the torque will slowly increase and the dragging will become heavier, giving people a feeling of hitting a sponge, similar to a spring mass damping system; and when the squeezing force exceeds the bearing limit of the sponge, a slight rebound will occur, which plays a role in protecting the robot. In this way, the user experience is improved through a variable damping control method. In addition, when the robot is far away from the interference zone, there will be no feeling of dragging becoming heavier.
[0149] In order to execute the corresponding steps in the above embodiments and various possible methods, a method for implementing the drag teaching control device 200 is provided below. Optionally, the drag teaching control device 200 can adopt the above Figure 1 The device structure of the electronic device 100 is shown. Fig.16 , Fig.16 The block diagram of the drag teaching control device 200 provided in the embodiment of the present application. It should be noted that the basic principle and technical effect of the drag teaching control device 200 provided in the present embodiment are the same as those of the above embodiment. For the sake of brief description, for the parts not mentioned in the present embodiment, reference can be made to the corresponding contents in the above embodiment. In the present embodiment, the drag teaching control device 200 may include: a position acquisition module 210, a judgment module 220, a damping determination module 230 and a control module 240.
[0150] The position acquisition module 210 is used to obtain the current position of the robot end.
[0151] The judgment module 220 is used to judge whether the current position is within the buffer area. The global space is divided into a free movement area, a buffer area, and an interference area to which the robot end is not allowed to move, and the buffer area is located between the free movement area and the interference area.
[0152] The judgment module 220 is further configured to judge whether the movement trend is close to the interference area according to the current external force information and the position information of the interference area when the current position is within the buffer area.
[0153] The damping determination module 230 is used to calculate the target damping by increasing the damping on the basis of the basic damping when the movement trend is close to the interference area.
[0154] The control module 240 is used to calculate the target position according to the current external force information, the current position and the target damping, and control the robot end to move to the target position.
[0155] Optionally, the above modules can be stored in the form of software or firmware. Figure 1 The 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.
[0156] 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 control method is implemented.
[0157] In summary, the embodiments of the present application provide a drag teaching control method, device, electronic device and readable storage medium. After the robot end moves to a position, it is determined whether the current position of the robot end is located in the buffer area. If so, it is determined whether the movement trend is close to the interference area based on the current external force information and the position information of the interference area; if the movement area is close to the interference area, the target damping is calculated based on the method of increasing the damping on the basic damping, and then the target position is calculated based on the current external force information, the current position and the target damping, and the robot end is controlled to move to the target position. Among them, the global space is divided into a free movement area, a buffer area and an interference area to which the robot end is not allowed to move, and the buffer area is located between the free movement area and the interference area. In this way, when the operator drags the robot and is about to reach the interference area, the resistance in the direction of movement is increased to remind the operator that it is about to reach the interference area, thereby reducing the situation where the operator drags the robot into the interference area.
[0158] 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.
[0159] 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.
[0160] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of 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 and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0161] 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 control method, characterized in that: The method comprises: Get the current position of the robot end; Determine whether the current position is within a buffer area, wherein the global space is divided into: a free motion area, a buffer area, and an interference area to which the robot end is not allowed to move, and the buffer area is located between the free motion area and the interference area; If the current position is within the buffer area, judging whether the movement trend is close to the interference area according to the current external force information and the position information of the interference area; If the movement trend is close to the interference area, the target damping is calculated based on the method of increasing the damping on the basic damping; Calculate the target position according to the current external force information, the current position and the target damping, and control the end of the robot to move to the target position; The global space is divided into three areas based on a parallel first cuboid and a second cuboid, the first cuboid is located inside the second cuboid, the first cuboid is the interference area or the free motion area, the second cuboid is the buffer area, and judging whether the motion trend is close to the interference area according to the current external force information and the position information of the interference area includes: Obtaining a target vector corresponding to a target object that the current position is close to according to the current position and the position information of the interference area, wherein the target object is a surface, an edge, or a vertex of the first cuboid, and the direction of a line between the center of the target object and the center of the first cuboid is the same as the direction of the target vector, and the direction of the target vector deviates from the interference area; Calculate the velocity direction according to the external force information; According to the speed direction and the target vector, it is determined whether the movement trend is close to the interference area.
2. The method according to claim 1, characterized in that The buffer area is a hollow cuboid, and the buffer area is divided into 26 sub-areas based on the planes where the six surfaces of the first cuboid are located; when a sub-area includes a vertex of the first cuboid, the object corresponding to the sub-area is the vertex; when the plane where a sub-area surface of a sub-area is located is the plane where a surface of the first cuboid is located, the object corresponding to the sub-area is the surface of the first cuboid; the objects corresponding to the remaining sub-areas are the edges of the first cuboid; the target object is the object corresponding to the sub-area where the current position is located.
3. The method according to claim 1, characterized in that: The method of calculating the target damping by increasing the damping on the basis of the basic damping includes: Calculating a first distance between the current position and the interference area according to the current position and the target object; The target damping is calculated according to the basic damping and the first distance, wherein the smaller the first distance is, the larger the target damping is.
4. The method according to claim 3, characterized in that: The calculating, according to the current position and the target object, a first distance between the current position and the interference area includes: When the interference area is the first cuboid, calculating the distance between the current position and the target object as the first distance; When the interference area is outside the second cuboid, the distance between the current position and the target object is calculated as the initial distance, and the first distance is obtained by subtracting the initial distance from the width corresponding to the target object indicated by the width information of the buffer area.
5. The method according to claim 4, characterized in that The step of calculating the target damping according to the basic damping and the first distance includes: Calculate and obtain the sum of the first distance and a first preset value as a first target value; A sum of a second distance and the first preset value is calculated as a second target value, wherein the second distance is a width corresponding to the target object indicated by the width information of the buffer area; The ratio of the second target value to the first target value is calculated, and the product of the result obtained by subtracting 1 from the ratio and the second preset value is calculated, and the sum of the product result and the basic damping is used as the target damping, wherein the first preset value and the second preset value are both greater than 0.
6. The method according to claim 5, characterized in that The step of calculating the target damping according to the basic damping and the first distance further comprises: In the case where the interference area is the first cuboid, determining whether the first distance is greater than the width corresponding to the target object indicated by the width information of the buffer area; if greater, taking the basic damping as the target damping; if not greater, performing the step of calculating and obtaining the sum of the first distance and a first preset value as the first target value; and / or, In the case where the interference area is outside the second cuboid, determine whether the first distance is less than 0; if so, set the target damping to a preset maximum value; if the first distance is greater than or equal to 0, perform the step of calculating the sum of the first distance and the first preset value as the first target value, wherein the preset maximum value is equal to the value calculated as the target damping when the first distance is equal to 0.
7. The method according to any one of claims 1 to 6, characterized in that: Before the step of calculating the target position according to the current external force information, the current position and the target damping, and controlling the robot end to move to the target position, the method further includes: If it is determined that the movement trend is away from the interference area, the basic damping is used as the target damping.
8. A drag teaching control device, characterized in that: The device comprises: The position acquisition module is used to obtain the current position of the robot end; A judgment module, used to judge whether the current position is within a buffer area, wherein the global space is divided into: a free motion area, a buffer area, and an interference area to which the robot end is not allowed to move, and the buffer area is located between the free motion area and the interference area; The judging module is further configured to judge whether the movement trend is close to the interference area according to the current external force information and the position information of the interference area when the current position is within the buffer area; A damping determination module, configured to calculate a target damping by increasing the damping on the basis of the basic damping when the movement trend is close to the interference area; A control module, used to calculate a target position according to current external force information, current position and the target damping, and control the robot end to move to the target position; The global space is divided into three areas based on a parallel first cuboid and a second cuboid, the first cuboid is located inside the second cuboid, the first cuboid is the interference area or the free motion area, and the second cuboid is the buffer area, and the judgment module is specifically used for: Obtaining a target vector corresponding to a target object that the current position is close to according to the current position and the position information of the interference area, wherein the target object is a surface, an edge, or a vertex of the first cuboid, and the direction of a line between the center of the target object and the center of the first cuboid is the same as the direction of the target vector, and the direction of the target vector deviates from the interference area; Calculate the velocity direction according to the external force information; According to the speed direction and the target vector, it is determined whether the movement trend is close to the interference area.
9. 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 control method described in any one of claims 1-7.
