US-12617085-B2 - Method for avoiding singularities of robotic arm, control device and computer-readable storage medium
Abstract
A method for avoiding singularities of a robotic arm includes: calculating a virtual environment external force required by the robotic arm to avoid singularities based on current joint positions of joints on the robotic arm when it is determined that the robotic arm needs to avoid singularities; obtaining a current end force of the robotic arm and a desired end trajectory of the robotic arm; performing admittance control calculation based on the virtual environment external force, the current end force and the desired end trajectory to obtain a corrected end trajectory of the robotic arm; and controlling the robotic arm to move based on the corrected end trajectory.
Inventors
- Xuan Luo
- Chunyu Chen
Assignees
- UBTECH ROBOTICS CORP LTD
Dates
- Publication Date
- 20260505
- Application Date
- 20231224
- Priority Date
- 20221229
Claims (20)
- 1 . A computer-implemented method for avoiding singularities of a robotic arm, the method comprising: calculating a virtual environment external force required by the robotic arm to avoid singularities based on current joint positions of joints on the robotic arm when it is determined that the robotic arm needs to avoid singularities; obtaining a current end force of the robotic arm and a desired end trajectory of the robotic arm; performing admittance control calculation based on the virtual environment external force, the current end force and the desired end trajectory to obtain a corrected end trajectory of the robotic arm; and controlling the robotic arm to move based on the corrected end trajectory; wherein the method further comprises: obtaining the current joint positions of the joints on the robotic arm; calculating manipulability of the robotic arm based on the current joint positions; and determining that the robotic arm needs to avoid singularities in response to the manipulability being less than or equal to a preset threshold; and wherein calculating the virtual environment external force required by the robotic arm to avoid singularities based on current joint positions of joints on the robotic arm comprises: obtaining the manipulability of the robotic arm, wherein the manipulability is determined based on the current joint positions; obtaining joint torques required by the robotic arm to avoid singularities based on the manipulability; and converting equivalently the joint torques into the end force of the robotic arm to obtain the virtual environment external force required by the robotic arm to avoid singularities.
- 2 . The method of claim 1 , further comprising, after calculating manipulability of the robotic arm based on the current joint positions, determining that the robotic arm does not need to avoid singularities in response to the manipulability being greater than the preset threshold.
- 3 . The method of claim 1 , wherein calculating manipulability of the robotic arm based on the current joint positions comprises: calculating the manipulability of the robotic arm according to a first model, wherein the first model is expressed as follows: m(q sensor )=√{square root over (det [J(q sensor )J(q sensor ) T ])}, where m(q sensor ) represents the manipulability of the robotic arm, q sensor is a position vector composed of the current joint positions, J(q sensor ) is a Jacobian matrix about q sensor , J(q sensor ) T is a transpose of J(q sensor ), det [J(q sensor )J(q sensor ) T ] is a determinant of a matrix J(q sensor ) J(q sensor ) T .
- 4 . The method of claim 1 , wherein the joint torques are expressed as follows: τ SA =2×k SA [m 0 −m(q sensor )]×J m (q sensor ) T , where τ SA represent the joint torques, k SA is a preset adjustment gain, m 0 is a preset manipulability threshold, m(q sensor ) is the manipulability, J m (q sensor ) T is a transpose of J m (q sensor ), J m (q sensor ) is an manipulability Jacobian matrix that represents a partial differential relationship between the manipulability and the current joint positions; the virtual environment external force is expressed as follows: F SA =J(q sensor ) +T τ SA , where F SA is the virtual environment external force, J(q sensor ) +T is a pseudo-inverse matrix of J(q sensor ) T .
- 5 . The method of claim 1 , wherein performing admittance control calculation based on the virtual environment external force, the current end force and the desired end trajectory to obtain the corrected end trajectory of the robotic arm comprises: correcting the current end force using the virtual environment external force to obtain a target end force of the robotic arm; calculating an amount of correction in end trajectory of the robotic arm based on the target end force and a preset admittance parameter; and correcting the desired end trajectory based on the amount of correction in end trajectory to obtain the corrected end trajectory of the robotic arm.
- 6 . A control device comprising: one or more processors; and a memory coupled to the one or more processors, the memory storing programs that, when executed by the one or more processors, cause performance of operations comprising: calculating a virtual environment external force required by a robotic arm to avoid singularities based on current joint positions of joints on the robotic arm when it is determined that the robotic arm needs to avoid singularities; obtaining a current end force of the robotic arm and a desired end trajectory of the robotic arm; performing admittance control calculation based on the virtual environment external force, the current end force and the desired end trajectory to obtain a corrected end trajectory of the robotic arm; and controlling the robotic arm to move based on the corrected end trajectory; wherein the operations further comprise: obtaining the current joint positions of the joints on the robotic arm; calculating manipulability of the robotic arm based on the current joint positions; and determining that the robotic arm needs to avoid singularities in response to the manipulability being less than or equal to a preset threshold; and wherein calculating the virtual environment external force required by the robotic arm to avoid singularities based on current joint positions of joints on the robotic arm comprises: obtaining the manipulability of the robotic arm, wherein the manipulability is determined based on the current joint positions; obtaining joint torques required by the robotic arm to avoid singularities based on the manipulability; and converting equivalently the joint torques into the end force of the robotic arm to obtain the virtual environment external force required by the robotic arm to avoid singularities.
- 7 . The control device of claim 6 , wherein the operations further comprise, after calculating manipulability of the robotic arm based on the current joint positions, determining that the robotic arm does not need to avoid singularities in response to the manipulability being greater than the preset threshold.
- 8 . The control device of claim 6 , wherein calculating manipulability of the robotic arm based on the current joint positions comprises: calculating the manipulability of the robotic arm according to a first model, wherein the first model is expressed as follows: m(q sensor )=√{square root over (det [J(q sensor ) J(q sensor ) T ])}, where m(q sensor ) represents the manipulability of the robotic arm, q sensor is a position vector composed of the current joint positions, J(q sensor ) is a Jacobian matrix about q sensor , J(q sensor ) T is a transpose of J(q sensor ), det [J(q sensor )J(q sensor ) T ] is a determinant of a matrix J(q sensor ) J(q sensor ) T .
- 9 . The control device of claim 6 , wherein the joint torques are expressed as follows: τ SA =2×k SA [m 0 −m(q sensor )]×J m (q sensor ) T , where τ SA represent the joint torques, k SA is a preset adjustment gain, m 0 is a preset manipulability threshold, m(q sensor ) is the manipulability, J m (q sensor ) T is a transpose of J m (q sensor ), J m (q sensor ) is an manipulability Jacobian matrix that represents a partial differential relationship between the manipulability and the current joint positions; the virtual environment external force is expressed as follows: F SA =J(q sensor ) +T τ SA , where F SA is the virtual environment external force, J(q sensor ) +T is a pseudo-inverse matrix of J(q sensor ) T .
- 10 . The control device of claim 6 , wherein performing admittance control calculation based on the virtual environment external force, the current end force and the desired end trajectory to obtain the corrected end trajectory of the robotic arm comprises: correcting the current end force using the virtual environment external force to obtain a target end force of the robotic arm; calculating an amount of correction in end trajectory of the robotic arm based on the target end force and a preset admittance parameter; and correcting the desired end trajectory based on the amount of correction in end trajectory to obtain the corrected end trajectory of the robotic arm.
- 11 . A non-transitory computer-readable storage medium storing instructions that, when executed by at least one processor of a control device, cause the at least one processor to perform a method, the method comprising: calculating a virtual environment external force required by the robotic arm to avoid singularities based on current joint positions of joints on the robotic arm when it is determined that the robotic arm needs to avoid singularities; obtaining a current end force of the robotic arm and a desired end trajectory of the robotic arm; performing admittance control calculation based on the virtual environment external force, the current end force and the desired end trajectory to obtain a corrected end trajectory of the robotic arm; and controlling the robotic arm to move based on the corrected end trajectory; wherein the method further comprises: obtaining the current joint positions of the joints on the robotic arm; calculating manipulability of the robotic arm based on the current joint positions; and determining that the robotic arm needs to avoid singularities in response to the manipulability being less than or equal to a preset threshold; and wherein calculating the virtual environment external force required by the robotic arm to avoid singularities based on current joint positions of joints on the robotic arm comprises: obtaining the manipulability of the robotic arm, wherein the manipulability is determined based on the current joint positions; obtaining joint torques required by the robotic arm to avoid singularities based on the manipulability; and converting equivalently the joint torques into the end force of the robotic arm to obtain the virtual environment external force required by the robotic arm to avoid singularities.
- 12 . The non-transitory computer-readable storage medium of claim 11 , wherein the method further comprises, after calculating manipulability of the robotic arm based on the current joint positions, determining that the robotic arm does not need to avoid singularities in response to the manipulability being greater than the preset threshold.
- 13 . The non-transitory computer-readable storage medium of claim 11 , wherein calculating manipulability of the robotic arm based on the current joint positions comprises: calculating the manipulability of the robotic arm according to a first model, wherein the first model is expressed as follows: m(q sensor )=√{square root over (det [J(q sensor )J(q sensor ) T ])}, where m(q sensor ) represents the manipulability of the robotic arm, q sensor is a position vector composed of the current joint positions, J(q sensor ) is a Jacobian matrix about q sensor , J(q sensor ) T is a transpose of J(q sensor ), det [J(q sensor )J(q sensor ) T ] is a determinant of a matrix J(q sensor )J(q sensor ) T .
- 14 . The non-transitory computer-readable storage medium of claim 11 , wherein the joint torques are expressed as follows: τ SA =2×k SA [m 0 −m(q sensor)]×J m (q sensor ) T , where τ SA represent the joint torques, k SA is a preset adjustment gain, m 0 is a preset manipulability threshold, m(q sensor ) is the manipulability, J m (q sensor ) T is a transpose of J m (q sensor ), J m (q sensor ) is an manipulability Jacobian matrix that represents a partial differential relationship between the manipulability and the current joint positions; the virtual environment external force is expressed as follows: F SA =J(q sensor ) +T τ SA , where F SA is the virtual environment external force, J(q sensor ) +T is a pseudo-inverse matrix of J(q sensor ) T .
- 15 . The non-transitory computer-readable storage medium of claim 11 , wherein performing admittance control calculation based on the virtual environment external force, the current end force and the desired end trajectory to obtain the corrected end trajectory of the robotic arm comprises: correcting the current end force using the virtual environment external force to obtain a target end force of the robotic arm; calculating an amount of correction in end trajectory of the robotic arm based on the target end force and a preset admittance parameter; and correcting the desired end trajectory based on the amount of correction in end trajectory to obtain the corrected end trajectory of the robotic arm.
- 16 . The non-transitory computer-readable storage medium of claim 15 , wherein correcting the current end force using the virtual environment external force to obtain the target end force of the robotic arm comprises: adding the virtual environmental external force to the current end force to obtain the target end force of the robotic arm.
- 17 . The non-transitory computer-readable storage medium of claim 15 , wherein correcting the desired end trajectory based on the amount of correction in end trajectory to obtain the corrected end trajectory of the robotic arm comprises: adding the amount of correction in end trajectory to the desired end trajectory to obtain the corrected end trajectory of the robotic arm.
- 18 . The non-transitory computer-readable storage medium of claim 11 , wherein performing the admittance control calculation based on the virtual environment external force, the current end force and the desired end trajectory to obtain the corrected end trajectory of the robotic arm comprises: inputting the virtual environment external force and the current end force into an admittance controller to obtain an amount of correction in end trajectory of the robotic arm; and correcting the desired end trajectory using the amount of correction in end trajectory to obtain the corrected end trajectory of the robotic arm.
- 19 . The non-transitory computer-readable storage medium of claim 18 , wherein the amount of correction in end trajectory comprises: an amount of correction in end pose, an amount of correction in end velocity, and an amount of correction in end acceleration.
- 20 . The non-transitory computer-readable storage medium of claim 19 , wherein the corrected end trajectory comprises: a corrected end pose, a corrected end velocity, and a corrected end acceleration.
Description
CROSS REFERENCE TO RELATED APPLICATIONS This application claims priority to Chinese Patent Application No. CN 202211712996.X, filed Dec. 29, 2022, which is hereby incorporated by reference herein as if set forth in its entirety TECHNICAL FIELD The present disclosure generally relates to robots, and in particular relates to a method for avoiding singularities of a robotic arm, control device and computer-readable storage medium. BACKGROUND With the advancement of technology, robotic arms are increasingly assisting humans in work and daily life as collaborative or service robots. Due to the limitations of their structure, robotic arms may encounter singular configurations during operation, leading to a loss of certain degrees of freedom and affecting their motion performance. Therefore, how robotic arms can avoid singular configurations during motion has remained a focal point of research. Conventionally, when robotic arms approach singular configurations, a common approach involves restricting joint movements to prevent the arm from getting closer to these singularities. However, this method not only affects the motion of robotic arms but also causes positional discontinuities when the arms resume movement, resulting in poor smoothness of the motion of the robotic arms. Therefore, there is a need to provide a method for avoiding singularities to overcome the above-mentioned problem. BRIEF DESCRIPTION OF DRAWINGS Many aspects of the present embodiments can be better understood with reference to the following drawings. The components in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the present embodiments. Moreover, in the drawings, all the views are schematic, and like reference numerals designate corresponding parts throughout the several views. FIG. 1 is a schematic block diagram of a control device according to one embodiment. FIG. 2 is an exemplary flowchart of a method for avoiding singularities of a robotic arm according to one embodiment. FIG. 3 is a schematic flowchart of a method for determining whether singularities need to be avoided according to one embodiment. FIG. 4 is a schematic flowchart of a method for determining a virtual environment external force required to avoid singularities. FIG. 5 is a schematic flowchart of a method for determining a corrected end trajectory according to one embodiment. FIG. 6 is a schematic flowchart of a method for avoiding singularities of a robotic arm according to one embodiment. FIG. 7 is a schematic diagram showing the principle of the avoidance of singularities for a robotic arm according to one embodiment. FIG. 8 is a schematic block diagram of a singularity avoiding device according to one embodiment. DETAILED DESCRIPTION The disclosure is illustrated by way of example and not by way of limitation in the figures of the accompanying drawings, in which like reference numerals indicate similar elements. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references can mean “at least one” embodiment. Although the features and elements of the present disclosure are described as embodiments in particular combinations, each feature or element can be used alone or in other various combinations within the principles of the present disclosure to the full extent indicated by the broad general meaning of the terms in which the appended claims are expressed. Conventionally, the compliance of robotic arms is primarily enhanced through admittance control. Admittance control takes force as input and produces position as output. However, admittance control lacks the capability to actively avoid singular configurations in robotic arms. Especially in scenarios where robotic arms interact with human forces, they are more prone to encountering singular configurations, posing safety risks. Therefore, it's crucial to incorporate singularity avoidance measures within admittance control when dealing with interactions involving human-robot forces. At present, when robotic arms approach singular configurations, they often restrict partial or all joint movements to prevent the arm from further getting closer to these singularities. However, limiting joint movements can lead to positional discontinuities when the joints resume movement, resulting in poor smoothness of the motion of the robotic arms. Additionally, this method requires significant computational time to identify the joints where singularities occur, impacting real-time control performance. Moreover, during the singularity avoidance process, if force interaction occurs (i.e., external force acts on the robot arm), it can cause deviations in the arm's motion. Therefore, integrating admittance control during singularity avoidance can enhance joint movements' smoothness, reduce computational load, and improve real-time control performance. Based on the aforement