Hole positioning method, shaft hole assembly method and related products based on robotic arms

By fixing a torque sensor and admittance algorithm at the end of the robotic arm and combining them with a hole-finding algorithm to adjust the motion trajectory of the shaft workpiece, the error problem in shaft-hole assembly was solved, and high-precision hole positioning and assembly were achieved.

CN118357713BActive Publication Date: 2026-06-30SHENZHEN JINGTAI TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN JINGTAI TECH CO LTD
Filing Date
2023-01-18
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

During the shaft and hole assembly process, errors may occur due to deviations between the taught position and the actual position of the hole or limitations in the precision of the robotic arm.

Method used

By fixing a torque sensor at the end of the robotic arm, the desired position of the hole is obtained, the shaft workpiece is controlled to move to the target position, and the torque sensor is used to detect the force on the shaft workpiece in the direction of the hole to determine that the assembly is successful. The motion trajectory of the shaft workpiece is adjusted by combining admittance algorithm and hole finding algorithm to achieve accurate assembly.

Benefits of technology

It improves the accuracy of shaft-hole assembly, ensures accurate docking of shaft workpieces and holes, and corrects hole positions to achieve high-precision assembly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118357713B_ABST
    Figure CN118357713B_ABST
Patent Text Reader

Abstract

This application discloses a hole positioning method, a shaft-hole assembly method, and related products based on a robotic arm. The positioning method includes: obtaining the desired position of the hole to be positioned; controlling a robotic arm to move a shaft workpiece to the target position according to the desired position; controlling the robotic arm to move the shaft workpiece from the target position along the axis of the hole toward the hole; if the movement distance of the shaft workpiece from the target position along the axis of the hole reaches a second preset distance, and the torque sensor detects that the force on the shaft workpiece in the axis of the hole reaches a preset pressure, it is determined that the shaft workpiece and the hole are successfully assembled; obtaining the current assembly posture of the shaft workpiece, and determining the actual position of the hole based on the current assembly posture. This application can correct the hole position to obtain the true and accurate position of the hole, thereby improving the accuracy of shaft-hole assembly.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of industrial control technology, and in particular to a hole positioning method, shaft hole assembly method and related products based on a robotic arm. Background Technology

[0002] In industrial assembly, shaft-hole assembly is frequently involved. This process requires inserting a shaft into a hole in an object. A common method involves using the taught position of the hole as the desired position for the shaft, and controlling a robotic arm to move the shaft towards this desired position, thus inserting it into the hole. However, if there is a deviation between the taught and actual positions of the hole, or if the robotic arm's own precision is limited, or if there are issues with the installation accuracy between the robotic arm and the shaft, this method can lead to errors in the shaft-hole assembly. Therefore, accurately determining the hole's position is of paramount importance. Summary of the Invention

[0003] This application provides a hole positioning method, a shaft hole assembly method, and related products for a robotic arm, which can correct the hole position to obtain the true and accurate position of the hole, thereby improving the accuracy of shaft hole assembly.

[0004] In a first aspect, a hole positioning method based on a robotic arm is provided, wherein a torque sensor and a shaft workpiece are fixed at the end of the robotic arm; the method includes:

[0005] Obtain the desired location of the hole to be located;

[0006] According to the desired position, the robotic arm is controlled to move the shaft workpiece to the target position, and the target position and the desired position are spaced apart by a first preset distance in the axial direction of the hole;

[0007] Control the robotic arm to move the shaft workpiece from the target position toward the hole along the axial direction of the hole;

[0008] If the shaft workpiece moves a distance from the target position along the axial direction of the hole to a second preset distance, and the torque sensor detects that the force on the shaft workpiece in the axial direction of the hole reaches a preset pressure, it is determined that the shaft workpiece and the hole are successfully assembled; wherein, the second preset distance is greater than or equal to the first preset distance;

[0009] The current assembly pose of the shaft workpiece is obtained, and the actual position of the hole is determined based on the current assembly pose.

[0010] In any embodiment of this application, the desired position is the position of the bottom of the hole, the second preset distance is equal to the first preset distance, and the first preset distance is greater than the depth of the hole.

[0011] In any embodiment of this application, the desired position is the position of the opening of the hole, the second preset distance is greater than the first preset distance, and the second preset distance is equal to the sum of the first preset distance and the depth of the hole.

[0012] In conjunction with any embodiment of this application, the method further includes:

[0013] If the distance the shaft workpiece moves from the target position along the axial direction of the hole is less than the second preset distance, and the torque sensor detects that the shaft workpiece is under force in the first target direction, it is determined that the shaft workpiece is in contact with the chamfered plane of the hole;

[0014] The admittance algorithm is used to control the robotic arm to move the shaft workpiece along the second target direction until the shaft workpiece enters the hole;

[0015] If the shaft workpiece moves a distance from the chamfered plane along the axial direction of the hole to a third preset distance, and the torque sensor detects that the force on the shaft workpiece in the axial direction of the hole reaches the preset pressure, it is determined that the shaft workpiece and the hole are successfully assembled.

[0016] Wherein, the first target direction is at a preset angle to the axis of the hole, and the first target direction is perpendicular to the chamfer plane; the second target direction is perpendicular to the first target direction, and the second target direction faces the bottom side of the hole.

[0017] In conjunction with any embodiment of this application, the method further includes:

[0018] If the distance the shaft workpiece moves from the target position along the axial direction of the hole is less than the second preset distance, and the torque sensor detects that the force on the shaft workpiece in the axial direction of the hole reaches the preset pressure, it is determined that the shaft workpiece is in contact with the outer peripheral plane of the hole.

[0019] According to the preset hole-finding algorithm, hole search is performed based on the contact point between the shaft workpiece and the outer peripheral plane;

[0020] After the hole search is successful, the robotic arm is controlled to move the shaft workpiece again along the axis of the hole.

[0021] If the shaft workpiece moves a distance from the outer peripheral plane along the axial direction of the hole to a fourth preset distance, and the torque sensor detects that the force on the shaft workpiece in the axial direction of the hole reaches the preset pressure, it is determined that the shaft workpiece and the hole are successfully assembled.

[0022] In any embodiment of this application, the step of searching for holes based on the contact points between the shaft workpiece and the outer peripheral plane according to a preset hole-finding algorithm includes:

[0023] The hole-finding area is determined based on the contact point between the shaft workpiece and the outer peripheral plane;

[0024] According to the preset hole-finding algorithm, hole searching is performed in the hole-finding area based on the contact point between the shaft workpiece and the outer peripheral plane.

[0025] In any embodiment of this application, the step of searching for holes based on the contact points between the shaft workpiece and the outer peripheral plane according to a preset hole-finding algorithm includes:

[0026] The starting point of rotation is determined based on the contact point between the shaft workpiece and the outer peripheral plane;

[0027] The robotic arm is controlled to drive the shaft workpiece to perform hole search in the outer peripheral plane along a first equidistant spiral trajectory, starting from the rotation starting point.

[0028] In conjunction with any embodiment of this application, the method further includes:

[0029] If no hole is found, the robotic arm is controlled to move the shaft workpiece along a second equidistant spiral trajectory within the outer peripheral plane to search for the hole again; or...

[0030] If the distance the shaft workpiece moves from the outer peripheral plane along the axial direction of the hole reaches the fourth preset distance, and the force on the shaft workpiece in the axial direction of the hole does not reach the preset pressure, the robotic arm is controlled to drive the shaft workpiece to perform hole searching again along the second equidistant spiral trajectory in the outer peripheral plane; or,

[0031] If the force exerted on the shaft workpiece in the axial direction of the hole reaches the preset pressure, and the distance the shaft workpiece moves from the outer peripheral plane along the axial direction of the hole is less than the fourth preset distance, the robotic arm is controlled to drive the shaft workpiece to perform hole search again along the second equidistant spiral trajectory in the outer peripheral plane.

[0032] The trajectory of the first equidistant spiral is different from that of the second equidistant spiral.

[0033] In any embodiment of this application, the pitch of the first equidistant spiral trajectory is different from the pitch of the second equidistant spiral trajectory; and / or, the rotation direction of the first equidistant spiral trajectory is different from the rotation direction of the second equidistant spiral trajectory; and / or, the starting rotation angle of the first equidistant spiral trajectory is different from the starting rotation angle of the second equidistant spiral trajectory; and / or, the rotation starting point of the first equidistant spiral trajectory is different from the rotation starting point of the second equidistant spiral trajectory.

[0034] In any embodiment of this application, the step of searching for holes based on the contact points between the shaft workpiece and the outer peripheral plane according to a preset hole-finding algorithm includes:

[0035] The scanning start point is determined based on the contact point between the shaft workpiece and the outer peripheral plane;

[0036] The robotic arm is controlled to drive the shaft workpiece to perform hole search in the outer peripheral plane along a first horizontal scanning trajectory, starting from the scanning start point.

[0037] In conjunction with any embodiment of this application, the method further includes:

[0038] If no hole is found, the robotic arm is controlled to move the shaft workpiece along the second horizontal scanning trajectory within the outer peripheral plane to search for the hole again; or...

[0039] If the distance the shaft workpiece moves from the outer peripheral plane along the axial direction of the hole reaches the fourth preset distance, and the force on the shaft workpiece in the axial direction of the hole does not reach the preset pressure, the robotic arm is controlled to drive the shaft workpiece to perform hole searching again along the second horizontal scanning trajectory in the outer peripheral plane; or,

[0040] If the force exerted on the shaft workpiece in the axial direction of the hole reaches the preset pressure, and the distance the shaft workpiece moves from the outer peripheral plane along the axial direction of the hole is less than the fourth preset distance, the robotic arm is controlled to drive the shaft workpiece to perform hole search again in the outer peripheral plane along the second horizontal scanning trajectory.

[0041] The first horizontal scanning trajectory and the second horizontal scanning trajectory have at least one of the following differences: different scanning starting points, different scanning spacing, and different scanning directions.

[0042] In any embodiment of this application, a successful hole search includes:

[0043] During hole search, the torque sensor is used to detect whether the force on the shaft workpiece in the axial direction of the hole remains at the target pressure;

[0044] If the force on the shaft workpiece in the axial direction of the hole is detected to be below a preset proportion of the target pressure, and the shaft workpiece produces a downward displacement in the axial direction of the hole, the hole search is determined to be successful.

[0045] Secondly, a shaft hole assembly method based on a robotic arm is provided, including:

[0046] The actual location of the target hole is obtained using the first aspect and any of its embodiments;

[0047] Based on the actual position, the robotic arm is controlled to drive the target shaft workpiece to complete the assembly with the target hole.

[0048] Thirdly, a hole positioning device based on a robotic arm is provided, characterized in that a torque sensor and a shaft workpiece are fixed at the end of the robotic arm; the positioning device includes:

[0049] The acquisition unit is used to acquire the desired position of the hole to be located;

[0050] The control unit is used to control the robotic arm to move the shaft workpiece to the target position according to the desired position, wherein the target position and the desired position are spaced apart by a first preset distance in the axial direction of the hole;

[0051] The control unit is also used to control the robotic arm to move the shaft workpiece from the target position toward the hole along the axial direction of the hole;

[0052] The determining unit is configured to determine that the shaft workpiece is successfully assembled with the hole if the distance the shaft workpiece moves from the target position along the axial direction of the hole reaches a second preset distance, and the torque sensor detects that the force on the shaft workpiece in the axial direction of the hole reaches a preset pressure; wherein the second preset distance is greater than or equal to the first preset distance.

[0053] The determining unit is further configured to acquire the current assembly pose of the shaft workpiece, and to determine the actual position of the hole based on the current assembly pose.

[0054] In any embodiment of this application, the desired position is the position of the bottom of the hole, the second preset distance is equal to the first preset distance, and the first preset distance is greater than the depth of the hole.

[0055] In any embodiment of this application, the desired position is the position of the opening of the hole, the second preset distance is greater than the first preset distance, and the second preset distance is equal to the sum of the first preset distance and the depth of the hole.

[0056] In any embodiment of this application, the determining unit is further configured to determine that the shaft workpiece is in contact with the chamfered plane of the hole if the moving distance of the shaft workpiece from the target position along the axial direction of the hole is less than the second preset distance, and the torque sensor detects that the shaft workpiece is under force in the first target direction;

[0057] The control unit is also used to control the robotic arm to move the shaft workpiece along the second target direction using an admittance algorithm until the shaft workpiece enters the hole;

[0058] The determining unit is further configured to determine that the shaft workpiece and the hole are successfully assembled if the distance the shaft workpiece moves from the chamfered plane along the axial direction of the hole reaches a third preset distance, and the torque sensor detects that the force on the shaft workpiece in the axial direction of the hole reaches the preset pressure.

[0059] Wherein, the first target direction is at a preset angle to the axis of the hole, and the first target direction is perpendicular to the chamfer plane; the second target direction is perpendicular to the first target direction, and the second target direction faces the bottom side of the hole.

[0060] In conjunction with any embodiment of this application, the determining unit is further configured to determine that the shaft workpiece is in contact with the outer peripheral plane of the hole if the moving distance of the shaft workpiece from the target position along the axial direction of the hole is less than the second preset distance, and the torque sensor detects that the force on the shaft workpiece in the axial direction of the hole reaches the preset pressure.

[0061] The control unit is also used to perform hole search based on the contact point between the shaft workpiece and the outer peripheral plane according to a preset hole-finding algorithm;

[0062] The control unit is also used to control the robotic arm to move the shaft workpiece again along the axial direction of the hole after the hole search is successful.

[0063] The determining unit is further configured to determine that the shaft workpiece and the hole are successfully assembled if the distance the shaft workpiece moves from the outer peripheral plane along the axial direction of the hole reaches a fourth preset distance, and the torque sensor detects that the force on the shaft workpiece in the axial direction of the hole reaches the preset pressure.

[0064] In conjunction with any embodiment of this application, the control unit is configured to:

[0065] The hole-finding area is determined based on the contact point between the shaft workpiece and the outer peripheral plane;

[0066] According to the preset hole-finding algorithm, hole searching is performed in the hole-finding area based on the contact point between the shaft workpiece and the outer peripheral plane.

[0067] In conjunction with any embodiment of this application, the control unit is configured to:

[0068] The starting point of rotation is determined based on the contact point between the shaft workpiece and the outer peripheral plane;

[0069] The robotic arm is controlled to drive the shaft workpiece to perform hole search in the outer peripheral plane along a first equidistant spiral trajectory, starting from the rotation starting point.

[0070] In conjunction with any embodiment of this application, the control unit is further configured to:

[0071] If no hole is found, the robotic arm is controlled to move the shaft workpiece along a second equidistant spiral trajectory within the outer peripheral plane to search for the hole again; or...

[0072] If the distance the shaft workpiece moves from the outer peripheral plane along the axial direction of the hole reaches the fourth preset distance, and the force on the shaft workpiece in the axial direction of the hole does not reach the preset pressure, the robotic arm is controlled to drive the shaft workpiece to perform hole searching again along the second equidistant spiral trajectory in the outer peripheral plane; or,

[0073] If the force exerted on the shaft workpiece in the axial direction of the hole reaches the preset pressure, and the distance the shaft workpiece moves from the outer peripheral plane along the axial direction of the hole is less than the fourth preset distance, the robotic arm is controlled to drive the shaft workpiece to perform hole search again along the second equidistant spiral trajectory in the outer peripheral plane.

[0074] The trajectory of the first equidistant spiral is different from that of the second equidistant spiral.

[0075] In any embodiment of this application, the pitch of the first equidistant spiral trajectory is different from the pitch of the second equidistant spiral trajectory; and / or, the rotation direction of the first equidistant spiral trajectory is different from the rotation direction of the second equidistant spiral trajectory; and / or, the starting rotation angle of the first equidistant spiral trajectory is different from the starting rotation angle of the second equidistant spiral trajectory; and / or, the rotation starting point of the first equidistant spiral trajectory is different from the rotation starting point of the second equidistant spiral trajectory.

[0076] In conjunction with any embodiment of this application, the control unit is configured to:

[0077] The scanning start point is determined based on the contact point between the shaft workpiece and the outer peripheral plane;

[0078] The robotic arm is controlled to drive the shaft workpiece to perform hole search in the outer peripheral plane along a first horizontal scanning trajectory, starting from the scanning start point.

[0079] In conjunction with any embodiment of this application, the control unit is further configured to:

[0080] If no hole is found, the robotic arm is controlled to move the shaft workpiece along the second horizontal scanning trajectory within the outer peripheral plane to search for the hole again; or...

[0081] If the distance the shaft workpiece moves from the outer peripheral plane along the axial direction of the hole reaches the fourth preset distance, and the force on the shaft workpiece in the axial direction of the hole does not reach the preset pressure, the robotic arm is controlled to drive the shaft workpiece to perform hole searching again along the second horizontal scanning trajectory in the outer peripheral plane; or,

[0082] If the force exerted on the shaft workpiece in the axial direction of the hole reaches the preset pressure, and the distance the shaft workpiece moves from the outer peripheral plane along the axial direction of the hole is less than the fourth preset distance, the robotic arm is controlled to drive the shaft workpiece to perform hole search again in the outer peripheral plane along the second horizontal scanning trajectory.

[0083] The first horizontal scanning trajectory and the second horizontal scanning trajectory have at least one of the following differences: different scanning starting points, different scanning spacing, and different scanning directions.

[0084] In conjunction with any embodiment of this application, the control unit is configured to:

[0085] During hole search, the torque sensor is used to detect whether the force on the shaft workpiece in the axial direction of the hole remains at the target pressure;

[0086] If the force on the shaft workpiece in the axial direction of the hole is detected to be below a preset proportion of the target pressure, and the shaft workpiece produces a downward displacement in the axial direction of the hole, the hole search is determined to be successful.

[0087] Fourthly, a shaft hole assembly device based on a robotic arm is provided, comprising:

[0088] The obtaining unit is used to obtain the actual position of the target hole using the first aspect and any embodiment thereof;

[0089] The control unit is used to control the robotic arm to drive the target shaft workpiece to complete the assembly with the target hole according to the actual position.

[0090] Fifthly, an electronic device is provided, characterized in that it comprises: a processor and a memory, the memory being used to store computer program code, the computer program code including computer instructions, wherein, when the processor executes the computer instructions, the electronic device performs a method as described in the first aspect above and any possible implementation thereof, or performs a method as described in the second aspect above.

[0091] In a sixth aspect, another electronic device is provided, comprising: a processor, a transmitting device, an input device, an output device, and a memory, the memory being used to store computer program code, the computer program code including computer instructions, wherein, when the processor executes the computer instructions, the electronic device performs a method as described in the first aspect above and any possible implementation thereof, or performs a method as described in the second aspect above.

[0092] In a seventh aspect, a computer-readable storage medium is provided, wherein a computer program is stored therein, the computer program including program instructions that, when executed by a processor, cause the processor to perform a method as described in the first aspect above and any possible implementation thereof, or to perform a method as described in the second aspect above.

[0093] Eighthly, a computer program product is provided, the computer program product comprising a computer program or instructions, which, when the computer program or instructions are executed on a computer, cause the computer to perform the method of the first aspect and any possible implementation thereof, or to perform the method of the second aspect.

[0094] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application.

[0095] In this application, the positioning device, upon obtaining the desired position of the hole to be positioned, controls a robotic arm to move the shaft workpiece to the target position based on this desired position. Then, the robotic arm moves the shaft workpiece from the target position along the axis of the hole towards the hole. Based on the distance the shaft workpiece moves along this axis and the force acting on it in that direction, it is determined whether the shaft workpiece and the hole are successfully assembled. Specifically, if the distance the shaft workpiece moves from the target position along the axis of the hole reaches a second preset distance, and a torque sensor detects that the force acting on the shaft workpiece in the axis of the hole reaches a preset pressure, it is determined that the shaft workpiece and the hole are successfully assembled. Finally, with the shaft workpiece and the hole successfully assembled, the actual position of the hole can be determined based on the current assembly posture of the shaft workpiece. Through this technical solution, the hole position can be corrected to obtain the true and accurate position of the hole, thereby improving the accuracy of shaft-hole assembly. Attached Figure Description

[0096] To more clearly illustrate the technical solutions in the embodiments of this application or the background art, the accompanying drawings used in the embodiments of this application or the background art will be described below.

[0097] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application.

[0098] Figure 1 This is a schematic diagram of the installation of a shaft workpiece provided in an embodiment of this application;

[0099] Figure 2 This is a schematic diagram illustrating an application scenario of shaft-hole assembly provided in an embodiment of this application;

[0100] Figure 3 A schematic diagram of a similar axis provided for an embodiment of this application;

[0101] Figure 4 Another similar axis schematic diagram provided for an embodiment of this application;

[0102] Figure 5 A flowchart illustrating a hole positioning method provided in an embodiment of this application;

[0103] Figure 6 A schematic diagram of a hole, a chamfered opening, and an outer peripheral plane provided for an embodiment of this application;

[0104] Figure 7 A schematic diagram illustrating a process for controlling a robotic arm using an admittance algorithm, provided as an embodiment of this application;

[0105] Figure 8 This application provides a schematic diagram of a shaft workpiece performing hole search within a hole-finding area according to an embodiment of the present application.

[0106] Figure 9 This is a schematic diagram illustrating the movement of a shaft workpiece along an equidistant spiral trajectory in a clockwise direction within the outer peripheral plane, as provided in an embodiment of this application.

[0107] Figure 10 This is a schematic diagram illustrating the movement of a shaft workpiece along an equidistant spiral trajectory in a counterclockwise direction within the outer peripheral plane, as provided in an embodiment of this application.

[0108] Figure 11 A schematic diagram illustrating the movement of another shaft workpiece along a clockwise equidistant spiral trajectory in the outer peripheral plane, as provided in an embodiment of this application.

[0109] Figure 12 This is a schematic diagram illustrating the movement of a shaft workpiece along a first horizontal scanning trajectory within an outer peripheral plane, as provided in an embodiment of this application.

[0110] Figure 13 A flowchart illustrating another hole positioning method provided in an embodiment of this application;

[0111] Figure 14 A schematic flowchart of a shaft hole assembly method based on a robotic arm provided in an embodiment of this application;

[0112] Figure 15 A schematic diagram of a hole positioning device based on a robotic arm provided in an embodiment of this application;

[0113] Figure 16 A schematic diagram of a shaft hole assembly device based on a robotic arm provided in an embodiment of this application;

[0114] Figure 17 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0115] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.

[0116] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

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

[0118] In industrial assembly, shaft-hole assembly is frequently involved. This process requires inserting a shaft workpiece into a hole in an object. A common method involves using the taught position of the hole as the desired position for the shaft workpiece, and controlling a robotic arm to move the workpiece towards that desired position, thus inserting it into the hole. However, if there is a deviation between the taught position and the actual position of the hole, or if the robotic arm itself has limited precision or the installation accuracy between the robotic arm and the shaft workpiece is compromised, this method can lead to errors in the shaft-hole assembly process.

[0119] Based on this, this application provides a hole positioning method based on a robotic arm. The hole positioning method can determine the hole position, so that when it is necessary to insert the shaft workpiece into the hole, the determined hole position can be used as the desired position, and the robotic arm can be controlled to drive the shaft workpiece into the hole.

[0120] The execution subject of this application embodiment is a positioning device, which can be any electronic device capable of executing the technical solutions disclosed in the method embodiments of this application. Optionally, the positioning device can be one of the following: a mobile phone, a computer, a tablet computer, or a wearable smart device. It should be understood that the method embodiments of this application can also be implemented by a processor executing computer program code.

[0121] In this embodiment, the positioning device can locate the position of the hole by performing a hole positioning method. Specifically, by controlling the robotic arm to move the shaft workpiece, the shaft workpiece is inserted into the hole to be positioned, and the position of the shaft workpiece is determined as the position of the hole to be positioned when the shaft workpiece is inserted into the hole. Figure 1 The diagram shown is a schematic of the installation of the shaft workpiece. Figure 1 As shown, the robotic arm is connected to a flange, the flange is connected to an instrument or tooling (such as an electric gripper), and the shaft workpiece is mounted on the instrument or tooling, wherein the instrument or tooling is used to fix the shaft workpiece.

[0122] In the application scenario of this application embodiment, the shaft workpiece is not in contact with the object including the hole to be positioned, and the shaft workpiece is located on the side facing the hole opening. Please refer to... Figure 2 , Figure 2 A schematic diagram illustrating the application scenario of the hole location method.

[0123] In this embodiment, the shaft workpiece can be any shaft. For example, the shaft workpiece can be a cylinder with a flat, curved, or conical bottom; another example is a rhomboid prism; yet another example is... Figure 3 The shape shown. Optionally, the shaft workpiece also includes shaft-like components, wherein the shaft-like components have irregularly shaped ends compared to the shaft, for example, Figure 4 The image shows a shaft-like structure with a cylindrical body but serrated ends.

[0124] Please see Figure 5 , Figure 5 This is a flowchart illustrating a hole positioning method provided in an embodiment of this application.

[0125] 501. Obtain the desired location of the hole to be located.

[0126] In this embodiment, the desired position of the hole to be located can be the taught position of the hole, which can be obtained through manual teaching or machine teaching. The desired position can also be directly input by the user; this is not limited here. The desired position can be represented as (x, y, z, rx, ry, rz), where x, y, and z represent the position of the hole in three-dimensional space, and rx, ry, and rz represent the Euler angles of the hole relative to the origin of the three-dimensional space. That is, the desired position can be represented by pose. The coordinate system representing this three-dimensional space can be the world coordinate system, the robot arm base coordinate system, or the object coordinate system, etc., and is not limited here.

[0127] 502. Based on the desired position, control the robotic arm to move the shaft workpiece to the target position.

[0128] In this embodiment, the target position and the desired position are spaced apart by a first preset distance along the axial direction of the hole. Specifically, the target position is outside the hole, and the distance between the desired position and the target position along the axial direction of the hole is the first preset distance. Optionally, the axial direction of the hole is vertical, the target position is vertically upward from the desired position, and the distance between the target position and the desired position is the first preset distance. For example, if the first preset distance is 10 millimeters, then the target position is located 10 millimeters vertically upward from the desired position.

[0129] The positioning device can determine the target position based on the desired position, and then control the robotic arm to move the shaft workpiece to the target position. Optionally, the positioning device controls the robotic arm to move the shaft workpiece so that the end of the shaft workpiece is located at the target position.

[0130] 503. Control the robotic arm to move the shaft workpiece from the target position toward the hole along the axis of the hole.

[0131] By executing step 503, the positioning device can move the shaft workpiece toward the hole, ultimately inserting the shaft workpiece into the hole or causing the shaft workpiece to abut against the outer peripheral plane of the hole. The outer peripheral plane of the hole is the plane on the object that is flush with the opening of the hole and located outside the opening. In one possible implementation, the axis of the hole is vertical, the target position is the vertically upward position of the desired position, and the positioning device controls the robotic arm to move the shaft workpiece from the target position in a vertically downward direction toward the hole.

[0132] 504. If the distance the shaft workpiece moves from the target position along the axial direction of the hole reaches a second preset distance, and the torque sensor detects that the force on the shaft workpiece in the axial direction of the hole reaches a preset pressure, it is determined that the shaft workpiece and the hole are successfully assembled.

[0133] In this embodiment, the second preset distance is greater than or equal to the first preset distance. The shaft workpiece has moved a distance from the target position along the axis of the hole to reach the second preset distance, indicating that the shaft workpiece has entered the hole. In one possible implementation, the desired position is the bottom of the hole, in which case the second preset distance is equal to the first preset distance, and the first preset distance is greater than the depth of the hole. In another possible implementation, the desired position is the opening of the hole, in which case the second preset distance is greater than the first preset distance, and the second preset distance is equal to the sum of the first preset distance and the depth of the hole; that is, the second preset distance is the distance between the target position and the bottom of the hole along the axis. The depth of the hole refers to the distance from the opening to the bottom of the hole. The relationship between the second and first preset distances does not consider the pressure deformation when the shaft workpiece contacts and is pressed against the bottom of the hole. If pressure deformation is considered, when the desired position is the bottom of the hole, the second preset distance = the first preset distance + pressure deformation; when the desired position is the opening of the hole, the second preset distance = the first preset distance + the depth of the hole + pressure deformation.

[0134] In this embodiment, a torque sensor is fixed to the end of the robotic arm. The torque sensor can detect at least the force along the axial direction of the hole. Preferably, the torque sensor is a six-dimensional torque sensor. When the end of the shaft workpiece is in contact with the bottom of the hole, the bottom of the hole exerts an external force on the shaft workpiece in the axial direction. Therefore, when the shaft workpiece is inserted into the hole, it can be determined whether the shaft workpiece is in contact with the bottom of the hole based on the force acting on it in the axial direction.

[0135] Specifically, if the force on the shaft workpiece in the axial direction reaches the preset pressure, it indicates that the shaft workpiece has made contact with the bottom of the hole, thus confirming that the shaft workpiece and the hole have been successfully assembled. If the force on the shaft workpiece in the axial direction does not reach the preset pressure, it indicates that the shaft workpiece and the hole have not been successfully assembled.

[0136] Optionally, if the shaft and hole are successfully assembled, there is assembly stress between them. In this case, the preset pressure can be determined based on the assembly stress. In one possible implementation, the preset pressure is the assembly stress; for example, if the assembly stress is 1 Newton, the preset pressure is also 1 Newton. In another possible implementation, the preset pressure is the sum of the assembly stress and a margin; for example, if the assembly stress is 1 Newton and the margin is 0.1 Newton, the preset pressure ranges from (1 ± 0.1) Newtons, i.e., from 0.9 Newtons to 1.1 Newtons.

[0137] Therefore, if the shaft workpiece moves a distance from the target position along the axis of the hole to the second preset distance, and the torque sensor detects that the force on the shaft workpiece in the axis of the hole reaches the preset pressure, the positioning device determines that the shaft workpiece and the hole are successfully assembled.

[0138] 505. Obtain the current assembly pose of the aforementioned shaft workpiece, and determine the actual position of the aforementioned hole based on the aforementioned current assembly pose.

[0139] When the shaft workpiece and the hole are successfully assembled, the positioning device can obtain the current assembly pose of the shaft workpiece, i.e., the current pose of the shaft workpiece. This current assembly pose can be the pose of the shaft workpiece in the robot arm's base coordinate system. Then, based on the current assembly pose of the shaft workpiece, the actual position of the hole can be determined. The actual position can also be represented as (x, y, z, rx, ry, rz). In one possible implementation, the positioning device determines the position of the end of the shaft based on the current assembly pose of the shaft workpiece, which is used as the actual position of the hole. In another possible implementation, the positioning device determines the position of the center of gravity of the shaft workpiece based on the current assembly pose of the shaft workpiece, which is used as the actual position of the hole. In yet another possible implementation, the positioning device determines the position of the geometric center of the shaft workpiece based on the current assembly pose of the shaft workpiece, which is used as the actual position of the hole.

[0140] In this embodiment, after obtaining the desired position of the hole to be positioned, the positioning device controls the robotic arm to move the shaft workpiece to the target position based on the desired position. Then, the robotic arm controls the shaft workpiece to move from the target position towards the hole along the axial direction of the hole. Based on the distance the shaft workpiece moves along the axial direction and the force acting on the shaft workpiece in the axial direction, it is determined that the shaft workpiece has been successfully assembled with the hole. Specifically, if the distance the shaft workpiece moves from the target position along the axial direction of the hole reaches a second preset distance, and the torque sensor detects that the force acting on the shaft workpiece in the axial direction of the hole reaches a preset pressure, it is determined that the shaft workpiece has been successfully assembled with the hole. The second preset distance is greater than or equal to the first preset distance. Finally, when the shaft workpiece is successfully assembled with the hole, the actual position of the hole can be determined based on the current assembly posture of the shaft workpiece.

[0141] As an optional implementation, the positioning device also performs the following steps:

[0142] 601. If the distance the shaft workpiece moves from the target position along the axis of the hole is less than the second preset distance, and the torque sensor detects that the shaft workpiece is under force in the first target direction, it is determined that the shaft workpiece is in contact with the chamfered plane of the hole.

[0143] In this embodiment, the first target direction is at a preset angle to the axis of the hole, and the first target direction is perpendicular to the chamfer plane, wherein the chamfer plane is the plane where the chamfer of the hole opening is located. The chamfer plane is inclined towards the bottom of the hole, and the chamfer plane and the plane where the hole opening is located form a fixed inclination angle. The chamfer can guide the shaft workpiece during shaft-hole assembly. The preset angle depends on the inclination angle of the chamfer plane; preferably, the preset angle is equal to the inclination angle. For example, Figure 6 The diagram shown illustrates the hole, the chamfered opening, and the outer circumferential plane. Figure 6 As shown, the chamfer of the orifice is annular, and the outer circumferential plane is... Figure 6 The shaded area in the diagram represents the plane where the opening of the hole is located.

[0144] If the distance the shaft workpiece moves from the target position along the axis of the hole is less than the second preset distance, it indicates that the shaft workpiece has not entered the hole or reached the bottom of the hole. At this time, if the torque sensor detects that the shaft workpiece is under force in the first target direction, it indicates that the shaft workpiece has made contact with the chamfered surface.

[0145] 602. Using the admittance algorithm, control the robotic arm to move the shaft workpiece along the second target direction until the shaft workpiece enters the hole.

[0146] In this embodiment, the second target direction is perpendicular to the first target direction, and the second target direction faces the bottom of the hole. The positioning device uses an admittance algorithm to control the robotic arm to move the shaft workpiece along the second target direction, which allows the shaft workpiece to move towards the bottom of the hole and eventually enter the hole.

[0147] Optional, Figure 7 The diagram shows a flowchart of controlling a robotic arm using an admittance algorithm. Figure 7As shown, the inputs to admittance control include the desired position, desired velocity, and desired force. A six-dimensional force sensor detects the external force acting on the workpiece along the axial direction, and gravity compensation is applied to this force to obtain the actual force acting on the workpiece along the axial direction. The desired position is the desired location in the admittance algorithm. The difference between the actual force and the desired force acting on the workpiece along the axial direction, the difference between the actual position and the desired position, and the difference between the actual velocity and the desired velocity are calculated and input to the admittance controller. The admittance controller can be understood as a computer software module that implements the admittance algorithm. Based on these three differences, the admittance controller controls the controlled object (i.e., the robotic arm) to move the workpiece in the environment. The actual position of the workpiece can be considered as its actual pose in the robotic arm's base coordinate system.

[0148] Optionally, the control principle of the admittance algorithm is expressed by the following formula:

[0149]

[0150] Among them, F e F is the external force on the shaft workpiece in the axial direction, collected by a torque sensor. e Forces in the Robot Arm Base Coordinate System (RABCS). e The difference between the desired position and the actual position of the shaft workpiece. and x e The first and second derivatives, K is the diagonal matrix of stiffness coefficients, B is the diagonal matrix of damping coefficients, and M is the diagonal matrix of inertia coefficients.

[0151] 603. If the distance the shaft workpiece moves from the chamfered plane along the axial direction of the hole reaches a third preset distance, and the torque sensor detects that the force on the shaft workpiece in the axial direction of the hole reaches the preset pressure, it is determined that the shaft workpiece and the hole are successfully assembled.

[0152] Optionally, the third preset distance is (hh′, h), where h is the depth of the hole and h′ is the height of the chamfer. When the contact point between the shaft workpiece and the chamfer plane is located near the hole opening plane, the third preset distance is approximately the depth of the hole; when the contact point between the shaft workpiece and the chamfer plane is located far from the hole opening plane, the third preset distance is approximately the depth of the hole minus the height of the chamfer. When the shaft workpiece moves from the chamfer plane along the axis of the hole to reach the third preset distance, it indicates that the shaft workpiece has contacted the bottom of the hole. Therefore, if the shaft workpiece moves from the chamfer plane along the axis of the hole to reach the third preset distance, and the torque sensor detects that the force on the shaft workpiece in the axis of the hole reaches the preset pressure, the positioning device determines that the shaft workpiece and the hole are successfully assembled.

[0153] In this embodiment, if the distance the shaft workpiece moves from the target position along the axis of the hole is less than a second preset distance, and a torque sensor detects that the shaft workpiece is under force in the first target direction, it is determined that the shaft workpiece is in contact with the chamfered plane of the hole. Therefore, an admittance algorithm can be used to control the robotic arm to move the shaft workpiece along the second target direction, causing it to move towards the bottom of the hole, and thus allowing it to enter the hole. Finally, based on the distance the shaft workpiece moves along this axis and the force acting on it in that direction, it is determined whether the shaft workpiece and the hole are successfully assembled. Specifically, if the distance the shaft workpiece moves from the chamfered plane along the axis of the hole reaches a third preset distance, and a torque sensor detects that the force acting on the shaft workpiece in the axis of the hole reaches a preset pressure, it is determined that the shaft workpiece and the hole are successfully assembled.

[0154] As an optional implementation, the positioning device also performs the following steps:

[0155] 701. If the distance the shaft workpiece moves from the target position along the axial direction of the hole is less than the second preset distance, and the torque sensor detects that the force on the shaft workpiece in the axial direction of the hole reaches the preset pressure, it is determined that the shaft workpiece is in contact with the outer peripheral plane of the hole.

[0156] In this embodiment, the outer peripheral plane of the hole is the plane on the object that is flush with the opening of the hole and located outside the opening. As mentioned above, if the distance the shaft workpiece moves from the target position along the axial direction of the hole is less than the second preset distance, it indicates that the shaft workpiece has not entered the hole or has not contacted the bottom of the hole. At this time, if the torque sensor detects that the force on the shaft workpiece in the axial direction reaches the preset pressure, it indicates that the shaft workpiece has contacted the outer peripheral plane of the hole, that is, the movement of the shaft workpiece has been hindered by the outer peripheral plane.

[0157] 702. Based on the preset hole-finding algorithm, perform hole search based on the contact points between the aforementioned shaft workpiece and the aforementioned outer peripheral plane.

[0158] The fact that the shaft workpiece is in contact with the outer peripheral plane indicates that the shaft workpiece has not yet entered the hole. Therefore, it is necessary to search for the hole in the outer peripheral plane to determine the opening of the hole, so that the shaft workpiece can enter the hole through the opening.

[0159] In this embodiment, the preset hole-finding algorithm is an algorithm for searching for holes within the outer peripheral plane. Specifically, since the opening of the hole is located within the outer peripheral plane, the preset hole-finding algorithm moves the shaft workpiece within the outer peripheral plane, thereby moving the shaft workpiece to the opening of the hole.

[0160] In one possible implementation, the preset hole-finding algorithm involves controlling a robotic arm to move the shaft workpiece within its outer peripheral plane while applying force along its axial direction. If the force on the shaft workpiece decreases along its axial direction, it is determined that the shaft workpiece has moved to the opening of the hole.

[0161] In this implementation, the shaft workpiece is subjected to force in the axial direction even if there is pressure between the shaft workpiece and the outer peripheral plane. If the shaft workpiece moves to the opening of the hole, the force on the shaft workpiece in the axial direction will decrease because there is no object in contact with the shaft workpiece at the opening of the hole or the shaft workpiece is in contact with the chamfered surface of the hole. Conversely, if the shaft workpiece does not move to the opening of the hole, the force on the shaft workpiece in the axial direction will not decrease because there is pressure between the shaft workpiece and the outer peripheral plane. Therefore, if the force on the shaft workpiece in the axial direction decreases, the positioning device determines that the shaft workpiece has moved to the opening of the hole; if the force on the shaft workpiece in the axial direction does not decrease, the positioning device determines that the shaft workpiece has not moved to the opening of the hole.

[0162] In another possible implementation, during hole searching, the positioning device uses a torque sensor to detect whether the force on the shaft workpiece in the axial direction of the hole remains at the target pressure. If the force on the shaft workpiece in the axial direction of the hole is detected to be below a preset proportion of the target pressure, and the shaft workpiece produces a downward displacement in the axial direction of the hole, the hole search is determined to be successful.

[0163] The preset ratio can be 50%, 45%, 35%, 20%, 10% or other values.

[0164] Optionally, if the force on the shaft workpiece in the axial direction of the hole is detected to be below a preset proportion of the target pressure, and the duration of the downward displacement of the shaft workpiece in the axial direction of the hole reaches a preset duration, the hole search is determined to be successful.

[0165] For example, the target pressure is 10 Newtons, the preset ratio is 20%, and the preset duration is 0.3 seconds. Then, if the positioning device detects that the force on the shaft workpiece in the axial direction of the hole is less than 10 * 20% = 2 Newtons, and the duration of the downward displacement of the shaft workpiece in the axial direction of the hole reaches 0.3 seconds, the hole search is considered successful.

[0166] In this implementation, if the force on the shaft workpiece in the axial direction is the target pressure, it indicates that there is pressure between the shaft workpiece and the outer peripheral plane, and this pressure is the target pressure. If the shaft workpiece moves to the opening of the hole, the force on the shaft workpiece in the axial direction will decrease, and a displacement in the axial direction will occur, because there is no object in contact with the shaft workpiece at the opening of the hole or the shaft workpiece is in contact with the chamfered surface of the hole. Conversely, if the shaft workpiece does not move to the opening of the hole, the force on the shaft workpiece in the axial direction will not decrease, and no displacement in the axial direction will occur, because there is a target pressure between the shaft workpiece and the outer peripheral plane. Therefore, if the force on the shaft workpiece in the axial direction is less than a preset proportion of the target pressure, it indicates that the force on the shaft workpiece in the axial direction has decreased.

[0167] Considering the possibility of recesses within the outer peripheral plane, and the axial displacement that would occur if the workpiece moves into a recess, the depth of the recess is typically shallow, resulting in a shorter time for the workpiece to move along the axial direction into the recess. Conversely, the depth of a hole is greater than that of a recess, leading to a longer time for the workpiece to move along the axial direction into the hole. Therefore, the positioning device can determine whether the workpiece enters a recess or a hole based on the duration of its axial displacement.

[0168] In this implementation, the positioning device determines whether the duration of displacement in the axial direction of the shaft workpiece is long or short based on a preset time, thereby determining whether the shaft workpiece enters a recess or a hole. Specifically, if the duration of displacement in the axial direction of the shaft workpiece is greater than or equal to the preset time, the positioning device determines that the duration of displacement in the axial direction of the shaft workpiece is long, and thus determines that the shaft workpiece has entered a hole. If the duration of displacement in the axial direction of the shaft workpiece is less than the preset time, the positioning device determines that the duration of displacement in the axial direction of the shaft workpiece is short, and thus determines that the shaft workpiece has entered a recess.

[0169] Therefore, if the force on the shaft workpiece in the axial direction of the hole is detected to be below a preset proportion of the target pressure, and the duration of the downward displacement of the shaft workpiece in the axial direction of the hole reaches a preset duration, the hole search is determined to be successful.

[0170] 703. After the hole search is successful, control the robotic arm to drive the shaft workpiece to move again along the axis of the hole.

[0171] In this embodiment, a successful hole search indicates that the shaft workpiece is located at the opening of the hole. Therefore, after a successful hole search, the positioning device controls the robotic arm to move the shaft workpiece again along the axial direction of the hole, thus allowing the shaft workpiece to enter the hole.

[0172] 704. If the distance the shaft workpiece moves from the outer peripheral plane along the axial direction of the hole reaches a fourth preset distance, and the torque sensor detects that the force on the shaft workpiece in the axial direction of the hole reaches the preset pressure, it is determined that the shaft workpiece and the hole are successfully assembled.

[0173] In this embodiment, the fourth preset distance is the depth of the hole. When the shaft workpiece moves a distance from the outer peripheral plane along the axial direction of the hole to the fourth preset distance, it indicates that the shaft workpiece has contacted the bottom of the hole. Therefore, if the shaft workpiece moves a distance from the outer peripheral plane along the axial direction of the hole to the fourth preset distance, and the torque sensor detects that the force on the shaft workpiece in the axial direction of the hole reaches a preset pressure, the positioning device determines that the shaft workpiece and the hole are successfully assembled.

[0174] In this embodiment, if the distance the shaft workpiece moves from the target position along the axis of the hole is less than a second preset distance, and the torque sensor detects that the force on the shaft workpiece in the axial direction of the hole reaches a preset pressure, it is determined that the shaft workpiece is in contact with the outer peripheral plane of the hole. Therefore, according to a preset hole-finding algorithm, a hole search is performed based on the contact point between the shaft workpiece and the outer peripheral plane. After a successful hole search, the robotic arm is controlled to move the shaft workpiece again along the axis of the hole, allowing the shaft workpiece to enter the hole. Finally, based on the distance the shaft workpiece moves along this axis and the force on the shaft workpiece in the axial direction, it is determined whether the shaft workpiece and the hole are successfully assembled. Specifically, if the distance the shaft workpiece moves from the outer peripheral plane along the axial direction of the hole reaches a fourth preset distance, and the torque sensor detects that the force on the shaft workpiece in the axial direction of the hole reaches a preset pressure, it is determined that the shaft workpiece and the hole are successfully assembled.

[0175] As an optional implementation, the positioning device performs the following steps during step 702:

[0176] 801. Determine the hole-finding area based on the contact point between the aforementioned shaft workpiece and the aforementioned outer peripheral plane.

[0177] In this embodiment, the hole-finding area is the region that may include the opening of a hole; that is, by searching for holes within the hole-finding area, the opening of a hole can be found. In one possible implementation, the positioning device defines a circular hole-finding area with a preset radius, centered on the contact point between the shaft workpiece and the outer peripheral plane. In another possible implementation, the positioning device defines a square hole-finding area with a preset side length, centered on the contact point between the shaft workpiece and the outer peripheral plane.

[0178] 802. According to the preset hole-finding algorithm, hole search is performed in the hole-finding area based on the contact point between the shaft workpiece and the outer peripheral plane.

[0179] In this embodiment, the positioning device first determines the hole-finding area based on the contact point between the shaft workpiece and the outer peripheral plane. Then, according to a preset hole-finding algorithm, it searches for holes within the hole-finding area based on the contact point between the shaft workpiece and the outer peripheral plane. This improves the efficiency of hole-finding and avoids blind hole searching. Optionally, Figure 8 The diagram shown illustrates the hole search process for a shaft workpiece within the hole-finding area. Figure 8 As shown, rectangle ABCD is the hole-finding area. During the hole search process, the shaft workpiece moves from point O (i.e., the contact point between the shaft workpiece and the outer peripheral plane) to point P within the hole-finding area along a spiral trajectory.

[0180] As an optional implementation, the positioning device performs the following steps during step 702:

[0181] 901. Determine the starting point of rotation based on the contact point between the shaft workpiece and the outer peripheral plane.

[0182] In one possible implementation, the positioning device uses the contact point between the shaft workpiece and the outer peripheral plane as the starting point of rotation.

[0183] In another possible implementation, the positioning device obtains the contact position of the contact point between the shaft workpiece and the outer peripheral plane, and determines the position of the rotation starting point by summing the contact position with a first preset displacement. The rotation starting point is then determined based on its position.

[0184] 902. Control the robotic arm to drive the shaft workpiece to perform hole search along the first equidistant spiral trajectory in the outer peripheral plane starting from the rotation starting point.

[0185] The positioning device, by executing step 902, causes the workpiece to move along a first equidistant helical trajectory within its outer peripheral plane. Optionally, the pitch of the first equidistant helical trajectory depends on the diameter of the hole, and the pitch is smaller than the diameter of the hole. For example, the pitch is 90%, 80%, 70%, or other values ​​of the hole diameter. For instance, if the diameter of the hole is 1 cm, then the pitch of the first equidistant helical trajectory is 9 mm.

[0186] In this embodiment, the positioning device controls the robotic arm to drive the shaft workpiece to perform hole search along a first equidistant spiral trajectory in the outer peripheral plane, which can improve the hole search efficiency.

[0187] As an optional implementation, the positioning device also performs one of the following steps:

[0188] 1001. If no hole is found, control the robotic arm to drive the shaft workpiece to move along the second equidistant spiral trajectory in the outer peripheral plane to search for the hole again.

[0189] In this embodiment, the first equidistant spiral trajectory is different from the second equidistant spiral trajectory. Optionally, the first equidistant spiral trajectory and the second equidistant spiral trajectory differ in at least one of the following: different pitch, different rotation direction, different initial rotation angle, and different rotation starting point.

[0190] For example, the pitch of the first equidistant helical trajectory is 1.2 mm, and the pitch of the second equidistant helical trajectory is 1 mm. In this case, the pitches of the first and second equidistant helical trajectories are different. As another example, the rotation direction of the first equidistant helical trajectory is clockwise, and the rotation direction of the second equidistant helical trajectory is counterclockwise. In this case, the rotation directions of the first and second equidistant helical trajectories are different. Alternatively, the rotation direction of the first equidistant helical trajectory is counterclockwise, and the rotation direction of the second equidistant helical trajectory is clockwise. In this case, the rotation directions of the first and second equidistant helical trajectories are different. Figure 9 The diagram shows the movement trajectory of a shaft workpiece along an equidistant spiral line in a clockwise direction within its outer peripheral plane. Figure 10 The diagram shows a shaft workpiece moving along an equidistant spiral trajectory in a counterclockwise direction within its outer peripheral plane.

[0191] The initial rotation angle (phase) of the first equidistant helical trajectory can be different from the initial rotation angle of the second equidistant helical trajectory, for example, Figure 11 The diagram shows another type of shaft workpiece moving along an equidistant spiral trajectory in a clockwise direction within its outer peripheral plane. Figure 9 The initial rotation angle of the equidistant spiral trajectory shown is... Figure 11 The initial rotation angles of the equidistant spiral trajectories shown are different; the first equidistant spiral trajectory can be... Figure 9 The equidistant spiral trajectory shown can be the second equidistant spiral trajectory. Figure 11 The equidistant spiral trajectory is shown.

[0192] When the starting point of rotation of the first equidistant spiral motion trajectory is different from the starting point of rotation of the second equidistant spiral motion trajectory, the starting point of rotation of the second equidistant spiral motion trajectory can be preset, or it can be determined based on the starting point of rotation of the first equidistant spiral motion trajectory. Alternatively, the starting point of rotation of the second equidistant spiral motion trajectory can be the contact point when the shaft workpiece contacts the outer peripheral plane, after the robotic arm is re-controlled to move from the target position along the axial direction toward the hole.

[0193] If no hole is found, the positioning device controls the robotic arm to move the workpiece along a second equidistant spiral trajectory within the outer peripheral plane to search for the hole again, thus identifying the hole from within the outer peripheral plane. By repeatedly changing the hole search trajectory in this way, the success rate of hole finding can be improved.

[0194] 1002. If the distance the shaft workpiece moves from the outer peripheral plane along the axial direction of the hole reaches the fourth preset distance, and the force on the shaft workpiece in the axial direction of the hole does not reach the preset pressure, control the robotic arm to drive the shaft workpiece to perform hole search again along the second equidistant spiral trajectory in the outer peripheral plane.

[0195] If the workpiece moves a distance from the outer peripheral plane along the axis of the hole to the fourth preset distance, and the force exerted on the workpiece along the axis of the hole does not reach the preset pressure, it indicates that the workpiece may have moved outside the outer peripheral plane, meaning it has not come into contact with the object including the hole. Alternatively, it indicates that the workpiece has entered a hole deeper than the hole to be located. In this case, it means that the hole search performed according to the first equidistant spiral trajectory did not find the correct hole. Therefore, the workpiece needs to be moved within the outer peripheral plane along a trajectory different from the first equidistant spiral trajectory to perform the hole search again. By repeatedly changing the hole search trajectory in this way, the success rate of the hole search can be improved.

[0196] The positioning device controls the robotic arm to drive the shaft workpiece to perform hole search again along the second equidistant spiral trajectory in the outer peripheral plane. Specifically, the positioning device controls the robotic arm to drive the shaft workpiece to perform hole search along the second equidistant spiral trajectory in the outer peripheral plane, so that the movement trajectory of the end of the shaft workpiece in the outer peripheral plane is the second equidistant spiral trajectory.

[0197] 1003. If the force on the shaft workpiece in the axial direction of the hole reaches the preset pressure, and the distance the shaft workpiece moves from the outer peripheral plane along the axial direction of the hole is less than the fourth preset distance, control the robotic arm to drive the shaft workpiece to perform hole search again along the second equidistant spiral trajectory in the outer peripheral plane.

[0198] If the force exerted on the shaft workpiece along the axial direction of the hole reaches the preset pressure, and the distance the shaft workpiece moves from the outer peripheral plane along the axial direction of the hole is less than the fourth preset distance, it indicates that the shaft workpiece may have moved outside the outer peripheral plane and come into contact with an object outside the outer peripheral plane, meaning that the object outside the outer peripheral plane is hindering the movement of the shaft workpiece. Alternatively, it indicates that the shaft workpiece has entered a hole shallower than the hole to be located. In this case, it means that the hole search performed according to the first equidistant spiral motion trajectory did not find the correct hole. Therefore, the shaft workpiece needs to be moved within the outer peripheral plane along a trajectory different from the first equidistant spiral motion trajectory to perform the hole search again. By changing the hole search trajectory multiple times in the above manner, the success rate of hole search can be improved.

[0199] Therefore, the positioning device controls the robotic arm to drive the shaft workpiece to perform hole search again along the second equidistant spiral trajectory in the outer peripheral plane. Specifically, the positioning device controls the robotic arm to drive the shaft workpiece to perform hole search along the second equidistant spiral trajectory in the outer peripheral plane, so that the movement trajectory of the end of the shaft workpiece in the outer peripheral plane is the second equidistant spiral trajectory.

[0200] As an optional implementation, the positioning device performs the following steps during step 702:

[0201] 1101. Determine the scanning start point based on the contact point between the shaft workpiece and the outer peripheral plane.

[0202] In one possible implementation, the positioning device uses the contact point between the shaft workpiece and the outer peripheral plane as the scanning starting point.

[0203] In another possible implementation, the positioning device obtains the contact position of the contact point between the shaft workpiece and the outer peripheral plane, and determines the position of the scanning start point by summing the contact position with a second preset displacement. The scanning start point is then determined based on its position.

[0204] 1102. Control the robotic arm to drive the shaft workpiece to perform hole search along the first horizontal scanning trajectory in the outer peripheral plane starting from the scanning start point.

[0205] In this embodiment, the first horizontal scanning trajectory, i.e., the movement trajectory of the shaft workpiece in the outer peripheral plane, is a horizontal movement row by row or column by column. For example... Figure 12 The image shows the movement trajectory of the shaft workpiece as it moves line by line along the first horizontal scanning path within the outer peripheral plane. For example... Figure 12 As shown, the trajectory of the shaft workpiece moving along the first horizontal scanning trajectory is from point O to point P.

[0206] As an optional implementation, the positioning device also performs one of the following steps:

[0207] 1201. If no hole is found, control the robotic arm to drive the shaft workpiece to perform hole search again along the second horizontal scanning trajectory in the outer peripheral plane.

[0208] In this embodiment, the first horizontal scanning trajectory and the second horizontal scanning trajectory are different. Optionally, the first horizontal scanning trajectory and the second horizontal scanning trajectory have at least one of the following differences: different scanning starting points, different scanning intervals, and different scanning directions. The scanning starting point is the position where the scanning begins, and the scanning interval is the distance between two adjacent trajectory lines in the horizontal direction (such as row spacing or column spacing). The scanning direction includes the horizontal scanning direction. For example, the first horizontal scanning direction scans from east to west, then from west to east, and so on, until the scanning is completed. The second horizontal scanning direction scans from west to east, then from east to west, and so on, until the scanning is completed. Another example is that the first horizontal scanning direction scans row by row, and the second horizontal scanning direction scans column by column.

[0209] If no hole is found during the hole search along the first horizontal scanning trajectory in the outer peripheral plane, the workpiece is then searched again along a second horizontal scanning trajectory, different from the first. By repeatedly changing the hole search trajectory in this way, the success rate of hole searching can be improved.

[0210] 1202. If the distance the shaft workpiece moves from the outer peripheral plane along the axial direction of the hole reaches the fourth preset distance, and the force on the shaft workpiece in the axial direction of the hole does not reach the preset pressure, control the robotic arm to drive the shaft workpiece to perform hole search again along the second horizontal scanning trajectory in the outer peripheral plane.

[0211] If the workpiece moves a distance from the outer peripheral plane along the axis of the hole to the fourth preset distance, and the force exerted on the workpiece along the axis of the hole does not reach the preset pressure, it indicates that the workpiece may have moved outside the outer peripheral plane, meaning it has not come into contact with the object including the hole. Alternatively, it indicates that the workpiece has entered a hole deeper than the hole to be located. In this case, it means that the hole search along the first horizontal scanning trajectory did not find the correct hole. Therefore, the workpiece is moved within the outer peripheral plane along a second horizontal scanning trajectory different from the first horizontal scanning trajectory to perform the hole search again. By changing the hole search trajectory multiple times in this way, the success rate of hole search can be improved.

[0212] 1203. If the force on the shaft workpiece in the axial direction of the hole reaches the preset pressure, and the distance the shaft workpiece moves from the outer peripheral plane along the axial direction of the hole is less than the fourth preset distance, control the robotic arm to drive the shaft workpiece to perform hole search again along the second horizontal scanning trajectory in the outer peripheral plane.

[0213] If the force exerted on the shaft workpiece along the axial direction of the hole reaches a preset pressure, and the distance the shaft workpiece moves from the outer peripheral plane along the axial direction of the hole is less than a fourth preset distance, it indicates that the shaft workpiece may have moved outside the outer peripheral plane and come into contact with an object outside the outer peripheral plane, meaning that the object outside the outer peripheral plane is obstructing the movement of the shaft workpiece. Alternatively, it indicates that the shaft workpiece has entered a hole shallower than the hole to be positioned. In this case, it means that the hole search performed according to the first horizontal scanning trajectory did not find the correct hole, so the shaft workpiece needs to be re-searched for the hole in the outer peripheral plane using a different method than the first horizontal scanning trajectory. Therefore, the positioning device controls the robotic arm to move the shaft workpiece to re-search for the hole in the outer peripheral plane using a second horizontal scanning trajectory. By changing the hole search trajectory multiple times in the above manner, the success rate of hole search can be improved.

[0214] Based on the technical solution provided in the embodiments of this application, this application also provides an application scenario for hole positioning. In this scenario, a robotic arm is connected to a shaft workpiece, and the movement of the robotic arm can drive the movement of the shaft workpiece. A torque sensor is mounted on the robotic arm, which can detect the external force acting on the shaft workpiece. The object containing the hole is placed on a horizontal surface, the plane containing the hole opening is parallel to the horizontal surface, and the axial direction of the hole is perpendicular to the hole opening surface, that is, the axial direction is vertical. The teaching position of the bottom of the hole is called the correction point.

[0215] Figure 13 A flowchart illustrating another method for locating holes is shown. Figure 13 As shown, the desired position (the point to be corrected, as described above) is input into the positioning device, and then the positioning device enters the positioning process. Specifically, the robotic arm is controlled to move the shaft workpiece above the point to be corrected (the target position mentioned above). Optionally, the end of the shaft workpiece is positioned at a first preset distance (e.g., 10 mm) directly above the point to be corrected by controlling the robotic arm to move the shaft workpiece vertically downwards until the force on the shaft workpiece in the vertical direction reaches a preset pressure, at which point the movement stops. The positioning device combines the current position of the shaft workpiece with the force to determine whether the shaft workpiece has entered the hole. Specifically, based on the current position of the shaft workpiece, it is determined whether the displacement of the shaft workpiece in the vertical direction has reached a second preset distance.

[0216] If the vertical displacement of the shaft workpiece reaches the second preset distance, it indicates that the shaft workpiece has entered the hole. If the vertical displacement of the shaft workpiece is less than the second preset distance, it indicates that the shaft workpiece has not entered the hole. The robotic arm is then controlled to move the shaft workpiece under a preset pressure in the vertical direction, searching for the hole by moving it along a first equidistant spiral trajectory within the outer peripheral plane. The current position and force of the shaft workpiece are then used to determine whether it has entered the hole. If the distance the shaft workpiece moves from the outer peripheral plane along the hole's axis reaches the fourth preset distance, and the force on the shaft workpiece in the hole's axis direction does not reach the preset pressure, it is determined that the shaft workpiece has not entered the correct hole. If the force on the shaft workpiece in the hole's axis direction reaches the preset pressure, and the distance the shaft workpiece moves from the outer peripheral plane along the hole's axis direction is less than the fourth preset distance, it is determined that the shaft workpiece has not entered the correct hole.

[0217] If it is determined that the shaft workpiece has not entered the hole, the direction of the first equidistant spiral motion trajectory and the pressure on the shaft workpiece in the vertical direction are adjusted, and the hole-finding process is restarted. If it is determined that the shaft workpiece has entered the hole, the admittance algorithm controls the robotic arm to move the shaft workpiece vertically downward until the force on the shaft workpiece in the vertical direction reaches the preset pressure and then the movement stops. At this time, the current position and force of the shaft workpiece are combined to determine whether the shaft workpiece has been successfully assembled with the hole. Specifically, if the vertical displacement of the shaft workpiece from the target position reaches the second preset distance, and the force on the shaft workpiece in the axial direction reaches the preset pressure, it is determined that the shaft workpiece has been successfully assembled with the hole. Then, the current position of the shaft workpiece, that is, the current pose of the shaft workpiece, is output, and the actual position of the hole is determined based on the current pose.

[0218] The technical solution of this application enables rapid correction of hole positions and is applicable to scenarios such as replacement of robotic arms, replacement of robotic arm end effectors, or installation errors between devices. Compared with traditional manual teaching, it saves time and manpower costs. Furthermore, the use of a six-dimensional force sensor results in higher positional accuracy than manual teaching. In addition, detecting the force on the workpiece in multiple dimensions using a six-dimensional force sensor also prevents misjudgments.

[0219] This application also provides a shaft hole assembly method based on a robotic arm. Please refer to [link to relevant documentation]. Figure 14 , Figure 14 This is a flowchart illustrating the shaft and hole assembly method based on a robotic arm provided in an embodiment of this application.

[0220] 1401. Obtain the actual position of the target hole using a hole positioning method based on a robotic arm.

[0221] Specifically, the shaft hole assembly device based on the robotic arm can obtain the actual position of the target hole using the hole positioning method of the robotic arm described above.

[0222] 1402. Based on the actual position mentioned above, control the robotic arm to drive the target shaft workpiece to complete the assembly with the target hole mentioned above.

[0223] In this embodiment, the target shaft workpiece is a shaft workpiece that matches the target hole, meaning the target shaft workpiece can be assembled into the target hole. The robotic arm-based shaft-hole assembly device uses the actual position of the target hole as the desired position and controls the robotic arm to move the target shaft workpiece toward the hole, thus completing the assembly of the target shaft workpiece and the target hole. For example, if the target shaft workpiece is a test tube and the target hole is a test tube placement hole, by determining the actual position of the test tube placement hole, the test tube can be accurately placed inside the hole.

[0224] In this application, the shaft hole assembly device based on a robotic arm utilizes the hole positioning method of the robotic arm described above to obtain the actual position of the target hole, thereby improving the efficiency of determining the actual position of the target hole. After determining the actual position of the target hole, the robotic arm can drive the target shaft workpiece to complete the assembly with the target hole according to the actual position of the target hole, thereby improving the assembly efficiency of the target shaft workpiece and the target hole.

[0225] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0226] The methods of the embodiments of this application have been described in detail above, and the apparatus of the embodiments of this application is provided below.

[0227] Please see Figure 15 , Figure 15 This is a schematic diagram of a hole positioning device 1 based on a robotic arm, provided in an embodiment of this application. The end of the robotic arm is fixed with a torque sensor and a shaft workpiece. The positioning device 1 includes: an acquisition unit 11, a control unit 12, and a determination unit 13. Specifically:

[0228] Acquisition unit 11 is used to acquire the desired position of the hole to be located;

[0229] Control unit 12 is used to control the robotic arm to move the shaft workpiece to the target position according to the desired position, wherein the target position and the desired position are spaced apart by a first preset distance in the axial direction of the hole;

[0230] The control unit 12 is also used to control the robotic arm to move the shaft workpiece from the target position toward the hole along the axial direction of the hole;

[0231] The determining unit 13 is configured to determine that the shaft workpiece is successfully assembled with the hole if the shaft workpiece moves a distance from the target position along the axial direction of the hole to a second preset distance, and the torque sensor detects that the force on the shaft workpiece in the axial direction of the hole reaches a preset pressure; wherein the second preset distance is greater than or equal to the first preset distance.

[0232] The determining unit 13 is also used to obtain the current assembly pose of the shaft workpiece and to determine the actual position of the hole based on the current assembly pose.

[0233] In any embodiment of this application, the desired position is the position of the bottom of the hole, the second preset distance is equal to the first preset distance, and the first preset distance is greater than the depth of the hole.

[0234] In any embodiment of this application, the desired position is the position of the opening of the hole, the second preset distance is greater than the first preset distance, and the second preset distance is equal to the sum of the first preset distance and the depth of the hole.

[0235] In conjunction with any embodiment of this application, the determining unit 13 is further configured to determine that the shaft workpiece is in contact with the chamfered plane of the hole if the moving distance of the shaft workpiece from the target position along the axial direction of the hole is less than the second preset distance, and the torque sensor detects that the shaft workpiece is under force in the first target direction;

[0236] The control unit 12 is also used to control the robotic arm to move the shaft workpiece along the second target direction using an admittance algorithm until the shaft workpiece enters the hole;

[0237] The determining unit 13 is further configured to determine that the shaft workpiece and the hole are successfully assembled if the distance the shaft workpiece moves from the chamfered plane along the axial direction of the hole reaches a third preset distance, and the torque sensor detects that the force on the shaft workpiece in the axial direction of the hole reaches the preset pressure.

[0238] Wherein, the first target direction is at a preset angle to the axis of the hole, and the first target direction is perpendicular to the chamfer plane; the second target direction is perpendicular to the first target direction, and the second target direction faces the bottom side of the hole.

[0239] In conjunction with any embodiment of this application, the determining unit 13 is further configured to determine that the shaft workpiece is in contact with the outer peripheral plane of the hole if the moving distance of the shaft workpiece from the target position along the axial direction of the hole is less than the second preset distance, and the torque sensor detects that the force on the shaft workpiece in the axial direction of the hole reaches the preset pressure.

[0240] The control unit 12 is also used to perform hole search based on the contact point between the shaft workpiece and the outer peripheral plane according to a preset hole-finding algorithm;

[0241] The control unit 12 is also used to control the robotic arm to move the shaft workpiece along the axis of the hole again after the hole search is successful.

[0242] The determining unit 13 is further configured to determine that the shaft workpiece and the hole are successfully assembled if the distance the shaft workpiece moves from the outer peripheral plane along the axial direction of the hole reaches a fourth preset distance, and the torque sensor detects that the force on the shaft workpiece in the axial direction of the hole reaches the preset pressure.

[0243] In any embodiment of this application, the control unit 12 is configured to:

[0244] The hole-finding area is determined based on the contact point between the shaft workpiece and the outer peripheral plane;

[0245] According to the preset hole-finding algorithm, hole searching is performed in the hole-finding area based on the contact point between the shaft workpiece and the outer peripheral plane.

[0246] In any embodiment of this application, the control unit 12 is configured to:

[0247] The starting point of rotation is determined based on the contact point between the shaft workpiece and the outer peripheral plane;

[0248] The robotic arm is controlled to drive the shaft workpiece to perform hole search in the outer peripheral plane along a first equidistant spiral trajectory, starting from the rotation starting point.

[0249] In conjunction with any embodiment of this application, the control unit 12 is further configured to:

[0250] If no hole is found, the robotic arm is controlled to move the shaft workpiece along a second equidistant spiral trajectory within the outer peripheral plane to search for the hole again; or...

[0251] If the distance the shaft workpiece moves from the outer peripheral plane along the axial direction of the hole reaches the fourth preset distance, and the force on the shaft workpiece in the axial direction of the hole does not reach the preset pressure, the robotic arm is controlled to drive the shaft workpiece to perform hole searching again along the second equidistant spiral trajectory in the outer peripheral plane; or,

[0252] If the force exerted on the shaft workpiece in the axial direction of the hole reaches the preset pressure, and the distance the shaft workpiece moves from the outer peripheral plane along the axial direction of the hole is less than the fourth preset distance, the robotic arm is controlled to drive the shaft workpiece to perform hole search again along the second equidistant spiral trajectory in the outer peripheral plane.

[0253] The trajectory of the first equidistant spiral is different from that of the second equidistant spiral.

[0254] In any embodiment of this application, the pitch of the first equidistant spiral trajectory is different from the pitch of the second equidistant spiral trajectory; and / or, the rotation direction of the first equidistant spiral trajectory is different from the rotation direction of the second equidistant spiral trajectory; and / or, the starting rotation angle of the first equidistant spiral trajectory is different from the starting rotation angle of the second equidistant spiral trajectory; and / or, the rotation starting point of the first equidistant spiral trajectory is different from the rotation starting point of the second equidistant spiral trajectory.

[0255] In any embodiment of this application, the control unit 12 is configured to:

[0256] The scanning start point is determined based on the contact point between the shaft workpiece and the outer peripheral plane;

[0257] The robotic arm is controlled to drive the shaft workpiece to perform hole search in the outer peripheral plane along a first horizontal scanning trajectory, starting from the scanning start point.

[0258] In conjunction with any embodiment of this application, the control unit 12 is further configured to:

[0259] If no hole is found, the robotic arm is controlled to move the shaft workpiece along the second horizontal scanning trajectory within the outer peripheral plane to search for the hole again; or...

[0260] If the distance the shaft workpiece moves from the outer peripheral plane along the axial direction of the hole reaches the fourth preset distance, and the force on the shaft workpiece in the axial direction of the hole does not reach the preset pressure, the robotic arm is controlled to drive the shaft workpiece to perform hole searching again along the second horizontal scanning trajectory in the outer peripheral plane; or,

[0261] If the force exerted on the shaft workpiece in the axial direction of the hole reaches the preset pressure, and the distance the shaft workpiece moves from the outer peripheral plane along the axial direction of the hole is less than the fourth preset distance, the robotic arm is controlled to drive the shaft workpiece to perform hole search again in the outer peripheral plane along the second horizontal scanning trajectory.

[0262] The first horizontal scanning trajectory and the second horizontal scanning trajectory have at least one of the following differences: different scanning starting points, different scanning spacing, and different scanning directions.

[0263] In any embodiment of this application, the control unit 12 is configured to:

[0264] During hole search, the torque sensor is used to detect whether the force on the shaft workpiece in the axial direction of the hole remains at the target pressure;

[0265] If the force on the shaft workpiece in the axial direction of the hole is detected to be below a preset proportion of the target pressure, and the shaft workpiece produces a downward displacement in the axial direction of the hole, the hole search is determined to be successful.

[0266] In this embodiment, after obtaining the desired position of the hole to be positioned, the positioning device controls the robotic arm to move the shaft workpiece to the target position based on the desired position. Then, the robotic arm controls the shaft workpiece to move from the target position towards the hole along the axial direction of the hole. Based on the distance the shaft workpiece moves along the axial direction and the force acting on the shaft workpiece in the axial direction, it is determined whether the shaft workpiece and the hole are successfully assembled. Specifically, if the distance the shaft workpiece moves from the target position along the axial direction of the hole reaches a second preset distance, and the torque sensor detects that the force acting on the shaft workpiece in the axial direction of the hole reaches a preset pressure, it is determined that the shaft workpiece and the hole are successfully assembled. The second preset distance is greater than or equal to the first preset distance. Finally, if the shaft workpiece and the hole are successfully assembled, the actual position of the hole can be determined based on the current assembly posture of the shaft workpiece.

[0267] Please see Figure 16 , Figure 16 This application provides a schematic diagram of a shaft hole assembly device 2 based on a robotic arm, comprising: a receiving unit 21 and a control unit 22. Specifically:

[0268] The obtaining unit 21 is used to obtain the actual position of the target hole using a hole positioning method based on a robotic arm;

[0269] The control unit 22 is used to control the robotic arm to drive the target shaft workpiece to complete the assembly with the target hole according to the actual position.

[0270] In this application, the shaft hole assembly device based on a robotic arm utilizes the hole positioning method of the robotic arm described above to obtain the actual position of the target hole, thereby improving the efficiency of determining the actual position of the target hole. After determining the actual position of the target hole, the robotic arm can drive the target shaft workpiece to complete the assembly with the target hole according to the actual position of the target hole, thereby improving the assembly efficiency of the target shaft workpiece and the target hole.

[0271] In some embodiments, the functions or modules of the apparatus provided in this application can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0272] Figure 17 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. The electronic device 3 includes a processor 31 and a memory 32. Optionally, the electronic device 3 also includes an input device 33 and an output device 34. The processor 31, memory 32, input device 33, and output device 34 are coupled together via connectors, which include various interfaces, transmission lines, or buses, etc., and are not limited in this embodiment. It should be understood that in the various embodiments of this application, coupling refers to mutual connection in a specific way, including direct connection or indirect connection through other devices, such as through various interfaces, transmission lines, buses, etc.

[0273] Processor 31 may include one or more processors, such as one or more CPUs. If the processor is a CPU, it may be a single-core CPU or a multi-core CPU. Optionally, processor 31 may be a processor group composed of multiple GPUs, with the multiple processors coupled to each other via one or more buses. Optionally, the processor may also be other types of processors, etc., which are not limited in this embodiment.

[0274] The memory 32 can be used to store computer program instructions, as well as various types of computer program code, including program code for executing the present application. Optionally, the memory includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or compact disc read-only memory (CD-ROM), which is used for related instructions and data. When the computer program instructions are processed by the processor 31, the processor 31 can execute any of the above-described robotic arm-based hole positioning method or robotic arm-based shaft hole assembly method.

[0275] Input device 33 is used to input data and / or signals, and output device 34 is used to output data and / or signals. Input device 33 and output device 34 can be independent devices or an integrated device.

[0276] It is understood that in this embodiment of the application, the memory 32 can be used not only to store related instructions, but also to store related data. This embodiment of the application does not limit the specific data stored in the memory.

[0277] Understandable, Figure 17 This is merely a simplified design of an electronic device. In practical applications, the electronic device may also include other necessary components, including, but not limited to, any number of input / output devices, processors, memories, etc., and all electronic devices that can implement the embodiments of this application are within the protection scope of this application.

[0278] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0279] Those skilled in the art will readily understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. Those skilled in the art will also readily understand that the various embodiments of this application have different focuses, and for the sake of convenience and brevity, the same or similar parts may not be repeated in different embodiments. Therefore, parts not described or not described in detail in one embodiment can be referred to the descriptions in other embodiments.

[0280] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0281] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0282] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0283] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., Digital Versatile Discs (DVDs)), or semiconductor media (e.g., Solid State Disks (SSDs)).

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

Claims

1. A hole positioning method based on a robotic arm, characterized in that, The end effector of the robotic arm has a torque sensor and a shaft workpiece fixed to it; the method includes: Obtain the desired location of the hole to be located; According to the desired position, the robotic arm is controlled to move the shaft workpiece to the target position, and the target position and the desired position are spaced apart by a first preset distance in the axial direction of the hole; Control the robotic arm to move the shaft workpiece from the target position toward the hole along the axial direction of the hole; If the shaft workpiece moves a distance from the target position along the axial direction of the hole to a second preset distance, and the torque sensor detects that the force on the shaft workpiece in the axial direction of the hole reaches a preset pressure, it is determined that the shaft workpiece and the hole are successfully assembled; wherein, the second preset distance is greater than or equal to the first preset distance; The current assembly pose of the shaft workpiece is obtained, and the actual position of the hole is determined based on the current assembly pose.

2. The method according to claim 1, characterized in that, The desired position is the position of the bottom of the hole, the second preset distance is equal to the first preset distance, and the first preset distance is greater than the depth of the hole.

3. The method according to claim 1, characterized in that, The desired position is the position of the opening of the hole, the second preset distance is greater than the first preset distance, and the second preset distance is equal to the sum of the first preset distance and the depth of the hole.

4. The method according to any one of claims 1-3, characterized in that, The method further includes: If the distance the shaft workpiece moves from the target position along the axial direction of the hole is less than the second preset distance, and the torque sensor detects that the shaft workpiece is under force in the first target direction, it is determined that the shaft workpiece is in contact with the chamfered plane of the hole; The admittance algorithm is used to control the robotic arm to move the shaft workpiece along the second target direction until the shaft workpiece enters the hole; If the shaft workpiece moves a distance from the chamfered plane along the axial direction of the hole to a third preset distance, and the torque sensor detects that the force on the shaft workpiece in the axial direction of the hole reaches the preset pressure, it is determined that the shaft workpiece and the hole are successfully assembled. Wherein, the first target direction is at a preset angle to the axis of the hole, and the first target direction is perpendicular to the chamfer plane; the second target direction is perpendicular to the first target direction, and the second target direction faces the bottom side of the hole.

5. The method according to any one of claims 1-3, characterized in that, The method further includes: If the distance the shaft workpiece moves from the target position along the axial direction of the hole is less than the second preset distance, and the torque sensor detects that the force on the shaft workpiece in the axial direction of the hole reaches the preset pressure, it is determined that the shaft workpiece is in contact with the outer peripheral plane of the hole. According to the preset hole-finding algorithm, hole search is performed based on the contact point between the shaft workpiece and the outer peripheral plane; After the hole search is successful, the robotic arm is controlled to move the shaft workpiece again along the axis of the hole. If the shaft workpiece moves a distance from the outer peripheral plane along the axial direction of the hole to a fourth preset distance, and the torque sensor detects that the force on the shaft workpiece in the axial direction of the hole reaches the preset pressure, it is determined that the shaft workpiece and the hole are successfully assembled.

6. The method according to claim 5, characterized in that, The step of searching for holes based on the contact points between the shaft workpiece and the outer peripheral plane according to a preset hole-finding algorithm includes: The hole-finding area is determined based on the contact point between the shaft workpiece and the outer peripheral plane; According to the preset hole-finding algorithm, hole searching is performed in the hole-finding area based on the contact point between the shaft workpiece and the outer peripheral plane.

7. The method according to claim 5, characterized in that, The step of searching for holes based on the contact points between the shaft workpiece and the outer peripheral plane according to a preset hole-finding algorithm includes: The starting point of rotation is determined based on the contact point between the shaft workpiece and the outer peripheral plane; The robotic arm is controlled to drive the shaft workpiece to perform hole search in the outer peripheral plane along a first equidistant spiral trajectory, starting from the rotation starting point.

8. The method according to claim 7, characterized in that, The method further includes: If no hole is found, the robotic arm is controlled to move the shaft workpiece along a second equidistant spiral trajectory within the outer peripheral plane to search for the hole again; or... If the distance the shaft workpiece moves from the outer peripheral plane along the axial direction of the hole reaches the fourth preset distance, and the force on the shaft workpiece in the axial direction of the hole does not reach the preset pressure, the robotic arm is controlled to drive the shaft workpiece to perform hole searching again along the second equidistant spiral trajectory in the outer peripheral plane; or, If the force exerted on the shaft workpiece in the axial direction of the hole reaches the preset pressure, and the distance the shaft workpiece moves from the outer peripheral plane along the axial direction of the hole is less than the fourth preset distance, the robotic arm is controlled to drive the shaft workpiece to perform hole search again in the outer peripheral plane along the second equidistant spiral trajectory; wherein, the first equidistant spiral trajectory is different from the second equidistant spiral trajectory.

9. The method according to claim 8, characterized in that, The pitch of the first equidistant spiral trajectory is different from the pitch of the second equidistant spiral trajectory; and / or, the rotation direction of the first equidistant spiral trajectory is different from the rotation direction of the second equidistant spiral trajectory; and / or, the starting rotation angle of the first equidistant spiral trajectory is different from the starting rotation angle of the second equidistant spiral trajectory; and / or, the rotation starting point of the first equidistant spiral trajectory is different from the rotation starting point of the second equidistant spiral trajectory.

10. The method according to claim 5, characterized in that, The step of searching for holes based on the contact points between the shaft workpiece and the outer peripheral plane according to a preset hole-finding algorithm includes: The scanning start point is determined based on the contact point between the shaft workpiece and the outer peripheral plane; The robotic arm is controlled to drive the shaft workpiece to perform hole search in the outer peripheral plane along a first horizontal scanning trajectory, starting from the scanning start point.

11. The method according to claim 10, characterized in that, The method further includes: If no hole is found, the robotic arm is controlled to move the shaft workpiece along the second horizontal scanning trajectory within the outer peripheral plane to search for the hole again; or... If the distance the shaft workpiece moves from the outer peripheral plane along the axial direction of the hole reaches the fourth preset distance, and the force on the shaft workpiece in the axial direction of the hole does not reach the preset pressure, the robotic arm is controlled to drive the shaft workpiece to perform hole searching again along the second horizontal scanning trajectory in the outer peripheral plane; or, If the force exerted on the shaft workpiece in the axial direction of the hole reaches the preset pressure, and the distance the shaft workpiece moves from the outer peripheral plane along the axial direction of the hole is less than the fourth preset distance, the robotic arm is controlled to drive the shaft workpiece to perform hole search again in the outer peripheral plane along the second horizontal scanning trajectory. The first horizontal scanning trajectory and the second horizontal scanning trajectory have at least one of the following differences: different scanning starting points, different scanning spacing, and different scanning directions.

12. The method according to claim 5, characterized in that, The hole search was successful, including: During hole search, the torque sensor is used to detect whether the force on the shaft workpiece in the axial direction of the hole remains at the target pressure; If the force on the shaft workpiece in the axial direction of the hole is detected to be below a preset proportion of the target pressure, and the shaft workpiece produces a downward displacement in the axial direction of the hole, the hole search is determined to be successful.

13. A shaft hole assembly method based on a robotic arm, characterized in that, include: The actual location of the target hole is obtained by using the method according to any one of claims 1-12; Based on the actual position, the robotic arm is controlled to drive the target shaft workpiece to complete the assembly with the target hole.

14. A hole positioning device based on a robotic arm, characterized in that, The end of the robotic arm is fixed with a torque sensor and a shaft workpiece; the positioning device includes: The acquisition unit is used to acquire the desired position of the hole to be located; The control unit is used to control the robotic arm to move the shaft workpiece to the target position according to the desired position, wherein the target position and the desired position are spaced apart by a first preset distance in the axial direction of the hole; The control unit is also used to control the robotic arm to move the shaft workpiece from the target position toward the hole along the axial direction of the hole; The determining unit is configured to determine that the shaft workpiece is successfully assembled with the hole if the distance the shaft workpiece moves from the target position along the axial direction of the hole reaches a second preset distance, and the torque sensor detects that the force on the shaft workpiece in the axial direction of the hole reaches a preset pressure; wherein the second preset distance is greater than or equal to the first preset distance. The determining unit is further configured to acquire the current assembly pose of the shaft workpiece and determine the actual position of the hole based on the current assembly pose of the shaft workpiece.

15. A shaft hole assembly device based on a robotic arm, characterized in that, The shaft hole assembly device includes: A receiving unit is used to obtain the actual position of the target hole using the method described in any one of claims 1-12; The control unit is used to control the robotic arm to drive the target shaft workpiece to complete the assembly with the target hole according to the actual position.

16. An electronic device, characterized in that, include: A processor and a memory, the memory being used to store computer program code, the computer program code including computer instructions, wherein, when the processor executes the computer instructions, the electronic device performs the method as described in any one of claims 1 to 13.

17. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 13.