Method, device and electronic equipment for controlling a robot arm
By calculating and correcting the Jacobian matrix using the least squares method, the control problem of remote control of the robotic arm under singularity and fault conditions was solved, realizing the effective operation and fault-tolerant control of the robotic arm in Cartesian space.
Patent Information
- Application Number
- CN202310464422.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-21
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2043-04-21
AI Technical Summary
Existing robotic arm remote control technology lacks adaptability to abnormal situations when controlling in Cartesian space, especially when the robotic arm is at a singularity or when the joint malfunctions.
By performing least squares calculations using the Jacobian matrix, correcting the Jacobian matrix, and combining the least squares method with the maximum constraint speed threshold, the optimal expected speed of each joint of the robotic arm is calculated to achieve fault-tolerant control of the robotic arm.
It enables effective remote control of the robotic arm in the event of singularities and joint failures, thereby improving the robotic arm's operational capabilities and fault handling capabilities in Cartesian space.
Smart Images

Figure CN116494231B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotic arm control technology, and in particular to a robotic arm control method, device and electronic device. Background Technology
[0002] Remote control functionality for robotic arms has always been a fundamental feature in the field of robotic arm control technology. With remote control, operators can control the robotic arm to reach a desired position in a predetermined manner. There are generally two ways to implement robotic arm remote control technology: remote control technology implemented in joint space and remote control technology implemented in Cartesian space.
[0003] The principle behind remote control technology for robotic arms implemented in joint space is relatively simple: controlling the joints to rotate to a specified angle. However, this method of remote control is not intuitive and cannot meet the operational requirements of Cartesian space. Remote control technology for robotic arms implemented in Cartesian space can control the end effector of the robotic arm to move to a specified position in Cartesian space, which is more intuitive and also meets the operational requirements of Cartesian space. However, this method lacks adaptability to abnormal situations because controlling a robotic arm in Cartesian space requires solving the inverse kinematics of the robotic arm, and in the following situations, the inverse kinematics of the robotic arm has no solution.
[0004] (1) The robotic arm is at a singularity;
[0005] (2) Several joints in the robotic arm malfunctioned and could not move. Summary of the Invention
[0006] This application provides a control method, device, and electronic device for a robotic arm. By using the Jacobian matrix to perform least squares calculations, the desired speed of each joint of the robotic arm is calculated, thereby enabling the robotic arm to traverse singularities and to remotely control the robotic arm even when it malfunctions.
[0007] The embodiments of this application provide the following technical solutions:
[0008] In a first aspect, embodiments of this application provide a control method for a robotic arm, the robotic arm including an end effector and multiple joints, the control method for the robotic arm including:
[0009] Obtain the current desired speed and joint angle of each joint of the robotic arm;
[0010] Based on the principle of differential kinematics of robotic arms, the first Jacobian matrix is obtained;
[0011] Correct the first Jacobian matrix to obtain the second Jacobian matrix;
[0012] Based on the least squares method, the expected joint velocities of the robotic arm are calculated according to the second Jacobian matrix;
[0013] Based on the maximum constraint speed threshold, the expected speed of the joint is corrected to obtain the first correction result;
[0014] The first correction result is corrected based on the direction of motion of the end effector and the current desired velocity direction to obtain the second correction result;
[0015] Based on the second correction result, the corrected joint desired velocity is obtained to control the movement of the robotic arm.
[0016] In some embodiments, based on the differential kinematics principle of the robotic arm, the first Jacobian matrix is obtained, including:
[0017] Based on the differential kinematics principle of the robotic arm, the current Jacobian matrix of the robotic arm is calculated according to the current expected velocity and joint angle of the robotic arm.
[0018] The current Jacobian matrix is determined as the first Jacobian matrix.
[0019] In some embodiments, modifying the first Jacobian matrix to obtain the second Jacobian matrix includes:
[0020] The joints with a current expected speed of zero are identified as faulty joints;
[0021] If there is a faulty joint, the column corresponding to the faulty joint is deleted from the first Jacobian matrix to obtain the second Jacobian matrix, where each joint corresponds to a column in the first Jacobian matrix.
[0022] If there is no faulty joint, the first Jacobian matrix is determined as the second Jacobian matrix.
[0023] In some embodiments, the expected joint velocities of the robotic arm are calculated based on the least squares method and according to the second Jacobian matrix, including:
[0024] Based on the second Jacobian matrix and its pseudo-inverse, determine the projection matrix of the second Jacobian matrix, specifically including:
[0025]
[0026] in, J is the projection matrix of the second Jacobian matrix. a This is the second Jacobian matrix. Let U be the pseudo-inverse of the second Jacobian matrix, U be the first orthogonal matrix obtained by the singular value decomposition of the second Jacobian matrix, V be the second orthogonal matrix obtained by the singular value decomposition of the second Jacobian matrix, and Σ be the diagonal matrix obtained by the singular value decomposition of the second Jacobian matrix.T V is the transpose of the first orthogonal matrix. T Let Σ be the transpose of the second orthogonal matrix. + It is the pseudo-inverse of the diagonal matrix;
[0027] Based on the projection matrix of the second Jacobian matrix and the current desired velocity, calculate the projection vector of the current desired velocity in the column space of the second Jacobian matrix, specifically including:
[0028]
[0029] in, Let be the projection vector of the current desired velocity into the column space of the second Jacobian matrix. The projection matrix of the second Jacobian matrix. The current expected speed;
[0030] Based on the least squares method, the expected joint velocity is calculated by combining the projection vector, the second Jacobian matrix, and the expected velocity. Specifically, this includes:
[0031]
[0032] Among them, when At that time, When the minimum value is reached, the desired velocity of the joint is obtained. equal
[0033] In some embodiments, the desired joint speed is corrected based on a maximum constraint speed threshold to obtain a first correction result, including:
[0034] Set the maximum constraint speed threshold;
[0035] If there are several joints whose expected joint speed is greater than the maximum constraint speed threshold, then calculate the ratio of the expected joint speed of these several joints to the maximum constraint speed threshold to obtain several ratios.
[0036] The largest ratio among several ratios is determined as the first ratio, and the desired velocity of the first joint is determined.
[0037] If all the expected velocities of the joints are less than or equal to the maximum constraint velocity threshold, then the expected velocity of the joint is determined as the expected velocity of the first joint.
[0038] The desired velocity of the first joint is determined as the first correction result;
[0039] The largest ratio among several ratios is determined as the first ratio, and the desired velocity of the first joint is determined, specifically including:
[0040] Based on the first ratio, the desired velocity of the first joint is determined, specifically including:
[0041]
[0042] in, The desired velocity of the first joint, Let r be the desired velocity of the joint, and r be the first ratio.
[0043] In some embodiments, the robotic arm includes an end effector. A first correction result is corrected based on the end effector's motion direction and the current desired velocity direction to obtain a second correction result, including:
[0044] The cosine of the direction of motion at the end point relative to the current desired velocity direction is calculated using the following formula:
[0045]
[0046]
[0047] Where cosα is the cosine of the direction of motion of the end effector and the direction of the current desired velocity. The velocity at the end, For the current desired speed, J a This is the second Jacobian matrix. This is the first correction result;
[0048] Calculate the angle based on the cosine of the angle between the direction of motion of the end effector and the direction of the current desired velocity;
[0049] Set the maximum threshold for the included angle;
[0050] If the angle is greater than or equal to the maximum threshold of the included angle, the desired speed of the robotic arm's joints is set to zero to stop the robotic arm's movement.
[0051] If the angle is less than the maximum threshold of the included angle, then the first correction result is determined as the second correction result.
[0052] In some embodiments, after obtaining the second correction result, the method further includes:
[0053] Based on the second correction result, the terminal correction velocity is calculated using the following formula:
[0054]
[0055] in, J is the end-effector corrected velocity. a This is the second Jacobian matrix. This is the second corrected result.
[0056] In some embodiments, obtaining the corrected joint desired velocity based on the second correction result includes:
[0057] The second correction result is determined as the corrected joint expected velocity;
[0058] The method also includes:
[0059] Get the refresh rate;
[0060] The control cycle is calculated based on the refresh rate using the following formula:
[0061]
[0062] Where Δt is the control period, f c This refers to the refresh rate;
[0063] Based on the control cycle and the second correction result, the corrected joint position is calculated using the following formula:
[0064]
[0065] Where, q c Here, q represents the corrected joint position, and q represents the current joint position of the robotic arm. This is the second correction result, where Δt is the control period.
[0066] Secondly, embodiments of this application provide a control device for a robotic arm, the robotic arm including an end effector and multiple joints, the control device for the robotic arm including:
[0067] The acquisition unit is used to acquire the current desired speed and joint angle of each joint of the robotic arm;
[0068] The processing unit is used to obtain a first Jacobian matrix based on the differential kinematics principle of the robotic arm; correct the first Jacobian matrix to obtain a second Jacobian matrix; calculate the expected joint velocity of the robotic arm based on the least squares method and the second Jacobian matrix; correct the expected joint velocity according to the maximum constraint velocity threshold to obtain a first correction result; correct the first correction result according to the motion direction of the end effector and the current expected velocity direction to obtain a second correction result; and obtain the corrected expected joint velocity according to the second correction result to control the movement of the robotic arm.
[0069] Thirdly, embodiments of this application provide an electronic device, including:
[0070] At least one processor; and
[0071] A memory that is communicatively connected to at least one processor; wherein,
[0072] The memory stores instructions that can be executed by at least one processor, which enables the at least one processor to perform a control method for the robotic arm, as described in the first aspect.
[0073] Fourthly, embodiments of this application provide a non-volatile computer-readable storage medium storing computer-executable instructions for causing an electronic device to perform a control method for a robotic arm as described in the first aspect.
[0074] The beneficial effects of the embodiments of this application are as follows: Unlike existing technologies, this application provides a control method for a robotic arm, which includes an end effector and multiple joints. The control method includes: acquiring the current desired speed and joint angle of each joint of the robotic arm; obtaining a first Jacobian matrix based on the differential kinematics principle of the robotic arm; correcting the first Jacobian matrix to obtain a second Jacobian matrix; calculating the desired joint speed of the robotic arm based on the second Jacobian matrix using the least squares method; correcting the desired joint speed according to a maximum constraint speed threshold to obtain a first correction result; correcting the first correction result based on the motion direction of the end effector and the current desired speed direction to obtain a second correction result; and obtaining the corrected desired joint speed based on the second correction result to control the movement of the robotic arm. This application can calculate the optimal desired speed of each joint of the robotic arm using the least squares method with the Jacobian matrix, thereby enabling the robotic arm to traverse singularities and remotely control the robotic arm even when it malfunctions. Attached Figure Description
[0075] One or more embodiments are illustrated by way of example with reference to the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements having the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.
[0076] Figure 1 This is a schematic diagram of an application environment provided in an embodiment of this application;
[0077] Figure 2 This is a flowchart illustrating a control method for a robotic arm provided in an embodiment of this application;
[0078] Figure 3 yes Figure 2 A detailed flowchart of step S202 in the process;
[0079] Figure 4 yes Figure 2 A detailed flowchart of step S203 in the process;
[0080] Figure 5 yes Figure 2A detailed flowchart of step S204 in the process;
[0081] Figure 6 yes Figure 2 A detailed flowchart of step S205 in the process;
[0082] Figure 7 yes Figure 6 A detailed flowchart of step S2054 in the process;
[0083] Figure 8 yes Figure 2 A detailed flowchart of step S206 in the process;
[0084] Figure 9 This is a schematic flowchart illustrating the calculation of the end-effector corrected velocity according to an embodiment of this application.
[0085] Figure 10 yes Figure 2 A detailed flowchart of step S207 in the process;
[0086] Figure 11 This is a schematic flowchart illustrating the calculation of the corrected joint position provided in an embodiment of this application;
[0087] Figure 12 This is a control schematic diagram of a robotic arm provided in an embodiment of this application;
[0088] Figure 13 This is an overall schematic diagram of a robotic arm control method provided in an embodiment of this application;
[0089] Figure 14 This is a schematic diagram of the structure of a control device for a robotic arm provided in an embodiment of this application;
[0090] Figure 15 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0091] Explanation of icon numbers:
[0092] label name label name 100 Application Environment 141 Acquisition Unit 10 robotic arm 142 Processing unit 20 server 150 electronic devices 30 electronic devices 151 processor 140 Control device of robotic arm 152 memory Detailed Implementation
[0093] To facilitate understanding of this application, a more detailed description is provided below with reference to the accompanying drawings and specific embodiments. It should be noted that when an element is described as "fixed to" another element, it can be directly on the other element, or one or more intermediate elements may exist between them. When an element is described as "connected to" another element, it can be directly connected to the other element, or one or more intermediate elements may exist between them. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this specification are for illustrative purposes only.
[0094] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The term "and / or" as used in this specification includes any and all combinations of one or more of the associated listed items.
[0095] The technical solution of this application is described in detail below with reference to the accompanying drawings:
[0096] Please see Figure 1 , Figure 1 This is a schematic diagram of an application environment provided in an embodiment of this application;
[0097] like Figure 1 As shown, the application environment 100 includes: a robotic arm 10, a server 20, and electronic devices 30. The robotic arm 10 and electronic devices 30 are connected via network communication, and the server 20 and electronic devices 30 are also connected via network communication. This network includes wired and / or wireless networks. It is understood that the network includes wireless networks such as 2G, 3G, 4G, 5G, Wi-Fi, and Bluetooth, and may also include wired networks such as serial cables and Ethernet cables.
[0098] In this embodiment, the robotic arm 10 includes multiple motion joints, drivers, sensors, end effectors, a communication module, a controller, and a housing. The multiple motion joints control the movement of various parts of the robotic arm. The drivers, including clutches, transmissions, universal joints, main reducers, differentials, and half-shafts, generate driving force to move the robotic arm. The sensors monitor the position, speed, and acceleration of the robotic arm. The end effector performs various tasks and can be configured according to different tasks, such as grippers, suction cups, and cutting tools. The communication module sends the current desired speed and joint angle of each joint of the robotic arm to the server 20. The controller receives the desired speed from the electronic device 30. The housing secures and protects the various components of the robotic arm. It is understood that the robotic arm 10 includes, but is not limited to, hydraulically driven, pneumatically driven, electrically driven, and mechanically driven robotic arms.
[0099] In this embodiment, the communication module, connected to server 20, is used to receive instructions sent by the server or to send data to the server. For example, it may receive instructions from the server to control the movement of the robotic arm, or send data on the current desired speed and joint angle of each joint of the robotic arm to the server. In this embodiment, the communication module can communicate with the Internet, and includes, but is not limited to, communication units such as a WIFI module, ZigBee module, NB-IoT module, 4G module, 5G module, and Bluetooth module.
[0100] In this embodiment, the controller is located inside the robotic arm and is electrically connected to the actuator, sensors, and end effector. The controller is also used to control the actuator to move the robotic arm to a specified position, or to control the sensors to acquire data on the current desired speed and joint angle of each joint of the robotic arm, or to control the end effector to move and perform corresponding tasks.
[0101] In the embodiments of this application, the controller can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a microcontroller, an ARM (Acorn RISC Machine) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. The controller can also be any conventional processor, controller, microcontroller, or state machine. The controller can also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors combined with a DSP and / or any other such configuration, or one or more combinations of a microcontroller unit (MCU), a field-programmable gate array (FPGA), and a system-on-chip (SoC).
[0102] In this embodiment, the server 20 is communicatively connected to the electronic device 30, and is used to receive data on the current desired speed and joint angle of each joint of the robotic arm sent by the robotic arm 10, or to send control commands to the electronic device 30, such as controlling the electronic device to correct the current desired speed of each joint of the robotic arm, or controlling the movement of the robotic arm. There are multiple servers 20, and multiple servers can form a server cluster. For example, the server cluster includes: a first server, a second server, ..., an Nth server; or the server cluster can be a cloud computing service center, which includes several servers. The servers in this embodiment include, but are not limited to: tower servers, rack servers, blade servers, and cloud servers. Preferably, the server is a cloud server (Elastic Compute Service, ECS).
[0103] In this embodiment, the electronic device 30 includes a 6D mouse, which serves as an input device. The 6D mouse sends the desired speed to the controller of the robotic arm via the electronic device. The electronic device 30 is used to acquire the current desired speed and joint angle of each joint of the robotic arm. Based on the differential kinematics principle of the robotic arm, a first Jacobian matrix is obtained. The first Jacobian matrix is corrected to obtain a second Jacobian matrix. Based on the least squares method, the desired joint speed of the robotic arm is calculated according to the second Jacobian matrix. The desired joint speed is corrected according to the maximum constraint speed threshold to obtain a first correction result. The first correction result is further corrected according to the motion direction of the end effector and the current desired speed direction to obtain a second correction result. Based on the second correction result, the corrected desired joint speed is obtained to control the movement of the robotic arm. It is understood that the electronic device 30 includes, but is not limited to, landline telephones, mobile communication devices, mobile personal computer devices, or other electronic devices with internet access capabilities.
[0104] In this embodiment, the electronic device 30 includes a controller, which is disposed inside the electronic device. The controller serves as the control core of the electronic device, used to control the current desired speed of each joint of the robotic arm, and to send the corrected desired speed to each joint of the robotic arm, as well as some business logic processing.
[0105] In the embodiments of this application, the controller can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a microcontroller, an ARM (Acorn RISC Machine) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. The controller can also be any conventional processor, controller, microcontroller, or state machine. The controller can also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors combined with a DSP and / or any other such configuration, or one or more combinations of a microcontroller unit (MCU), a field-programmable gate array (FPGA), and a system-on-chip (SoC).
[0106] It is understood that the electronic device 30 in the embodiments of this application also includes a storage module, which includes, but is not limited to, one or more of the following devices: FLASH flash memory, NAND flash memory, vertical NAND flash memory (VNAND), NOR flash memory, resistive random access memory (RRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), spin-transfer torque random access memory (STT-RAM).
[0107] Please see Figure 2 , Figure 2 This is a flowchart illustrating a control method for a robotic arm provided in an embodiment of this application;
[0108] The control method of the robotic arm is applied to electronic devices. Specifically, the execution subject of the control method of the robotic arm is one or more processors of the electronic device. The robotic arm includes an end effector, multiple joints, and an end effector.
[0109] In this embodiment, Cartesian space is a generalization of the radial coordinate system and the Cartesian coordinate system to the plane: three non-coplanar number axes intersecting at the origin constitute the radial coordinate system of space. A radial coordinate system with equal units of measurement on the three number axes is called a spatial Cartesian coordinate system. A Cartesian coordinate system with three mutually perpendicular number axes is called a spatial Cartesian rectangular coordinate system. The robotic arm control method in this application is applied to Cartesian space, which can meet the requirements of operation in Cartesian space and is also consistent with human intuition.
[0110] like Figure 2 As shown, the control method of the robotic arm includes:
[0111] Step S201: Obtain the current desired speed and joint angle of each joint of the robotic arm;
[0112] Specifically, a 6D mouse (3Dconnexion SpaceMouse) is used as the input device. It possesses omnidirectional three-dimensional control capabilities, offering six movement directions: forward, backward, left, right, up, and down. Furthermore, these directions can be combined to create forward-right, left-down, and other movement patterns. The advantage of using a 6D mouse as the input device is that it provides users with a greater sense of control and immersion, reducing the probability of errors. The 6D mouse generates a desired speed, which includes both the desired linear velocity and the desired angular velocity in three-dimensional space. This allows the 6D mouse to control the movement of a robotic arm in Cartesian space. It should be noted that this desired speed can be set according to actual needs. In this embodiment, the electronic device reads the desired speed sent by the 6D mouse, and simultaneously, the encoder data of each joint is read by the actuators of each joint of the robotic arm to obtain the joint angles. This yields the current desired speed and joint angle of each joint of the robotic arm. The current desired speed is a vector, possessing both magnitude and direction. Assuming the current desired speed is... The expression for the current expected speed is as follows:
[0113]
[0114] in, For the current desired speed, v e Let ω be the desired linear velocity of the current desired velocity. e v is the expected angular velocity of the current desired velocity. ex Let v be the component of the desired linear velocity translated along the x-axis. ey Let v be the component of the desired linear velocity translated along the y-axis. ez Let ω be the component of the desired linear velocity translated along the z-axis. ex Let ω be the component of the desired angular velocity rotating along the x-axis. ey Let ω be the component of the desired angular velocity rotating along the y-axis. ez Let be the component of the desired angular velocity rotating along the z-axis.
[0115] Step S202: Based on the principle of differential kinematics of the robotic arm, obtain the first Jacobian matrix;
[0116] Please refer to the following: Figure 3 , Figure 3 yes Figure 2 A detailed flowchart of step S202 in the process;
[0117] like Figure 3 As shown, step S202: Based on the principle of differential kinematics of the robotic arm, the first Jacobian matrix is obtained, including:
[0118] Step S2021: Based on the differential kinematics principle of the robotic arm, calculate the current Jacobian matrix of the robotic arm according to the current desired velocity and joint angles of the robotic arm;
[0119] Specifically, the differential kinematics principle of robotic arms includes the relationship between the end-effector, acceleration, joint velocities, and acceleration. The Jacobian matrix is a matrix formed by partially differentiating each element of one vector with respect to each element of another vector; it can be used to locally linearize the nonlinear relationship between two vectors. In robotic arm kinematics, the Jacobian matrix refers to the partial differential relationship between the pose (position and orientation) of the end-effector and the position values of each joint of the robotic arm.
[0120] In this embodiment, based on the differential kinematics principle of the robotic arm, and taking a six-axis robotic arm as an example, the current desired velocity includes the desired linear velocity (x, y, z) and the desired angular velocity (θ) in three-dimensional space, according to the current desired velocity and joint angle of the robotic arm. x θ y θ z Let the vector set of the current desired velocity be F = {x, y, z, θ}. x θ y θ z Let f(q) be the function of the current desired velocity with respect to the joint angle q, and we have the following equation:
[0121]
[0122] Further calculations are performed on the above equation. Taking the total differential of each term in the vector group F (i.e., the left side of the equation) and the partial derivatives with respect to all q values in the function on the right side of the equation, the result can be transformed into the following matrix form, yielding the current Jacobian matrix of the robotic arm:
[0123]
[0124] Step S2022: Determine the current Jacobian matrix as the first Jacobian matrix;
[0125] Specifically, the current Jacobian matrix is determined as the first Jacobian matrix, which is the Jacobian matrix to be corrected. Taking a six-axis robotic arm as an example, the six-axis robotic arm includes six joints. Under normal circumstances, the first Jacobian matrix of the six-axis robotic arm is in the form of 6x6, and its expression is as follows:
[0126]
[0127] Among them, J rThe first Jacobian matrix is a linear mapping from the current desired velocity vector of a joint to the velocity vector in the Cartesian operation space. Therefore, each column of the first Jacobian matrix represents the transfer ratio of the current velocity and the end-effector linear velocity and angular velocity of the six joints of the robotic arm.
[0128] Step S203: Correct the first Jacobian matrix to obtain the second Jacobian matrix;
[0129] Please refer to the following: Figure 4 , Figure 4 yes Figure 2 A detailed flowchart of step S203 in the process;
[0130] like Figure 4 As shown, step S203: Correcting the first Jacobian matrix to obtain the second Jacobian matrix includes:
[0131] Step S2031: Identify the joints with a current expected speed of zero as faulty joints;
[0132] Specifically, the robotic arm includes multiple joints, each of which corresponds to a column in the first Jacobian matrix. When several joints malfunction and cannot move, it means that the current expected speed of these joints is locked at zero, and the joints with the current expected speed of zero are identified as faulty joints.
[0133] Step S2032: Determine if a faulty joint exists;
[0134] Specifically, determine whether there is a faulty joint, that is, determine whether there is a joint with a current expected speed of zero. If there is a faulty joint, proceed to step S2033; if there is no faulty joint, proceed to step S2034.
[0135] Step S2033: Delete the column corresponding to the faulty joint from the first Jacobian matrix to obtain the second Jacobian matrix;
[0136] Specifically, in the first Jacobian matrix, each column represents a joint. If a faulty joint exists, the column corresponding to the faulty joint is removed from the first Jacobian matrix, resulting in the second Jacobian matrix. Taking a six-axis robotic arm as an example, assuming that the 2nd and 6th joints of the six-axis robotic arm are determined to be faulty joints, the expression for the second Jacobian matrix is as follows:
[0137]
[0138] Among them, J a This is the second Jacobian matrix.
[0139] Step S2034: Determine the first Jacobian matrix as the second Jacobian matrix;
[0140] Specifically, if there are no faulty joints, the first Jacobian matrix is determined as the second Jacobian matrix; that is, when all joints are fault-free, J... a =J r .
[0141] In this embodiment, when several joints malfunction and cannot move (i.e., the desired speed is zero), the Jacobian matrix is modified, and the least squares method is used for calculation. This allows the robotic arm to still be remotely controlled in Cartesian space even under such abnormal conditions. In practical applications, when the robotic arm is far from the user and in a complex working environment, and several joints malfunction, the user often wants to escape by controlling the robotic arm's movement in Cartesian space. In this case, the robotic arm needs to have the ability to handle malfunctioning joints.
[0142] Step S204: Based on the least squares method, calculate the expected joint speed of the robotic arm according to the second Jacobian matrix;
[0143] Please refer to the following: Figure 5 , Figure 5 yes Figure 2 A detailed flowchart of step S204 in the process;
[0144] like Figure 5 As shown, step S204: Based on the least squares method, calculate the expected joint velocity of the robotic arm according to the second Jacobian matrix, including:
[0145] In this embodiment of the application, the calculation of the expected joint velocity of the robotic arm based on the least squares method and the second Jacobian matrix refers to the assumption J a This is the second Jacobian matrix. For the current desired speed, according to J a and Solve the least squares problem of the following form:
[0146]
[0147] Among them, J a and Given quantities For the expected velocity of the joint (excluding the expected velocity of the faulty joint), due to Since these are unknowns, they need to be solved using the least squares method described below.
[0148] Step S2041: Determine the projection matrix of the second Jacobian matrix based on the second Jacobian matrix and its pseudo-inverse.
[0149] Specifically, first, perform singular value decomposition on the second Jacobian matrix to obtain the following equation:
[0150] Ja =UΣV T ,
[0151] Among them, J a Let U be the second Jacobian matrix, U be the first orthogonal matrix obtained by the singular value decomposition of the second Jacobian matrix, V be the second orthogonal matrix obtained by the singular value decomposition of the second Jacobian matrix, and Σ be the diagonal matrix obtained by the singular value decomposition of the second Jacobian matrix. T Let U be the transpose of the second orthogonal matrix. The first orthogonal matrix U is calculated by... Eigenvalue decomposition yields because Since Λ1 is a symmetric matrix, U is an orthogonal matrix, and all its eigenvalues are non-negative. These eigenvalues lie on the diagonal of Λ1. Taking the square root of each eigenvalue yields the elements on the diagonal of Σ. This relationship can also be expressed as: Λ1 = ΣΣ T This yields the diagonal matrix Σ. The second orthogonal matrix V is calculated by... Eigenvalue decomposition yields because Since Λ2 is a symmetric matrix, V is an orthogonal matrix, and all its eigenvalues are non-negative. These eigenvalues lie on the diagonal of Λ2. Taking the square root of each eigenvalue, we can also obtain the elements on the diagonal of Σ using this calculation method. This relationship can also be expressed as: Λ2 = Σ T Σ, thus obtaining the diagonal matrix Σ.
[0152] Secondly, based on the second Jacobian matrix, the pseudo-inverse matrix of the second Jacobian matrix is calculated, and the expression for the pseudo-inverse matrix of the second Jacobian matrix is as follows:
[0153]
[0154] in, Let V be the pseudo-inverse of the second Jacobian matrix, and let V be the second orthogonal matrix obtained by singular value decomposition of the second Jacobian matrix. + U is the pseudo-inverse of a diagonal matrix. T Σ is the transpose of the first orthogonal matrix. + This is the pseudo-inverse of Σ. Since Σ is a diagonal matrix, we can obtain Σ by transposing Σ and taking the reciprocals of all its non-zero elements. + Furthermore, since U and V are orthogonal matrices, we have:
[0155] U T =U -1 ,
[0156] V T =V -1 .
[0157] Finally, multiplying the second Jacobian matrix by its pseudo-inverse matrix yields the projection matrix of the second Jacobian matrix, expressed as follows:
[0158]
[0159] in, J is the projection matrix of the second Jacobian matrix. a This is the second Jacobian matrix. Let U be the pseudo-inverse of the second Jacobian matrix, U be the first orthogonal matrix obtained by the singular value decomposition of the second Jacobian matrix, V be the second orthogonal matrix obtained by the singular value decomposition of the second Jacobian matrix, and Σ be the diagonal matrix obtained by the singular value decomposition of the second Jacobian matrix. T V is the transpose of the first orthogonal matrix. T Let Σ be the transpose of the second orthogonal matrix. + It is the pseudo-inverse of the diagonal matrix.
[0160] Step S2042: Based on the projection matrix of the second Jacobian matrix and the current desired velocity, calculate the projection vector of the current desired velocity in the column space of the second Jacobian matrix;
[0161] Specifically, based on the projection matrix of the second Jacobian matrix and the current desired velocity, the projection vector of the current desired velocity in the column space of the second Jacobian matrix is calculated, and its expression is as follows:
[0162]
[0163] in, Let be the projection vector of the current desired velocity into the column space of the second Jacobian matrix. The projection matrix of the second Jacobian matrix. This represents the current expected speed.
[0164] Step S2043: Calculate the joint's expected velocity based on the least squares method, combining the projection vector, the second Jacobian matrix, and the expected velocity;
[0165] Specifically, based on the least squares method, and combining the projection vector, the second Jacobian matrix, and the desired velocity, the desired joint velocity is calculated, and its expression is as follows:
[0166]
[0167] Among them, because yes In J a The projection in column space, so It is J a Distance in column space The nearest vector. And when At that time, Therefore, it can be appropriate hour, The minimum value is obtained. Therefore This is the solution to the least squares problem, at which point the expected joint velocity is obtained. equal
[0168] In this embodiment, when the robotic arm is at a singular point, the Jacobian matrix becomes a singular matrix and cannot be inverted. This application uses the Jacobian matrix to perform least squares calculation to calculate the expected speed of each joint of the robotic arm, thereby enabling the robotic arm to traverse singular points. Furthermore, the advantage of using pseudo-inverse for least squares calculation is its strong versatility. It can be calculated regardless of whether the Jacobian matrix is a full-rank matrix, meaning that this method is applicable to various Jacobian matrices.
[0169] Step S205: Correct the joint's desired speed based on the maximum constraint speed threshold to obtain the first correction result;
[0170] Please refer to the following: Figure 6 , Figure 6 yes Figure 2 A detailed flowchart of step S205 in the process;
[0171] like Figure 6 As shown, step S205: Based on the maximum constraint speed threshold, the desired joint speed is corrected to obtain the first correction result, including:
[0172] Step S2051: Set the maximum constraint speed threshold;
[0173] Specifically, the maximum constraint speed threshold can be set according to the actual situation. For example, the maximum constraint speed threshold can be set to 0.5 radians / second.
[0174] Step S2052: Determine whether there are several joints whose expected joint velocity is greater than the maximum constraint velocity threshold;
[0175] Specifically, it determines whether there are several joints whose expected joint velocities exceed the maximum constraint velocity threshold, i.e., it determines the expected joint velocities. If the speed of some joints exceeds the maximum constraint speed threshold, proceed to step S2053; if the speed of all joints is less than or equal to the maximum constraint speed threshold, proceed to step S2055.
[0176] Step S2053: Calculate the ratio of the expected joint velocity to the maximum constraint velocity threshold for several joints to obtain several ratios;
[0177] Specifically, if the expected joint speed of several joints is greater than the maximum constraint speed threshold, it means that the expected joint speed needs to be corrected. Then, the ratio of the expected joint speed of these several joints to the maximum constraint speed threshold is calculated to obtain several ratios.
[0178] Step S2054: Determine the largest ratio among several ratios as the first ratio, and determine the desired velocity of the first joint;
[0179] Please refer to the following: Figure 7 , Figure 7 yes Figure 6 A detailed flowchart of step S2054 in the process;
[0180] like Figure 7 As shown, step S2054: determining the largest ratio among several ratios as the first ratio, and determining the desired velocity of the first joint, including:
[0181] Step S2541: Determine the desired velocity of the first joint based on the first ratio;
[0182] Specifically, the largest ratio among several ratios is determined as the first ratio. Based on the first ratio, the desired velocity of the first joint is determined. The formula for calculating the desired velocity of the first joint is as follows:
[0183]
[0184] in, The desired velocity of the first joint, Let r be the desired velocity of the joint, and r be the first ratio.
[0185] Step S2055: Determine the desired velocity of the joint as the desired velocity of the first joint;
[0186] Specifically, if the expected speed of all joints is less than or equal to the maximum constraint speed threshold, it means that the expected speed of all joints has not exceeded the maximum constraint speed threshold, and there is no need to correct the expected speed of the joints. The expected speed of the joints is then determined as the first expected speed of the joints.
[0187] Step S2056: Determine the desired velocity of the first joint as the first correction result;
[0188] Specifically, determining the desired velocity of the first joint as the first correction result indicates that the first correction has been completed.
[0189] Step S206: Based on the direction of motion of the end effector and the current desired velocity direction, correct the first correction result to obtain the second correction result;
[0190] Please refer to the following: Figure 8 , Figure 8 yes Figure 2 A detailed flowchart of step S206 in the process;
[0191] like Figure 8 As shown, step S206: Based on the direction of motion of the end effector and the current desired velocity direction, the first correction result is corrected to obtain the second correction result, including:
[0192] Step S2061: Calculate the cosine value of the end effector's motion direction and the current desired velocity direction;
[0193] Specifically, calculate the second Jacobian matrix J. a The rank of a matrix is a linear algebra term. In linear algebra, the rank of a matrix is the order of the highest order of its non-zero minors, while the rank of a vector group is the number of vectors in its maximally independent set. The rank is calculated by using Gaussian elimination to transform the second Jacobian matrix into a row echelon form matrix; the number of non-zero rows in this row echelon form matrix is the rank of the second Jacobian matrix. A robotic arm includes an end effector. The direction of motion of the end effector is obtained by electronic equipment. At this point, the desired velocity of the first joint needs to be determined. A second correction is made when the joint reaches the desired speed of the first joint. During high-speed movement, the end effector of the robotic arm moves at a speed of... Velocity motion, assuming the velocity of the end effector is... Then there is End-effector velocity This is a vector, including the magnitude of the velocity and the direction of the final motion. When the second Jacobian matrix j... a When the rank is less than the preset value, it indicates that the end effector's velocity is low. Compared with the current expected speed If the directions do not coincide, the movement direction of the robotic arm end effector will deviate from the expected movement direction, requiring a second correction. The preset value can be set according to the actual situation, for example, the preset value can be set to 6. This application does not limit this.
[0194] Calculate the cosine of the end effector's motion direction and the current desired velocity direction, specifically including:
[0195]
[0196]
[0197] Where cosα is the cosine of the direction of motion of the end effector and the direction of the current desired velocity. The velocity at the end, For the current desired speed, J a This is the second Jacobian matrix. This is the first correction result.
[0198] Step S2062: Calculate the angle based on the cosine of the angle between the end-effector's direction of motion and the current desired velocity direction;
[0199] Specifically, based on the cosine value cosα of the angle between the direction of motion of the end effector and the direction of the current desired velocity, the angle α corresponding to this cosine value can be calculated using the arccosine function.
[0200] Step S2063: Set the maximum threshold for the included angle;
[0201] Specifically, set the maximum threshold α of the included angle according to the actual situation. max If the angle between the end effector's motion direction and the current desired speed direction is greater than or equal to the maximum threshold angle, it indicates that the deviation between the end effector's motion direction and the current desired speed direction is too large. If the angle between the end effector's motion direction and the current desired speed direction is less than the maximum threshold angle, it indicates that the deviation between the end effector's motion direction and the current desired speed direction is within a reasonable range.
[0202] In this embodiment of the application, the maximum threshold α of the included angle max You can set it according to your specific needs, for example: set it to π / 30 radians, which is 6°.
[0203] Step S2064: Determine whether the angle is greater than or equal to the maximum threshold of the included angle;
[0204] Specifically, it is determined whether the angle is greater than or equal to the maximum threshold of the included angle. If the angle between the end-effector's motion direction and the current desired velocity direction is greater than or equal to the maximum threshold of the included angle, then proceed to step S2065; if the angle between the end-effector's motion direction and the current desired velocity direction is less than the maximum threshold of the included angle, then proceed to step S2066.
[0205] Step S2065: Set the desired speed of the robotic arm's joints to zero to stop the robotic arm's movement;
[0206] Specifically, if the angle between the end effector's movement direction and the current desired speed direction is greater than or equal to the maximum threshold angle, it indicates that the deviation between the end effector's movement direction and the current desired speed direction is too large. In this case, the desired speed of the robotic arm's joints is set to zero to stop the robotic arm's movement.
[0207] Step S2066: Determine the first correction result as the second correction result;
[0208] Specifically, if the angle between the end effector's motion direction and the current desired velocity direction is less than the maximum threshold angle, it indicates that the deviation between the end effector's motion direction and the current desired velocity direction is within a reasonable range. The first correction result is then determined as the second correction result, which is the final second correction result. for:
[0209]
[0210] in, This is the second correction result, where α is the angle between the direction of motion of the end effector and the current desired velocity direction. max This represents the maximum threshold value for the included angle.
[0211] In this embodiment, the current desired speed of each joint is corrected twice to obtain the first correction result and the second correction result. This can comprehensively consider the limitations on the speed of the robotic arm joints and the limitations on the direction of movement of the robotic arm, thus ensuring the stability and safety of the robotic arm control.
[0212] Please refer to the following: Figure 9 , Figure 9 This is a schematic flowchart illustrating the calculation of the end-effector corrected velocity according to an embodiment of this application.
[0213] like Figure 9 As shown, the process for calculating the end-effector corrected velocity includes:
[0214] Step S901: Calculate the corrected velocity at the end of the trajectory based on the second correction result;
[0215] Specifically, according to the second revision result The end-effector correction velocity can be calculated as follows:
[0216] Step S207: Based on the second correction result, obtain the corrected joint desired speed to control the movement of the robotic arm;
[0217] Please refer to the following: Figure 10 , Figure 10 yes Figure 2 A detailed flowchart of step S207 in the process;
[0218] like Figure 10 As shown, step S207: Based on the second correction result, obtain the corrected joint desired speed to control the movement of the robotic arm, including:
[0219] Step S2071: Determine the second correction result as the corrected joint desired velocity;
[0220] Specifically, the second correction result is determined as the corrected joint expected velocity, which is used to control the pose (position and attitude) of the robotic arm.
[0221] Please refer to the following: Figure 11 , Figure 11 This is a schematic flowchart illustrating the calculation of the corrected joint position provided in an embodiment of this application;
[0222] like Figure 11 As shown, the process for calculating the corrected joint position includes:
[0223] Step S1101: Obtain the refresh rate;
[0224] Specifically, the refresh rate is determined by the signal frequency of the input device. If the input device is a 6D mouse, then the refresh rate is obtained by obtaining the signal frequency of the 6D mouse. For example, the signal frequency of a 6D mouse is 100Hz.
[0225] Step S1102: Calculate the control cycle based on the refresh frequency;
[0226] Specifically, the control cycle is calculated based on the refresh rate, using the following formula:
[0227]
[0228] Where Δt is the control period, f c This refers to the refresh rate.
[0229] Step S1103: Calculate the corrected joint position based on the control cycle and the second correction result;
[0230] Specifically, based on the control period Δt and the second correction result Will Multiplying by Δt yields the position increment. Then add the position increment to the current position q to obtain the corrected joint position q. c Finally, q c The actuators are sent to each joint of the robotic arm to drive the joint motors. The corrected formula for calculating the joint position is as follows:
[0231]
[0232] Where, q c Here, q represents the corrected joint position, and q represents the current joint position of the robotic arm. This is the second correction result, where Δt is the control period.
[0233] Please refer to the following: Figure 12 , Figure 12 This is a control schematic diagram of a robotic arm provided in an embodiment of this application;
[0234] like Figure 12 As shown, taking a six-axis robotic arm as an example, the six-axis robotic arm includes six joints. The input device sends the current desired speed to the controller of the robotic arm. By correcting the speed using the control method of the robotic arm described above, the corrected movement speed of the end effector of the robotic arm can be obtained.
[0235] Please refer to the following: Figure 13 , Figure 13 This is an overall schematic diagram of a robotic arm control method provided in an embodiment of this application;
[0236] like Figure 13 As shown, the system inputs the current desired speed, obtains the current desired speed and joint angle of each joint of the robotic arm, and obtains the first Jacobian matrix based on the differential kinematics principle of the robotic arm. Information on faulty joints of the robotic arm is obtained, and the first Jacobian matrix is corrected to obtain the second Jacobian matrix. Based on the least squares method, the desired joint speed is obtained by combining the current desired speed and the second Jacobian matrix. A maximum constraint speed threshold is set, and the desired joint speed is corrected for the first time to obtain the first correction result. The first correction result is then corrected a second time based on the direction of motion of the end effector and the direction of the current desired speed to obtain the second correction result. The current joint position of the robotic arm and the second correction result are integrated to obtain the corrected joint position. Finally, the corrected joint position is sent to the robotic arm's actuator to control the movement of the robotic arm.
[0237] In this embodiment, a control method for a robotic arm is provided. The robotic arm includes an end effector and multiple joints. The method includes: acquiring the current desired speed and joint angle of each joint of the robotic arm; obtaining a first Jacobian matrix based on the differential kinematics principle of the robotic arm; correcting the first Jacobian matrix to obtain a second Jacobian matrix; calculating the desired speed of the joints of the robotic arm based on the second Jacobian matrix using the least squares method; correcting the desired speed of the joints according to a maximum constraint speed threshold to obtain a first correction result; correcting the first correction result according to the motion direction of the end effector and the current desired speed direction to obtain a second correction result; and obtaining the corrected desired speed of the joints according to the second correction result to control the movement of the robotic arm. This application can calculate the optimal desired speed of each joint of the robotic arm by performing least squares calculation using the Jacobian matrix, thereby enabling the robotic arm to traverse singularities and remotely control the robotic arm even when a malfunction occurs.
[0238] Please refer to the following: Figure 14 , Figure 14 This is a schematic diagram of the structure of a control device for a robotic arm provided in an embodiment of this application;
[0239] The control device of the robotic arm is applied to an electronic device; specifically, the control device of the robotic arm is applied to one or more processors of the electronic device.
[0240] like Figure 14 As shown, the control device 140 of the robotic arm includes:
[0241] Acquisition unit 141 is used to acquire the current desired speed and joint angle of each joint of the robotic arm;
[0242] The processing unit 142 is used to obtain a first Jacobian matrix based on the differential kinematics principle of the robotic arm; correct the first Jacobian matrix to obtain a second Jacobian matrix; calculate the expected joint velocity of the robotic arm based on the least squares method and the second Jacobian matrix; correct the expected joint velocity according to the maximum constraint velocity threshold to obtain a first correction result; correct the first correction result according to the motion direction of the end effector and the current expected velocity direction to obtain a second correction result; and obtain the corrected expected joint velocity according to the second correction result to control the movement of the robotic arm.
[0243] In this embodiment of the application, the acquisition unit 141 is further configured to:
[0244] Get the refresh rate.
[0245] In this embodiment of the application, the processing unit 142 is further configured to:
[0246] Based on the second correction result, calculate the corrected velocity at the end.
[0247] In the embodiments of this application, the control device of the robotic arm can also be constructed from hardware devices. For example, the control device of the robotic arm can be constructed from one or more chips, and the chips can work together in coordination to complete the control method of the robotic arm described in the above embodiments. As another example, the control device of the robotic arm can also be constructed from various logic devices, such as general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), microcontrollers, ARM (Acorn RISC Machine) or other programmable logic devices, discrete gate or transistor logic, discrete hardware components, or any combination of these components.
[0248] The control device for the robotic arm in this embodiment can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. For example, mobile electronic devices can be mobile phones, tablets, laptops, PDAs, in-vehicle electronic devices, wearable devices, ultra-mobile personal computers (UMPCs), netbooks, or personal digital assistants (PDAs), etc., while non-mobile electronic devices can be servers, network-attached storage (NAS), personal computers (PCs), televisions (TVs), ATMs, or self-service machines, etc. This embodiment does not impose specific limitations.
[0249] The control device for the robotic arm in this embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this embodiment does not specifically limit the specific operating system used.
[0250] The control device for the robotic arm provided in this application embodiment can achieve... Figure 2 To avoid repetition, the various processes involved will not be detailed here.
[0251] It should be noted that the control device for the robotic arm described above can execute the control method for the robotic arm provided in the embodiments of this application, and has the corresponding functional modules and beneficial effects of the method. Technical details not described in detail in the embodiments of the control device for the robotic arm can be found in the control method for the robotic arm provided in the above embodiments.
[0252] In this embodiment, a control device for a robotic arm is provided, comprising: an acquisition unit for acquiring the current desired speed and joint angle of each joint of the robotic arm; a processing unit for obtaining a first Jacobian matrix based on the differential kinematics principle of the robotic arm; correcting the first Jacobian matrix to obtain a second Jacobian matrix; calculating the desired joint speed of the robotic arm based on the second Jacobian matrix using the least squares method; correcting the desired joint speed according to a maximum constraint speed threshold to obtain a first correction result; correcting the first correction result according to the motion direction of the end effector and the current desired speed direction to obtain a second correction result; and obtaining the corrected desired joint speed according to the second correction result to control the movement of the robotic arm. This application can calculate the optimal desired speed of each joint of the robotic arm by performing least squares calculation using the Jacobian matrix, thereby enabling the robotic arm to traverse singularities and remotely control the robotic arm even when a malfunction occurs.
[0253] Please refer to the following: Figure 15 , Figure 15 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0254] like Figure 15 As shown, the electronic device 150 includes one or more processors 151 and a memory 152. Wherein, Figure 15 Take a processor 151 as an example.
[0255] Processor 151 and memory 152 can be connected via a bus or other means. Figure 15 Taking the example of a connection between China and Israel via a bus.
[0256] Processor 151 provides computing and control capabilities to control electronic device 150 to perform corresponding tasks. For example, electronic device 150 executes the control method of the robotic arm in any of the above method embodiments, including: acquiring the current desired speed and joint angle of each joint of the robotic arm; obtaining a first Jacobian matrix based on the differential kinematics principle of the robotic arm; correcting the first Jacobian matrix to obtain a second Jacobian matrix; calculating the desired speed of the joints of the robotic arm based on the least squares method and the second Jacobian matrix; correcting the desired speed of the joints according to the maximum constraint speed threshold to obtain a first correction result; correcting the first correction result according to the motion direction of the end effector and the current desired speed direction to obtain a second correction result; obtaining the corrected desired speed of the joints according to the second correction result to control the movement of the robotic arm. This application can calculate the optimal desired speed of each joint of the robotic arm by performing least squares calculation using the Jacobian matrix, thereby enabling the robotic arm to traverse singularities and remotely control the robotic arm even when a malfunction occurs.
[0257] By using the Jacobian matrix and least squares calculation, the expected speed of each joint of the robotic arm is calculated, thereby enabling the robotic arm to traverse singularities and to be remotely controlled when the robotic arm malfunctions.
[0258] Processor 151 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), a hardware chip, or any combination thereof; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The aforementioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0259] Memory 152, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the robotic arm control method in the embodiments of this application. Processor 151 can implement the robotic arm control method in any of the following method embodiments by running the non-transitory software programs, instructions, and modules stored in memory 152. Specifically, memory 152 may include volatile memory (VM), such as random access memory (RAM); memory 152 may also include non-volatile memory (NVM), such as read-only memory (ROM), flash memory, hard disk drive (HDD), solid-state drive (SSD), or other non-transitory solid-state storage devices; memory 152 may also include combinations of the above types of memory.
[0260] Memory 152 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 152 may optionally include memory remotely located relative to processor 151, and such remote memory may be connected to processor 151 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0261] One or more modules are stored in memory 152. When executed by one or more processors 151, they perform the control method of the robotic arm in any of the above method embodiments, for example, the method described above. Figure 2 The steps shown can also be implemented. Figure 14 The functions of each module or unit.
[0262] In this embodiment, the electronic device 150 may also have wired or wireless network interfaces, keyboards, and input / output interfaces for input and output. The electronic device 150 may also include other components for implementing device functions, which will not be described in detail here.
[0263] This application also provides a computer-readable storage medium, such as a memory including program code, which can be executed by a processor to complete the robotic arm control method in the above embodiments. For example, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CDROM), magnetic tape, floppy disk, and optical data storage device, etc.
[0264] This application also provides a computer program product comprising one or more lines of program code stored in a computer-readable storage medium. The processor of an electronic device reads the program code from the computer-readable storage medium and executes the program code to complete the method steps of the robotic arm control method provided in the above embodiments.
[0265] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware, or by a program or program code related to hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0266] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software and a general-purpose hardware platform, or of course, using hardware. 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. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0267] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and not to limit them; under the concept of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations as described above in different aspects of this application, which are not provided in detail for the sake of brevity; although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A control method for a robotic arm, characterized in that, The robotic arm includes an end effector and multiple joints, and the method includes: Obtain the current desired speed and joint angle of each joint of the robotic arm; Based on the principle of differential kinematics of robotic arms, the first Jacobian matrix is obtained; The first Jacobian matrix is modified to obtain the second Jacobian matrix; Based on the least squares method, the expected joint speed of the robotic arm is calculated according to the second Jacobian matrix; The desired speed of the joint is corrected based on the maximum constraint speed threshold to obtain a first correction result; Based on the direction of motion of the end effector and the current desired velocity direction, the first correction result is corrected to obtain the second correction result; Based on the second correction result, the corrected joint desired speed is obtained to control the movement of the robotic arm.
2. The method according to claim 1, characterized in that, The first Jacobian matrix, obtained based on the differential kinematics principle of the robotic arm, includes: Based on the differential kinematics principle of the robotic arm, the current Jacobian matrix of the robotic arm is calculated according to the current desired velocity of the robotic arm and the joint angle. The current Jacobian matrix is determined as the first Jacobian matrix.
3. The method according to claim 2, characterized in that, The step of modifying the first Jacobian matrix to obtain the second Jacobian matrix includes: The joints with a current expected speed of zero are identified as faulty joints; If the faulty joint exists, the column corresponding to the faulty joint is deleted from the first Jacobian matrix to obtain the second Jacobian matrix, wherein each joint corresponds to a column in the first Jacobian matrix. If the faulty joint does not exist, the first Jacobian matrix is determined as the second Jacobian matrix.
4. The method according to claim 3, characterized in that, The calculation of the expected joint velocity of the robotic arm based on the least squares method and according to the second Jacobian matrix includes: Based on the second Jacobian matrix and its pseudo-inverse, the projection matrix of the second Jacobian matrix is determined, specifically including: in, J is the projection matrix of the second Jacobian matrix. a This is the second Jacobian matrix. Let U be the pseudo-inverse of the second Jacobian matrix, U be the first orthogonal matrix obtained by the singular value decomposition of the second Jacobian matrix, V be the second orthogonal matrix obtained by the singular value decomposition of the second Jacobian matrix, and Σ be the diagonal matrix obtained by the singular value decomposition of the second Jacobian matrix. T V is the transpose of the first orthogonal matrix. T Let Σ be the transpose of the second orthogonal matrix. + It is the pseudo-inverse of the diagonal matrix; Based on the projection matrix of the second Jacobian matrix and the current desired velocity, calculate the projection vector of the current desired velocity in the column space of the second Jacobian matrix, specifically including: in, Let the current desired velocity be the projection vector in the column space of the second Jacobian matrix. The projection matrix of the second Jacobian matrix. The current desired speed; Based on the least squares method, and combining the projection vector, the second Jacobian matrix, and the desired velocity, the desired joint velocity is calculated, specifically including: Among them, when At that time, The minimum value is obtained, at which point the desired speed of the joint is obtained. equal 5. The method according to claim 3, characterized in that, The step of correcting the desired joint speed based on the maximum constraint speed threshold to obtain a first correction result includes: Set the maximum constraint speed threshold; If there are several joints whose expected joint speed is greater than the maximum constraint speed threshold, then the ratio of the expected joint speed of the several joints to the maximum constraint speed threshold is calculated to obtain several ratios. The largest ratio among the given ratios is determined as the first ratio, and the desired velocity of the first joint is determined. If all the expected speeds of the joints are less than or equal to the maximum constraint speed threshold, then the expected speed of the joints is determined as the first expected speed of the joint. The desired velocity of the first joint is determined as the first correction result; The step of determining the largest ratio among several ratios as the first ratio and determining the desired speed of the first joint specifically includes: Based on the first ratio, the desired velocity of the first joint is determined, specifically including: in, The desired velocity of the first joint, Let r be the desired velocity of the joint, and r be the first ratio.
6. The method according to claim 5, characterized in that, The robotic arm includes an end effector. The step of correcting the first correction result based on the movement direction of the end effector and the current desired velocity direction to obtain a second correction result includes: Calculate the cosine of the direction of motion of the end effector relative to the direction of the current desired velocity. The calculation formula is as follows: Where cosα is the cosine of the direction of motion of the end effector and the direction of the current desired velocity. The velocity at the end, For the current desired speed, J a This is the second Jacobian matrix. This is the first correction result; The angle is calculated based on the cosine of the angle between the direction of motion of the end and the direction of the current desired velocity. Set the maximum threshold for the included angle; If the angle is greater than or equal to the maximum threshold of the included angle, the desired speed of the robotic arm joint is set to zero to stop the robotic arm movement. If the angle is less than the maximum threshold of the included angle, then the first correction result is determined as the second correction result.
7. The method according to claim 1, characterized in that, After obtaining the second corrected result, the method further includes: Based on the second correction result, the terminal correction velocity is calculated using the following formula: in, J is the end-effector corrected velocity. a This is the second Jacobian matrix. This is the second corrected result.
8. The method according to claim 7, characterized in that, The step of obtaining the corrected joint expected velocity based on the second correction result includes: The second correction result is determined as the corrected joint desired velocity; The method further includes: Get the refresh rate; Based on the refresh frequency, the control period is calculated using the following formula: Where Δt is the control period, f c This refers to the refresh rate; Based on the control cycle and the second correction result, the corrected joint position is calculated using the following formula: Where, q c Here, q represents the corrected joint position, and q represents the current joint position of the robotic arm. This is the second correction result, where Δt is the control period.
9. A control device for a robotic arm, characterized in that, The robotic arm includes an end effector and multiple joints, and the device includes: The acquisition unit is used to acquire the current desired speed and joint angle of each joint of the robotic arm; The processing unit is configured to: obtain a first Jacobian matrix based on the differential kinematics principle of the robotic arm; correct the first Jacobian matrix to obtain a second Jacobian matrix; calculate the desired joint velocity of the robotic arm based on the second Jacobian matrix using the least squares method; correct the desired joint velocity according to the maximum constraint velocity threshold to obtain a first correction result; correct the first correction result according to the motion direction of the end effector and the current desired velocity direction to obtain a second correction result; and obtain the corrected desired joint velocity according to the second correction result to control the movement of the robotic arm.
10. An electronic device, characterized in that, include: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the control method of the robotic arm as described in any one of claims 1-8.
Citation Information
Patent Citations
Strangular protection method for robot and robot system
CN115157251A
Inverse kinematics
US20100228396A1