A robot arm gripper trajectory reproduction system and method based on master-slave structure
By adopting the real-time communication and motion capture module of the master-slave structure in the robot arm control system, the manual motion data is captured and compressed in real time, and the data delay problem caused by network fluctuations is solved, realizing the timely response and efficient control of the robot arm.
Patent Information
- Application Number
- CN202410607856.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-16
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-05-16
AI Technical Summary
The existing robotic arm control system will cause data delays when the network fluctuates, which will lead to the delay of the robotic arm reproducing human hand movements and untimely control problems.
Using the real-time communication module and motion capture module based on the master-slave structure, the manual motion data is captured in real time, binary conversion and slice processing is performed, and the compressed sequence is generated to reduce the amount of data, and restore it in the slave arm response module to ensure the timely operation of the robot arm. response.
Through data compression and rapid transmission, the impact of network delay on robotic arm control is shortened, making robotic arm response more timely, and reducing the impact of network delay on control.
Smart Images

Figure CN118305807B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robot technology, and in particular to a robot arm gripper trajectory reproduction system and method based on a master-slave structure. Background Art
[0002] Traditional robotic arm control systems mainly rely on pre-programming or remote control operations, which may not be flexible or intuitive enough in complex environments or scenarios that require delicate operations. In order to improve the intuitiveness and convenience of robotic arm operation, a robotic arm control system that can instantly reproduce human hand movements has been developed;
[0003] The system can capture the movement trajectory of human hands in real time and guide the robotic arm to accurately reproduce it, thereby achieving a highly simulated human hand operation effect. However, this method requires high network stability. If the network fluctuates, it will cause the robotic arm to receive information late, which will in turn cause a delay in the control of the robotic arm that reproduces human hand movements.
[0004] In order to solve the above problems, the present invention proposes a solution. Summary of the invention
[0005] The purpose of the present invention is to provide a robot arm gripper trajectory reproduction system and method based on a master-slave structure, in order to solve the problem that network fluctuations in the prior art cause delays in data transmitted to the robot arm in real time, which in turn causes delays in the reproduction robot arm, resulting in untimely control;
[0006] The purpose of the present invention can be achieved through the following technical solutions:
[0007] A robot arm gripper trajectory reproduction system based on a master-slave structure, comprising:
[0008] An instant communication module, used to compress and transmit the hand movement data collected in real time by the operator wearing the handheld gripper device;
[0009] For the current hand motion data, the instant messaging module performs binary conversion to obtain motion carry data, and specifies the step length to slice the motion carry data to obtain several carry sequences. For each carry sequence, starting from the left end, the first two characters, the middle two characters, and the last two characters are taken in turn as the first root, the middle root, and the last root string;
[0010] Determine the first root string and the second first root string, the first middle root string and the second middle root string, the first last root string and the second last root string at the current moment according to the first root, the middle root and the last root string of the plurality of carry sequences;
[0011] For each carry sequence, its first root string is matched with the first root string and the second first root string, its middle root string is matched with the first middle root string and the second middle root string, and its last root string is matched with the first last root string and the second last root string for consistency, and the compression comparison amount of each carry sequence is determined according to the matching results, and a compression sequence of each carry sequence is generated according to the compression comparison amount of each carry sequence. When generating the compression sequence of each carry sequence, it is determined whether the corresponding carry sequence has an auxiliary string according to the number of characters in the corresponding compression sequence.
[0012] Furthermore, it also includes a motion capture module for capturing the hand motion data of an operator wearing the handheld gripper device in real time.
[0013] Furthermore, the specific steps of slicing the motion carry data to obtain a number of carry sequences are as follows:
[0014] S11: performing binary conversion on the hand motion data at the current moment, and marking the converted binary data as motion carry data;
[0015] S12: specifying a step length of P1, slicing the motion carry data to obtain a number of carry sequences, wherein P1 is a preset segmentation step length threshold, and the value of P1 is 6;
[0016] According to the position of each carry sequence in the motion carry data before being sliced.
[0017] A method for reproducing the trajectory of a robot arm gripper based on a master-slave structure comprises the following steps:
[0018] Step 1: Real-time hand movement data of the operator wearing the handheld gripper device at the current moment;
[0019] Step 2: Convert the current hand motion data into binary to obtain motion carry data, and slice the motion carry data with a specified step length to obtain several carry sequences. For each carry sequence, starting from the left end, take the first two characters, the middle two characters, and the last two characters as the first root, the middle root, and the last root string;
[0020] Step 3: Determine the first root string and the second first root string, the first middle root string and the second middle root string, the first last root string and the second last root string at the current moment according to the first root, the middle root and the last root string of the plurality of carry sequences;
[0021] Step 4: for each carry sequence, the first root string is matched with the first root string and the second first root string, the middle root string is matched with the first middle root string and the second middle root string, and the last root string is matched with the first last root string and the second last root string, and the compression comparison amount of each carry sequence is determined according to the matching result, and the corresponding compression sequence is generated according to the compression comparison amount of each carry sequence. When generating the corresponding compression sequence, it is determined whether there is an auxiliary string in the corresponding carry sequence according to the number of characters in the corresponding compression sequence, and if so, the auxiliary string is obtained;
[0022] Step 5: According to the order in which the auxiliary word strings are obtained, several auxiliary word strings are spliced to obtain the auxiliary restoration sequence at the current moment, and the auxiliary restoration sequence and several carry sequences are transmitted to the slave arm response module;
[0023] Step 6: The slave arm response module receives and restores several carry sequences and the auxiliary restoration sequence at the current moment, obtains the human hand motion data at the current moment, and reflects it in the robotic arm.
[0024] Beneficial effects of the present invention:
[0025] (1) The present invention captures the hand motion data of the operator wearing the handheld gripper device in real time by setting a motion capture terminal, and the instant communication module compresses the real-time hand motion data and transmits the compressed data to the slave arm response module, which restores the data and converts it into a mechanical arm control instruction to adjust the mechanical arm to move. In this way, the data capacity of the data for compressing the control of the mechanical arm is reduced, the time for data transmission in the network is shortened, and the degree of influence of network delay on data transmission is reduced;
[0026] (2) When compressing real-time human hand motion data, the present invention first slices the motion carry data generated according to the conversion thereof, so that the character length of each carry sequence obtained after slicing is 6, and divides each carry sequence into first root, middle root and last root strings, and then determines the first root string and the second first root string, the first middle root string and the second middle root string, the first last root string and the second last root string based on the first root, middle root and last root strings of several carry sequences, and then obtains the compression comparison amount of each carry sequence, and compresses the corresponding carry sequence by using the obtained several compression comparison amounts to obtain the corresponding compression sequence. In this way, the carry sequence with 6 characters obtained after slicing can be compressed to 3 characters at the shortest, and the carry sequence is greatly compressed. In this way, the amount of data transmitted by the human hand motion data in the network is greatly shortened, the influence of network delay on the control of the robot arm is reduced, and the robot arm responds more promptly. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The present invention will be further described below in conjunction with the accompanying drawings.
[0028] Figure 1 is a system block diagram of the present invention;
[0029] Figure 2 It is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0031] like Figure 1 , 2 As shown, a robot arm gripper trajectory reproduction system and method based on a master-slave structure includes a motion capture terminal, an instant communication module and a slave arm response module;
[0032] A motion capture terminal is used to capture the hand motion data of an operator wearing a handheld gripper device in real time. In this embodiment, the handheld gripper device includes a gripper body, a plurality of sensors, a wearable interface, a power supply, and a housing;
[0033] Gripper body: This is the part of the device used to grasp and release objects, usually containing multiple movable fingers (claws), which can be designed with two fingers, three fingers or more to accommodate objects of different shapes and sizes;
[0034] Several sensors: used to accurately control the movement of the gripper and capture the operator's hand movements. In one embodiment of the present invention, the sensors built into the gripper device include optical sensors, magnetic sensors, posture sensors, speed sensors, force sensors, pressure sensors, tactile sensors, temperature sensors, and humidity sensors. These sensors can monitor the state of the gripper and the operator's movements in real time to ensure that the gripper can accurately reproduce the trajectory of the human hand.
[0035] Wearable interface: The operator interacts with the gripper through this interface;
[0036] Power supply: The handheld gripper device needs a power source to operate, which may be a built-in battery or an external power source. If it is a built-in battery, it needs to have enough capacity to ensure that the system can operate normally for a certain period of time without external power supply;
[0037] Housing: To ensure that the operator can use the handheld gripper device comfortably and for a long time, the housing and overall design take into account ergonomic principles to ensure even weight distribution, comfortable grip, and simple and intuitive operation;
[0038] A plurality of marking points are arranged on the handheld gripper device, and sensors are built-in at positions corresponding to the plurality of marking points on the handheld gripper device to capture corresponding data;
[0039] In this embodiment, the positions of several markers are selected based on five aspects: motion capture requirements, sensor type and position, device structure limitations, operator comfort, and data accuracy requirements;
[0040] Among them, the demand for motion capture refers to the fact that the setting of markers should be able to accurately capture the movements of the operator's hands and wrists; the sensor type and position refers to the fact that the selection and layout of markers also need to consider the type and position of built-in sensors; the limitation of the device structure refers to the fact that the design and structure of the handheld gripper device will also affect the setting of markers, and it is necessary to ensure that the markers will not be unrecognizable due to the occlusion of the device itself; the comfort of the operator refers to the fact that when setting markers, it is also necessary to ensure that the operator feels comfortable during use, and the markers will not hinder normal operation or cause discomfort to the operator; the data accuracy requirement refers to the fact that the selection of markers needs to be aimed at improving accuracy, and more markers may need to be set at key motion parts;
[0041] In this embodiment, marking points are set at the wrist, back of hand, finger joints, etc.;
[0042] The motion capture terminal transmits the operator's hand motion data collected in real time to the instant communication module. The hand motion data includes position data, posture data, speed data, force and pressure data, contact and collision data, and environmental data;
[0043] The position data is collected by the optical and magnetic sensors built into the gripper device, which can capture the absolute position of the gripper device in space and the displacement relative to the starting position;
[0044] The posture data is collected by the built-in posture sensor in the gripper device, which can capture the posture of the gripper device including tilt angle, rotation angle and direction;
[0045] The velocity data is collected through the velocity sensor built into the gripper device, which can capture the velocity of the gripper device, including linear velocity and angular velocity;
[0046] The force and pressure data are collected by the force sensor and pressure sensor built into the gripper device, respectively, which can detect the force and pressure applied by the operator on the gripper;
[0047] Contact and collision data is collected through the built-in tactile sensor in the gripper device, which can capture information when the gripper contacts the object, including the contact position, contact area and the pressure generated during contact.
[0048] Environmental data is collected through the temperature and humidity sensors built into the gripper device, which can capture relevant data about the operating environment. Although this data may not be directly used for trajectory reproduction, it may be necessary for the normal operation of the system and to ensure the safety of the equipment;
[0049] An instant communication module is used to compress and transmit the hand motion data collected in real time to the trajectory reproduction module;
[0050] After receiving the hand movement data transmitted at the current moment, the instant messaging module compresses it according to the preset compression rules to obtain the current moment, as follows:
[0051] S11: performing binary conversion on the hand motion data at the current moment, and marking the converted binary data as motion carry data;
[0052] S12: specifying a step length of P1, slicing the motion carry data to obtain a number of carry sequences, wherein P1 is a preset segmentation step length threshold. In this embodiment, the value of P1 is 6;
[0053] According to the position of each carry sequence in the motion carry data before being sliced, the obtained carry sequences are marked as A1, A2, ..., Aa, a≥1 from left to right;
[0054] It should be noted that the number of characters constituting the carry sequences A1, A2, ..., Aa-1 obtained after slicing is P1, and the number of characters constituting the carry sequence Aa is less than or equal to P1;
[0055] S13: starting from the left end of the carry sequence A1, extract the first two characters to form a first root string based on the carry sequence A1, then extract the third and fourth characters in the middle to form a middle root string based on the carry sequence A1, and finally extract the last two characters to form a last root string based on the carry sequence A1;
[0056] S14: According to S13, the first root, the middle root and the last root word strings based on the carry sequence A1, A2, ..., Aa are obtained in sequence;
[0057] S15: Filter out the first root string and the second root string from the first root string based on the carry sequence A1, A2, ..., Aa according to the preset filtering rules. The filtering rules are as follows:
[0058] S151: sequentially marking the pre-root word strings based on the carry sequence A1, A2, ..., Aa as B1, B2, ..., Ba, and aggregating these pre-root word strings into a set, which is labeled as a pre-root word string set;
[0059] S152: De-duplicate the pre-root string set, and retain only one of the pre-root strings that are consistent in content and order, wherein the pre-root strings that are consistent in content and order refer to the characters constituting the pre-root strings being the same in content, number and order;
[0060] S153: After the first root character string is deduplicated, all the first root character strings are extracted and re-labeled as C1, C2, ..., Cc, 1≤c≤4;
[0061] S154: for the pre-root character set that has not been deduplicated, respectively obtain the number of pre-root character strings D1, D2, ..., Dc that are consistent with the pre-root character strings C1, C2, ..., Cc in terms of content and sequence. At this time, the number D1, D2, ..., Dc corresponds to the pre-root character strings C1, C2, ..., Cc, respectively;
[0062] S155: Marking the first root string corresponding to the number Dmax and Dnd as the first root string and the second root string respectively, where Dmax and Dnd are the maximum and second maximum values among the numbers D1, D2, ..., Dc respectively;
[0063] S16: Filter out the first middle root string and the second middle root string from the middle root string based on the carry sequence A1, A2, ..., Aa, and filter out the first and second root strings and the second second root strings from the second root strings based on the carry sequence A1, A2, ..., Aa. It should be noted that the filtering method of the first middle root string and the second middle root string, the first and second root string and the second second root string is the same as the filtering method of the first root string and the second first root string, and they are all obtained by filtering according to step S15;
[0064] S17: Calculate and obtain the compression comparison value G1 of the carry sequence A1 according to a preset calculation rule. The specific calculation rule is as follows:
[0065] S171: Mark the middle root string and the last root string based on the carry sequence A1 as E1 and F1 respectively;
[0066] S172: Perform consistency matching on the first root string B1 and the second root string respectively. If the first root string B1 matches the first root string, P2 is used as a replacement string for the first root string B1. P2 is a preset first replacement character. In this embodiment, P2 is a character string type number 1.
[0067] If the pre-root string B1 matches the secondary pre-root string, then P3 is used as the replacement string for the pre-root string B1, where P3 is a preset second replacement character. In this embodiment, P3 is the numeric 0 of string type;
[0068] If it does not match both the first pre-root string and the secondary pre-root string, then the pre-root string B1 itself is used as its replacement string; for example, if the pre-root string B1 is 11, and it does not match both the first pre-root string and the secondary pre-root string, then its replacement string is 11, which is itself. Among them, "matching" means that the characters constituting it are the same in content, quantity, and order;
[0069] S173: According to S172, calculate and obtain the replacement strings of the in-root string E1 and the post-root string F1 in sequence;
[0070] S174: Respectively obtain the number of characters constituting the replacement strings of the pre-root string B1, the in-root string E1, and the post-root string F1, and calculate and obtain their total sum, and label the total sum as the compression comparison quantity G1 of the carry sequence A1;
[0071] S18: Compress and generate the compression sequence of the carry sequence A1 according to the preset compression generation rule, and determine whether there is an auxiliary string in the carry sequence A1 according to the number of characters in the compression sequence of the carry sequence A1, specifically as follows:
[0072] S181: If G1 = P4, then first determine that the carry sequence A does not have an auxiliary string, and then, in the order of B1, E1, and F1, splice the replacement strings of the pre-root string B1, the in-root string E1, and the post-root string F1 to obtain the compression sequence of the carry sequence A1, where P4 is a preset first compression comparison threshold. In this embodiment, the value of P4 is 3;
[0073] S182: If P4 < G1 < P5, then first, in the order of B1, E1, and F1, splice the replacement strings of the pre-root string B1, the in-root string E1, and the post-root string F1 to obtain the undecided sequence of the carry sequence A1, where P5 is a preset second compression comparison threshold. In this embodiment, the value of P5 is 5;
[0074] S183: Then determine the replacement strings of the pre-root string B1, the in-root string E1, and the post-root string F1:
[0075] SS1: If the replacement strings of both the pre-root string B1 and the in-root string E1 are any one of P2 or P3, and the replacement string of the post-root string F1 is itself, then first determine that the carry sequence A1 has an auxiliary string;
[0076] Then use P2 as the auxiliary string of the carry sequence A1, and re-label the undecided sequence of the carry sequence A1 as the compression sequence of the carry sequence A1;
[0077] SS2: If the replacement string of the first root string B1 is itself, and the replacement strings of the middle root string E1 and the last root string F1 are any one of P2 or P3, first determine whether there is an auxiliary string in the carry sequence A1;
[0078] Then, P3 is used as the auxiliary word string of the carry sequence A1, and the pending sequence of the carry sequence A1 is re-calibrated as the compressed sequence of the carry sequence A1;
[0079] SS3: If the replacement strings of the first root string B1 and the second root string F1 are both P2 or P3, and the replacement string of the middle root string E1 is itself, first determine that there is no auxiliary string in the carry sequence A1;
[0080] Then, in the order of B1, P2, E1, and F1, the replacement characters of the first root string B1, P2, the middle root string E1, and the replacement string of the last root string F1 are concatenated to obtain a compressed sequence of the carry sequence A1;
[0081] S184: if G1≥P5, then in the order of B1, E1, and F1, the first root string B1, the middle root string E1, and the last root string F1 are concatenated to obtain a compression sequence of the carry sequence A1;
[0082] S19: According to S18, the compression sequences of the carry sequences A1, A2, ..., Aa are generated in sequence, and then the carry sequences A1, A2, ..., Aa are determined in sequence to determine whether there is an auxiliary string, and if so, the corresponding auxiliary string is obtained;
[0083] S110: concatenating all auxiliary character strings in the order of acquisition to obtain an auxiliary restoration sequence at the current moment;
[0084] The order of the carry sequences A1, A2, ..., Aa is used to transmit the compression sequences to the slave arm response module in sequence, and then the auxiliary restoration sequence at the current moment is synchronously transmitted to the slave arm response module;
[0085] The slave arm response module includes a trajectory restoration unit and a slave arm response unit. After receiving the compression sequence of the transmitted carry sequence A1, A2, ..., Aa and the auxiliary restoration sequence at the current moment, the slave arm response module restores the sequence according to the preset restoration steps to obtain the human hand motion data at the current moment.
[0086] The default restore steps are as follows:
[0087] According to the order of the received compressed sequences, the number of characters in each compressed sequence is determined. If the number of characters in a compressed sequence is equal to P4, the corresponding compressed sequence is restored according to the first root string and the second first root string, the first middle root string and the second middle root string, and the first last root string and the second last root string;
[0088] If the number of characters in a certain compressed sequence is greater than P4 and less than P5, the corresponding compressed sequence is restored according to the first root string and the second first root string, the first middle root string and the second middle root string, the first last root string and the second last root string, and the current hand movement data;
[0089] The trajectory restoration unit transmits the current hand motion data to the slave arm response unit. After receiving the transmitted current hand motion data, the slave arm response unit first maps the hand motion data into the motion range of the robotic arm. It should be noted that due to the structural differences between the human hand and the robotic arm, a certain algorithm (such as least squares method, neural network, etc.) is required to realize the mapping between different motion spaces and obtain the target positions and postures of different joints after mapping.
[0090] Secondly, inverse kinematics is used to solve the problem. According to the mapped target position and posture, the angle that each joint should reach is calculated. Inverse kinematics (IK) is the process of determining the joint angles of the robot arm to achieve the desired end position and posture.
[0091] Then, a smooth and feasible trajectory is planned based on the calculated angle that each joint should reach and the target position and posture of each joint. In order to make the robot move smoothly, a series of intermediate values need to be generated by the difference between the current position and the target position to form a continuous trajectory.
[0092] Generate several control instructions according to the planned trajectory, and one control instruction includes the target position, speed and acceleration of the corresponding joint;
[0093] The slave nose response unit controls the corresponding joints on the slave robot arm according to the generated control instructions to ensure the reproduction of the motion trajectory of the human hand;
[0094] In the description of the specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0095] The above contents are merely examples and explanations of the present invention. Those skilled in the art may make various modifications or additions to the specific embodiments described or replace them in a similar manner. As long as they do not deviate from the invention or exceed the scope defined by the claims, they shall all fall within the protection scope of the present invention.
[0096] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.
Claims
1. A robot arm gripper trajectory reproduction system based on a master-slave structure, characterized in that: include: An instant communication module, used to compress and transmit the hand movement data collected in real time by the operator wearing the handheld gripper device; For the current hand motion data, the instant messaging module performs binary conversion to obtain motion carry data, and specifies the step length to slice the motion carry data to obtain several carry sequences. For each carry sequence, starting from the left end, the first two characters, the middle two characters, and the last two characters are taken in turn as the first root, the middle root, and the last root string; The specific steps of slicing the motion carry data to obtain several carry sequences are as follows: S11: performing binary conversion on the hand motion data at the current moment, and marking the converted binary data as motion carry data; S12: specifying a step length of P1, slicing the motion carry data to obtain a number of carry sequences, wherein P1 is a preset segmentation step length threshold, and the value of P1 is 6; According to the position of each carry sequence in the motion carry data before being sliced, the obtained carry sequences are marked as A1, A2, ..., Aa, a≥1 from left to right; According to the first root, middle root and last root strings of several carry sequences, the first root string and the second first root string, the first middle root string and the second middle root string, the first last root string and the second last root string at the current moment are determined, and the specific steps are as follows: S13: starting from the left end of the carry sequence A1, extract the first two characters to form a first root string based on the carry sequence A1, then extract the third and fourth characters in the middle to form a middle root string based on the carry sequence A1, and finally extract the last two characters to form a last root string based on the carry sequence A1; S14: According to S13, the first root, the middle root and the last root word strings based on the carry sequence A1, A2, ..., Aa are obtained in sequence; S15: Filter out the first root string and the second root string at the current moment from the first root string based on the carry sequence A1, A2, ..., Aa according to the preset filtering rules. The filtering rules are as follows: S151: sequentially marking the pre-root word strings based on the carry sequence A1, A2, ..., Aa as B1, B2, ..., Ba, and aggregating these pre-root word strings into a set, which is labeled as a pre-root word string set; S152: De-duplicate the pre-root string set, and retain only one of the pre-root strings that are consistent in content and order, wherein the pre-root strings that are consistent in content and order refer to the characters constituting the pre-root strings being the same in content, number and order; S153: After the first root character string is deduplicated, all the first root character strings are extracted and re-labeled as C1, C2, ..., Cc, 1≤c≤4; S154: for the pre-root character set that has not been deduplicated, respectively obtain the number of pre-root character strings D1, D2, ..., Dc that are consistent with the pre-root character strings C1, C2, ..., Cc in terms of content and sequence. At this time, the number D1, D2, ..., Dc corresponds to the pre-root character strings C1, C2, ..., Cc, respectively; S155: Marking the first root string corresponding to the number Dmax and Dnd as the first root string and the second root string respectively, where Dmax and Dnd are the maximum and second maximum values among the numbers D1, D2, ..., Dc respectively; S16: Filter out the first middle root string and the second middle root string from the middle root string based on the carry sequence A1, A2, ..., Aa, and filter out the first second root string and the second second root string from the second root string based on the carry sequence A1, A2, ..., Aa. The filtering method of the first middle root string and the second middle root string, the first second root string and the second second root string is the same as the filtering method of the first root string and the second first root string, and they are all obtained by filtering according to step S15; For each carry sequence, the first root string is matched with the first root string and the second first root string, the middle root string is matched with the first middle root string and the second middle root string, and the last root string is matched with the first last root string and the second last root string, and the compression comparison amount of each carry sequence is determined according to the matching results, and the compression sequence of each carry sequence is generated according to the compression comparison amount of each carry sequence. When generating the compression sequence of each carry sequence, it is determined whether the corresponding carry sequence has an auxiliary string according to the number of characters in the corresponding compression sequence; If it exists, its corresponding auxiliary string is obtained, and then all the auxiliary strings are concatenated in the order of acquisition to obtain the auxiliary restoration sequence at the current moment.
2. According to the master-slave structure based robot arm gripper trajectory reproduction system of claim 1, it is characterized in that: The device also includes a motion capture module for capturing hand motion data of an operator wearing a handheld gripper device in real time.
3. According to the master-slave structure based robot arm gripper trajectory reproduction system of claim 1, it is characterized in that: The specific steps for determining the compression comparison amount of the carry sequence A1 are as follows: S171: Mark the middle root string and the last root string based on the carry sequence A1 as E1 and F1 respectively; S172: Perform consistency matching on the first root string B1 and the second root string respectively. If the first root string B1 matches the first root string, P2 is used as a replacement string for the first root string B1. P2 is a preset first replacement character, and P2 is a character string type number 1. If the first root string B1 matches the second first root string, P3 is used as a replacement string for the first root string B1, where P3 is a preset second replacement character and P3 is a character string type number 0; If it does not match the first root string or the second root string, the first root string B1 itself is used as its replacement string, where matching means that the characters constituting it are the same in content, quantity and order; S173: According to S172, the replacement strings of the middle root string E1 and the rear root string F1 are calculated in sequence; S174: respectively obtain the number of characters constituting the replacement string of the first root string B1, the middle root string E1 and the last root string F1 and calculate their sum, and mark the sum as the compression comparison amount G1 of the carry sequence A1.
4. The robot arm gripper trajectory reproduction system based on the master-slave structure according to claim 3 is characterized in that: The specific steps of generating a compression sequence of the carry sequence A1 and determining whether the carry sequence A1 has an auxiliary string according to the number of characters in the compression sequence are as follows: S181: If G1 = P4, first determine that there is no auxiliary substring in the carry sequence A, and then splice the preorder substring B1, the inorder substring E1, and the postorder substring F1 substitution strings in the order of B1, E1, F1 to obtain the compressed sequence of the carry sequence A1. The P4 is a preset first compression comparison threshold, and the value of P4 is 3; S182: If P4 < G1 < P5, first splice the preorder substring B1, the inorder substring E1, and the postorder substring F1 substitution strings in the order of B1, E1, F1 to obtain the undecided sequence of the carry sequence A1. The P5 is a preset second compression comparison threshold, and the value of P5 is 5; S183: Then determine the substitution strings of the preorder substring B1, the inorder substring E1, and the postorder substring F1: SS1: If the substitution strings of the preorder substring B1 and the inorder substring E1 are both any one of P2 or P3, and the substitution string of the postorder substring F1 is itself, first determine that there is an auxiliary substring in the carry sequence A1; Then use P2 as the auxiliary substring of the carry sequence A1, and re-label the undecided sequence of the carry sequence A1 as the compressed sequence of the carry sequence A1; SS2: If the substitution string of the preorder substring B1 is itself, and the substitution strings of the inorder substring E1 and the postorder substring F1 are both any one of P2 or P3, first determine that there is an auxiliary substring in the carry sequence A1; Then use P3 as the auxiliary substring of the carry sequence A1, and re-label the undecided sequence of the carry sequence A1 as the compressed sequence of the carry sequence A1; SS3: If the substitution strings of the preorder substring B1 and the postorder substring F1 are both any one of P2 or P3, and the substitution string of the inorder substring E1 is itself, first determine that there is no auxiliary substring in the carry sequence A1; Then splice the substitution character of the preorder substring B1, P2, the inorder substring E1, and the substitution string of the postorder substring F1 in the order of B1, P2, E1, F1 to obtain the compressed sequence of the carry sequence A1; S184: If G1 ≥ P5, splice the preorder substring B1, the inorder substring E1, and the postorder substring F1 substitution strings in the order of B1, E1, F1 to obtain the compressed sequence of the carry sequence A1.
5. A method for reproducing the trajectory of a robot gripper based on a master-slave structure, characterized in that: It includes the following steps: Step 1: Real-time collect the hand movement data of the operator wearing the handheld gripper device at the current moment; Step 2: Convert the hand movement data at the current moment into binary to obtain movement carry data, and specify a step size to slice the movement carry data to obtain several carry sequences. For each carry sequence, starting from its left end, take the first two, middle two, and last two characters in turn as its preorder, inorder, and postorder substrings; The specific steps to slice the movement carry data to obtain several carry sequences are as follows: S11: Convert the hand movement data at the current moment into binary, and label the converted binary data as movement carry data; S12: Specify the step size as P1, and slice the movement carry data to obtain several carry sequences. The P1 is a preset segmentation step size threshold, and the value of P1 is 6; According to the position of each carry sequence in the motion carry data before being sliced, the obtained carry sequences are marked as A1, A2, ..., Aa, a≥1 from left to right; Step 3: Determine the first root string and the second first root string, the first middle root string and the second middle root string, the first last root string and the second last root string at the current moment according to the first root, middle root and last root strings of the plurality of carry sequences. The specific steps are as follows: S13: starting from the left end of the carry sequence A1, extract the first two characters to form a first root string based on the carry sequence A1, then extract the third and fourth characters in the middle to form a middle root string based on the carry sequence A1, and finally extract the last two characters to form a last root string based on the carry sequence A1; S14: According to S13, the first root, the middle root and the last root word strings based on the carry sequence A1, A2, ..., Aa are obtained in sequence; S15: Filter out the first root string and the second root string at the current moment from the first root string based on the carry sequence A1, A2, ..., Aa according to the preset filtering rules. The filtering rules are as follows: S151: sequentially marking the pre-root word strings based on the carry sequence A1, A2, ..., Aa as B1, B2, ..., Ba, and aggregating these pre-root word strings into a set, which is labeled as a pre-root word string set; S152: De-duplicate the pre-root string set, and retain only one of the pre-root strings that are consistent in content and order, wherein the pre-root strings that are consistent in content and order refer to the characters constituting the pre-root strings being the same in content, number and order; S153: After the first root character string is deduplicated, all the first root character strings are extracted and re-labeled as C1, C2, ..., Cc, 1≤c≤4; S154: for the pre-root character set that has not been deduplicated, respectively obtain the number of pre-root character strings D1, D2, ..., Dc that are consistent with the pre-root character strings C1, C2, ..., Cc in terms of content and sequence. At this time, the number D1, D2, ..., Dc corresponds to the pre-root character strings C1, C2, ..., Cc, respectively; S155: Marking the first root string corresponding to the number Dmax and Dnd as the first root string and the second root string respectively, where Dmax and Dnd are the maximum and second maximum values among the numbers D1, D2, ..., Dc respectively; S16: Filter out the first middle root string and the second middle root string from the middle root string based on the carry sequence A1, A2, ..., Aa, and filter out the first second root string and the second second root string from the second root string based on the carry sequence A1, A2, ..., Aa. The filtering method of the first middle root string and the second middle root string, the first second root string and the second second root string is the same as the filtering method of the first root string and the second first root string, and they are all obtained by filtering according to step S15; Step 4: for each carry sequence, the first root string is matched with the first root string and the second first root string, the middle root string is matched with the first middle root string and the second middle root string, and the last root string is matched with the first last root string and the second last root string, and the compression comparison amount of each carry sequence is determined according to the matching result, and the corresponding compression sequence is generated according to the compression comparison amount of each carry sequence. When generating the corresponding compression sequence, it is determined whether there is an auxiliary string in the corresponding carry sequence according to the number of characters in the corresponding compression sequence, and if so, the auxiliary string is obtained; Step 5: According to the order in which the auxiliary word strings are obtained, several auxiliary word strings are spliced to obtain the auxiliary restoration sequence at the current moment, and the auxiliary restoration sequence and several carry sequences are transmitted to the slave arm response module; Step 6: The slave arm response module receives and restores several carry sequences and the auxiliary restoration sequence at the current moment, obtains the human hand motion data at the current moment, and reflects it in the robotic arm.
