Trajectory reproduction method and device, robot, storage medium
Patent Information
- Application Number
- CN202211503923.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-28
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2042-11-28
AI Technical Summary
[0154]本公开实施例提供的方案中可以获取机器人的初始运动数据;所述初始运动数据包括所述机器人被拖动示教过程中关节在移动轨迹上多个路径点的运动数据的序列;对所述初始运动数据进行修复处理,得到符合机器人的关节性能的修复运动数据;对所述修复运动数据进行平滑处理,得到复现轨迹。这样,本实施例通过对初始运动数据进行修复处理,可以使修复运动数据满足机器的关节性能即机器人能够实现,从而获得可执行的复现轨迹,有利于提高拖动示教的效率且提高机器人的学习效率。另外,本实施例中可以实现零力矩拖动无需增加力传感器,可降低机器人的硬件成本。
Smart Images

Figure CN118123801B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of control technology, and in particular to a trajectory reproduction method and apparatus, a robot, and a storage medium. Background Technology
[0002] To enable a robot to quickly learn a certain operation task, the operator can directly drag the robot's joints to the ideal posture to complete the operation task. At the same time, the robot records the dragging trajectory information and can independently complete the operation task after the operator releases the grip. The above process can be called robot drag teaching.
[0003] Dragging teaching can be divided into two parts: the first part is dragging, which minimizes the operator's effort during dragging, making it easier for them to complete the operation, also known as zero-torque dragging; the second part is reproduction, where the robot can follow the operator's intention, plan the trajectory, and successfully complete the operation task after the operator releases their hand. Summary of the Invention
[0004] This disclosure provides a trajectory reproduction method and apparatus, robot, and storage medium to address the shortcomings of related technologies.
[0005] According to a first aspect of the present disclosure, a trajectory reproduction method is provided, applicable to a robot, the method comprising:
[0006] Acquire the robot's initial motion data; the initial motion data includes a sequence of motion data of the joints at multiple path points on the movement trajectory during the robot's dragging and teaching process;
[0007] The initial motion data is repaired to obtain repaired motion data that conforms to the joint performance of the robot;
[0008] The repaired motion data is smoothed to obtain the reproduced trajectory.
[0009] Optionally, the initial motion data is repaired, including:
[0010] The position data in the initial motion data is smoothed to obtain smoothed motion data;
[0011] The time data in the smoothed motion data is repaired to obtain repaired motion data.
[0012] Optionally, the position data in the initial motion data is smoothed to obtain smoothed motion data, including:
[0013] For each path point, obtain the initial position data of the current path point and a preset number of subsequent path points;
[0014] Obtain the location data of the current path point and the average value of the location data of the preset number of path points;
[0015] The position data of the current path point is updated to the average value, and the smooth motion data is obtained after updating the initial position data of all path points.
[0016] Optionally, the time data in the smoothed motion data is repaired, including:
[0017] When it is determined that the scene is reproduced at the original speed, the speed data of the robot's joints at the current path point and the first path point after the current path point, as well as the maximum acceleration of the joints, are obtained.
[0018] The motion time of the joint at the current path point is obtained based on the position data, the velocity data, and the maximum acceleration, and the verification time is obtained.
[0019] The drag time is obtained by acquiring the time difference between the current path point and the first path point.
[0020] When the verification time is less than the dragging time, the time data of the first path point in the smooth motion data is updated according to the verification time to obtain the repaired motion data.
[0021] Optionally, the motion time of the joint at the current path point is obtained based on the position data, the velocity data, and the maximum acceleration to obtain the verification time, including:
[0022] Based on the position data of the current path point and the first path point, and the maximum speed of the joint, the time it takes for the joint to move from the current path point to the first path point at its maximum speed is obtained, thus obtaining the first motion time.
[0023] The second motion time is obtained by calculating the time it takes for the joint to transition from its maximum speed to its reverse maximum speed with maximum acceleration based on the maximum speed and maximum acceleration of the joint.
[0024] The first motion time and the second motion time are used as the verification time.
[0025] Optionally, the time it takes for the joint to move from the current path point to the first path point at its maximum speed is obtained based on the position data of the current path point and the first path point, as well as the maximum speed of the joint, to obtain the first motion time, including:
[0026] Obtain the distance difference between the location data of the current path point and the location data of the first path point;
[0027] Obtain the quotient of the distance difference and the maximum speed of the joint, and use the quotient as the first movement time.
[0028] Optionally, the second motion time is obtained by acquiring the time it takes for the joint to transition from its maximum speed to its reverse maximum speed with maximum acceleration based on the joint's maximum speed and maximum acceleration, including:
[0029] Obtain the reversal sign symbol;
[0030] When the value of the reversing sign is greater than zero, the value of the second motion time is determined to be 0;
[0031] When the value of the reversing sign is less than zero, the quotient of the maximum speed and maximum acceleration of the joint is obtained, and twice the quotient is taken as the second motion time.
[0032] Optionally, the reversing sign symbol is obtained, including:
[0033] The first distance is obtained by obtaining the difference between the position data of the second path point after the current path point and the position data of the first path point;
[0034] The difference between the location data of the first path point and the location data of the current path point is obtained to get the second distance;
[0035] Obtain the ratio of the first distance to the second distance, and use the ratio as the value of the reversal sign symbol.
[0036] Optionally, updating the time data of the first path point in the smooth motion data according to the verification time includes:
[0037] Obtain the larger of the first motion time and the second motion time within the verification time;
[0038] Obtain the sum of the time data of the current path point and the larger value;
[0039] Update the time data of the first path point to the sum value.
[0040] Optionally, the time data in the smoothed motion data is repaired, including:
[0041] When it is determined to be a variable speed reproduction scenario, obtain the robot's joints at the current path point with a maximum acceleration of 5 degrees and the expected speed;
[0042] The motion time of the joint at the current path point is obtained based on the position data, the velocity data, and the maximum acceleration, and the verification time is obtained.
[0043] The expected time of the joint at the current path point is obtained based on the position data of the current path point and the first path point after the current path point, as well as the expected speed.
[0044] 0 When the verification time is less than the expected time, the time data of the first path point in the smooth motion data is updated according to the verification time to obtain the repaired motion data.
[0045] Optionally, the motion time of the joint at the current path point is obtained based on the position data, the velocity data, and the maximum acceleration to obtain the verification time, including:
[0046] Based on the position data of the current path point and the first path point, and the maximum speed of the joint, the time it takes for the joint to move from the current path point to the first path point at its maximum speed is obtained, thus obtaining the first motion time.
[0047] The second motion time is obtained by calculating the time it takes for the joint to transition from its maximum speed to its reverse maximum speed with maximum acceleration based on the maximum speed and maximum acceleration of the joint.
[0048] The first motion time and the second motion time are used as the verification time.
[0049] Optionally, based on the position data of the current path point and the first path point, and the maximum speed of the joint, the time it takes for the joint to move from the current path point to the first path point at its maximum speed is obtained, resulting in a first motion time, including:
[0050] Obtain the distance difference between the current path point's location data and the first path point's location data;
[0051] Obtain the quotient of the distance difference and the maximum speed of the joint, and use the quotient as the first motion time of the fifth movement.
[0052] Optionally, the second motion time is obtained by acquiring the time it takes for the joint to transition from its maximum speed to its reverse maximum speed with maximum acceleration based on the maximum speed and maximum acceleration of the joint, including:
[0053] Obtain the reversal sign symbol;
[0054] When the value of the reversing sign is greater than zero, the value of the second motion time is determined to be 0;
[0055] When the value of the reversing sign is less than zero, the quotient of the maximum speed and the maximum acceleration of the joint is obtained, and twice the quotient is taken as the second motion time.
[0056] Optionally, the reversing sign symbol is obtained, including:
[0057] The first distance is obtained by obtaining the difference between the position data of the second path point after the current path point and the position data of the first path point;
[0058] The difference between the location data of the first path point and the location data of the current path point is obtained to get the second distance;
[0059] Obtain the ratio of the first distance to the second distance, and use the ratio as the value of the reversal sign symbol.
[0060] Optionally, the expected time of the joint at the current path point is obtained based on the position data of the current path point and the first path point after the current path point, as well as the expected speed, including:
[0061] The difference between the position data of the current path point and the position data of the first path point is obtained to get the position change value;
[0062] Calculate the expected time for the joint to move from the current path point to the first path point based on the position change value and the expected speed.
[0063] Optionally, updating the time data of the first path point in the smooth motion data according to the verification time includes:
[0064] Obtain the larger of the first motion time and the second motion time within the verification time;
[0065] Obtain the sum of the time data of the current path point and the larger value;
[0066] Update the time data of the first path point to the sum value.
[0067] Optionally, initial motion data of the robot is acquired, including:
[0068] In response to the operation of configuring drag mode, switch to drag mode;
[0069] In response to the operation of the configuration sub-mode, switch to key point mode or trajectory mode;
[0070] In the key point mode or trajectory mode, the output force of each joint of the robot is calculated in real time and sent to the joint controller;
[0071] Record the motion data of each joint at each path point. The motion data includes working mode, position, speed and time. The path points include key points in key point mode or preset points in trajectory mode.
[0072] Optionally, the force output of each joint of the robot is calculated in real time, including:
[0073] Gravity data, friction data, and braking data of each joint are acquired sequentially;
[0074] The sum of the gravity data, friction data, and braking data is obtained, and the sum is used as the output force of each joint.
[0075] According to a second aspect of the present disclosure, a trajectory reproduction device is provided, suitable for a robot, the device comprising:
[0076] An initial data acquisition module is used to acquire the robot's initial motion data; the initial motion data includes a sequence of motion data of the joints at multiple path points on the movement trajectory during the robot's dragging and teaching process;
[0077] The initial data repair module is used to repair the initial motion data to obtain repaired motion data that conforms to the joint performance of the robot.
[0078] The trajectory acquisition module is used to smooth the repaired motion data to obtain the reproduced trajectory.
[0079] Optionally, the initial data repair module includes:
[0080] The smoothing data acquisition submodule is used to smooth the position data in the initial motion data to obtain smoothed motion data.
[0081] The data acquisition repair submodule is used to repair the time data in the smooth motion data to obtain repaired motion data.
[0082] Optionally, the smoothing data acquisition submodule includes:
[0083] The initial position acquisition unit is used to acquire the initial position data of the current path point and a preset number of subsequent path points for each path point;
[0084] An average value acquisition unit is used to acquire the average value of the location data of the current path point and the location data of the preset number of path points;
[0085] An initial position update unit is used to update the position data of the current path point to the average value, and the smooth motion data is obtained after updating the initial position data of all path points.
[0086] Optionally, the repair data acquisition submodule includes:
[0087] The speed acquisition unit is used to acquire the speed data of the robot's joints at the current path point and the first path point after the current path point, as well as the maximum acceleration of the joints, when it is determined that the scene is reproduced at the original speed.
[0088] The verification time acquisition unit is used to obtain the movement time of the joint at the current path point based on the position data, the velocity data and the maximum acceleration, and to obtain the verification time.
[0089] The drag time acquisition unit is used to acquire the time difference between the time data of the current path point and the first path point to obtain the drag time.
[0090] The data acquisition unit is used to update the time data of the first path point in the smooth motion data according to the verification time when the verification time is less than the dragging time, so as to obtain the repaired motion data.
[0091] Optionally, the verification time acquisition unit includes:
[0092] The first subunit is acquired based on the position data of the current path point and the first path point, as well as the maximum speed of the joint, to obtain the time it takes for the joint to move from the current path point to the first path point at its maximum speed, thus obtaining the first motion time.
[0093] The second time acquisition subunit is used to obtain the time when the joint transitions from the maximum speed to the reverse maximum speed with the maximum acceleration based on the maximum speed and maximum acceleration of the joint, so as to obtain the second motion time.
[0094] The first motion time and the second motion time are used as the verification time.
[0095] Optionally, the first time acquisition sub-unit includes:
[0096] The distance difference acquisition subunit is used to acquire the distance difference between the location data of the current path point and the location data of the first path point;
[0097] The first subunit is acquired to obtain the quotient of the distance difference and the maximum speed of the joint, and the quotient is used as the first motion time.
[0098] Optionally, the second time acquisition subunit includes:
[0099] The commutation flag acquisition subunit is used to acquire the commutation flag symbol;
[0100] The second time value acquisition subunit is used to determine that the value of the second motion time is 0 when the value of the reversing sign symbol is greater than zero; and to obtain the quotient of the maximum speed and maximum acceleration of the joint when the value of the reversing sign symbol is less than zero, and to take twice the quotient as the second motion time.
[0101] Optionally, the reversing flag acquisition subunit includes:
[0102] The first distance acquisition subunit is used to obtain the difference between the position data of the second path point after the current path point and the position data of the first path point to obtain the first distance;
[0103] The second distance acquisition subunit is used to obtain the difference between the position data of the first path point and the position data of the current path point to obtain the second distance;
[0104] The ratio acquisition subunit is used to acquire the ratio between the first distance and the second distance, and to use the ratio as the value of the reversing sign symbol.
[0105] Optionally, the repair data acquisition unit includes:
[0106] The larger value acquisition subunit is used to acquire the larger value between the first motion time and the second motion time within the verification time.
[0107] The sum value acquisition subunit is used to acquire the sum of the time data of the current path point and the larger value;
[0108] The time data update subunit is used to update the time data of the first path point to the sum value.
[0109] Optionally, the repair data acquisition submodule includes:
[0110] The speed acquisition unit is used to acquire the maximum acceleration and expected speed of the robot's joints at the current path point when it is determined that the scenario is a variable speed reproduction scenario.
[0111] The verification time acquisition unit is used to obtain the movement time of the joint at the current path point based on the position data, the velocity data and the maximum acceleration, and to obtain the verification time.
[0112] The expected time acquisition unit is used to acquire the expected time of the joint at the current path point based on the position data of the current path point and the first path point after the current path point, as well as the expected speed.
[0113] The data acquisition unit is used to update the time data of the first path point in the smooth motion data according to the verification time when the verification time is less than the expected time, so as to obtain the repaired motion data.
[0114] Optionally, the verification time acquisition unit includes:
[0115] The first time to obtain the sub-unit is used to obtain the time it takes for the joint to move from the current path point to the first path point at the maximum speed, based on the position data of the current path point and the first path point and the maximum speed of the joint, so as to obtain the first motion time.
[0116] The second time acquisition subunit is used to obtain the time when the joint transitions from the maximum speed to the reverse maximum speed with the maximum acceleration based on the maximum speed and the maximum acceleration of the joint, so as to obtain the second motion time.
[0117] The first motion time and the second motion time are used as the verification time.
[0118] Optionally, the first time acquisition sub-unit includes:
[0119] The distance difference acquisition subunit is used to acquire the distance difference between the location data of the current path point and the location data of the first path point.
[0120] The first subunit is acquired to obtain the quotient of the distance difference and the maximum speed of the joint, and the quotient is used as the first motion time.
[0121] Optionally, the second time acquisition subunit includes:
[0122] The commutation flag acquisition subunit is used to acquire the commutation flag symbol;
[0123] The second time value acquisition subunit is used to determine that the value of the second motion time is 0 when the value of the reversing sign symbol is greater than zero; and to obtain the quotient of the maximum speed and the maximum acceleration of the joint when the value of the reversing sign symbol is less than zero, and to take twice the quotient as the second motion time.
[0124] Optionally, the reversing flag acquisition subunit includes:
[0125] The first distance acquisition subunit is used to obtain the difference between the position data of the second path point after the current path point and the position data of the first path point to obtain the first distance;
[0126] The second distance acquisition subunit is used to obtain the difference between the position data of the first path point and the position data of the current path point to obtain the second distance;
[0127] The ratio acquisition subunit is used to acquire the ratio between the first distance and the second distance, and to use the ratio as the value of the reversing sign symbol.
[0128] Optionally, the expected time acquisition unit includes:
[0129] The change value acquisition subunit is used to acquire the difference between the position data of the current path point and the position data of the first 5 path points to obtain the position change value;
[0130] The expected time acquisition subunit is used to calculate the expected time for the joint to move from the current path point to the first path point based on the position change value and the expected speed.
[0131] Optionally, the repair data acquisition unit includes:
[0132] The larger value acquisition subunit is used to acquire the larger value between the first motion time and the second motion time within the verification time.
[0133] The sum value acquisition subunit is used to acquire the sum of the time data of the current path point and the larger value;
[0134] The time data update subunit is used to update the time data of the first path point to the sum value.
[0135] 5. Optionally, the initial data acquisition module includes:
[0136] The drag-and-drop mode switching submodule is used to switch to drag-and-drop mode in response to the operation of configuring drag-and-drop mode;
[0137] The sub-mode switching submodule is used to switch to key point mode or trajectory mode in response to the operation of configuring sub-mode;
[0138] The 0-joint output force calculation submodule is used to calculate the output force of each joint of the robot in real time and send it to the joint controller in the key point mode or trajectory mode.
[0139] The motion data recording module is used to record the motion data of each joint at each path point. The motion data includes working mode, position, speed and time. The path points include key points in key point mode or preset points in trajectory mode.
[0140] 5. Optionally, the joint output force calculation submodule includes:
[0141] The data acquisition unit is used to sequentially acquire the gravity data, friction data, and braking data of each joint;
[0142] The output acquisition unit is used to acquire the sum of the gravity data, the friction data, and the braking data, and use the sum as the output of each joint.
[0143] According to a third aspect of the present disclosure, a robot is provided, comprising:
[0144] Multiple joints and their controllers
[0145] Memory and processor;
[0146] The memory is used to store computer programs that can be executed by the processor;
[0147] The processor is configured to execute a computer program in the memory to implement the method as described in any of the first aspects.
[0148] According to a fourth aspect of the present disclosure, a chip is provided, comprising:
[0149] Memory and processor;
[0150] The memory is used to store computer programs that can be executed by the processor;
[0151] The processor is configured to execute a computer program in the memory to implement the method as described in any of the first aspects.
[0152] According to a fifth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, which, when an executable computer program in the storage medium is executed by a processor, can implement the method as described in any of the first aspects.
[0153] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0154] The solution provided in this embodiment can acquire the robot's initial motion data. This initial motion data includes a sequence of motion data from multiple path points along the robot's movement trajectory during the dragging and teaching process. The initial motion data is then repaired to obtain repaired motion data that conforms to the robot's joint performance. Finally, the repaired motion data is smoothed to obtain a reproduced trajectory. Thus, by repairing the initial motion data, this embodiment ensures that the repaired motion data meets the robot's joint performance requirements, enabling the robot to achieve an executable reproduced trajectory. This improves the efficiency of dragging and teaching and enhances the robot's learning efficiency. Furthermore, this embodiment enables zero-torque dragging without the need for a force sensor, reducing the robot's hardware cost.
[0155] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0156] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0157] Figure 1 This is a flowchart illustrating a trajectory reproduction method according to an exemplary embodiment.
[0158] Figure 2 This is a schematic diagram illustrating a drag-and-teach movement trajectory according to an exemplary embodiment.
[0159] Figure 3 This is a flowchart illustrating an example of acquiring repair motion data according to an exemplary embodiment.
[0160] Figure 4 This is a flowchart illustrating another method for acquiring repair motion data according to an exemplary embodiment.
[0161] Figure 5 This is a flowchart illustrating yet another method of acquiring repair motion data according to an exemplary embodiment.
[0162] Figure 6 This is a block diagram illustrating a drag-and-drop teaching and reproduction trajectory according to an exemplary embodiment.
[0163] Figure 7 This is a flowchart illustrating a trajectory reproduction according to an exemplary embodiment.
[0164] Figure 8 This is a block diagram illustrating a trajectory reproduction device according to an exemplary embodiment. Detailed Implementation
[0165] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described below by way of example do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatus consistent with some aspects of this disclosure as detailed in the appended claims. It should be noted that, without conflict, the following embodiments and features in the implementation methods can be combined with each other.
[0166] This disclosure provides a trajectory reproduction method and apparatus, a robot, and a storage medium. The trajectory reproduction method described above is applicable to robots that require joint control, and such robots may include, but are not limited to, robotic arms, bipedal robots, or quadrupedal robots, etc., and are not limited thereto.
[0167] Figure 1This is a flowchart illustrating a trajectory reproduction method according to an exemplary embodiment, see [link to flowchart]. Figure 1 One method for trajectory reproduction includes steps 11 to 13.
[0168] In step 11, the initial motion data of the robot is acquired; the initial motion data includes a sequence of motion data of the joints at multiple path points on the movement trajectory during the robot being dragged and taught.
[0169] In this embodiment, the robot's processor can acquire initial motion data from a designated location. In one example, the designated location may include, but is not limited to, local storage, cache, and the cloud, and is not limited thereto.
[0170] In this embodiment, the initial motion data includes a sequence of motion data of the joint at multiple path points on the movement trajectory during the machine being dragged and taught. The initial motion data may include, but is not limited to, (drag) speed data, position data, and time data. In one example, taking the initial motion data as including speed data, position data, and time data as an example, it can be understood as the instantaneous speed (i.e., speed data) and arrival time (i.e., time data) of the joint when it is dragged to the path point (i.e., position data).
[0171] In this embodiment, the robot's drag-and-drop teaching process may include:
[0172] The robot's display screen can show a configuration page, which includes normal mode and drag mode. Normal mode refers to the robot's automatic operation along a preset trajectory, while drag mode is operated by the operator. The operator can manipulate the drag mode, and when the robot detects this operation, it can switch to drag mode in response to the configured drag mode settings.
[0173] In one example, the drag mode is further subdivided into keypoint mode and trajectory mode. Keypoint mode specifies each keypoint the robot must traverse and records the motion data of the joints at each keypoint. Trajectory mode allows the operator to first set the desired speed (i.e., subsequent desired speed) at each preset point on the trajectory, and then drag the robot to move (the movement speed may not be the desired speed) and record the speed data of the joints at each point.
[0174] It should be noted that both the key points in the keypoint mode and the preset points in the trajectory mode are points traversed by the joint. The difference lies in the number of key points: key points are fewer, for example, 10 to 50. Each key point can include inflection points, endpoints, start points, or end points in the movement trajectory. Each point is relatively important to the movement trajectory, hence the name key point. In contrast, the number of preset points in the trajectory mode is greater, for example, 30 to 1000. Each preset point is part of the movement trajectory. In addition to inflection points, endpoints, start points, or end points in the movement trajectory, it can also include midpoints between two endpoints. The role of each path point in the movement trajectory is less than that of the key points mentioned above, hence the name preset point.
[0175] The processor can switch to keypoint mode or trajectory mode in response to an operation configuring a sub-mode in the drag mode. In keypoint mode or trajectory mode, the processor can calculate the output force of each joint of the robot in real time and send it to the joint controller.
[0176] In one example, the processor calculates the output force of each joint of the robot in real time, including: sequentially acquiring the gravity data, friction data, and braking data of each joint. Then, the processor can acquire the sum of the gravity data, friction data, and braking data of the current joint, and use the sum as the output force of the joint. The output force is shown in equation (1):
[0177] τ i =G i + f i + B i v i (1)
[0178] In equation (1), τ i G represents the force output of the joint at the i-th path point; i Gravity data can be calculated from a dynamic model; f i Friction data is represented by Coulomb viscosity plus the Stribeck model, obtained through joint identification and adjustment; B i The damping coefficient is a known term and can be obtained by adjusting the joint; v i The joint velocity can be obtained through joint feedback.
[0179] It should be noted that the above embodiments describe the calculation method of the output force of each joint. Knowing the operator's dragging force during the drag teaching process, it can be determined that the robot's output force is equal to the aforementioned dragging force. Combined with the robot's structural relationships, the processor can allocate the output force of each joint, and the joint output force is sent to the joint controller so that the operator's output force is 0, thus achieving the effect of dragging the robot with zero torque.
[0180] During the dragging process, the robot can move along a trajectory. See also Figure 2 The robot's hand can move along a dotted line trajectory, and the processor can record the motion data of each joint at each path point. This motion data includes the operating mode (such as keypoint mode or trajectory mode), the speed (at each path point), and the time taken to reach that path point. The path points can include key points in keypoint mode or preset points in trajectory mode (or can be understood as key points, but their number is much greater than in keypoint mode).
[0181] Thus, in this embodiment, the operator can drag the robot with zero torque, reducing the operator's workload; and no force sensor is needed during the dragging process, which can reduce hardware costs.
[0182] In step 12, the initial motion data is repaired to obtain repaired motion data that conforms to the joint performance of the robot.
[0183] In this embodiment, the purpose of drag-and-drop teaching is to enable the robot to automatically move along the trajectory after the operator drags it once, thus achieving the goal of learning from the operator and achieving a human-like effect. During the dragging process, the operator's movements may be too fast or too slow; if they are too fast, they may exceed the joint's performance. Therefore, the processor can perform repair processing on the initial motion data. The repair processing targets the motion data of path points that the joints cannot achieve even at their maximum capabilities (maximum speed and / or maximum acceleration). For example, if the speed data of a certain path point is 5.1 m / s, while the maximum speed of the joint is 5 m / s, the joint cannot reach the speed data of that path point. After such repair processing, repaired data that conforms to the joint performance of the machine can be obtained.
[0184] In one embodiment, see Figure 3 The processor can perform repair processing on the initial motion data, including steps 31 and 32.
[0185] In step 31, the processor can smooth the position data in the initial motion data to obtain smoothed motion data. For example, for each path point, the processor can obtain the initial position data of the current path point and a preset number (e.g., 3-5, configurable) of subsequent path points, such as x. i x i+1 x i+2And so on. Understandably, the processor performs the same smoothing operation on each path point. For ease of description, the path point currently being processed is referred to as the current path point. Then, the processor can obtain the position data of the current path point and the average of the position data of a preset number of path points. Afterward, the processor can update the position data of the current path point to this average. For the last preset number of path points, processing can be ignored or padded. Taking padded processing as an example, the last calculated average can be padded to the last preset number of path points.
[0186] For example, let the initial position data of the i-th path point be x. i The smoothed position data of the i-th path point is y. i , then y i With x i The relationship is shown in equation (2).
[0187]
[0188] In equation (2), x i+1 x i+2 x i+3 x i+4 These are the 1st, 2nd, 3rd, and 4th path points after the i-th path point, respectively. Equation (2) illustrates the scheme for calculating the average when the preset number is 4.
[0189] In this way, after updating the position data of all waypoints, smooth motion data can be obtained. The smoothed position data of the waypoints in this step can eliminate interference caused by operator jitter or robot jitter, enabling the robot to move smoothly subsequently.
[0190] In step 32, the processor can perform repair processing on the time data in the smoothed motion data to obtain repaired motion data.
[0191] In this embodiment, the processor can repair the time data in the smooth motion data, including original speed reproduction scenarios and variable speed reproduction scenarios. The original speed reproduction scenario matches the aforementioned keypoint pattern; that is, the speed data when the joint reaches each path point during the operator's drag-and-teach process is the same as the speed data when the joint reaches the same path point in the repaired motion data (at which point the speed data is less than the maximum speed) or the joint's maximum speed (at which point the drag-and-teach speed data is greater than the joint's maximum speed). The variable speed reproduction scenario matches the aforementioned trajectory pattern; that is, the operator first sets the desired speed for each path point, then records the speed data when the joint reaches each path point during the drag-and-teach process; during the reproduction process, the speed data of each path point is repaired to the desired speed.
[0192] Understandably, the original speed reproduction scenario requires relatively accurate drag-and-drop teaching by the operator, making it suitable for relatively simple operations; while the variable speed reproduction scenario allows the operator's drag-and-drop teaching to be at varying speeds, making teaching relatively simple and suitable for complex robot operations. Technicians can choose the appropriate scenario based on the specific situation, and no restrictions are imposed here.
[0193] Taking a scene reproduced at the original speed as an example, the processor can obtain the working mode from the smoothed motion data. When the working mode is the keypoint mode, the processor can determine that it is a scene reproduced at the original speed. See also Figure 4 The processor can perform repair processing on the time data in the smooth motion data, including steps 41 to 44.
[0194] In step 41, the processor can acquire the velocity data of the robot's joints at the current path point and the first path point after the current path point, as well as the maximum acceleration of the joints.
[0195] Understandably, the velocity data of the current path point and the velocity data of the first path point after the current path point can be read from the smooth motion data. The maximum acceleration of the joint is a known quantity, which the processor can read from the joint's configuration data.
[0196] In step 42, the processor can obtain the movement time of the joint at the current path point based on the position data, the velocity data, and the maximum acceleration, and thus obtain the verification time.
[0197] In this step, the processor can obtain the time it takes for the joint to move from the current path point to the first path point at its maximum speed, based on the position data of the current path point and the first path point, and the maximum speed of the joint, thus obtaining the first motion time. In one example, the processor can obtain the distance difference between the position data of the current path point and the position data of the first path point after the current path point, i.e., the position data of the first path point minus the position data of the current path point. Then, the processor can obtain the quotient of the above distance difference and the maximum speed of the joint, and use the quotient as the first motion time. The first motion time is shown in equation (3):
[0198]
[0199] In equation (3), period_p min,j y represents the first motion time of the j-th joint. i+1,j This represents the position data of the j-th joint at the (i+1)-th path point, y i,j Vec represents the position data of the j-th joint at the i-th path point. max,j This represents the maximum speed of the j-th joint.
[0200] In other words, the first movement time is the minimum allowable time for the joint to move from the current path point to the first path point. If the time is less than the first movement time, the joint will not be able to reach the first path point after the current path point.
[0201] In this step, the processor can obtain the time it takes for the joint to transition from maximum speed to reverse maximum speed with maximum acceleration based on the maximum speed and maximum acceleration of the joint, thus obtaining the second motion time.
[0202] In one example, the processor can acquire a reversal flag indicating whether the joint's direction has changed between the current path point, the first path point after the current path point, and the second path point. In this example, acquiring the reversal flag involves: the processor acquiring the difference between the position data of the second path point after the current path point and the position data of the first path point to obtain a first distance; then, the processor acquiring the difference between the position data of the first path point and the position data of the current path point to obtain a second distance; and finally, the processor acquiring the ratio of the first distance to the second distance and using this ratio as the value of the reversal flag. Alternatively, when the joint does not reverse direction, the current path point, the first path point, and the second path point should be moving further and further away from the starting point (i.e., at time ti = 0). When the joint reverses direction, the current path point may be located after the first path point, while the first path point is closer to the starting point, resulting in a negative first distance. Or, the second path point may be located before the first path point, while the second path point is closer to the starting point, resulting in a negative second distance. When the first or second distance is negative, the reversal indicator symbol is negative (less than zero). When no reversal occurs at the joint, both the first and second distances are positive, and the reversal indicator symbol is positive (greater than zero).
[0203] In this example, when the value of the reversing sign is greater than zero, the processor can determine that the value of the second motion time is 0; when the value of the reversing sign is less than zero, the processor can obtain the quotient of the maximum speed and maximum acceleration of the joint, and take twice the quotient as the second motion time.
[0204] In this example, the second motion time is shown in equation (4):
[0205]
[0206] In equation (4), period_v min,j Indicates the second motion time, Vec max,j Let 2Vec represent the maximum velocity of the j-th joint. max,j =Vec max,j -(-Vec max,j) represents the velocity change of the j-th joint when it switches from maximum velocity to the reverse maximum velocity, Acc max,j This represents the maximum acceleration of the j-th joint.
[0207] In this way, the processor can use the first motion time and the second motion time as the verification time, which can be used to represent the joint performance.
[0208] In step 43, the processor can obtain the time difference between the time data of the current path point and the first path point to get the drag time, as shown in equation (5):
[0209] period log =t i+1 -t i (5)
[0210] In equation (5), period log The time t represents the dragging time, which is the time it takes for a joint to be dragged from the current path point to the first path point. i+1 This represents the time data of the first path point after the joint reaches the current path point, t. i This represents the time data for a joint to reach the current path point.
[0211] In step 44, when the verification time is less than the dragging time, the processor can update the time data of the first path point in the smooth motion data according to the verification time to obtain the repaired motion data.
[0212] In this embodiment, the processor can compare the verification time and the dragging time to obtain their relative magnitudes. When the dragging time is less than the verification time, it indicates that the joint can move from the current path point to the first path point within the dragging time, and no time data repair is needed. When the verification time is less than the dragging time, it indicates that the joint cannot move from the current path point to the first path point within the dragging time, meaning the joint cannot reach the first path point, or it exceeds the joint's performance. In this case, the processor can update the time data of the first path point in the smooth motion data based on the verification time. For example, the processor can obtain the larger of the first and second movement times within the detection time. Then, the processor can obtain the sum of the time data of the current path point and the larger value. Afterward, the processor can update the time data of the first path point after the current path point to the above sum value, obtaining the updated time data. After updating the time data of all path points, the repaired motion data is obtained.
[0213] In this embodiment, by reproducing the smoothed motion data at its original speed, the trajectory corresponding to the repaired motion data can be made as consistent as possible with that of the initial motion data, thereby improving learning efficiency.
[0214] Taking a variable-speed reproduction scenario as an example, the processor can obtain the operating mode from the smooth motion data. When the operating mode is trajectory mode, the processor can determine that it is a variable-speed reproduction scenario. See also Figure 5 The processor can perform repair processing on the time data in the smooth motion data, including steps 51 to 54.
[0215] In step 51, the processor can obtain the maximum acceleration and desired velocity of the robot's joints at the current path point. It is understood that the maximum acceleration of the joint is a known quantity, which the processor can read from the joint's configuration data. The desired velocity of the joint is the velocity configured by the operator for each path point in trajectory mode, and is also a known quantity.
[0216] In step 52, the processor can obtain the movement time of the joint at the current path point based on the position data, the velocity data, and the maximum acceleration, and thus obtain the verification time.
[0217] In this step, the velocity data of the current path point and the velocity and position data of the first path point after the current path point can be read from the smooth motion data.
[0218] In one example, the processor can obtain the time it takes for the joint to move from the current path point to the first path point at its maximum speed, based on the position data of the current path point and the first path point, as well as the joint's maximum speed, thus obtaining a first movement time. For example, the processor can obtain the distance difference between the position data of the current path point and the position data of the first path point after the current path point, i.e., the position data of the first path point minus the position data of the current path point. Then, the processor can obtain the quotient of the above distance difference and the maximum speed of the joint, and use the quotient as the first movement time. This first movement time is shown in equation (3). In other words, the first movement time is the minimum allowable time for the joint to move from the current path point to the first path point. If the time is less than the above first movement time, the joint will not be able to reach the first path point after the current path point.
[0219] In another example, the processor can obtain the time it takes for the joint to transition from maximum speed to reverse maximum speed with maximum acceleration based on the joint's maximum speed and maximum acceleration, thus obtaining the second motion time.
[0220] In one example, the processor can acquire a reversal flag indicating whether the joint's direction has changed between the current path point, the first path point after the current path point, and the second path point. In this example, acquiring the reversal flag involves: the processor acquiring the difference between the position data of the second path point after the current path point and the position data of the first path point to obtain a first distance; then, the processor acquiring the difference between the position data of the first path point and the position data of the current path point to obtain a second distance; and finally, the processor acquiring the ratio of the first distance to the second distance and using this ratio as the value of the reversal flag. Alternatively, when the joint does not reverse direction, the current path point, the first path point, and the second path point should be moving further and further away from the starting point (i.e., at time ti = 0). When the joint reverses direction, the current path point may be after the first path point, while the first path point is closer to the starting point, resulting in a negative first distance. Or, the second path point may be before the first path point, while the second path point is closer to the starting point, resulting in a negative second distance. When the first or second distance is negative, the reversal indicator symbol is negative (less than zero). When no reversal occurs at the joint, both the first and second distances are positive, and the reversal indicator symbol is positive (greater than zero).
[0221] In this example, when the value of the reversing sign symbol is greater than zero, the processor can determine that the value of the second motion time is 0; when the value of the reversing sign symbol is less than zero, the processor can obtain the quotient of the maximum speed and the maximum acceleration of the joint, and take twice the quotient as the second motion time, as shown in equation (4).
[0222] In this way, the processor can use the first motion time and the second motion time as the verification time, which can be used to represent the joint performance.
[0223] In step 53, the processor can obtain the expected time of the joint at the current path point based on the position data of the current path point and the first path point after the current path point, as well as the expected speed.
[0224] In one example, the processor can obtain the difference between the position data of the current path point and the position data of the first path point to get the position change value. Then, the processor can calculate the expected time for the joint to move from the current path point to the first path point based on the position change value and the expected speed. In this example, the expected time is shown in equation (6):
[0225]
[0226] In equation (6), period des Indicates the joint moving at the desired velocity veldes The expected time is the time taken to drag from the current path point to the first path point, y. i+1,j This represents the position data of the j-th joint at the first path point, y i,j This represents the position data of the j-th joint at the current path point.
[0227] In step 54, when the verification time is less than the expected time, the processor can update the time data of the first path point in the smooth motion data according to the verification time to obtain the repaired motion data.
[0228] In this embodiment, the processor can compare the verification time and the expected time to obtain their relative magnitudes. When the expected time is less than the verification time, it indicates that the joint can move from the current path point to the first path point within the expected time, and no time data repair is needed. When the verification time is less than the expected time, it indicates that the joint cannot move from the current path point to the first path point within the expected time, meaning the joint cannot reach the first path point, or it exceeds the joint's performance. In this case, the joint needs the expected time to move to the first path point. Therefore, the processor can update the time data of the first path point in the smooth motion data based on the verification time. For example, the processor can obtain the larger of the first motion time and the second motion time within the detection time. Then, the processor can obtain the sum of the time data of the current path point and the larger value. Afterward, the processor can update the time data of the first path point after the current path point to the above sum, obtaining the updated time data. After updating the time data of all path points, the repaired motion data is obtained.
[0229] In this embodiment, by reproducing the smooth motion data at varying speeds, the speed data of the joints is restored to the preset desired speed, thereby improving the efficiency of drag teaching and the learning efficiency of the robot.
[0230] In step 13, the repaired motion data is smoothed to obtain the reproduced trajectory.
[0231] In this embodiment, the motion data to be repaired consists of discrete motion points on various path points. The processor can then perform smoothing processing on the repaired motion data. Smoothing methods include, but are not limited to, linear interpolation, staged interpolation, and polynomial fitting. When more path points can be inserted between two known path points, the corresponding scheme falls within the scope of this disclosure. It is understood that the smoothing process targets both the time and position data in the repaired motion data to obtain the reproduced trajectory (y, t). The velocity data can be obtained by differentiating the position data; and the operating mode can use the original path point operating mode.
[0232] Thus, the solution provided in this embodiment can acquire the robot's initial motion data; the initial motion data includes a sequence of motion data of multiple path points of the joints on the movement trajectory during the robot's dragging and teaching process; the initial motion data is repaired to obtain repaired motion data that conforms to the robot's joint performance; the repaired motion data is smoothed to obtain a reproduced trajectory. In this way, by repairing the initial motion data, this embodiment ensures that the repaired motion data meets the robot's joint performance requirements, i.e., the robot can achieve it, thereby obtaining an executable reproduced trajectory, which is beneficial for improving the efficiency of dragging and teaching and the robot's learning efficiency. Furthermore, this embodiment can achieve zero-torque dragging without adding a force sensor, which can reduce the robot's hardware cost.
[0233] The process of a trajectory reproduction method provided in this embodiment is described below with reference to an example.
[0234] In this embodiment, the process of drag-and-drop teaching and trajectory reproduction is as follows: Figure 6 As shown, the robot can respond to dragging operations and record initial motion data. Then, the robot can enter a reproduction process, first determining whether to reproduce at a variable speed or the original speed. After determining whether to reproduce at a variable speed or the original speed, the initial motion data can be processed to ultimately obtain the reproduced trajectory.
[0235] In this embodiment, the drag-and-drop teaching section includes:
[0236] First, configure the robot to enter drag mode. In drag mode, the operator starts to drag the robot to perform operations; and the processor can calculate the joint output force of the robot in real time as shown in equation (1), so that the operator can save as much effort as possible when dragging, that is, achieve the effect of zero torque dragging.
[0237] In drag-and-drop mode, the operator can choose between keypoint mode and trajectory mode. In keypoint mode, the operator can specify each keypoint the robot must pass through, as well as the speed at each keypoint; in trajectory mode, the operator can select the speed at each point along the trajectory.
[0238] After dragging in drag mode, the robot can enter reproduction mode. In reproduction mode, the robot reproduces the dragging action according to the position and speed specified by the operator, that is, it acquires and processes the recorded position data, speed data, and time data. After the repair processing is completed, a smoothing process is performed to complete the trajectory reproduction.
[0239] In the scenario of reproducing the original speed, see Figure 7 The processor can calculate the allowable time for position transition (first motion time), the allowable time for velocity transition (e.g., second motion time), and the actual allocated time (i.e., dragging time). See details... Figure 3The details of the illustrated embodiments will not be repeated here.
[0240] After obtaining the first motion time period_p min Second motion time period_v min and drag time period log Then, the maximum value of the three, period, can be selected, and t can be set to... i+1 =t i +period. Where t0 = 0.
[0241] It should be noted that the first motion time is period_p min The second motion time is period_v, which is the maximum value among the first motion times of all joints. min It refers to the maximum value of the first movement time of all joints.
[0242] Finally, repeat the above steps to complete the smoothed motion data for each time point t0,...,t. i ,...,t N The update restored the motion data.
[0243] In variable-speed reproduction scenarios, the processor can obtain the expected time period. des The first motion time period_p min Second motion time period_v min See details Figure 5 The details of the illustrated embodiment will not be repeated here. The processor can then proceed from the desired time period. des The first motion time period_p min Second motion time period_v min Choose the maximum value as period and make t i+1 =t i +period. Where t0 = 0.
[0244] Finally, repeat the above steps to complete the smoothed motion data for each time point t0,...,t. i ,...,t N The update restored the motion data.
[0245] After obtaining the restored motion data, piecewise polynomial interpolation can be performed on the position and time data to obtain the reproduced trajectory. The processor can then send the reproduced trajectory to the joint controller, which can then control the joint movement based on the reproduced trajectory to achieve a human-like effect.
[0246] Based on the trajectory reproduction method provided in the embodiments of this disclosure, the embodiments of this disclosure also provide a trajectory reproduction device, suitable for robots, see [link to relevant documentation]. Figure 8 The device includes:
[0247] The initial data acquisition module 81 is used to acquire the robot's initial motion data; the initial motion data includes a sequence of motion data of the joints at multiple path points on the movement trajectory during the robot's dragging and teaching process;
[0248] The initial data repair module 82 is used to repair the initial motion data to obtain repaired motion data that conforms to the joint performance of the robot.
[0249] The trajectory acquisition module 83 is used to smooth the repaired motion data to obtain the trajectory.
[0250] In one embodiment, the initial data repair module includes:
[0251] The smoothing data acquisition submodule is used to smooth the position data in the initial motion data to obtain smoothed motion data.
[0252] The data acquisition repair submodule is used to repair the time data in the smooth motion data to obtain repaired motion data.
[0253] In one embodiment, the smoothing data acquisition submodule includes:
[0254] The initial position acquisition unit is used to acquire the initial position data of the current path point and a preset number of subsequent path points for each path point;
[0255] An average value acquisition unit is used to acquire the average value of the location data of the current path point and the location data of the preset number of path points;
[0256] An initial position update unit is used to update the position data of the current path point to the average value, and the smooth motion data is obtained after updating the initial position data of all path points.
[0257] In one embodiment, the repair data acquisition submodule includes:
[0258] The speed acquisition unit is used to acquire the speed data of the robot's joints at the current path point and the first path point after the current path point, as well as the maximum acceleration of the joints, when it is determined that the scene is reproduced at the original speed.
[0259] The verification time acquisition unit is used to obtain the movement time of the joint at the current path point based on the position data, the velocity data and the maximum acceleration, and to obtain the verification time.
[0260] The drag time acquisition unit is used to acquire the time difference between the time data of the current path point and the first path point to obtain the drag time.
[0261] The data acquisition unit is used to update the time data of the first path point in the smooth motion data according to the verification time when the verification time is less than the dragging time, so as to obtain the repaired motion data.
[0262] In one embodiment, the verification time acquisition unit includes:
[0263] The first subunit is acquired based on the position data of the current path point and the first path point, as well as the maximum speed of the joint, to obtain the time it takes for the joint to move from the current path point to the first path point at its maximum speed, thus obtaining the first motion time.
[0264] The second time acquisition subunit is used to obtain the time when the joint transitions from the maximum speed to the reverse maximum speed with the maximum acceleration based on the maximum speed and maximum acceleration of the joint, so as to obtain the second motion time.
[0265] The first motion time and the second motion time are used as the verification time.
[0266] In one embodiment, the first time acquisition subunit includes:
[0267] The distance difference acquisition subunit is used to acquire the distance difference between the location data of the current path point and the location data of the first path point;
[0268] The first subunit is acquired to obtain the quotient of the distance difference and the maximum speed of the joint, and the quotient is used as the first motion time.
[0269] In one embodiment, the second time acquisition subunit includes:
[0270] The commutation flag acquisition subunit is used to acquire the commutation flag symbol;
[0271] The second time value acquisition subunit is used to determine that the value of the second motion time is 0 when the value of the reversing sign symbol is greater than zero; and to obtain the quotient of the maximum speed and maximum acceleration of the joint when the value of the reversing sign symbol is less than zero, and to take twice the quotient as the second motion time.
[0272] In one embodiment, the reversing flag acquisition subunit includes:
[0273] The first distance acquisition subunit is used to obtain the difference between the position data of the second path point after the current path point and the position data of the first path point to obtain the first distance;
[0274] The second distance acquisition subunit is used to obtain the difference between the position data of the first path point and the position data of the current path point to obtain the second distance;
[0275] The ratio acquisition subunit is used to acquire the ratio between the first distance and the second distance, and to use the ratio as the value of the reversing sign symbol.
[0276] In one embodiment, the repair data acquisition unit includes:
[0277] The larger value acquisition subunit is used to acquire the larger value between the first motion time and the second motion time within the verification time.
[0278] The sum value acquisition subunit is used to acquire the sum of the time data of the current path point and the larger value;
[0279] The time data update subunit is used to update the time data of the first path point to the sum value.
[0280] In one embodiment, the repair data acquisition submodule includes:
[0281] The speed acquisition unit is used to acquire the maximum acceleration and expected speed of the robot's joints at the current path point when it is determined that the scenario is a variable speed reproduction scenario.
[0282] The verification time acquisition unit is used to obtain the movement time of the joint at the current path point based on the position data, the velocity data and the maximum acceleration, and to obtain the verification time.
[0283] The expected time acquisition unit is used to acquire the expected time of the joint at the current path point based on the position data of the current path point and the first path point after the current path point, as well as the expected speed.
[0284] The data acquisition unit is used to update the time data of the first path point in the smooth motion data according to the verification time when the verification time is less than the expected time, so as to obtain the repaired motion data.
[0285] In one embodiment, the verification time acquisition unit includes:
[0286] The first time to obtain the sub-unit is used to obtain the time it takes for the joint to move from the current path point to the first path point at the maximum speed, based on the position data of the current path point and the first path point and the maximum speed of the joint, so as to obtain the first motion time.
[0287] The second time acquisition subunit is used to obtain the time when the joint transitions from the maximum speed to the reverse maximum speed with the maximum acceleration based on the maximum speed and the maximum acceleration of the joint, so as to obtain the second motion time.
[0288] The first motion time and the second motion time are used as the verification time.
[0289] In one embodiment, the first time acquisition subunit includes:
[0290] The distance difference acquisition subunit is used to acquire the distance difference between the location data of the current path point and the location data of the first path point.
[0291] The first subunit is acquired to obtain the quotient of the distance difference and the maximum speed of the joint, and the quotient is used as the first motion time.
[0292] In one embodiment, the second time acquisition subunit includes:
[0293] The commutation flag acquisition subunit is used to acquire the commutation flag symbol;
[0294] The second time value acquisition subunit is used to determine that the value of the second motion time is 0 when the value of the reversing sign symbol is greater than zero; and to obtain the quotient of the maximum speed and the maximum acceleration of the joint when the value of the reversing sign symbol is less than zero, and to take twice the quotient as the second motion time.
[0295] In one embodiment, the reversing flag acquisition subunit includes:
[0296] The first distance acquisition subunit is used to obtain the difference between the position data of the second path point after the current path point and the position data of the first path point to obtain the first distance;
[0297] The second distance acquisition subunit is used to obtain the difference between the position data of the first path point and the position data of the current path point to obtain the second distance;
[0298] The ratio acquisition subunit is used to acquire the ratio between the first distance and the second distance, and to use the ratio as the value of the reversing sign symbol.
[0299] In one embodiment, the desired time acquisition unit includes:
[0300] The change value acquisition subunit is used to acquire the difference between the position data of the current path point and the position data of the first path point to obtain the position change value;
[0301] The expected time acquisition subunit is used to calculate the expected time for the joint to move from the current path point to the first path point based on the position change value and the expected speed.
[0302] In one embodiment, the repair data acquisition unit includes:
[0303] The larger value acquisition subunit is used to acquire the larger value between the first motion time and the second motion time within the verification time.
[0304] The sum value acquisition subunit is used to acquire the sum of the time data of the current path point and the larger value;
[0305] The time data update subunit is used to update the time data of the first path point to the sum value.
[0306] In one embodiment, the initial data acquisition module includes:
[0307] The drag-and-drop mode switching submodule is used to switch to drag-and-drop mode in response to the operation of configuring drag-and-drop mode;
[0308] The sub-mode switching submodule is used to switch to key point mode or trajectory mode in response to the operation of configuring sub-mode;
[0309] The joint output force calculation submodule is used to calculate the output force of each joint of the robot in real time and send it to the joint controller in the key point mode or trajectory mode.
[0310] The motion data recording module is used to record the motion data of each joint at each path point. The motion data includes working mode, position, speed and time. The path points include key points in key point mode or preset points in trajectory mode.
[0311] In one embodiment, the joint output force calculation submodule includes:
[0312] The data acquisition unit is used to sequentially acquire the gravity data, friction data, and braking data of each joint;
[0313] The output acquisition unit is used to acquire the sum of the gravity data, the friction data, and the braking data, and use the sum as the output of each joint.
[0314] It should be noted that the system embodiment shown in this embodiment matches the content of the above method embodiment, and the content of the above method embodiment can be referred to, and will not be repeated here.
[0315] In an exemplary embodiment, a robot is also provided, comprising:
[0316] Multiple joints and their controllers
[0317] Memory and processor;
[0318] The memory is used to store computer programs that can be executed by the processor;
[0319] The processor is used to execute the computer program in the memory to implement the method as described above.
[0320] In an exemplary embodiment, a chip is also provided, comprising:
[0321] Memory and processor;
[0322] The memory is used to store computer programs that can be executed by the processor;
[0323] The processor is used to execute the computer program in the memory to implement the method as described above.
[0324] The chip can be a conventional CPU (central processing unit) chip, GPU (graphics processing unit) chip, or an acceleration chip specifically designed for artificial intelligence technology, such as an AI (Artificial Intelligence) accelerator.
[0325] In an exemplary embodiment, a non-transitory computer-readable storage medium is also provided, such as a memory 1304 including instructions, wherein the executable computer program described above can be executed by a processor. The readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, or optical data storage device, etc.
[0326] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This disclosure is intended to cover any variations, uses, or adaptations that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0327] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A trajectory reproduction method, characterized in that, Applicable to robots, the method includes: Acquire the robot's initial motion data; the initial motion data includes a sequence of motion data of the joints at multiple path points on the movement trajectory during the robot's dragging and teaching process; The initial motion data is repaired to obtain repaired motion data that conforms to the joint performance of the robot; The repaired motion data is smoothed to obtain the reproduced trajectory; The initial motion data is repaired, including: The position data in the initial motion data is smoothed to obtain smoothed motion data; The time data in the smoothed motion data is repaired to obtain repaired motion data; The position data in the initial motion data is smoothed to obtain smoothed motion data, including: For each path point, obtain the initial position data of the current path point and a preset number of subsequent path points; Obtain the location data of the current path point and the average value of the location data of the preset number of path points; The position data of the current path point is updated to the average value, and the smooth motion data is obtained after updating the initial position data of all path points.
2. The method according to claim 1, characterized in that, The time data in the smoothed motion data is repaired, including: When it is determined that the scene is reproduced at the original speed, the speed data of the robot's joints at the current path point and the first path point after the current path point, as well as the maximum acceleration of the joints, are obtained. The motion time of the joint at the current path point is obtained based on the position data, the velocity data, and the maximum acceleration, and the verification time is obtained. The drag time is obtained by acquiring the time difference between the time data of the current path point and the first path point. When the verification time is less than the dragging time, the time data of the first path point in the smooth motion data is updated according to the verification time to obtain the repaired motion data.
3. The method according to claim 2, characterized in that, Based on the position data, the velocity data, and the maximum acceleration, the movement time of the joint at the current path point is obtained, and the verification time is derived, including: Based on the position data of the current path point and the first path point, and the maximum speed of the joint, the time it takes for the joint to move from the current path point to the first path point at its maximum speed is obtained, thus obtaining the first motion time. The second motion time is obtained by calculating the time it takes for the joint to transition from its maximum speed to its reverse maximum speed with maximum acceleration based on the maximum speed and maximum acceleration of the joint. The first motion time and the second motion time are used as the verification time.
4. The method according to claim 3, characterized in that, Based on the position data of the current path point and the first path point, and the maximum speed of the joint, the time it takes for the joint to move from the current path point to the first path point at its maximum speed is obtained, thus obtaining the first motion time, including: Obtain the distance difference between the location data of the current path point and the location data of the first path point; Obtain the quotient of the distance difference and the maximum speed of the joint, and use the quotient as the first movement time.
5. The method according to claim 3, characterized in that, The second motion time is obtained by calculating the time it takes for the joint to transition from its maximum velocity to its reverse maximum velocity with maximum acceleration based on the joint's maximum velocity and maximum acceleration, including: Obtain the reversal sign symbol; When the value of the reversing sign is greater than zero, the value of the second motion time is determined to be 0; When the value of the reversing sign is less than zero, the quotient of the maximum speed and maximum acceleration of the joint is obtained, and twice the quotient is taken as the second motion time.
6. The method according to claim 5, characterized in that, Obtain the reversing sign symbol, including: The first distance is obtained by obtaining the difference between the position data of the second path point after the current path point and the position data of the first path point; The difference between the location data of the first path point and the location data of the current path point is obtained to get the second distance; Obtain the ratio of the first distance to the second distance, and use the ratio as the value of the reversal sign symbol.
7. The method according to claim 3, characterized in that, Updating the time data of the first path point in the smooth motion data according to the verification time includes: Obtain the larger of the first motion time and the second motion time within the verification time; Obtain the sum of the time data of the current path point and the larger value; Update the time data of the first path point to the sum value.
8. The method according to claim 1, characterized in that, The time data in the smoothed motion data is repaired, including: When it is determined to be a variable speed reproduction scenario, obtain the maximum acceleration and expected speed of the robot's joints at the current path point; The motion time of the joint at the current path point is obtained based on the position data, velocity data, and maximum acceleration, and the verification time is obtained. The expected time of the joint at the current path point is obtained based on the position data of the current path point and the first path point after the current path point, as well as the expected speed. When the verification time is less than the expected time, the time data of the first path point in the smooth motion data is updated according to the verification time to obtain the repaired motion data.
9. The method according to claim 8, characterized in that, Based on the position data, the velocity data, and the maximum acceleration, the movement time of the joint at the current path point is obtained, and the verification time is derived, including: Based on the position data of the current path point and the first path point, and the maximum speed of the joint, the time it takes for the joint to move from the current path point to the first path point at its maximum speed is obtained, thus obtaining the first motion time. The second motion time is obtained by calculating the time it takes for the joint to transition from its maximum speed to its reverse maximum speed with maximum acceleration based on the maximum speed and maximum acceleration of the joint. The first motion time and the second motion time are used as the verification time.
10. The method according to claim 8, characterized in that, Based on the position data of the current path point and the first path point, and the maximum speed of the joint, the time it takes for the joint to move from the current path point to the first path point at its maximum speed is obtained, thus obtaining the first motion time, including: Obtain the distance difference between the current path point's location data and the first path point's location data; Obtain the quotient of the distance difference and the maximum speed of the joint, and use the quotient as the first movement time.
11. The method according to claim 8, characterized in that, The second motion time is obtained by calculating the time it takes for the joint to transition from its maximum speed to its reverse maximum speed with maximum acceleration based on the maximum speed and maximum acceleration of the joint, including: Obtain the reversal sign symbol; When the value of the reversing sign is greater than zero, the value of the second motion time is determined to be 0; When the value of the reversing sign is less than zero, the quotient of the maximum speed and the maximum acceleration of the joint is obtained, and twice the quotient is taken as the second motion time.
12. The method according to claim 11, characterized in that, Obtain the reversing sign symbol, including: The first distance is obtained by obtaining the difference between the position data of the second path point after the current path point and the position data of the first path point; The difference between the location data of the first path point and the location data of the current path point is obtained to get the second distance; Obtain the ratio of the first distance to the second distance, and use the ratio as the value of the reversal sign symbol.
13. The method according to claim 8, characterized in that, Based on the position data of the current path point and the first path point after the current path point, and the desired speed, the expected time of the joint at the current path point is obtained, including: The difference between the position data of the current path point and the position data of the first path point is obtained to get the position change value; Calculate the expected time for the joint to move from the current path point to the first path point based on the position change value and the expected speed.
14. The method according to claim 8, characterized in that, Updating the time data of the first path point in the smooth motion data according to the verification time includes: Obtain the larger of the first motion time and the second motion time within the verification time; Obtain the sum of the time data of the current path point and the larger value; Update the time data of the first path point to the sum value.
15. The method according to claim 1, characterized in that, Acquire the robot's initial motion data, including: In response to the operation of configuring drag mode, switch to drag mode; In response to the operation of the configuration sub-mode, switch to key point mode or trajectory mode; In the key point mode or trajectory mode, the output force of each joint of the robot is calculated in real time and sent to the joint controller; Record the motion data of each joint at each path point. The motion data includes working mode, position, speed and time. The path points include key points in key point mode or preset points in trajectory mode.
16. The method according to claim 15, characterized in that, Real-time calculation of the force output of each joint of the robot, including: Gravity data, friction data, and braking data of each joint are acquired sequentially; Obtain the gravity data and the friction data. The sum of the braking data is used as the output force of each joint.
17. A trajectory reproduction device, characterized in that, Suitable for robots, the device includes: An initial data acquisition module is used to acquire the robot's initial motion data; the initial motion data includes a sequence of motion data of the joints at multiple path points on the movement trajectory during the robot's dragging and teaching process; The initial data repair module is used to repair the initial motion data to obtain repaired motion data that conforms to the joint performance of the robot. The trajectory acquisition module is used to smooth the repaired motion data to obtain the trajectory. The initial data repair module includes: The smoothing data acquisition submodule is used to smooth the position data in the initial motion data to obtain smoothed motion data. The data acquisition repair submodule is used to repair the time data in the smooth motion data to obtain repaired motion data; The smooth data acquisition submodule includes: The initial position acquisition unit is used to acquire the initial position data of the current path point and a preset number of subsequent path points for each path point; An average value acquisition unit is used to acquire the average value of the location data of the current path point and the location data of the preset number of path points; An initial position update unit is used to update the position data of the current path point to the average value, and the smooth motion data is obtained after updating the initial position data of all path points.
18. A robot, characterized in that, include: Multiple joints and their controllers Memory and processor; The memory is used to store computer programs that can be executed by the processor; The processor is configured to execute a computer program in the memory to implement the method as described in any one of claims 1 to 16.
19. A chip, characterized in that, include: Memory and processor; The memory is used to store computer programs that can be executed by the processor; The processor is configured to execute a computer program in the memory to implement the method as described in any one of claims 1 to 16.
20. A non-transitory computer-readable storage medium, characterized in that, When the executable computer program in the storage medium is executed by a processor, it can implement the method as described in any one of claims 1 to 16.
Citation Information
Patent Citations
Method and device for controlling robot
CN106826826A
Industrial robot teaching programming system and method based on 3D joystick
CN115056214A