A teaching system for a robot arm

By combining the sensor acquisition module and the teaching module, the optimal motor rotation angle is selected and cascaded control is performed, which solves the problem of large reproduction error caused by joint error in the robotic arm teaching system and realizes fast, accurate and stable reproduction of the action.

CN117182873BActive Publication Date: 2026-06-30BEIJING MECHANICAL EQUIP INST

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING MECHANICAL EQUIP INST
Filing Date
2022-05-31
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing robotic arm teaching systems struggle to avoid joint errors that result in significant errors in motion reproduction, as well as difficulties in selecting appropriate motor angles from multiple sets of motor angles for motion reproduction.

Method used

The sensor acquisition module collects the posture information of the end effector of the robotic arm and the actual rotation angle information of the joint motor. The inverse kinematics solution is performed through the teaching module, the optimal group of motors is selected to reproduce the rotation angle, and the cascade control is performed through the motor operation control module to realize the reproduction of the robotic arm's movement.

Benefits of technology

It enables rapid, accurate, and stable reproduction of robotic arm movements, reduces pose errors caused by joint errors, and improves the consistency of movements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117182873B_ABST
    Figure CN117182873B_ABST
Patent Text Reader

Abstract

This invention relates to a teaching system for a robotic arm, belonging to the field of teaching-type robotic arm design technology. It solves the problems of existing robotic arm teaching systems, such as the large errors in reproduced movements caused by joint errors and the difficulty in selecting appropriate motor angles from multiple sets of motor angles for movement reproduction. The system includes a sensor acquisition module for acquiring the posture information of the robotic arm's end effector and the actual rotation angle information of each joint motor corresponding to the taught robotic arm movement at set time intervals; a teaching module for performing inverse kinematics on the received posture information to obtain multiple sets of motor reproduction angles, and then selecting the optimal set of motor reproduction angles corresponding to each posture information based on the received actual rotation angle information of each joint motor; and a motor motion control module for cascade control of the joint angles of the robotic arm based on the optimal set of motor reproduction angles corresponding to each posture information, thereby realizing the reproduction of the taught robotic arm movement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of teach-in robotic arm design technology, and more particularly to a teach-in system for robotic arms. Background Technology

[0002] Robotic arms can assist or replace humans in completing high-risk tasks. Teach-penned robotic arms, which can reproduce motion trajectories based on operator input, are widely used in automated assembly lines and other industrial applications. Ideally, current teaching methods allow the robotic arm to automatically memorize the position, posture, and motion parameters of each taught action during the teaching process, and automatically generate a program to continuously execute all operations. After teaching is complete, a single start command is given to the robotic arm, which will precisely follow the taught actions step-by-step to complete all operations, thus reproducing the motion. A key factor is determining which motion parameters to sample.

[0003] Currently, the motion parameters typically sampled are the joint angles of each joint. Storing these joint angles completely allows for the reproduction of the values ​​during the teaching process. However, each joint has joint errors due to factors such as assembly precision. These errors accumulate at the end effector, leading to significant pose errors. Another approach is to sample the end effector's attitude sensor. The advantage is that the reproduced values ​​maintain a high degree of consistency with the sampled values. However, obtaining the rotation angle of each motor using this method may result in multiple sets of values.

[0004] Therefore, existing robotic arm teaching systems struggle to avoid problems such as large errors in motion reproduction caused by joint errors and difficulty in selecting appropriate motor angles from multiple sets of motor angles for motion reproduction. Summary of the Invention

[0005] Based on the above analysis, the present invention aims to provide a teaching system for robotic arms to solve the problems of existing robotic arm teaching systems, which are difficult to avoid joint errors that cause large errors in motion reproduction and are difficult to select a suitable motor angle from multiple sets of motor angles for motion reproduction.

[0006] This invention provides a teaching system for a robotic arm, including a sensor acquisition module, a teaching module, and a motor operation control module;

[0007] The sensor acquisition module is used to acquire the posture information of the end effector of the robotic arm corresponding to the robotic arm teaching action and the actual rotation angle information of each joint motor based on a set time interval.

[0008] The teaching module is used to perform inverse kinematics solution based on the received posture information to obtain multiple sets of motor reproduction angles, and then select the optimal set of motor reproduction angles corresponding to each posture information based on the received actual rotation angle information of each joint motor.

[0009] The motor motion control module is used to perform cascade control of the joint angles of the robotic arm based on the optimal group of motor reproduction angles corresponding to the received posture information, so as to realize the reproduction of the taught actions of the robotic arm.

[0010] Furthermore, the teaching module obtains the optimal group motor reproduction angle corresponding to each attitude information by sequentially executing the following steps:

[0011] The inverse kinematics solution is performed on the current posture information to obtain multiple sets of motor reproduction angles; each set of motor reproduction angles includes the reproduction angles of each joint of the robotic arm;

[0012] The following processing is performed sequentially on each group of motors to reproduce the rotation angle, resulting in multiple usable groups of motors to reproduce the rotation angle:

[0013] If the signs of the joints reproduced in the current group of motors are the same, then it is determined whether the error between the reproduced angle of each joint in the group and the actual angle of the corresponding joint motor is less than or equal to the preset error threshold of the corresponding joint. If so, the current group is used as the available group of motors to reproduce angles.

[0014] Based on the obtained rotation angles of multiple available motor groups, the optimal rotation angle of the motor group is selected.

[0015] Furthermore, the teaching module selects the optimal motor group rotation angle based on the obtained multiple available motor group rotation angles, including:

[0016] The average error between the joint reproduced angle of each available group of motors and the actual angle of each joint motor is calculated, and the reproduced angle of the available group of motors with the smallest average error is selected as the optimal group of motors reproduced angle.

[0017] Furthermore, the teaching module selects the optimal motor group rotation angle based on the obtained multiple available motor group rotation angles, including:

[0018] The robot arm's joints are prioritized, and based on this priority, the rotation angles reproduced by each available group of motors are sequentially evaluated to determine the optimal group of motors for reproducing rotation angles, including:

[0019] S11. Take the joint with the highest priority as the current joint, and take the rotation angle of all available group motors as the current rotation angle of each available group motor.

[0020] S12. Obtain the corresponding reproduced angle of the current joint in the currently available group of motor reproduced angles, and obtain each error based on the actual angle of the corresponding motor;

[0021] S13. Sort the obtained errors by magnitude.

[0022] If the number of available group motor repeating angles corresponding to the minimum error is 1, then the available group motor repeating angle corresponding to the minimum error is taken as the optimal group motor repeating angle.

[0023] If the number of available group motor reproduction angles corresponding to the minimum error is not 1, and the current joint is not the joint with the lowest priority, then the available group motor reproduction angles corresponding to the minimum error are taken as the current available group motor reproduction angles, and the current joint is updated to the next priority joint, and the process returns to step S12; if the current joint is the joint with the lowest priority, then a group is randomly selected from the available group motor reproduction angles corresponding to the minimum error as the optimal group motor reproduction angles.

[0024] Furthermore, the actual rotation angle of each joint motor is multiplied by a set fixed proportional coefficient to serve as the error threshold for each joint.

[0025] Furthermore, the teaching module, based on the obtained rotation angles reproduced by multiple available motor groups, selects the optimal rotation angle for each motor group, and further includes:

[0026] After selecting one of the available group motor reproduction angles as the optimal group motor reproduction angle from multiple available group motor reproduction angles, the reproduction angles of each joint in the optimal group motor reproduction angle are weighted with the corresponding actual motor rotation angles to obtain the weighted reproduction angles of each joint; the reproduction angles of each joint in the optimal group motor reproduction angle are then updated with the weighted reproduction angles of each joint.

[0027] Furthermore, the motor motion control module performs cascade control of the rotation angles of each joint of the robotic arm by executing the following steps:

[0028] The error value calculated based on the optimal group motor reproduction angle from the input motor motion control module and the output motor feedback angle is input to the position loop PID controller to obtain the desired motor speed; wherein, the output motor feedback angle is obtained by passing the motor angle output by the motor motion control module through the position loop feedback gain;

[0029] The error value calculated based on the desired motor speed and the motor speed feedback value is input to the speed loop PID controller to obtain the motor speed setpoint; where the motor speed feedback value is obtained by passing the motor output speed through the speed loop feedback gain;

[0030] The motor speed setting value is input into the motor to obtain the motor output speed, and then the output motor rotation angle is obtained.

[0031] Furthermore, the sensor acquisition module includes an IMU attitude acquisition module and a motor rotation angle acquisition module;

[0032] The IMU attitude acquisition module acquires various attitude information of the robotic arm's teaching actions through a three-axis angle sensor installed on the end effector of the robotic arm;

[0033] The motor rotation angle acquisition module acquires the actual rotation angle information of the motors at each joint by using absolute position encoders installed on the motors at each joint of the robotic arm.

[0034] Furthermore, the time interval set in the sensor acquisition module is 100ms.

[0035] Furthermore, before the teaching system performs action teaching or reproduction, the end effector of the robotic arm performs attitude initialization, including setting the roll angle to 0°, the pitch angle to 0°, and the gimbal motor angle to 0°.

[0036] Compared with the prior art, the present invention can achieve the following beneficial effects:

[0037] This invention provides a teaching system for a robotic arm. A sensor acquisition module collects data on the taught motion. Based on the collected posture data, the teaching module calculates the reproduction angle of each motor and selects the optimal reproduction angle for each motor based on the actual motor angle. This ensures a high degree of consistency between the reproduced motion and the taught motion. A motor operation control module then performs cascade control on each joint motor based on the optimal reproduction angle, maintaining strong linearity among the motors in the teaching system and achieving fast, accurate, and stable motion reproduction.

[0038] In this invention, the above-described technical solutions can be combined with each other to achieve more preferred combinations. Other features and advantages of this invention will be set forth in the following description, and some advantages may become apparent from the description or be learned by practicing the invention. The objects and other advantages of this invention can be realized and obtained from what is particularly pointed out in the description and drawings. Attached Figure Description

[0039] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts.

[0040] Figure 1 A schematic diagram of a teaching system for a robotic arm provided in an embodiment of the present invention;

[0041] Figure 2 A flowchart illustrating the motor operation control module provided in an embodiment of the present invention;

[0042] Figure 3 A schematic diagram of the robotic arm structure provided in an embodiment of the present invention;

[0043] Figure 4 This is a schematic diagram of the teaching process of the teaching system provided in an embodiment of the present invention;

[0044] Figure 5 This is a schematic diagram illustrating the reproduction process of the teaching system provided in this embodiment of the invention;

[0045] Figure label:

[0046] 1-Base; 2-Gimbal motor housing; 3-Forearm motor; 4-Gimbal motor; 5-Robotic arm upper arm;

[0047] 6- Robotic arm forearm link; 7- Arm motor; 8- Robotic arm forearm; 9- Replaceable end effector. Detailed Implementation

[0048] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.

[0049] One specific embodiment of the present invention discloses a teaching system for a robotic arm, such as... Figure 1 As shown, it includes a sensor acquisition module, a teaching module, and a motor operation control module;

[0050] The sensor acquisition module is used to acquire the posture information of the end effector of the robotic arm corresponding to the robotic arm teaching action and the actual rotation angle information of each joint motor based on a set time interval.

[0051] The teaching module is used to perform inverse kinematics solution based on the received posture information to obtain multiple sets of motor reproduction angles, and then select the optimal set of motor reproduction angles corresponding to each posture information based on the received actual rotation angle information of each joint motor.

[0052] The motor motion control module is used to perform cascade control of the joint angles of the robotic arm based on the optimal group of motor reproduction angles corresponding to the received posture information, so as to realize the reproduction of the taught actions of the robotic arm.

[0053] Specifically, robotic arm teaching actions are teaching actions by the operator directly and manually operating the end effector of the robotic arm to perform corresponding actions.

[0054] In a specific implementation, the teaching system also includes a communication module for communicating with the sensor acquisition module, the teaching module, and the motor motion control module.

[0055] In practice, the teaching system uses an STM32F407 software development platform, with a motherboard containing a W25Q256 flash memory chip, and external communication interfaces including one RS232 interface and one USB2.0 interface.

[0056] Compared with the prior art, this embodiment provides a teaching system for a robotic arm. The sensor acquisition module collects data on the teaching action. The teaching module calculates the reproduction angle of each motor based on the collected posture data, and then selects the optimal reproduction angle of each motor based on the actual motor angle, so that the reproduced action maintains a high degree of consistency with the teaching action. Then, the motor operation control module performs cascade control on each joint motor based on the optimal reproduction angle of each motor, so that each motor maintains strong linearity in the teaching system, and realizes fast, accurate and stable reproduction of the action.

[0057] In practice, the sensor acquisition module includes an IMU attitude acquisition module and a motor rotation angle acquisition module.

[0058] The IMU attitude acquisition module acquires various attitude information of the robotic arm's teaching actions through a three-axis angle sensor installed on the end effector of the robotic arm; wherein, the three-axis angle sensor is an MPU6500.

[0059] The motor rotation angle acquisition module acquires the actual rotation angle information of the motors at each joint by using absolute position encoders installed on the motors at each joint of the robotic arm.

[0060] Specifically, the sensor acquisition module is set to acquire data at a time interval of 100ms.

[0061] During implementation, the teaching module obtains the optimal group motor reproduction angle corresponding to each attitude information by sequentially executing the following steps:

[0062] The inverse kinematics solution is performed on the current posture information to obtain multiple sets of motor reproduction angles; each set of motor reproduction angles includes the reproduction angles of each joint of the robotic arm;

[0063] The following processing is performed sequentially on each group of motors to reproduce the rotation angle, resulting in multiple usable groups of motors to reproduce the rotation angle:

[0064] If the signs of the joints reproduced in the current group of motors are the same, then it is determined whether the error between the reproduced angle of each joint in the group and the actual angle of the corresponding joint motor is less than or equal to the preset error threshold of the corresponding joint. If so, the current group is used as the available group of motors to reproduce angles.

[0065] Based on the obtained rotation angles of multiple available motor groups, the optimal rotation angle of the motor group is selected.

[0066] Specifically, the actual rotation angle of each joint motor is multiplied by a set fixed proportional coefficient to obtain the error threshold for each joint. Understandably, setting error thresholds for different joints enhances applicability and makes the judgment more accurate.

[0067] In implementation, the fixed ratio coefficient is set according to the actual needs of the teaching system. Preferably, the fixed ratio coefficient is two-fifths. This ratio coefficient can be set via the control panel of the robotic arm in subsequent processes.

[0068] Optionally, the teaching module selects the optimal group of motors to reproduce the rotation angle based on the obtained multiple available group motors, including:

[0069] The average error between the joint reproduced angle of each available group of motors and the actual angle of each joint motor is calculated, and the reproduced angle of the available group of motors with the smallest average error is selected as the optimal group of motors reproduced angle.

[0070] Optionally, the teaching module selects the optimal group of motors to reproduce the rotation angle based on the obtained multiple available group motors, including:

[0071] The robot arm's joints are prioritized, and based on this priority, the rotation angles reproduced by each available group of motors are sequentially evaluated to determine the optimal group of motors for reproducing rotation angles, including:

[0072] S11. Take the joint with the highest priority as the current joint, and take the rotation angle of all available group motors as the current rotation angle of each available group motor.

[0073] S12. Obtain the corresponding reproduced angle of the current joint in the currently available group of motor reproduced angles, and obtain each error based on the actual angle of the corresponding motor;

[0074] S13. Sort the obtained errors by magnitude.

[0075] If the number of available group motor repeating angles corresponding to the minimum error is 1, then the available group motor repeating angle corresponding to the minimum error is taken as the optimal group motor repeating angle.

[0076] If the number of available group motor reproduction angles corresponding to the minimum error is not 1, and the current joint is not the joint with the lowest priority, then the available group motor reproduction angles corresponding to the minimum error are taken as the current available group motor reproduction angles, and the current joint is updated to the next priority joint, and the process returns to step S12; if the current joint is the joint with the lowest priority, then a group is randomly selected from the available group motor reproduction angles corresponding to the minimum error as the optimal group motor reproduction angles.

[0077] Preferably, the teaching module selects the optimal group of motors to reproduce the rotation angle based on the obtained multiple available group motors, and further includes:

[0078] After selecting one of the available group motor reproduction angles as the optimal group motor reproduction angle from multiple available group motor reproduction angles, the reproduction angles of each joint in the optimal group motor reproduction angle are weighted with the corresponding actual motor rotation angles to obtain the weighted reproduction angles of each joint; the reproduction angles of each joint in the optimal group motor reproduction angle are then updated with the weighted reproduction angles of each joint.

[0079] It is understandable that the sensors of the actuator at the end of the robotic arm will have some data fluctuations. By weighting the obtained optimal group of motor reproduction angles with the actual rotation angles of the corresponding joint motors, the influence of data fluctuations can be further eliminated, so that the taught actions can be reproduced more accurately based on the reproduction angles, resulting in better performance.

[0080] In implementation, the motor motion control module performs cascade control of the rotation angles of each joint of the robotic arm by executing the following steps, such as... Figure 2 As shown:

[0081] The error value calculated based on the optimal group motor reproduction angle from the input motor motion control module and the output motor feedback angle is input to the position loop PID controller to obtain the desired motor speed; wherein, the output motor feedback angle is obtained by passing the motor angle output by the motor motion control module through the position loop feedback gain;

[0082] The error value calculated based on the desired motor speed and the motor speed feedback value is input to the speed loop PID controller to obtain the motor speed setpoint; where the motor speed feedback value is obtained by passing the motor output speed through the speed loop feedback gain;

[0083] The motor speed setting value is input into the motor to obtain the motor output speed, and then the output motor rotation angle is obtained.

[0084] In practice, each motor is a brushless servo motor with a built-in electronic speed controller. The input voltage is 12-24V. The main control chip, STM32F407, provides control signals (motor current values) via a CAN network and can also acquire motor rotation angle values ​​through the CAN network. The attitude information and rotation angles of each joint collected by the sensor acquisition module are transmitted to the main control chip via the CAN network.

[0085] Understandably, the motor motion control module performs cascade control on each joint motor, enabling each motor to maintain strong linearity in the teaching system and achieve fast, accurate, and stable reproduction of the movements.

[0086] During implementation, before the teaching system performs motion teaching or reproduction, the end effector of the robotic arm performs attitude initialization, including setting the roll angle to 0°, the pitch angle to 0°, and the gimbal motor angle to 0°.

[0087] Specifically, this embodiment uses a three-axis articulated robotic arm, such as... Figure 3 As shown, it includes a base 1, a gimbal motor housing 2, a forearm motor 3, a gimbal motor 4, a robotic arm upper arm 5, a robotic arm forearm linkage 6, an upper arm motor 7, a robotic arm forearm 8, and a replaceable end effector 9. By inputting signals to the three motors, the position control of the bottom turntable, upper arm, and forearm of the robotic arm can be achieved. Among them, the gimbal motor 4 uses a DJI-RM6025 servo motor, which features high precision, fast response, and large torque. It is a control motor specifically designed for two-axis and three-axis gimbals and can control the rotation of the turntable at the bottom of the robotic arm around the vertical central axis. The forearm motor 3 and the upper arm motor 7 both use DJI-RM3508 servo motors, which control the rotation of the forearm 8 and the upper arm 5 of the robotic arm, respectively. The external circuits of the three servo motors are integrated into the main control chip. The electronic speed controllers in each motor are centrally driven by the button switches set on the operation panel to control the robotic arm to teach and complete the target task. The main control chip collects the corresponding posture information through the angle sensor in the end effector and stores the teaching data in the memory.

[0088] More specifically, in this embodiment, since a desktop robotic arm is used, the overall weight and size are relatively small. Therefore, zero-torque teaching is not considered. In teaching mode, the absolute position encoder of the servo motor is used to sample the angles of the three joint motors. A set of data is collected at set time intervals. The total teaching data capacity is designed to be no more than 32MB based on the W25Q256 Flash chip. When the teaching data is about to be full, an alarm sound is issued to inform the operator to stop the teaching action. The teaching data is stored in non-volatile memory, so the teaching data can be effectively saved even if the power is off.

[0089] In practice, the teaching system operates as follows:

[0090] Teaching process:

[0091] like Figure 4As shown, first, initialize the end effector's attitude via the control panel, setting the roll angle to 0°, pitch angle to 0°, and gimbal motor angle to 0°. After initializing the end effector's attitude, press the teach setting button on the robotic arm's control panel to configure the system into teach mode. The robotic arm will emit short "beep beep beep" sounds, indicating that it has entered teach mode. The operator can then manually teach the robotic arm by dragging it along the desired trajectory. During this process, the software will sample sensor data every 100ms and store it in the Flash chip. When the stored data time exceeds the 32MB limit, the robotic arm will emit "beep----beep---" sounds, indicating insufficient memory space and the need to stop teaching. After stopping teaching, press the configuration button on the robotic arm's control panel to configure the robotic arm to exit teach mode.

[0092] Reproduction process:

[0093] like Figure 5 As shown, firstly, the attitude of the end effector is initialized through the operation panel, that is, the roll angle is 0°, the pitch angle is 0°, and the angle of the gimbal motor is 0°. After the attitude of the end effector is initialized, the reproduction setting button on the robotic arm operation panel is pressed to enter the reproduction mode. The optimal group of motor reproduction angles is obtained based on all attitude data and the actual rotation angle of the motor, and sent to the motor motion control module for motion reproduction.

[0094] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.

[0095] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A teaching system for a robotic arm, characterized in that, It includes a sensor acquisition module, a teaching module, and a motor motion control module; The sensor acquisition module is used to acquire the posture information of the end effector of the robotic arm corresponding to the robotic arm teaching action and the actual rotation angle information of each joint motor based on a set time interval. The teaching module is used to perform inverse kinematics solution based on the received posture information to obtain multiple sets of motor reproduction angles, and then select the optimal set of motor reproduction angles corresponding to each posture information based on the received actual rotation angle information of each joint motor. The teaching module obtains the optimal group motor reproduction angle corresponding to each attitude information by sequentially executing the following steps: The inverse kinematics solution is performed on the current posture information to obtain multiple sets of motor reproduction angles; each set of motor reproduction angles includes the reproduction angles of each joint of the robotic arm; The following processing is performed sequentially on each group of motors to reproduce the rotation angle, resulting in multiple usable groups of motors to reproduce the rotation angle: If the signs of the joints reproduced in the current group of motors are the same, then it is determined whether the error between the reproduced angle of each joint in the group and the actual angle of the corresponding joint motor is less than or equal to the preset error threshold of the corresponding joint. If so, the current group is used as the available group of motors to reproduce angles. Based on the obtained rotation angles of multiple available motor groups, the optimal rotation angle of the motor group is selected; including: The robot arm's joints are prioritized, and based on this priority, the rotation angles reproduced by each available group of motors are sequentially evaluated to determine the optimal group of motors for reproducing rotation angles, including: S11. Take the joint with the highest priority as the current joint, and take the rotation angle of all available group motors as the current rotation angle of each available group motor. S12. Obtain the corresponding reproduced angle of the current joint in the currently available group of motor reproduced angles, and obtain each error based on the actual angle of the corresponding motor; S13. Sort the obtained errors by magnitude. If the number of available group motor repeating angles corresponding to the minimum error is 1, then the available group motor repeating angle corresponding to the minimum error is taken as the optimal group motor repeating angle. If the number of available group motor reproduction angles corresponding to the minimum error is not 1, and the current joint is not the joint with the lowest priority, then the available group motor reproduction angles corresponding to the minimum error are taken as the current available group motor reproduction angles, and the current joint is updated to the next priority joint, and the process returns to step S12; if the current joint is the joint with the lowest priority, then a group is randomly selected from the available group motor reproduction angles corresponding to the minimum error as the optimal group motor reproduction angle. Alternatively, based on the obtained rotation angles of multiple available motor groups, the optimal rotation angle for selecting the motor group includes: The average error between the joint reproduced angle of each available group of motors and the actual angle of each joint motor is calculated, and the available group of motors reproduced angle with the smallest average error is selected as the optimal group of motors reproduced angle. The motor motion control module is used to perform cascade control of the joint angles of the robotic arm based on the optimal group of motor reproduction angles corresponding to the received posture information, so as to realize the reproduction of the taught actions of the robotic arm. The teaching system also includes a communication module for communicating with the sensor acquisition module, the teaching module, and the motor motion control module.

2. The teaching system for a robotic arm according to claim 1, characterized in that, The actual rotation angle of each joint motor is multiplied by a set fixed proportional coefficient to serve as the error threshold for each joint.

3. The teaching system for a robotic arm according to claim 1, characterized in that, The teaching module, based on the obtained rotation angles reproduced by multiple available motor groups, selects the optimal rotation angle for each motor group and further includes: After selecting one of the available group motor reproduction angles as the optimal group motor reproduction angle from multiple available group motor reproduction angles, the reproduction angles of each joint in the optimal group motor reproduction angle are weighted with the corresponding actual motor rotation angles to obtain the weighted reproduction angles of each joint; the reproduction angles of each joint in the optimal group motor reproduction angle are then updated with the weighted reproduction angles of each joint.

4. The teaching system for a robotic arm according to claim 1, characterized in that, The motor motion control module performs cascade control of the rotation angles of each joint of the robotic arm by executing the following steps: The error value calculated based on the optimal group motor reproduction angle from the input motor motion control module and the output motor feedback angle is input to the position loop PID controller to obtain the desired motor speed; wherein, the output motor feedback angle is obtained by passing the motor angle output by the motor motion control module through the position loop feedback gain; The error value calculated based on the desired motor speed and the motor speed feedback value is input to the speed loop PID controller to obtain the motor speed setpoint; where the motor speed feedback value is obtained by passing the motor output speed through the speed loop feedback gain; The motor speed setting value is input into the motor to obtain the motor output speed, and then the output motor rotation angle is obtained.

5. The teaching system for a robotic arm according to claim 1, characterized in that, The sensor acquisition module includes an IMU attitude acquisition module and a motor rotation angle acquisition module; The IMU attitude acquisition module acquires various attitude information of the robotic arm's teaching actions through a three-axis angle sensor installed on the end effector of the robotic arm; The motor rotation angle acquisition module acquires the actual rotation angle information of the motors at each joint by using absolute position encoders installed on the motors at each joint of the robotic arm.

6. The teaching system for a robotic arm according to claim 1, characterized in that, The time interval set in the sensor acquisition module is 100ms.

7. The teaching system for a robotic arm according to claim 1, characterized in that, Before the teaching system performs action teaching or reproduction, the end effector of the robotic arm performs attitude initialization, including roll angle of 0°, pitch angle of 0°, and gimbal motor angle of 0°.