ROBOT ARM OBSTACLE AVOIDANCE METHOD AND ROBOT ARM OBSTACLE AVOIDANCE SYSTEM

20230061855 · 2023-03-02

    Inventors

    Cpc classification

    International classification

    Abstract

    An obstacle avoidance method for a robot arm is provided, including a modeling step, a collecting and evaluating coordinates step, an obtaining control parameter step, an establishing an occupation function step, and a finding an obstacle avoiding posture step. The present invention pre-stores the data obtained in performing the modeling step, the step of collecting and evaluating coordinates, the step of obtaining control parameter, and the step of establishing the occupation function into a database, thereby allowing the robot arm to quickly evaluate whether a collision behavior will occur in subsequent execution of a task. If a collision will occur, the robot arm executes the step of the finding the obstacle avoiding posture to dodge obstacles. The invention uses a non-contact approach for anti-collision design, which can improve the shortcomings faced by the existing contact type anti-collision design.

    Claims

    1. An robot arm obstacle avoidance method, applicable to a robot arm with a plurality of joints and a plurality of connecting arms respectively connected to different joints, robot arm obstacle avoidance method comprising: a modeling step, to construct the connecting arms into a cylinder with a fixed diameter, and the diameter of the cylinder being not less than the diameter of the thickest connecting arm; a collecting and evaluating coordinates step, to collect the k-th sampling point of the modeled robot arm in the i-th working posture within a working range, and mark the evaluation coordinates corresponding to the sampling point as Q.sub.k.sup.i, both i and k being positive integers; an establishing an occupancy function step, to establish an occupancy function O to be used to determine whether the m-th spatial coordinate being part of the occupancy function O occupied by the robot arm, m being a positive integer; when the distance between the m-th spatial coordinate and the evaluation coordinate to be compared being less than a set value, defining the function value range of the occupation function O corresponding to occupied state to be greater than 0.5 and less than 1, and defining the function value range of the occupation function O corresponding to non-occupied state to be 0 to 0.5; an obtaining control parameter, to obtain the control parameter X.sup.i corresponding to the i-th working posture of the robot arm on the movement path ; and a finding an obstacle avoiding posture, based on the following equation:
    Min(X.sub.new.sup.i−X.sup.i).sup.2 s.t. O(X.sub.new.sup.i)≤O.sub.T, to obtain an obstacle avoidance posture, where X.sub.new.sup.i being the control parameter corresponding to the obstacle avoidance posture, and O.sub.T being a threshold.

    2. The robot arm obstacle avoidance method according to claim 1, wherein the finding an obstacle avoidance posture step further comprises a step of adjusting the threshold O.sub.T to another threshold O.sub.T′, and the adjusted threshold O.sub.T′ is less than the threshold O.sub.T, and the threshold O.sub.T′ is less than 0.5.

    3. The robot arm obstacle avoidance method according to claim 1, wherein the robot arm further comprises an end effector, and the posture of the end effector in the world coordinate system does not change with time.

    4. The robot arm obstacle avoidance method according to claim 3, wherein when the time required for the step of finding an obstacle avoidance posture is greater than a running time, the robot arm stops moving.

    5. The robot arm obstacle avoidance method according to claim 1, wherein data obtained in the modeling step, the collecting and evaluating coordinates step, the obtaining control parameter step, and the establishing an occupation function step are all pre-stored in a database.

    6. The robot arm obstacle avoidance method according to claim 5, wherein when the time required for the step of finding an obstacle avoidance posture is greater than a running time, the robot arm stops moving.

    7. A robot arm obstacle avoidance system, comprising: a robot arm, fixed to a base, comprising a plurality of joints and a plurality of connecting arms respectively connected to different joints; and a host, electrically connected to the robot arm and comprising: a database, for storing the data obtained in the modeling step, the collecting and evaluating coordinates step, the obtaining control parameter step, and the establishing an occupancy function step according to claim 1; and a computation control module, electrically connected to the database, and used to execute the finding an obstacle avoidance posture step according to claim 1 to control the robot arm to avoid over obstacles.

    8. The robot arm obstacle avoidance system according to claim 7, wherein the robot arm further comprises an end effector, and the posture of the end effector in the world coordinate system does not change with time.

    9. The robot arm obstacle avoidance system according to claim 7, wherein when the time required for the step of finding an obstacle avoidance posture is greater than a running time, the robot arm stops moving.

    10. The robot arm obstacle avoidance system according to claim 7, wherein the finding an obstacle avoidance posture step further comprises a step of adjusting the threshold O.sub.T to another threshold O.sub.T′, and the adjusted threshold O.sub.T′ is less than the threshold O.sub.T, and the threshold O.sub.T′ is less than 0.5.

    Description

    BRIEF DESCRIPTION OF THE DRAWINGS

    [0016] The present invention will be apparent to those skilled in the art by reading the following detailed description of a preferred embodiment thereof, with reference to the attached drawings, in which:

    [0017] FIG. 1 is a flow chart of the robot arm obstacle avoidance method of the present invention;

    [0018] FIG. 2 is a schematic view of an embodiment of the robot arm obstacle avoidance system of the present invention;

    [0019] FIG. 3 is a block diagram of a host of the robot arm obstacle avoidance system of the present invention;

    [0020] FIG. 4 is a schematic view of a robot arm in a working range of an embodiment of the robot arm obstacle avoidance system of the present invention;

    [0021] FIG. 5 is a schematic view of the robotic arm of the embodiment of the robotic arm obstacle avoidance system of the present invention, illustrating that the robot arm has only two joint degrees of freedom in the first working posture;

    [0022] FIG. 6 is a distribution diagram of an occupancy function of the robot arm obstacle avoidance method of the present invention, wherein the horizontal axis has the control parameter X.sup.i of the i-th working posture, and the vertical axis is the function value of the occupancy function;

    [0023] FIG. 7 is a schematic view of another robot arm of the embodiment of the robot arm obstacle avoidance system of the present invention in the i-th working posture, illustrating the distance between the k-th sampling point Q.sub.k.sup.i, of the robot arm in the i-th working posture and the m-th spatial coordinates R.sub.m as d.sub.i, k, m;

    [0024] FIG. 8 is a schematic view of the robot arm moving along a movement path in the embodiment of the present invention; and

    [0025] FIG. 9 is a schematic view similar to FIG. 8 illustrating that the robot arm of the present invention is controlled to avoid obstacles in an obstacle avoidance posture.

    DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

    [0026] The accompanying drawings are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.

    [0027] It should be noted that in the following description, similar elements are represented by the same numbers. In addition, the relevant parameters such as the shape, size, thickness, and angle of the elements are not drawn according to scale in the drawings, and its simplified intention is only for convenience and clarity.

    [0028] Referring to FIGS. 1, 2, and 3, the robot arm obstacle avoidance method of the present invention is applicable for the robot arm obstacle avoidance system. The robot arm obstacle avoidance system includes a robot arm 1 with a high degree of freedom, and a host computer 2 electrically connected to the robot arm 1. In this embodiment, the robot arm 1 is fixed to a base 3, and the robot arm 1 includes a plurality of joints 11 and a plurality of connecting arms 12 respectively connecting to different joints 11. The host 2 includes a database 21, a computation control module 22, and a signal receiving module 23 that are mutually electrically connected. The computation control module 22 includes a processor, and the signal receiving module 23 includes a receiver and an emitter. In actual applications, the host 2 can be a robot controller, server, desktop computer or laptop, and so on. The electrical connection between the host 2 and the robot arm 1 is not limited to wirelessly transmitting signals through the signal receiving module 23, and may also be transmitting signals through wired means.

    [0029] The robot arm obstacle avoidance method of the present invention at least includes the following steps S101 to S105:

    [0030] Refer to FIGS. 1, and 2, in step S101, modeling step: all the connecting arms 12 are constructed into cylinders with a fixed diameter, and the diameter of the cylinders is not less than the diameter of the thickest connecting arm. For example, if the diameter sizes of the plurality of connecting arms 12 of the robot arm 1 are 130 mm and 220 mm, respectively, the diameter and width of the modeled connecting arms 12 must be at least 220 mm or greater than 220 mm. This step is to simulate the robot arm 1 to estimate the distance under more severe conditions to avoid an obstacle b (as shown in FIG. 8). If the subsequent simulation result can smoothly avoid the obstacle b, it means that there will be sufficient buffer space between the robot arm 1 and the obstacle b when the robot arm 1 is in actual operation. That is to say, the present invention includes this modeling step to improve the reliability when in use.

    [0031] Refer to FIGS. 1, 2, and 4, in step S102, collecting and evaluating coordinates step: collecting the k-th sampling point of the modeled robot arm 1 in the i-th working posture within a working range W, and labeling the corresponding evaluation coordinate position of the sampling point as Q.sub.k.sup.i, i and k are both positive integers. Different i values indicate different working postures of robotic arm 1. For example, Q.sub.3.sup.1 represents the evaluation coordinates of the third sampling point of robotic arm 1 in the first working posture. In FIG. 4, the sampling points are shown as triangle symbol and the sampling points have their own respective evaluation coordinates. After a certain number of sampling points are constructed, the corresponding relationship between the evaluation coordinates of the sampling points and the working posture of the robotic arm 1 can be established.

    [0032] Referring to FIGS. 1, 2, and 5, step S103, obtaining control parameter step: obtaining the control parameter X.sup.i corresponding to the i-th working posture of the robot arm 1 on the movement path P. The control parameter X.sup.i can be a control parameter X.sup.i set directly by the controller, or from a known working posture, and then using inverse kinematics to obtain the corresponding control parameter; that is to say, in step S103, how the control parameter X.sup.i came about is not restricted as long as the control parameter X.sup.i corresponding to the i-th working posture of the robot arm 1 on the movement path P.

    [0033] The control parameter X.sup.i corresponding to the i-th working posture conforms to the following equation:


    X.sup.i=Σ.sub.j=1.sup.Nx.sub.j.sup.ie.sub.j   (1)

    [0034] Wherein N is a positive integer and represents the highest degree of freedom of the robot arm 1. This embodiment uses an eight-axis robotic arm 1 (as shown in FIG. 2), so N is 8, and x.sub.j represents the magnitude of the variation of the j-th joint 11, e.sub.j represents the j-th normal basis, j is a positive integer, and the control parameter X.sup.i can be made to cover the magnitude of the variation of the rotation or movement between the joints 11 through equation (1).

    [0035] For the convenience and clarity of formula (1), FIG. 4 and FIG. 5 show a robot arm with two joints as an example, so as to further understand the obstacle avoidance operation of an eight-axis robot arm with a higher degree of freedom. FIG. 5 shows the first working posture of the robot arm 1′. The first working posture can be operated by directly setting the control parameter X.sup.1, or the control parameter X.sup.1 can be obtained from the first working posture according to inverse kinematics. The control parameter X.sup.1, after being applied to equation (1), can be expressed as follows:


    X1=X.sup.1=x.sub.1.sup.1e.sub.1+x.sub.2.sup.1e.sub.2

    [0036] When the robot arm 1′ has another working posture, its control parameter can be recorded as X.sup.2, and so on; with the i-th working posture, the control parameter can be recorded as X.sup.i.

    [0037] Referring to FIGS. 1, 2, 6, and 7, step S104, establishing an occupation function step: an occupation function O is used to determine whether the m-th spatial coordinate within the working range of the robot arm 1 is part occupied by the robot arm 1, m is a positive integer, the m-th spatial coordinate can be marked as R.sub.m, and the distance between R.sub.m and Q.sub.k.sup.i can be represented by d.sub.i,k,m, wherein d.sub.i,k,m=||Q.sub.k.sup.i−R.sub.m||.

    [0038] The occupation function O(X.sup.i) is described as follows:

    [00001] O ( X i ) = { 0.5 < O m 1 , if .Math. "\[LeftBracketingBar]" .Math. "\[LeftBracketingBar]" Q k i - R m .Math. "\[RightBracketingBar]" .Math. "\[RightBracketingBar]" ε k , then occupy 0 O m 0.5 , otherwise ( 2 )

    [0039] Formula (2) shows that when the distance between the m-th spatial coordinate R.sub.m and the evaluation coordinate Q.sub.k.sup.i to be compared is less than a set value ε, and for all the k-th sampling points in the i-th working posture of the robot arm 1, the function value O.sub.m of the occupation function O corresponding to the occupied state is defined to range between 0.5 and 1, and the function value O.sub.m of the occupation function O corresponding to the non-occupied state is defined to range from 0 to 0.5, wherein ε is a real number. For example, if the m-th spatial coordinate R.sub.m in the space is occupied by an obstacle, and when the occupation function O(X.sup.i) is calculated to be 1, the spatial coordinates R.sub.m will be substantially occupied by the evaluation coordinates because the function value O.sub.m of the occupation function is greater than 0.5 and less than 1. Also, because the evaluation coordinates are the k-th sampling point of the robot arm 1 in the i-th working posture, the i-th working posture of the robot arm will be evaluated as will-touch obstacles. When the occupation function O(X.sup.i) is calculated to be 0, the spatial coordinates R.sub.m will not be substantially occupied by the evaluation coordinates because the function value O.sub.m of the occupation function is greater than 0 and less than 0.5. And the i-th working posture of the robot arm will be evaluated as will-not-touch obstacles. Preferably, in the establishing an occupation function step, in order to have the best numerical solution for the robot arm in the subsequent obstacle avoidance movement path, the occupation function O(X.sup.i) needs to be further converted into a Gaussian function, which has a curve shown as the dashed line in FIG. 6.

    [0040] It should be particularly noted that step S104 does not have to be after step S103. Specifically, step S103 may be executed first and then step S104 is executed, or steps S103 and S104 may be executed at the same time.

    [0041] Referring to FIG. 1, step S105, finding an obstacle avoidance posture step: according to the following equation to obtain the obstacle avoidance posture,


    Min(X.sub.new.sup.i−X.sup.i).sup.2 s.t. O(X.sub.new.sup.i)≤O.sub.T   (3)

    [0042] Wherein X.sub.new.sup.i is the control parameter corresponding to the obstacle avoidance posture. In addition, since the control parameter X.sup.i can be, for example, the amount of change that each joint is regulated by the respective motor. Therefore, through the minimization problem of equation (3), to make the required adjustment amount of change of each motor the smallest, an obstacle avoidance posture satisfying equation (3) can be obtained. By definition, when the function value O.sub.m of the occupancy function O(X.sup.i) is 0.5<O.sub.m≤1, it means that the robot arm is evaluated as will-touch an obstacle, and when the function value O.sub.m of the occupancy function O(X.sup.i) is is 0≤O_m≤0.5, it means that the robot arm is evaluated as will-not-touch the obstacle. Therefore, the present invention can also adjust the threshold O.sub.T from 0.5 to another threshold O.sub.T less than 0.5, such as O.sub.T=0.4, to improve the safety level of obstacle avoidance. As such, the calculated occupancy function value O.sub.m must be less than or equal to 0.4, and the obstacle avoidance posture of the robot arm will be evaluated as will-not-touch the obstacle, and when the calculated occupancy function value O.sub.m is greater than 0.4, the obstacle avoidance posture of the robot arm will be evaluated as will-touch the obstacle. As the occupancy function value O.sub.m becomes larger, the more serious the collision, i.e. the will-touch the obstacle, will be. It can be seen from the above that the condition wherein the adjusted threshold O.sub.T′ is even smaller than the threshold O.sub.T, means that, in actual use, the distance between the robot arm and the obstacle is increased to reduce the probability of the robot arm touching the obstacle. Therefore, the safety level of obstacle avoidance can be controlled by adjusting the size of the threshold O.sub.T.

    [0043] In actual applications, for example, when the robot arm performs dispensing operations along a specific path on a horizontal surface, the end of the robot arm used for dispensing must be maintained on the horizontal surface. Therefore, under the condition that the equation (3) is met, an additional restriction can be added wherein the relative position between the base and the eighth joint of the robot arm in sequence disposed outwards from the base must stay the same before and after the step of finding an obstacle avoidance posture, so as to ensure that the robot arm can maintain the correct position of the end effector when performing tasks while avoiding obstacles. Moreover, it is also possible to add a constraint that the end vector remains unchanged, that is, the posture of the end effector of the robot arm itself in the world coordinate system does not change with time, so that the robot arm can be applied to the hole position operation that requires accurate alignment (no inclination in the hole entry direction), such as, screwing operations or edge-finding operations on target items.

    [0044] Referring to FIGS. 2, 3, 8, and 9, the following will use the above-mentioned obstacle avoidance method to avoid an obstacle b by the robot arm 1, so as to understand the advantages of the present invention:

    [0045] First, store the data obtained in step S101 to step S104 in the database 21 of the host computer 2, and then install related drivers in the robot arm 1 and the host computer 2. The time required to execute steps S101 to S104 in the present invention is the number of evaluation coordinates multiplied by the number of sampled postures and then multiplied by the calculation time of each group of the permutation and combination of the postures when occupying the evaluation coordinates. Preferably, the time required to execute steps S101 to S104 is completed in one day.

    [0046] Then, when the robot arm 1 is performing a task, the computation control module 22 controls the robot arm 1 to move along a movement path P. There is a plurality of path coordinates on the movement path P, and each path coordinate can match the corresponding evaluation coordinate. When there is an obstacle b within the working range of the robot arm 1 (the relevant coordinates of the obstacle can be obtained through 3D point cloud technology, for example), the computation control module 22 will calculate whether the robot arm 1 will collide with the obstacle b. This calculation process can be completed within 10 milliseconds. If this calculation process evaluates that there will be no collision, the robot arm 1 continues to move along the movement path P. On the contrary, if it is evaluated that a collision will occur (as shown in FIG. 8), the computation control module 22 will perform the finding an obstacle avoidance posture step, so that the robot arm 1 can continue to perform the task by passing the obstacle b in the obstacle avoidance posture (as shown in FIG. 9). For example, the time required to perform the step of finding an obstacle avoidance posture can be the following equation:


    t=D*(E*F+G)  (4)

    [0047] Wherein t refers to the time required for the step of finding an obstacle avoidance posture, D is the number of iterations, E is the number of calculations of the occupation function required for each iteration, F is the time required for each calculation of the occupation function, and G is the required time applicable to the algorithm of equation (4).

    [0048] If, the computation control module 22 evaluates that a collision will occur, but when the time to execute the finding an obstacle avoidance posture step exceeds a running time, the computation control module 22 will control the robot arm 1 to stop and wait for the obstacle b to move away. After the obstacle b moves away from the position where the collision may occur, the computation control module 22 controls the robot arm 1 to continue to perform the task.

    [0049] The present invention pre-stores the relevant parameters that the robot arm may encounter in the task execution in the database, so that the robot arm system can quickly evaluate whether the robot arm will collide during the movement when used. If it is evaluated that a collision will occur, the robot arm obstacle avoidance method of the present invention has pre-calculated all the possible working postures that will collide with the obstacle, so the present invention only needs to calculate the working posture for avoiding the obstacle that will collide with the obstacle, and can quickly find a proper obstacle avoidance posture to avoid obstacles. As such, the robot arm of the present invention will not be interrupted due to encountering obstacles when performing tasks.

    [0050] In summary, the robot arm obstacle avoidance method of the present invention and the robot arm obstacle avoidance system using the obstacle avoidance method can indeed achieve the purpose of the invention.

    [0051] Although the present invention has been described with reference to the preferred embodiments thereof, it is apparent to those skilled in the art that a variety of modifications and changes may be made without departing from the scope of the present invention which is intended to be defined by the appended claims.