Control method of mechanical arm, electronic device and mechanical arm

By introducing an objective function to optimize the joint angle, the collision problem of the robotic arm in a confined space is solved, achieving a high level of safety and making it suitable for precision operations in narrow spaces.

CN123129130APending Publication Date: 2026-11-20ZHEJIANG AITU EMBODIED INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611214365.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-11
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

When existing robotic arms operate in confined spaces, the traditional inverse kinematics solution method often results in large swings or redundant flips of the elbow and wrist, which can easily lead to collisions with obstacles, affecting operational safety and equipment integrity.

Method used

By introducing an objective function, taking into account end-effector position error, attitude error, and collision risk, iterative calculations are performed on multiple joints to optimize joint angles, thereby reducing collision risk and improving operational safety and environmental adaptability.

Benefits of technology

It effectively reduces collisions between the robotic arm and obstacles, improves operational safety and motion stability, and is especially suitable for delicate operations in narrow spaces, such as fabric gripping and sewing machine operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123129130A_ABST
    Figure CN123129130A_ABST
Patent Text Reader

Abstract

The application provides a control method of a mechanical arm, an electronic device and the mechanical arm. The method comprises the following steps: obtaining a target end position and a target end posture; performing iterative calculation of joint angles of multiple joints according to the target end position and the target end posture to obtain target joint angles which make a value of a target function minimum; the target function is a function determined according to an end position error, an end posture error and a collision risk of the mechanical arm, with the joint angles of the multiple joints as independent variables; the end position error is used to represent a deviation degree between an actual position of an end of the mechanical arm and the target end position; the end posture error is used to represent a deviation degree between an actual posture of the end of the mechanical arm and the target end posture; the collision risk is used to represent a space interference degree between the mechanical arm and an obstacle; and the multiple joints of the mechanical arm are controlled to move according to the target joint angles. The application can improve the operation safety of the mechanical arm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of robotic arm control technology, and in particular to a control method for a robotic arm, an electronic device, and a robotic arm. Background Technology

[0002] With the rapid development of intelligent manufacturing and flexible automation technologies, sewing, assembly, and other scenarios place extremely high demands on the operational capabilities of robotic arms in confined spaces. In operations such as fabric gripping and single-layer separation, the end effector of the robotic arm needs to frequently approach areas with dense obstacles, such as sewing machine tables, fixtures, and workpiece stacking areas.

[0003] In existing technologies, conventional methods for solving the inverse kinematics of robotic arms (such as the Jacobi pseudo-inverse method and analytical methods) typically only consider "the end effector reaching the target pose" as the sole calculation objective. This strategy works in open spaces, but when faced with small workspaces like sewing machine tables, traditional algorithms, in pursuit of instantaneous end effector arrival at the designated position, often cause significant swinging or redundant flipping of the robotic arm's elbow and wrist. This can easily lead to collisions with the sewing machine column, tabletop, or surrounding equipment, causing equipment damage or fabric contamination, thus compromising the operational safety of the robotic arm. Summary of the Invention

[0004] This application provides a control method, electronic device, and robotic arm with high safety.

[0005] This application provides a control method for a robotic arm, the robotic arm including multiple joints, the method comprising: Obtain the target end-effector position and target end-effector pose; the target end-effector position is the desired position of the end of the robotic arm; the target end-effector pose is the desired pose of the end of the robotic arm. Based on the target end-effector position and the target end-effector posture, iterative calculations are performed on the joint angles of the multiple joints to obtain the target joint angle that minimizes the value of the objective function. The objective function is a function determined based on the end-effector position error, end-effector posture error, and collision risk of the robotic arm, with the joint angles of the multiple joints as independent variables. The end-effector position error characterizes the degree of deviation between the actual position of the robotic arm's end-effector and the target end-effector position. The end-effector posture error characterizes the degree of deviation between the actual posture of the robotic arm's end-effector and the target end-effector posture. The collision risk characterizes the degree of spatial interference between the robotic arm and obstacles. The movement of the plurality of joints of the robotic arm is controlled according to the target joint angle.

[0006] In some embodiments, collision risk is incorporated into the objective function, and collision risk is co-optimized with end-effector position error and end-effector attitude error. In this way, when the robotic arm is working in a narrow space, the risk of collision between the robotic arm and other obstacles in the space can be reduced, thereby improving the operational safety and environmental adaptability of the robotic arm in a confined environment.

[0007] Optionally, the collision risk is determined based on the degree of deviation between the shortest distance between the link of the robotic arm and the obstacle and a preset safe distance.

[0008] In some embodiments, the collision risk can be easily determined based on the deviation between the shortest distance between the robotic arm's link and the obstacle and a preset safe distance, thereby improving the response speed of the robotic arm's control method.

[0009] Optionally, the objective function is determined based on the joint angles of the plurality of joints as independent variables, according to the end position error, end posture error, collision risk, and joint smoothness of the robotic arm; the joint smoothness is used to characterize the degree of deviation between the joint angles of the plurality of joints and the target joint angle of the previous control cycle.

[0010] In some embodiments, joint smoothness, along with end-effector position error, end-effector posture error, and collision risk, constitutes the objective function. Joint smoothness can constrain the deviation between the target joint angle and the target joint angle of the previous control cycle, i.e., constrain the trend of change of the target joint angle. In this way, the motion continuity and smoothness of the robotic arm between adjacent control cycles can be improved, and joint angle jumps and motion oscillations can be reduced.

[0011] Optionally, the objective function is determined based on the joint angles of the plurality of joints as independent variables, according to the end position error, end posture error, collision risk, and joint offset degree of the robotic arm; the joint offset degree is used to characterize the degree of deviation between the joint angles of the plurality of joints and a preset reference joint angle.

[0012] In some embodiments, the degree of joint offset, end-effector position error, end-effector posture error, and collision risk together constitute the objective function. This allows the robotic arm to move as close as possible to the desired configuration, reducing large-scale swinging and improving the stability of the robotic arm's movement.

[0013] Optionally, the objective function is determined by multiplying the joint angles of the plurality of joints as independent variables, based on the end-effector position error, end-effector posture error, collision risk, joint smoothness, joint offset degree, and corresponding weights of the robotic arm; the joint smoothness is used to characterize the degree of deviation between the joint angles of the plurality of joints and the target joint angle of the previous control cycle; the joint offset degree is used to characterize the degree of deviation between the joint angles of the plurality of joints and a preset reference joint angle.

[0014] In some embodiments, the objective function is determined based on the product of the end-effector position error, end-effector posture error, collision risk, joint smoothness, joint offset, and their corresponding weights. During the control of the robotic arm, the corresponding weights can be adjusted to regulate the degree of attention given to different control conditions, thereby improving the flexibility and adaptability of the robotic arm control.

[0015] Optionally, the weights corresponding to the collision risk, the joint smoothness, and the joint offset are greater than the weights corresponding to the end-effector position error and the end-effector posture error.

[0016] In some embodiments, the weights corresponding to collision risk, joint smoothness, and joint offset are greater than the weights corresponding to end-effector position error and end-effector posture error, thereby ensuring the movement safety and stability of the robotic arm during the control process.

[0017] Optionally, the step of iteratively calculating the joint angles of the plurality of joints based on the target end position and the target end pose to obtain the target joint angle that minimizes the value of the objective function includes: Based on the target end position and the target end pose, iterative calculations are performed on the joint angles of the multiple joints to obtain the target joint angles that minimize the value of the objective function and satisfy the constraints; the constraints include one or more of the following: The target joint angle is within a preset joint angle range; The rate of change of the target joint angle in adjacent control cycles is within a preset rate of change range; The end effector of the robotic arm is positioned within the permissible space. The distance between the link of the robotic arm and the obstacle is greater than a preset safety distance.

[0018] In some embodiments, by introducing constraints, the obtained target joint angles are made kinematically feasible and can be guaranteed to be safe.

[0019] This application provides an electronic device, including: Memory is used to store executable instructions for a computer; The processor, when executing computer-executable instructions stored in the memory, implements the control method of the robotic arm described in any of the preceding claims.

[0020] This application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the control method of the robotic arm described in any of the above claims.

[0021] This application provides a computer program product including computer-executable instructions stored in a computer-readable storage medium; When the processor of the electronic device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, it implements the control method of the robotic arm described in any of the above claims.

[0022] This application provides a robotic arm, comprising: Multiple joints; and The electronic device described above is electrically connected to the plurality of joints.

[0023] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0024] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0025] Figure 1 The diagram shown is a flowchart of one embodiment of the control method for the robotic arm of this application.

[0026] Figure 2 This is a hardware structure diagram of an electronic device illustrated in this specification according to an exemplary embodiment. Detailed Implementation

[0027] This application provides a control method, electronic device, and robotic arm for a robotic arm. The control method, electronic device, and robotic arm of this application will be described in detail below with reference to the accompanying drawings. Unless otherwise specified, the features in the following embodiments and implementations can be combined with each other.

[0028] Figure 1 The diagram shown is a flowchart of one embodiment of the control method for the robotic arm of this application.

[0029] like Figure 1 As shown, the control method of the robotic arm includes steps 11 to 13.

[0030] The control method for the robotic arm utilizes a robotic arm comprising multiple joints. These joints can be rotary or prismatic, and are connected in series via links. The end effector is the end of the last link of the robotic arm, i.e., the mounting position of the end effector.

[0031] Step 11: Obtain the target end position and target end attitude.

[0032] The target end-effector position is the desired position of the robotic arm's end effector. The target end-effector posture is the desired posture of the robotic arm's end effector. The target end-effector position and posture can be determined based on the task to be performed by the robotic arm. For example, when the robotic arm performs tasks such as fabric gripping or single-layer separation, the required position and posture of the end effector are preset according to the operational requirements. Optionally, the target end-effector position and posture can be obtained through a host computer, user input, or a pre-stored task planning file.

[0033] The target end position and target end attitude can be combined into the target end pose, denoted as: .

[0034] in, T d The target end pose; R d The target's end attitude; P d The target end position.

[0035] After obtaining the target end position and target end pose, the control method of the robotic arm may also include: transforming the target end position and target end pose to the workspace coordinate system so that it is consistent with the coordinates of other objects in the workspace.

[0036] Step 12: Based on the target end position and target end pose, perform iterative calculations of the joint angles of multiple joints to obtain the target joint angles that minimize the value of the objective function.

[0037] The objective function is determined based on the joint angles of multiple joints as independent variables, taking into account the end-effector position error, end-effector attitude error, and collision risk of the robotic arm. The end-effector position error characterizes the actual position of the robotic arm's end effector and the degree of deviation from the target end-effector position. The end-effector attitude error characterizes the actual attitude of the robotic arm's end effector and the degree of deviation from the target end-effector attitude. The collision risk characterizes the degree of spatial interference between the robotic arm and obstacles.

[0038] The objective function evaluates the end-effector position error, end-effector attitude error, and collision risk for a set of candidate joint angles. By minimizing the objective function, the joint angles with the lowest combined end-effector position error, end-effector attitude error, and collision risk can be selected. In the objective function, end-effector position error, end-effector attitude error, and collision risk can have different weights to reflect varying degrees of concern. For example, when safety requirements are high, increasing the weight of collision risk can yield joint angles with lower collision risk.

[0039] The end-effector position error can be determined based on the forward kinematics model of the robotic arm. Specifically, firstly, the actual position of the robotic arm's end effector is calculated using forward kinematics based on the joint angles of multiple joints; then, the deviation between the actual position and the target end effector position is calculated to obtain the end-effector position error. The end-effector position error can be represented using Euclidean distance or squared distance. The end-effector position error can be expressed as: ,or, .

[0040] The end-effector attitude error can be determined based on the forward kinematics model of the robotic arm. Specifically, firstly, the actual attitude of the robotic arm's end effector is calculated using forward kinematics based on the joint angles of multiple joints; then, the deviation between the actual attitude and the target end-effector attitude is calculated to obtain the end-effector attitude error. When Euler angles are used to represent the attitude, the end-effector attitude error can be represented as the weighted sum of squares of the Euler angle deviations. The end-effector attitude error can be represented using a Lie group logarithmic mapping as follows: ,or, .

[0041] Obstacles can be fixed obstacles in the working environment of the robotic arm, such as equipment, walls, and workbenches, or they can be dynamic obstacles, such as other mobile devices or people.

[0042] Optionally, the collision risk is determined based on the degree of deviation between the shortest distance between the robotic arm's link and the obstacle and a preset safe distance.

[0043] First, the geometrical occupancy of the robotic arm's links in space is determined. The links have defined geometric shapes and dimensions. Based on the joint angles of multiple joints, the position and orientation of each link in space are calculated using forward kinematics, thus determining the spatial geometrical occupancy of each link. Optionally, the links can be modeled using geometric shapes such as cylinders, cuboids, or convex polyhedra. Second, the geometrical occupancy of obstacles in space is determined. The spatial position and geometric dimensions of obstacles can be obtained in real-time through sensors or pre-calibrated based on prior information about the working environment. Optionally, obstacles can be modeled using geometric shapes such as spheres, cylinders, cuboids, or convex polyhedra. For obstacles with complex shapes, an approximate representation can be achieved by combining multiple basic geometric shapes. Then, the shortest distance between each link and the obstacle is calculated. The shortest distance is defined as the minimum Euclidean distance between the geometrical occupancy of the i-th link and the geometrical occupancy of the obstacle. Based on the deviation between the shortest distance and a preset safety distance, the collision risk corresponding to the i-th link is determined. Specifically, when the shortest distance is greater than or equal to the preset safe distance, it indicates that the distance between the i-th link and the obstacle is safe enough and the collision risk is zero; when the shortest distance is less than the preset safe distance, it indicates that the distance between the i-th link and the obstacle is less than the safe distance and there is a collision risk. In this case, the collision risk increases as the difference decreases.

[0044] Collision risk can be represented as: in, m The number of links; For the first j The shortest distance from each link to the obstacle; For safe distance.

[0045] In some embodiments, the collision risk can be easily determined based on the deviation between the shortest distance between the robotic arm's link and the obstacle and a preset safe distance, thereby improving the response speed of the robotic arm's control method.

[0046] Iterative calculations of joint angles for multiple joints can be performed using numerical optimization algorithms to solve the objective function. Optional numerical optimization algorithms include, but are not limited to: gradient descent, Newton's method, Gauss-Newton method, Levenberg-Marquardt algorithm, differential evolution algorithm, and particle swarm optimization algorithm.

[0047] For a robotic arm with 7 joints, the target joint angle can be expressed as: .

[0048] in, q iLet be the angle of the i-th joint.

[0049] Step 13: Control the movement of multiple joints of the robotic arm according to the target joint angle.

[0050] After obtaining the target joint angle, the target joint angle is used as a control command to send to the actuators of each joint of the robotic arm, controlling multiple joints of the robotic arm to rotate or move according to the target joint angle, so that the end effector of the robotic arm reaches the target end position and the target end posture.

[0051] The forward kinematic output of the robotic arm is denoted as: .

[0052] in, R(q) For the joint angle is q The end posture at that time, P(q) For the joint angle is q The end position of time.

[0053] Optionally, before sending the target joint angle to the actuators of each joint of the robotic arm, the target joint angle can be smoothed, for example, by using a trajectory interpolation method to generate a smooth motion trajectory from the current joint angle to the target joint angle, in order to reduce the impact and vibration of the robotic arm during the movement.

[0054] Optionally, the control method for the robotic arm can be executed cyclically according to a preset control cycle. That is, in each control cycle, steps 11 to 13 are re-executed to achieve real-time control of the robotic arm. When the target end position and / or target end posture changes, by re-iteratio calculation in each control cycle, the robotic arm can adapt to the changing target end position and / or target end posture in real time.

[0055] In some embodiments, collision risk is incorporated into the objective function, and the collision risk is co-optimized with the end-effector position error and end-effector attitude error. This reduces the risk of collisions between the robotic arm and other obstacles in confined spaces, improving its operational safety and environmental adaptability in restricted environments. In the field of intelligent sewing machines, this significantly reduces the risk of collisions with the machine table and presser foot, making it particularly suitable for delicate tasks such as fabric gripping and threading.

[0056] In some embodiments, the objective function is determined based on the end-effector position error, end-effector posture error, collision risk, and joint smoothness, with the joint angles of multiple joints as independent variables. Joint smoothness characterizes the degree of deviation between the joint angles of multiple joints and the target joint angles of the previous control cycle.

[0057] The target joint angle of the previous control cycle is the target joint angle calculated iteratively and used to control the movement of the robotic arm in the previous control cycle. Optionally, the smoothness of the joint is represented by the square of the Euclidean distance between the current candidate joint angles of multiple joints and the target joint angle of the previous control cycle. When this value is small, it indicates that the deviation between the current candidate joint angle and the target joint angle of the previous control cycle is small, and the joint movement is relatively smooth; when this value is large, it indicates that the current candidate joint angle has changed significantly relative to the target joint angle of the previous control cycle, and the smoothness of the joint movement is low.

[0058] The smoothness of a joint can be expressed as: .in, q k-1 The target joint angle for the previous control cycle.

[0059] During the iterative calculation, the target joint angle of the previous control cycle remains fixed in each iteration and is not updated with the current iteration process, unless the next control cycle is entered.

[0060] In the first control cycle, since there is no target joint angle from the previous control cycle, the joint smoothness can be initialized by using a preset initial joint angle instead of the target joint angle from the previous control cycle.

[0061] Joint smoothness, along with end-effector position error, end-effector posture error, and collision risk, constitutes the objective function. This allows the robotic arm to avoid abrupt acceleration changes in the joints during trajectory execution, preventing body vibration and ensuring the success rate of precision operations (such as threading a needle or fine-tuning the gripping point). Joint smoothness can constrain the deviation between the target joint angle and the target joint angle of the previous control cycle, thus constraining the trend of target joint angle change. This improves the continuity and stability of the robotic arm's motion between adjacent control cycles, reducing joint angle jumps and motion oscillations.

[0062] In some embodiments, the objective function is determined based on the end-effector position error, end-effector posture error, collision risk, and joint offset degree of the robotic arm, with the joint angles of multiple joints as independent variables. The joint offset degree characterizes the degree of deviation between the joint angles of multiple joints and a preset reference joint angle.

[0063] The preset reference joint angles represent a pre-defined desired joint configuration, and their specific values ​​can be determined based on different application requirements. The preset reference joint angles can be dynamically adjusted according to the current task of the robotic arm. During task switching, the preset reference joint angles are switched synchronously, ensuring that the reference benchmark for joint offset matches the current task requirements, thereby making the robotic arm configuration closer to the optimal form for that task.

[0064] The degree of joint offset can be represented by the square of the Euclidean distance between the current candidate joint angle and the preset reference joint angle. When this value is small, it indicates that the current candidate joint angle is close to the preset reference joint angle, and the robot arm is near the desired offset configuration; when this value is large, it indicates that the current candidate joint angle deviates far from the preset reference joint angle, and the robot arm configuration deviates from the desired configuration.

[0065] The degree of joint misalignment can be expressed as: .in, q ref For reference joint angles.

[0066] The degree of joint offset, along with the end-effector position error, end-effector posture error, and collision risk, constitutes the objective function. This allows the robotic arm to move as close as possible to the desired configuration, reducing large-scale swinging and improving the stability of its movement.

[0067] In some embodiments, the objective function is determined by multiplying the joint angles of multiple joints as independent variables, based on the end-effector position error, end-effector posture error, collision risk, joint smoothness, joint offset, and corresponding weights.

[0068] The objective function is determined by multiplying the end-effector position error, end-effector posture error, collision risk, joint smoothness, joint offset, and their corresponding weights. During the control of the robotic arm, the weights can be adjusted to regulate the degree of attention given to different control conditions, thereby improving the flexibility and adaptability of the robotic arm control.

[0069] The objective function can be expressed as: J (q)= w p J p (q)+ w R J R (q)+ w s J s (q)+ w b J b (q)+ w c J c (q) in, w p The weight for the end position error; w R The weights for the end-effector attitude error;w c Weighting for collision risk; w s Weights for the smoothness of the joint; w b The weights for the degree of joint offset.

[0070] Optionally, the weights corresponding to collision risk, joint smoothness, and joint offset are greater than the weights corresponding to end-effector position error and end-effector attitude error.

[0071] During the control of the robotic arm, when the collision risk, joint smoothness, and joint offset are high, a large penalty value will be generated in the objective function. This will drive iterative calculation to prioritize adjusting the joint angle to reduce the collision risk, joint smoothness, and joint offset, even if the adjustment will lead to an increase in the end-effector position error or end-effector posture error.

[0072] The weights corresponding to collision risk, joint smoothness, and joint offset are greater than the weights corresponding to end-effector position error and end-effector posture error, which ensures the safety and stability of the robotic arm's movement during the control process.

[0073] In some embodiments, step 12 includes: Based on the target end-effector position and attitude, iterative calculations of joint angles for multiple joints are performed to obtain the target joint angles that minimize the objective function and satisfy the constraints. The constraints include one or more of the following: The target joint angle is within the preset joint angle range; The rate of change of the target joint angle in adjacent control cycles is within a preset rate of change range; The end effector of the robotic arm is positioned within the permissible operating space; The distance between the robotic arm's linkage and the obstacle is greater than the preset safety distance.

[0074] The constraints are hard constraints; the target joint angles must satisfy these constraints during the iterative calculation process, otherwise the solution is deemed infeasible. The objective function and constraints constitute a nonlinear programming problem; solving this nonlinear programming problem yields the target joint angles.

[0075] The above constraints can be expressed as: in, Let be the minimum allowable angle for the i-th joint; This represents the maximum permissible angle of the i-th joint. The target joint angle of the i-th joint in the previous control cycle; This represents the maximum change in the target joint angle between adjacent control cycles. This represents the minimum change in the target joint angle between adjacent control cycles. This is the lower bound of the permitted activity space; This is the upper bound of the allowed activity space.

[0076] The preset joint angle range is the physical range of motion of each joint of the robotic arm. The joint angle range is determined by the mechanical structure of the robotic arm. For example, for rotary joints, the joint angle range is determined by mechanical limit blocks or encoder range; for locating joints, the joint angle range is determined by lead screw travel or guide rail length. Joint angles exceeding the joint angle range are physically impossible to achieve, and forcibly executing them will result in mechanical collisions or equipment damage.

[0077] The preset rate of change range is the range of how fast the target joint angle changes in adjacent control cycles. During the iterative calculation, based on the preset rate of change range and the target joint angle of the previous control cycle, the feasible range of the target joint angle in the current control cycle is determined, and the search is performed within this feasible range. In this way, the rate of change of the target joint angle in adjacent control cycles can be controlled within the preset rate of change range.

[0078] The allowable activity space is the spatial range that the end effector of the robotic arm is permitted to reach in Cartesian space. The allowable activity space can be determined based on the robotic arm's working environment; for example, based on the workpiece layout on the worktable, areas where collisions might occur are excluded from the allowable activity space. The allowable activity space can be a cuboid, sphere, cylinder, or polyhedral region. During iterative calculations, the end effector position of the robotic arm is calculated each time based on candidate joint angles, and it is determined whether this position is within the allowable activity space; if not, the candidate joint angle is discarded.

[0079] The distance between each link of the robotic arm and any obstacle is greater than a preset safety distance. During the iterative calculation process, solutions that do not meet this condition are directly discarded.

[0080] By introducing constraints, the target joint angles obtained can be kinematically feasible and can be guaranteed to be safe.

[0081] Figure 2 This is a hardware structure diagram of an electronic device illustrated in this specification according to an exemplary embodiment, such as... Figure 2As shown, the device may include: a processor 21, a memory 22, an input / output interface 23, a communication interface 24, and a bus 25. The processor 21, memory 22, input / output interface 23, and communication interface 24 are interconnected within the device via the bus 25.

[0082] The processor 21 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the steps for identifying motion sickness conditions provided in the embodiments of this specification.

[0083] The memory 22 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 22 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 22 and is called and executed by the processor 21.

[0084] Input / output interface 23 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touch screens, microphones, various sensors, etc., and output devices may include displays, speakers, vibrators, indicator lights, etc.

[0085] Communication interface 24 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (e.g., USB, Ethernet cable, etc.) or wireless means (e.g., mobile network, WIFI, Bluetooth, etc.).

[0086] Bus 25 includes a pathway for transmitting information between various components of the device, such as processor 21, memory 22, input / output interface 23, and communication interface 24.

[0087] It should be noted that although the above-described device only shows the processor 21, memory 22, input / output interface 23, communication interface 24, and bus 25, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.

[0088] This specification also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the robotic arm control method provided in this specification.

[0089] This specification also provides a computer program product, which includes computer-executable instructions stored in a computer-readable storage medium; wherein, when the processor of an electronic device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, it implements the steps of the robotic arm control method described in the above embodiments of this application.

[0090] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0091] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0092] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0093] This application also provides a robotic arm, including: multiple joints, and electronic devices as described above, wherein the electronic devices are electrically connected to the multiple joints.

Claims

1. A control method for a robotic arm, characterized in that, The robotic arm includes multiple joints, and the method includes: Obtain the target end-effector position and target end-effector pose; the target end-effector position is the desired position of the end of the robotic arm; the target end-effector pose is the desired pose of the end of the robotic arm. Based on the target end-effector position and the target end-effector posture, iterative calculations are performed on the joint angles of the multiple joints to obtain the target joint angle that minimizes the value of the objective function. The objective function is a function determined based on the end-effector position error, end-effector posture error, and collision risk of the robotic arm, with the joint angles of the multiple joints as independent variables. The end-effector position error characterizes the degree of deviation between the actual position of the robotic arm's end-effector and the target end-effector position. The end-effector posture error characterizes the degree of deviation between the actual posture of the robotic arm's end-effector and the target end-effector posture. The collision risk characterizes the degree of spatial interference between the robotic arm and obstacles. The movement of the plurality of joints of the robotic arm is controlled according to the target joint angle.

2. The control method for the robotic arm according to claim 1, characterized in that, The collision risk is determined based on the degree of deviation between the shortest distance between the link of the robotic arm and the obstacle and a preset safe distance.

3. The control method for the robotic arm according to claim 1, characterized in that, The objective function is determined based on the joint angles of the multiple joints as independent variables, and according to the end position error, end posture error, collision risk, and joint smoothness of the robotic arm. The joint smoothness is used to characterize the degree of deviation between the joint angles of the plurality of joints and the target joint angle of the previous control cycle.

4. The control method for the robotic arm according to claim 1, characterized in that, The objective function is determined based on the joint angles of the multiple joints as independent variables, according to the end position error, end posture error, collision risk, and joint offset degree of the robotic arm. The degree of joint offset is used to characterize the degree of deviation between the joint angles of the plurality of joints and the preset reference joint angles.

5. The control method for the robotic arm according to claim 1, characterized in that, The objective function is determined by multiplying the joint angles of the multiple joints as independent variables, based on the end-effector position error, end-effector posture error, collision risk, joint smoothness, joint offset degree, and corresponding weights of the robotic arm. The joint smoothness is used to characterize the degree of deviation between the joint angles of the plurality of joints and the target joint angle of the previous control cycle. The degree of joint offset is used to characterize the degree of deviation between the joint angles of the plurality of joints and the preset reference joint angles.

6. The control method for the robotic arm according to claim 5, characterized in that, The weights corresponding to the collision risk, the joint smoothness, and the joint offset are greater than the weights corresponding to the end-effector position error and the end-effector posture error.

7. The control method for the robotic arm according to claim 1, characterized in that, The step of iteratively calculating the joint angles of the multiple joints based on the target end position and the target end pose to obtain the target joint angle that minimizes the value of the objective function includes: Based on the target end position and the target end pose, iterative calculations are performed on the joint angles of the multiple joints to obtain the target joint angles that minimize the value of the objective function and satisfy the constraints; the constraints include one or more of the following: The target joint angle is within a preset joint angle range; The rate of change of the target joint angle in adjacent control cycles is within a preset rate of change range; The end effector of the robotic arm is positioned within the permissible space. The distance between the link of the robotic arm and the obstacle is greater than a preset safety distance.

8. An electronic device, characterized in that, include: Memory is used to store executable instructions for a computer; A processor, when executing computer-executable instructions stored in the memory, implements the control method of the robotic arm according to any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that, The device stores computer-executable instructions, which, when executed by a processor, implement the control method of the robotic arm according to any one of claims 1 to 7.

10. A computer program product, characterized in that, The computer program product includes computer-executable instructions stored in a computer-readable storage medium; When the processor of the electronic device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, it implements the control method of the robotic arm according to any one of claims 1 to 7.

11. A robotic arm, characterized in that, include: Multiple joints; and The electronic device of claim 8 is electrically connected to the plurality of joints.