Robot teaching track optimization method and device and robot

By generating and optimizing the robot teaching trajectory, the tracking abnormality caused by redundant operations during the robot teaching process is solved, and a more stable and smooth tracking process is achieved.

CN119839854AActive Publication Date: 2025-04-18HANGZHOU EZVIZ SOFTWARE CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510152981.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-11
Publication Date
2025-04-18
Estimated Expiration
2045-02-11

AI Technical Summary

Technical Problem

During the robot teaching process, redundant operations often occur when manually controlling the robot movement, resulting in redundant information contained in the teaching trajectory, and tracking abnormalities occur during the tracking process.

Method used

By acquiring multiple sampling points in the initial teaching trajectory, multiple sampling groups are generated, and the motion state of the robot in the sampling group is determined based on the status information in the sampling group, thereby selecting a reference sampling point and generating a target teaching trajectory to control the robot to track.

Benefits of technology

This method can effectively screen out irrelevant sampling points brought by redundant operations, generate a smoother and smoother target teaching trajectory, and improve the stability and fluency of the robot during the tracking process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119839854A_ABST
    Figure CN119839854A_ABST
Patent Text Reader

Abstract

The invention provides a robot teaching track optimization method and device and a robot. A plurality of sampling groups are generated based on a plurality of sampling points included in an initial teaching track, for each sampling group, the motion state of the robot between the sampling points included in the sampling group is determined according to the state information included in the sampling group, and the motion state of the robot between the sampling points included in the sampling group is determined according to the corresponding motion states of the robot in the plurality of sampling groups. And selecting a plurality of reference sampling points from the plurality of sampling points, and further generating a target teaching track according to the reference sampling points, so as to control the robot to track based on the target teaching track. According to the method, the sampling points of which the motion states change are determined according to the motion states of the robot in the multiple sampling groups, and the initial teaching track is optimized according to the sampling points of which the motion states change, so that irrelevant sampling points brought by redundant operation can be screened out, the target teaching track is smoother, and the operation efficiency is improved. And the stability and the smoothness of the robot in the tracking process are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of robot control technology, and in particular to a robot teaching trajectory optimization method, device and robot. Background Art

[0002] In actual scenarios such as industrial automation, logistics, and warehousing, robots are often required to perform repeated operations on a specified trajectory. In this case, the user usually first controls the robot, teaches the robot, and obtains the teaching trajectory so that the robot can follow the teaching trajectory.

[0003] However, in the process of teaching the robot, some redundant operations often occur when manually controlling the robot's movement, such as rewinding after the turning angle exceeds the target angle, and retracting after the moving distance exceeds the target distance. These redundant operations will also be recorded in the teaching trajectory, and then tracking according to the above teaching trajectory during the tracking process will also cause tracking anomalies. Summary of the invention

[0004] In view of this, the present application provides a robot teaching trajectory optimization method, device and robot to optimize the teaching trajectory to avoid tracking anomalies during the tracking process.

[0005] The technical solutions provided by this application are as follows:

[0006] According to an embodiment of the first aspect of the present application, a robot teaching trajectory optimization method is provided, the method comprising:

[0007] Acquire an initial teaching trajectory of the robot, wherein the initial teaching trajectory includes state information of a plurality of sampling points;

[0008] Generating a plurality of sampling groups based on a plurality of sampling points included in the initial teaching trajectory, each sampling group including at least two sampling points;

[0009] For each sampling group, according to the state information of the sampling points included in the sampling group, determine the motion state corresponding to the sampling group, wherein the motion state refers to the motion state of the robot between the sampling points included in the sampling group;

[0010] According to the motion states of the robot corresponding to the multiple sampling groups, selecting multiple reference sampling points from the multiple sampling points, the reference sampling points including sampling points where the motion state of the robot changes;

[0011] A target teaching trajectory is generated according to the reference sampling points, so as to control the robot to track based on the target teaching trajectory.

[0012] Optionally, the state information includes the position and attitude angle of the robot; and determining the motion state corresponding to the sampling group according to the state information of the sampling points included in the sampling group includes:

[0013] Determine the Euclidean distance between two sampling points of the robot according to the positions of the sampling point with the earliest sampling time and the sampling point with the latest sampling time in the sampling group;

[0014] Determine the change in attitude angle of the robot between two sampling points according to the attitude angles of the sampling point with the earliest sampling time and the sampling point with the latest sampling time in the sampling group;

[0015] The motion state corresponding to the sampling group is determined according to the Euclidean distance and the attitude angle change.

[0016] Optionally, determining the motion state corresponding to the sampling group according to the Euclidean distance and the attitude angle change includes:

[0017] If the Euclidean distance is not less than the preset distance threshold, it is determined that the motion state corresponding to the sampling group is straight;

[0018] If the Euclidean distance is less than a preset distance threshold, and the attitude angle change is less than a preset angle threshold, it is determined that the motion state corresponding to the sampling group is stationary;

[0019] If the Euclidean distance is less than the preset distance threshold, and the attitude angle change is not less than the preset angle threshold, the motion state corresponding to the sampling group is rotation in place.

[0020] Optionally, the motion state includes stationary and rotating in place; and selecting a plurality of reference sampling points from the plurality of sampling points according to the motion state of the robot corresponding to the plurality of sampling groups includes:

[0021] Based on the motion state corresponding to each sampling group, the sampling points included in the sampling group are divided into sampling point sets corresponding to the motion state of the sampling group, wherein the sampling point sets include a stationary sampling point set and an in-situ rotating sampling point set;

[0022] Clustering all the sampling points included in the static sampling point set and the in-situ rotating sampling point set according to state information of all the sampling points included in the static sampling point set and the in-situ rotating sampling point set to obtain a plurality of reference subsets, wherein the sampling points included in each reference subset are continuous sampling points in the initial teaching trajectory;

[0023] For each reference subset, the starting point and the ending point of the continuous sampling points included in the reference subset are used as reference sampling points.

[0024] Optionally, the multiple sampling points included in the initial teaching trajectory include at least one pre-configured key point, and the key point is used to instruct the robot to perform a specified action at the sampling point; before using the starting point and the end point of the continuous sampling points included in the reference subset as the reference sampling point, the method further includes:

[0025] Detecting whether the key point is included in the continuous sampling points included in the reference subset, and if so, taking the starting point, the end point and the key point of the continuous sampling points included in the reference subset as reference sampling points;

[0026] If not, continue to execute the step of taking the starting point and the end point of the continuous sampling points included in the reference subset as reference sampling points.

[0027] Optionally, the motion state further includes straight movement, the sampling point set further includes a straight movement set, and the selecting a plurality of reference sampling points from the plurality of sampling points according to the motion states of the robot corresponding to the plurality of sampling groups further includes:

[0028] Determine, according to the state information of the sampling points included in the straight set and the starting point and the end point of the continuous sampling points included in each of the reference subsets, a plurality of candidate subsets included in the straight set, wherein the sampling points included in each candidate subset are continuous sampling points in the initial teaching trajectory;

[0029] The sampling points included in each candidate subset are used as reference sampling points.

[0030] Optionally, before taking the sampling points included in each candidate subset as reference sampling points, the method further comprises:

[0031] For each candidate subset, determining a straight line equation corresponding to the candidate subset according to state information of continuous sampling points included in the candidate subset, wherein the straight line equation is used to characterize the motion trajectory of the sampling points included in the candidate subset;

[0032] According to the straight line equation and the starting point and the end point of the continuous sampling points included in the candidate subset, determine the midpoint of the straight area corresponding to the candidate subset, and divide the straight area into a plurality of sub-areas, wherein the straight area refers to the line segment between the starting point and the end point of the continuous sampling points included in the candidate subset by the straight line equation;

[0033] According to the midpoint of the straight area and the plurality of sub-areas, the sampling points included between the starting point and the end point of the continuous sampling points in the candidate subset are reallocated to each sub-area; wherein the number of the reallocated sampling points in each sub-area is positively correlated with the reference distance corresponding to the sub-area, and the reference distance corresponding to the sub-area refers to the distance between the midpoint of the sub-area and the midpoint of the straight area;

[0034] For each sub-region, according to the straight line equation and the number of reallocated sampling points in the sub-region, the state information of the reallocated sampling points in the sub-region is determined to update the candidate subset.

[0035] According to an embodiment of the second aspect of the present application, a robot teaching trajectory optimization device is provided, the device comprising:

[0036] An acquisition unit, used for acquiring an initial teaching trajectory of the robot, wherein the initial teaching trajectory includes state information of a plurality of sampling points;

[0037] A determination unit, configured to generate a plurality of sampling groups based on a plurality of sampling points included in the initial teaching trajectory, each sampling group including at least two sampling points;

[0038] For each sampling group, according to the state information of the sampling points included in the sampling group, determine the motion state corresponding to the sampling group, wherein the motion state refers to the motion state of the robot between the sampling points included in the sampling group;

[0039] A selection unit, configured to select a plurality of reference sampling points from the plurality of sampling points according to the motion states of the robot corresponding to the plurality of sampling groups, wherein the reference sampling points include sampling points where the motion state of the robot changes;

[0040] A generating unit is used to generate a target teaching trajectory according to the reference sampling point, so as to control the robot to track based on the target teaching trajectory.

[0041] Optionally, the state information includes the position and attitude angle of the robot; and the determination unit is specifically used for:

[0042] Determine the Euclidean distance between two sampling points of the robot according to the positions of the sampling point with the earliest sampling time and the sampling point with the latest sampling time in the sampling group;

[0043] Determine the change in attitude angle of the robot between two sampling points according to the attitude angles of the sampling point with the earliest sampling time and the sampling point with the latest sampling time in the sampling group;

[0044] The motion state corresponding to the sampling group is determined according to the Euclidean distance and the attitude angle change.

[0045] Optionally, the determining unit is specifically configured to:

[0046] If the Euclidean distance is not less than the preset distance threshold, it is determined that the motion state corresponding to the sampling group is straight;

[0047] If the Euclidean distance is less than a preset distance threshold, and the attitude angle change is less than a preset angle threshold, it is determined that the motion state corresponding to the sampling group is stationary;

[0048] If the Euclidean distance is less than the preset distance threshold, and the attitude angle change is not less than the preset angle threshold, the motion state corresponding to the sampling group is rotation in place.

[0049] Optionally, the motion state includes stationary and rotating in place; and the selection unit is specifically used for:

[0050] Based on the motion state corresponding to each sampling group, the sampling points included in the sampling group are divided into sampling point sets corresponding to the motion state of the sampling group, wherein the sampling point sets include a stationary sampling point set and an in-situ rotating sampling point set;

[0051] Clustering all the sampling points included in the static sampling point set and the in-situ rotating sampling point set according to state information of all the sampling points included in the static sampling point set and the in-situ rotating sampling point set to obtain a plurality of reference subsets, wherein the sampling points included in each reference subset are continuous sampling points in the initial teaching trajectory;

[0052] For each reference subset, the starting point and the ending point of the continuous sampling points included in the reference subset are used as reference sampling points.

[0053] Optionally, the multiple sampling points included in the initial teaching trajectory include at least one pre-configured key point, and the key point is used to instruct the robot to perform a specified action at the sampling point; before using the starting point and the end point of the continuous sampling points included in the reference subset as the reference sampling point, the selection unit is further used to:

[0054] Detecting whether the key point is included in the continuous sampling points included in the reference subset, and if so, taking the starting point, the end point and the key point of the continuous sampling points included in the reference subset as reference sampling points;

[0055] If not, continue to execute the step of taking the starting point and the end point of the continuous sampling points included in the reference subset as reference sampling points.

[0056] Optionally, the motion state further includes straight movement, the sampling point set further includes a straight movement set, and the selection unit is further used for:

[0057] Determine, according to the state information of the sampling points included in the straight set and the starting point and the end point of the continuous sampling points included in each of the reference subsets, a plurality of candidate subsets included in the straight set, wherein the sampling points included in each candidate subset are continuous sampling points in the initial teaching trajectory;

[0058] The sampling points included in each candidate subset are used as reference sampling points.

[0059] Optionally, before taking the sampling points included in each candidate subset as reference sampling points, the selection unit is further configured to:

[0060] For each candidate subset, determining a straight line equation corresponding to the candidate subset according to state information of continuous sampling points included in the candidate subset, wherein the straight line equation is used to characterize the motion trajectory of the sampling points included in the candidate subset;

[0061] According to the straight line equation and the starting point and the end point of the continuous sampling points included in the candidate subset, determine the midpoint of the straight area corresponding to the candidate subset, and divide the straight area into a plurality of sub-areas, wherein the straight area refers to the line segment between the starting point and the end point of the continuous sampling points included in the candidate subset by the straight line equation;

[0062] According to the midpoint of the straight area and the plurality of sub-areas, the sampling points included between the starting point and the end point of the continuous sampling points in the candidate subset are reallocated to each sub-area; wherein the number of the reallocated sampling points in each sub-area is positively correlated with the reference distance corresponding to the sub-area, and the reference distance corresponding to the sub-area refers to the distance between the midpoint of the sub-area and the midpoint of the straight area;

[0063] For each sub-region, according to the straight line equation and the number of reallocated sampling points in the sub-region, the state information of the reallocated sampling points in the sub-region is determined to update the candidate subset.

[0064] According to an embodiment of the third aspect of the present application, a robot is provided, the robot comprising:

[0065] A sensor, used to detect status information of the robot;

[0066] A logic operator, used to execute the method described in the first aspect.

[0067] Optionally, the robot is a two-wheeled spherical robot, and the robot further comprises:

[0068] A camera device, wherein the camera device is parallel to a horizontal plane when the robot is stationary, and is used for performing image acquisition to determine whether the robot performs a specified action, wherein the specified action includes the robot performing image acquisition at a specified sampling point in a specified posture.

[0069] It can be seen from the above technical solutions that the present application generates multiple sampling groups based on multiple sampling points included in the initial teaching trajectory. For each sampling group, the robot's motion state between the sampling points included in the sampling group is determined according to the state information included in the sampling group, and multiple reference sampling points are selected from the multiple sampling points according to the robot's motion state corresponding to the multiple sampling groups, and a target teaching trajectory is further generated according to the reference sampling points to control the robot to track based on the target teaching trajectory. The present application determines the sampling points where the robot's motion state changes through the robot's motion state in multiple sampling groups, optimizes the initial teaching trajectory according to the sampling points where the motion state changes, and can screen out irrelevant sampling points caused by redundant operations, making the target teaching trajectory smoother and smoother, and improving the robot's stability and fluency during the tracking process. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0071] Figure 1 A schematic diagram of a motion scene of a two-wheeled spherical robot provided in an embodiment of the present application;

[0072] Figure 2 A flowchart of a robot teaching trajectory optimization method provided in an embodiment of the present application;

[0073] Figure 3 A schematic diagram of the redistribution of sampling points in a straight area provided in an embodiment of the present application;

[0074] Figure 4 A schematic diagram of a specific process of a robot teaching trajectory optimization method provided in an embodiment of the present application;

[0075] Figure 5 A schematic diagram of the structure of a robot provided in an embodiment of the present application;

[0076] Figure 6 A structural diagram of a robot teaching trajectory optimization device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0077] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application and to make the above-mentioned purposes, features and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application are further described in detail below in conjunction with the accompanying drawings.

[0078] In actual scenarios such as industrial automation, logistics, and warehousing, robots are often required to perform repeated operations on a specified trajectory. In this case, the user usually first controls the robot, teaches the robot, and obtains the teaching trajectory so that the robot can follow the teaching trajectory.

[0079] However, in the process of teaching the robot, some redundant operations often occur when manually controlling the robot's movement, such as rewinding after the turning angle exceeds the target angle, and retracting after the moving distance exceeds the target distance. These redundant operations will also be recorded in the teaching trajectory, and then tracking according to the above teaching trajectory during the tracking process will also cause tracking anomalies.

[0080] The following takes a two-wheeled spherical robot as an example to describe the problems that may occur during the robot's tracking process.

[0081] Please refer to Figure 1 , Figure 1 Schematic diagram of the motion scene of the two-wheeled spherical robot provided in an embodiment of the present application.

[0082] like Figure 1 As shown, the two-wheeled spherical robot usually goes through operations such as going straight, stopping and turning during its movement.

[0083] If redundant operations occur during the teaching process, for example, the target turning angle is 60 degrees, and the user controls the robot to turn 70 degrees and then adjusts it back 10 degrees, this process will also be recorded in the teaching trajectory. During the tracking process, the robot will first turn 70 degrees and then adjust it back 10 degrees, causing the robot's tracking to be inconsistent.

[0084] In addition, the robot will accelerate and decelerate rapidly during the tracking process, especially when moving straight, causing the robot to sway back and forth.

[0085] Based on this, the present application provides a robot teaching trajectory optimization method to optimize the robot's teaching trajectory and improve the robot's stability and smoothness during the tracking process.

[0086] Please refer to Figure 2 , Figure 2 A flowchart of the robot teaching trajectory optimization method provided in an embodiment of the present application.

[0087] like Figure 2As shown, the method may include the following steps:

[0088] Step 201, obtaining the initial teaching trajectory of the robot.

[0089] In this embodiment, the initial teaching trajectory of the robot can be obtained by the user manually controlling the robot to move along the specified trajectory, or the preset specified teaching trajectory information can be directly sent to the robot, and this application does not impose any restrictions on this.

[0090] The initial teaching trajectory includes multiple sampling points, and each sampling point records the state information of the robot at the sampling point.

[0091] The initial teaching trajectory is a trajectory composed of multiple sampling points. The sampling points can be sampling points obtained by sampling at a specified sampling frequency during the teaching process. The sampling points include the state information of the robot at the sampling point at the sampling moment.

[0092] Exemplarily, the status information may be the position, attitude angle, speed, acceleration, etc. of the robot, which is used to describe the current operating status of the robot, and the present application does not impose any limitation on this.

[0093] At this point, the description of step 201 ends, and step 202 is executed next.

[0094] Step 202 : generating a plurality of sampling groups based on a plurality of sampling points included in the initial teaching trajectory.

[0095] In this embodiment, the multiple sampling points included in the initial teaching trajectory can be divided into multiple sampling groups, each sampling group includes at least two sampling points. It is generally believed that the motion states of the sampling points in the same sampling group are the same.

[0096] As an embodiment, every two adjacent sampling points in the initial teaching trajectory may be regarded as a sampling group to obtain multiple sampling groups.

[0097] The specific method of dividing the sampling groups will be described in conjunction with step 203 and will not be repeated here.

[0098] Step 203: for each sampling group, determine the motion state corresponding to the sampling group according to the state information of the sampling points included in the sampling group.

[0099] In this embodiment, for the multiple sampling groups determined in step 202, the motion state corresponding to each sampling group can be determined according to the state information included in the sampling group.

[0100] As an embodiment, the Euclidean distance between two sampling points of the robot is determined according to the positions of the sampling point with the earliest sampling time and the sampling point with the latest sampling time in the sampling group;

[0101] Determine the change in the robot's attitude angle between two sampling points according to the attitude angles of the sampling point with the earliest sampling time and the sampling point with the latest sampling time in the sampling group;

[0102] The motion state corresponding to the sampling group is determined according to the Euclidean distance and the change in attitude angle.

[0103] In this embodiment, the state information may include the position and attitude angle of the robot, wherein the attitude angle refers to the angle at which the robot rotates about its central axis in the vertical direction.

[0104] Among them, the motion state refers to the motion state of the robot between the sampling points included in the sampling group. The changes in the distance and direction of the robot can be determined through the Euclidean distance between the sampling points and the change in the attitude angle, and then the motion state of the robot between the sampling points included in the sampling group can be determined.

[0105] It should be noted that if there are only two sampling points in the sampling group, the Euclidean distance and attitude angle of the two sampling points can be directly determined. If the sampling group includes more than two sampling points, the Euclidean distance and attitude angle of the first sampling point (the sampling point with the earliest sampling time) and the last sampling point (the sampling point with the latest sampling time) can be determined to determine the motion state of the sampling group based on the above two sampling points.

[0106] Alternatively, the Euclidean distance and attitude angle between adjacent sampling points in the sampling group can be determined, and the motion state corresponding to the sampling group can be further determined according to the motion state of the robot between each two sampling points. For example, if there are continuous sampling points A, B, and C in a sampling group, the motion state of the robot between each two sampling points can be detected. If the motion state of the robot between A and B is detected to be straight, and the motion state between B and C is also straight, then the motion state corresponding to the sampling group can be determined to be straight; if the motion state of the robot between A and B is detected to be straight, and the motion state between B and C is stationary, then point B can be ignored, and the motion state of the first sampling point (the sampling point with the earliest sampling time) and the last sampling point (the sampling point with the latest sampling time) can be detected, and the motion state is used as the motion state corresponding to the sampling group.

[0107] It is easy to understand that in the process of generating a sampling group, the optimization accuracy of the teaching trajectory can be adjusted by adjusting the number of sampling points included in the sampling group. If a more accurate teaching trajectory is required, the number of sampling points included in each sampling group can be set to be smaller, such as every two adjacent sampling points as a sampling group. If less resource occupation is required, the number of sampling points included in each sampling group can be set to be larger, such as every four sampling points as a sampling group. This application does not limit this.

[0108] Specifically, the motion state of the robot between two adjacent sampling points is determined according to the Euclidean distance and the change in attitude angle, including:

[0109] The motion state corresponding to the sampling group is determined according to the Euclidean distance and the change in attitude angle, including:

[0110] If the Euclidean distance is not less than the preset distance threshold, it is determined that the motion state corresponding to the sampling group is straight;

[0111] If the Euclidean distance is less than the preset distance threshold, and the attitude angle change is less than the preset angle threshold, it is determined that the motion state corresponding to the sampling group is stationary;

[0112] If the Euclidean distance is less than the preset distance threshold, and the attitude angle change is not less than the preset angle threshold, the motion state corresponding to the sampling group is rotation in place.

[0113] In this embodiment, a distance threshold and an angle threshold can be preset. If it is detected that the Euclidean distance between two sampling points of the robot in the sampling group is not less than the preset distance threshold, it indicates that the robot has moved a longer distance between the two sampling points. At this time, it can be considered that the movement state of the robot between the two adjacent sampling points is straight-ahead, that is, the movement state corresponding to the sampling group is straight-ahead.

[0114] If it is detected that the Euclidean distance between two sampling points of the robot in the sampling group is less than the preset distance threshold, it means that the robot has almost no position change between the two sampling points. During this process, the robot may be stationary or rotating on the spot.

[0115] Furthermore, the relationship between the change in the robot's attitude angle between the two sampling points and the preset angle threshold can be determined. If the change in the robot's attitude angle between the two sampling points is less than the preset angle threshold, it indicates that the robot has hardly rotated between the two sampling points. At this time, it can be determined that the robot's motion state between the two sampling points is stationary, that is, the motion state corresponding to the sampling group is stationary.

[0116] If it is found that the robot's posture angle change between two sampling points is not less than the preset angle threshold, it means that the robot has rotated a sufficiently large angle between the two sampling points. At this time, it can be determined that the robot's motion state between the two sampling points is rotation in place, that is, the motion state corresponding to the sampling group is rotation in place.

[0117] At this point, the description of step 203 ends, and step 204 is executed next.

[0118] Step 204 , selecting a plurality of reference sampling points from the plurality of sampling points according to the motion states of the robot corresponding to the plurality of sampling groups.

[0119] The reference sampling points include sampling points where the motion state of the robot changes.

[0120] In this embodiment, the motion state may include moving straight, stationary, and rotating in place. The following describes the method for determining the reference sampling points corresponding to the three motion states:

[0121] As an embodiment, according to the motion states of the robot corresponding to the multiple sampling groups, multiple reference sampling points are selected from the multiple sampling points, including:

[0122] Based on the motion state corresponding to each sampling group, the sampling points included in the sampling group are divided into sampling point sets corresponding to the motion state of the sampling group, where the sampling point sets include a stationary sampling point set and an in-situ rotating sampling point set;

[0123] Clustering all the sampling points included in the stationary sampling point set and the in-situ rotating sampling point set according to the state information of all the sampling points included in the stationary sampling point set and the in-situ rotating sampling point set to obtain a plurality of reference subsets, wherein the sampling points included in each reference subset are continuous sampling points in the initial teaching trajectory;

[0124] For each reference subset, the starting point and the ending point of the continuous sampling points included in the reference subset are used as reference sampling points.

[0125] First, according to the motion state of the robot corresponding to each sampling group obtained in step 203, each sampling point in the initial teaching trajectory is divided into a sampling point set corresponding to the motion state of the sampling point.

[0126] Specifically, the sampling points in the sampling group whose motion state is straight forward can be divided into the straight forward sampling point set, the sampling points in the sampling group whose motion state is stationary can be divided into the stationary sampling point set, and the sampling points in the sampling group whose motion state is rotating on the spot can be divided into the rotating on the spot sampling point set.

[0127] As an embodiment, repeated points in two pairs of adjacent sampling points of motion state changes may be divided into sampling point sets corresponding to two telekinetic states.

[0128] For example, taking every two adjacent sampling points as a sampling group, there are continuous sampling points A, B, C, and D. If it is detected that the robot's motion state between A and B is stationary, the motion state between B and C is rotating on the spot, and the motion state between C and D is straight, then in the process of dividing the sampling points, sampling points A and B can be divided into the stationary sampling point set, sampling points B and C can be divided into the in-place rotating sampling point set, and sampling points C and D can be divided into the straight sampling point set. (The straight sampling point set will be described in detail below and will not be repeated here)

[0129] In this embodiment, the method for determining the reference sampling point in the stationary state and the in-situ rotating state is the same, and is introduced here together.

[0130] After all sampling points are divided, multiple reference subsets may be obtained by further clustering all sampling points included in the static sampling point set and the in-situ rotating sampling point set.

[0131] It is easy to understand that the sampling points included in each reference subset obtained after clustering are continuous sampling points, that is, a process of continuous stillness or continuous rotation in place, then all reference subsets are all stillness and rotation in place processes included in the initial teaching trajectory, and for each stillness or rotation in place process, the starting point and end point of the continuous sampling points included in the reference subset can be determined, that is, the starting point and end point of the stillness or rotation in place, and the starting point and end point are used as reference sampling points.

[0132] In this embodiment, the method for clustering multiple sampling points is a common method in the related art, which will not be described in detail here. It can be seen that the determined reference sampling points do not include the redundant operation process, thus avoiding the influence caused by the redundant operation.

[0133] As an embodiment, the initial teaching trajectory includes at least one pre-configured key point among the plurality of sampling points, and the key point is used to instruct the robot to perform a specified action at the sampling point; before taking the starting point and the end point of the continuous sampling points included in the reference subset as the reference sampling point, the method further includes:

[0134] Detect whether the continuous sampling points included in the reference subset include key points, and if so, use the starting point, the end point and the key point of the continuous sampling points included in the reference subset as reference sampling points;

[0135] If not, continue to execute the step of taking the starting point and the end point of the continuous sampling points included in the reference subset as reference sampling points.

[0136] In this embodiment, the multiple sampling points included in the initial teaching trajectory may also include at least one pre-configured key point, where the key point means that the robot performs a specified action at the sampling point, such as the robot performs image acquisition at the sampling point, etc. This application does not impose any restrictions on this.

[0137] It can be seen that the key points are actually manually set sampling points that play a key role in the tracking process. Based on this, in the process of determining the reference sampling points, we can further consider whether each reference subset includes the pre-set key points. If so, the key points, the start point and the end point are used as reference sampling points.

[0138] The following is an introduction to the method of determining the reference sampling point for the straight-ahead state:

[0139] Selecting multiple reference sampling points from multiple sampling points according to the motion states of the robot corresponding to the multiple sampling groups, further comprising:

[0140] Determine a plurality of candidate subsets included in the straight set according to the state information of the sampling points included in the straight set and the starting point and the end point of the continuous sampling points included in each reference subset, wherein the sampling points included in each candidate subset are continuous sampling points in the initial teaching trajectory;

[0141] The sampling points included in each candidate subset are taken as reference sampling points.

[0142] In this embodiment, the reference sampling points determined in the above-mentioned stationary and in-situ rotating sets are actually the pause points and turning points in the teaching trajectory, and between these points, the robot moves in a linear motion.

[0143] According to the state information of the sampling points included in the straight set and the above-mentioned pause points and turning points, multiple candidate subsets included in the straight set can be determined. It is easy to understand that each candidate subset actually represents a straight area.

[0144] As an embodiment, the sampling points included in the straight set can be arranged in the order of sampling time, and the reference sampling points determined in the above-mentioned static set and the in-situ rotation set can be found from the sampling points included in the straight set, that is, the pause points and turning points (recorded as target points) in the teaching trajectory can be found from the sampling points included in the straight set, and at the same time, it is detected whether there are other sampling points between each two adjacent target points. If there are, the two adjacent target points and the set of all sampling points included between the two adjacent target points are taken as a candidate subset included in the straight set. The connecting line of all the sampling points included in the candidate subset represents a continuous straight area, that is, the motion state of the robot between the starting point and the end point (that is, the above-mentioned two adjacent target points) of each straight area is straight.

[0145] Furthermore, the sampling points included in each candidate subset may be used as reference sampling points.

[0146] At the same time, considering that the robot may also shake back and forth when it accelerates and decelerates rapidly during the tracking process, especially when it is moving straight, the present application further optimizes the teaching trajectory during the straight moving process.

[0147] Before taking the sampling points included in each candidate subset as reference sampling points, the method proposed in the present application may further include:

[0148] For each candidate subset, determining a straight line equation corresponding to the candidate subset according to state information of continuous sampling points included in the candidate subset, where the straight line equation is used to characterize the motion trajectory of the sampling points included in the candidate subset;

[0149] According to the straight line equation and the starting point and the end point of the continuous sampling points included in the candidate subset, determine the midpoint of the straight area corresponding to the candidate subset, and divide the straight area into a plurality of sub-areas, where the straight area refers to the line segment between the starting point and the end point of the continuous sampling points included in the candidate subset by the straight line equation;

[0150] According to the midpoint of the straight area and the multiple sub-areas, the sampling points included between the starting point and the end point of the continuous sampling points in the candidate subset are reallocated to each sub-area; wherein the number of the reallocated sampling points in each sub-area is positively correlated with the reference distance corresponding to the sub-area, and the reference distance corresponding to the sub-area refers to the distance between the midpoint of the sub-area and the midpoint of the straight area;

[0151] For each sub-region, according to the straight line equation and the number of reallocated sampling points in the sub-region, the state information of the reallocated sampling points in the sub-region is determined to update the candidate subset.

[0152] In this embodiment, considering that during the straight-line process, the robot usually accelerates near the starting point of the straight-line area and decelerates near the end point, it is easy to cause the problem of shaking back and forth. Based on this, the sampling points included in the straight-line area can be rearranged so that the sampling points in the interval closer to the starting point and the end point are denser, and the sampling points in the interval farther away from the starting point and the end point are sparser, so as to obtain a smoother teaching trajectory.

[0153] For example, the starting point of the teaching trajectory can be used as the origin to establish a coordinate system. If the starting point of one of the straight areas is p1 (x1, y1) and the end point is p2 (x2, y2), the straight line equation corresponding to the straight area can be determined based on the coordinates of the starting point p1 and the end point p2: y = kx + b;

[0154] Among them, k = (y2-y1) / (x2-x1), b = y1-k*x1.

[0155] At the same time, the length D of the straight line area can also be determined according to the coordinates of the starting point p1 and the end point p2:

[0156]

[0157] If the length D of the straight area is less than the preset threshold ε, it indicates that the length of the straight area is short. The robot usually does not experience sudden acceleration and deceleration in a shorter straight area, and the probability of shaking back and forth when moving in the straight area is low. At this time, there is no need to rearrange the sampling points included in the straight area, and the target teaching trajectory can be generated directly according to the position and posture of the sampling points included in the straight area.

[0158] If the length D of the straight area is not less than the preset threshold ε, it means that the length of the straight area is long. The robot is more likely to experience sudden acceleration and deceleration in the longer straight area, that is, it is more likely to shake back and forth. At this time, the sampling points included in the straight area can be rearranged.

[0159] Specifically, please refer to Figure 3 , Figure 3 A schematic diagram of the redistribution of sampling points in a straight area provided in an embodiment of the present application.

[0160] like Figure 3 As shown, for Figure 3 The straight line area shown in the figure can be divided into multiple sub-areas from the left and right sides of the midpoint of the straight line area. For example, the straight line area can be divided into 6 equally spaced sub-areas symmetrically about the midpoint of the straight line area, and the length corresponding to each sub-area is Δd=D / 6.

[0161] At the same time, for each sub-region, a sampling point ratio corresponding to the sub-region is pre-configured, and the sampling point ratio refers to the ratio of the number of sampling points reallocated in the sub-region to the total number of sampling points included in the straight line region (excluding the starting point and the end point), which is used to indicate the number of sampling points reallocated in the sub-region.

[0162] In this embodiment, the sampling point ratio is positively correlated with the reference distance corresponding to the sub-area (i.e., the distance between the midpoint of the sub-area and the midpoint of the straight area), that is, the closer the sub-area is to the midpoint of the straight area, the fewer the reallocated sampling points are, and the farther the sub-area is from the midpoint of the straight area, the more the reallocated sampling points are.

[0163] For example, Figure 3 In the example, according to the distance between the midpoint of the sub-region and the midpoint of the straight region, the proportion of sampling points corresponding to each sub-region is set to 1 / 4, 1 / 6, 1 / 12, 1 / 12, 1 / 6, and 1 / 4 respectively. The sum of the proportions of sampling points corresponding to all sub-regions is usually 1.

[0164] Furthermore, the sampling points except the starting point and the end point in the straight area may be redistributed to each sub-area according to the above sampling point ratio based on the sampling time sequence.

[0165] exist Figure 3 In the straight area shown, taking the number of sampling points in the straight area excluding the starting point and the end point as N as an example, after dividing according to the above sampling point ratio, the number of reallocated sampling points corresponding to each sub-area is respectively:

[0166] n 1 =N / 4; n 2 =N / 6; n 3 =N / 12; n 4 =N / 12; n 5 =N / 6; n 6 =N / 4.

[0167] Among them, n i It refers to the number of reallocated sampling points corresponding to the i-th sub-area in the straight area.

[0168] The intervals between the redistributed sampling points corresponding to each sub-area are:

[0169] d 1 =Δd / n 1 ;d 2 =Δd / n 2 ;d 3 =Δd / n 3 ;d 4 =Δd / n 4 ;d5 =Δd / n 5 ;d 6 =

[0170] Δd / n 6 .

[0171] Among them, n i It refers to the number of reallocated sampling points corresponding to the ith sub-area in the straight area, d i It refers to the interval between the reallocated sampling points corresponding to the i-th sub-area in the straight area.

[0172] Furthermore, the state information of each sampling point after reallocation may be determined according to the straight line equation corresponding to the straight area and the intervals between the reallocated sampling points corresponding to each sub-area.

[0173] Since the attitude angles of each sampling point are fixed during the straight-line process, the focus is to determine the positions of each sampling point after redistribution, that is, the coordinates corresponding to each sampling point.

[0174] As an example, for Figure 3 The coordinates of each redistributed sampling point in can be determined by:

[0175] y j =k*x j +b

[0176]

[0177] Among them, k = (y2-y1) / (x2-x1), b = y1-k*x1, the starting point of the straight area is p1(x1,y1), the end point is p2(x2,y2), n i It refers to the number of reallocated sampling points corresponding to the ith sub-area in the straight area, d i It refers to the interval between the redistributed sampling points corresponding to the i-th sub-area in the straight area, x j It refers to the x-coordinate of the j-th sampling point in the straight area that is redistributed in the order of sampling time, and y j Refers to the y coordinate of the jth sampling point in the straight area that is redistributed in the order of sampling time.

[0178] In this embodiment, the distribution of the sampling points after reallocation is sparser the closer to the midpoint of the straight area, and denser the farther from the midpoint of the straight area, that is, the closer to the starting point or the end point of the straight area. In areas where the sampling points are denser, the tracking speed of the robot during the tracking process is slower, and in areas where the sampling points are sparser, the tracking speed is faster, thereby avoiding the problem of the robot shaking back and forth due to sudden acceleration or deceleration near the starting point and end point of the straight area when the robot moves in a straight line during the tracking process.

[0179] It should be noted that, in the present embodiment, since the sub-areas included in the straight-line area are divided symmetrically on both sides of the midpoint of the straight-line area, when determining the corresponding coordinates of each sampling point after redistribution, the corresponding coordinates of the sampling points on one side of the midpoint of the straight-line area can also be determined first, and then the coordinates of the sampling points on the other side of the midpoint of the straight-line area can be determined based on the symmetric relationship. The present application does not impose any restrictions on this.

[0180] In this embodiment, interpolation may also be performed in the candidate subset corresponding to each straight area, that is, a number of sampling points may be inserted between the starting point and the end point in the candidate subset, so that the robot moves smoothly in the straight area.

[0181] Specifically, the straight line equation corresponding to the sampling points in each candidate subset may be determined according to the state information of the sampling points included in each candidate subset, and the midpoint of the straight area may be further determined according to the starting point, the end point and the straight line equation.

[0182] As an embodiment, when interpolating, the closer to the midpoint position, the fewer sampling points are inserted, and the farther away from the midpoint position, the more sampling points are inserted, to ensure that enough sampling points are inserted in areas with faster acceleration and deceleration to smooth the movement of the robot.

[0183] After completing the redistribution and / or difference processing of the sampling points included in the straight area, the candidate subset can be updated according to the processed sampling points, and the sampling points included in the updated candidate subset are also used as reference sampling points. Then, the target teaching trajectory is obtained according to the reference sampling points, which can enable the trajectory to achieve smooth acceleration and deceleration, thereby completing the task of smooth tracking during the tracking process.

[0184] At this point, the description of step 204 ends, and step 205 is executed next.

[0185] Step 205 , generating a target teaching trajectory according to the reference sampling points, so as to control the robot to track based on the target teaching trajectory.

[0186] In this embodiment, after a plurality of reference sampling points are obtained in step 204, a target teaching trajectory may be generated according to the plurality of reference sampling points.

[0187] Specifically, the reference sampling points may be connected in sequence according to the sampling moments of the reference sampling points to obtain the target teaching trajectory, which is not limited in the present application.

[0188] This concludes Figure 1 Description.

[0189] The present application generates multiple sampling groups based on multiple sampling points included in the initial teaching trajectory. For each sampling group, the robot's motion state between the sampling points included in the sampling group is determined based on the state information included in the sampling group, and multiple reference sampling points are selected from the multiple sampling points based on the robot's motion state corresponding to the multiple sampling groups, and a target teaching trajectory is further generated based on the reference sampling points to control the robot to track based on the target teaching trajectory. The present application determines the sampling points where the robot's motion state changes through the robot's motion state in multiple sampling groups, optimizes the initial teaching trajectory based on the sampling points where the motion state changes, and can screen out irrelevant sampling points caused by redundant operations, making the target teaching trajectory smoother and smoother, and improving the robot's stability and fluency during the tracking process.

[0190] According to the following Figure 4 The overall process of the robot teaching trajectory optimization method proposed in this application is briefly described through a specific embodiment.

[0191] Please refer to Figure 4 , Figure 4 A schematic diagram of a specific flow chart of a robot teaching trajectory optimization method provided in an embodiment of the present application.

[0192] like Figure 4 As shown, first determine whether there is an initial teaching trajectory. If there is no corresponding initial teaching trajectory, re-teaching is required.

[0193] Traverse the teaching trajectory, take each two adjacent sampling points as a sampling group as an example, and calculate the Euclidean distance deltD and the attitude angle change deltA of the robot between two adjacent sampling points.

[0194] If deltD is greater than or equal to the threshold TH1, the robot's motion state is determined to be straight, and the straight sampling point set P1 of the robot's straight process is recorded;

[0195] If deltD is less than the threshold TH1 and deltA is less than TH2, the robot is determined to be stationary, and the stationary sampling point set P2 of the robot during the stationary process is recorded;

[0196] If deltD is less than the threshold TH1 and deltA is greater than or equal to TH2, the robot's motion state is determined to be in-situ rotation, and the in-situ rotation sampling point set P3 of the robot's rotation process is recorded;

[0197] The detected posture sets P2 and P3 in the static and rotating processes are clustered to obtain multiple reference subsets. Each reference subset corresponds to a complete static or in-place rotation operation to be compatible with the rotation drift generated during the movement, filter out redundant postures to optimize the rotation movement, and filter out redundant static movements to avoid long waiting times during tracking, and determine the starting point, end point, and key points in each reference subset.

[0198] According to the above starting point and end point, the sampling points included in the straight sampling point set are divided into multiple candidate subsets, each subset represents a straight area, and the straight line equation corresponding to the straight area is further determined, and the sampling points included in the straight area are redistributed according to the distance from the midpoint of the straight area, so that the sampling points in the interval closer to the starting point and the end point are denser, and the sampling points in the interval farther from the starting point and the end point are sparser, thereby achieving smooth acceleration and deceleration in the tracking process.

[0199] Further, according to the starting point, the end point, the key point in the reference subset and the sampling points included in each candidate subset, a target teaching trajectory is generated.

[0200] According to the target teaching trajectory, the trajectory tracking process is completed according to the PID frequency control.

[0201] In this embodiment, the process of tracking the target teaching trajectory according to PID is a common method in the related art and will not be described in detail here.

[0202] This concludes Figure 4 Description.

[0203] Please refer to Figure 5 , Figure 5 This is a schematic structural diagram of a robot proposed in an embodiment of the present application. At the hardware level, the robot includes a logic operator, an internal bus, and a sensor, and of course may also include hardware required for other services (such as a camera device).

[0204] As an embodiment, the sensor may include an inertial measurement unit and a linear Hall sensor. The inertial measurement unit can be used to detect the posture angle of the robot at the sampling point, and the linear Hall sensor can be used to detect the position information of the sampling point. The specific detection method is a commonly used method in related technologies and will not be repeated here.

[0205] The logic operator can be used to perform Figure 1 The method shown in ;

[0206] As an embodiment, the robot may be a two-wheeled spherical robot, and the robot may further include:

[0207] The camera device is parallel to the horizontal plane when the robot is stationary and is used to collect images to determine whether the robot performs a specified action. The specified action includes the robot collecting images at a specified sampling point according to a specified posture.

[0208] This concludes Figure 5 Description of the robot structure.

[0209] Please refer to Figure 6 , Figure 6 : is a structural diagram of a robot teaching trajectory optimization device proposed in an embodiment of the present application. Figure 6 As shown, the device may include an acquisition unit 601, a determination unit 602, a selection unit 603, and a generation unit 604. Specifically, the device includes:

[0210] An acquisition unit 601 is used to acquire an initial teaching trajectory of the robot, where the initial teaching trajectory includes state information of multiple sampling points;

[0211] A determination unit 602 is used to generate a plurality of sampling groups based on a plurality of sampling points included in the initial teaching trajectory, each sampling group including at least two sampling points;

[0212] For each sampling group, according to the state information of the sampling points included in the sampling group, determine the motion state corresponding to the sampling group, where the motion state refers to the motion state of the robot between the sampling points included in the sampling group;

[0213] A selection unit 603 is used to select a plurality of reference sampling points from a plurality of sampling points according to the motion states of the robot corresponding to the plurality of sampling groups, wherein the reference sampling points include sampling points where the motion state of the robot changes;

[0214] The generating unit 604 is used to generate a target teaching trajectory according to the reference sampling points, so as to control the robot to track based on the target teaching trajectory.

[0215] Optionally, the state information includes the position and attitude angle of the robot; the determination unit 602 is specifically used for:

[0216] Determine the Euclidean distance between two sampling points of the robot according to the positions of the sampling point with the earliest sampling time and the sampling point with the latest sampling time in the sampling group;

[0217] Determine the change in the robot's attitude angle between two sampling points according to the attitude angles of the sampling point with the earliest sampling time and the sampling point with the latest sampling time in the sampling group;

[0218] The motion state corresponding to the sampling group is determined according to the Euclidean distance and the change in attitude angle.

[0219] Optionally, the determining unit 602 is specifically configured to:

[0220] If the Euclidean distance is not less than the preset distance threshold, it is determined that the motion state corresponding to the sampling group is straight;

[0221] If the Euclidean distance is less than the preset distance threshold, and the attitude angle change is less than the preset angle threshold, it is determined that the motion state corresponding to the sampling group is stationary;

[0222] If the Euclidean distance is less than the preset distance threshold, and the attitude angle change is not less than the preset angle threshold, the motion state corresponding to the sampling group is rotation in place.

[0223] Optionally, the motion state includes stationary and rotating in place; the selection unit 603 is specifically used for:

[0224] Based on the motion state corresponding to each sampling group, the sampling points included in the sampling group are divided into sampling point sets corresponding to the motion state of the sampling group, where the sampling point sets include a stationary sampling point set and an in-situ rotating sampling point set;

[0225] Clustering all the sampling points included in the stationary sampling point set and the in-situ rotating sampling point set according to the state information of all the sampling points included in the stationary sampling point set and the in-situ rotating sampling point set to obtain a plurality of reference subsets, wherein the sampling points included in each reference subset are continuous sampling points in the initial teaching trajectory;

[0226] For each reference subset, the starting point and the ending point of the continuous sampling points included in the reference subset are used as reference sampling points.

[0227] Optionally, the multiple sampling points included in the initial teaching trajectory include at least one pre-configured key point, and the key point is used to instruct the robot to perform a specified action at the sampling point; before taking the start point and the end point of the continuous sampling points included in the reference subset as the reference sampling point, the selection unit 603 is further used to:

[0228] Detect whether the continuous sampling points included in the reference subset include key points, and if so, use the starting point, the end point and the key point of the continuous sampling points included in the reference subset as reference sampling points;

[0229] If not, continue to execute the step of taking the starting point and the end point of the continuous sampling points included in the reference subset as reference sampling points.

[0230] Optionally, the motion state further includes straight movement, the sampling point set further includes a straight movement set, and the selection unit 603 is further configured to:

[0231] Determine a plurality of candidate subsets included in the straight set according to the state information of the sampling points included in the straight set and the starting point and the end point of the continuous sampling points included in each reference subset, wherein the sampling points included in each candidate subset are continuous sampling points in the initial teaching trajectory;

[0232] The sampling points included in each candidate subset are taken as reference sampling points.

[0233] Optionally, before taking the sampling points included in each candidate subset as reference sampling points, the selection unit 603 is further configured to:

[0234] For each candidate subset, determining a straight line equation corresponding to the candidate subset according to state information of continuous sampling points included in the candidate subset, where the straight line equation is used to characterize the motion trajectory of the sampling points included in the candidate subset;

[0235] According to the straight line equation and the starting point and the end point of the continuous sampling points included in the candidate subset, determine the midpoint of the straight area corresponding to the candidate subset, and divide the straight area into a plurality of sub-areas, where the straight area refers to the line segment between the starting point and the end point of the continuous sampling points included in the candidate subset by the straight line equation;

[0236] According to the midpoint of the straight area and the multiple sub-areas, the sampling points included between the starting point and the end point of the continuous sampling points in the candidate subset are reallocated to each sub-area; wherein the number of the reallocated sampling points in each sub-area is positively correlated with the reference distance corresponding to the sub-area, and the reference distance corresponding to the sub-area refers to the distance between the midpoint of the sub-area and the midpoint of the straight area;

[0237] For each sub-region, the state information of the reallocated sampling points in the sub-region is determined according to the equation of the straight line and the number of reallocated sampling points in the sub-region to update the candidate subset. Figure 6 Description of the robot teaching trajectory optimization device.

[0238] Correspondingly, an embodiment of the present application further provides a computer-readable storage medium, on which a number of computer instructions are stored. When the computer instructions are executed, the method disclosed in the above example of the present application can be implemented.

[0239] Exemplarily, the computer-readable storage medium may be any electronic, magnetic, optical or other physical storage device that may contain or store information, such as executable instructions, data, etc. For example, the computer-readable storage medium may be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as optical disk, DVD, etc.), or similar storage medium, or a combination thereof.

[0240] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of protection of the present application.

Claims

1. A robot teaching trajectory optimization method, characterized in that: The method includes: Acquire an initial teaching trajectory of the robot, wherein the initial teaching trajectory includes state information of a plurality of sampling points; Generating a plurality of sampling groups based on a plurality of sampling points included in the initial teaching trajectory, each sampling group including at least two sampling points; For each sampling group, according to the state information of the sampling points included in the sampling group, determine the motion state corresponding to the sampling group, wherein the motion state refers to the motion state of the robot between the sampling points included in the sampling group; According to the motion states of the robot corresponding to the multiple sampling groups, selecting multiple reference sampling points from the multiple sampling points, the reference sampling points including sampling points where the motion state of the robot changes; A target teaching trajectory is generated according to the reference sampling points, so as to control the robot to track based on the target teaching trajectory.

2. The method according to claim 1, characterized in that The state information includes the position and attitude angle of the robot; the determining the motion state corresponding to the sampling group according to the state information of the sampling points included in the sampling group includes: Determine the Euclidean distance between two sampling points of the robot according to the positions of the sampling point with the earliest sampling time and the sampling point with the latest sampling time in the sampling group; Determine the change in attitude angle of the robot between two sampling points according to the attitude angles of the sampling point with the earliest sampling time and the sampling point with the latest sampling time in the sampling group; The motion state corresponding to the sampling group is determined according to the Euclidean distance and the attitude angle change.

3. The method according to claim 2, characterized in that The determining the motion state corresponding to the sampling group according to the Euclidean distance and the attitude angle change includes: If the Euclidean distance is not less than the preset distance threshold, it is determined that the motion state corresponding to the sampling group is straight; If the Euclidean distance is less than a preset distance threshold, and the attitude angle change is less than a preset angle threshold, it is determined that the motion state corresponding to the sampling group is stationary; If the Euclidean distance is less than the preset distance threshold, and the attitude angle change is not less than the preset angle threshold, the motion state corresponding to the sampling group is rotation in place.

4. The method according to claim 1, characterized in that: The motion state includes stationary and rotating in place; the selecting a plurality of reference sampling points from the plurality of sampling points according to the motion state of the robot corresponding to the plurality of sampling groups includes: Based on the motion state corresponding to each sampling group, the sampling points included in the sampling group are divided into sampling point sets corresponding to the motion state of the sampling group, wherein the sampling point sets include a stationary sampling point set and an in-situ rotating sampling point set; Clustering all the sampling points included in the static sampling point set and the in-situ rotating sampling point set according to state information of all the sampling points included in the static sampling point set and the in-situ rotating sampling point set to obtain a plurality of reference subsets, wherein the sampling points included in each reference subset are continuous sampling points in the initial teaching trajectory; For each reference subset, the starting point and the ending point of the continuous sampling points included in the reference subset are used as reference sampling points.

5. The method according to claim 4, characterized in that The multiple sampling points included in the initial teaching trajectory include at least one pre-configured key point, and the key point is used to instruct the robot to perform a specified action at the sampling point; before using the starting point and the end point of the continuous sampling points included in the reference subset as the reference sampling point, the method also includes: Detecting whether the key point is included in the continuous sampling points included in the reference subset, and if so, taking the starting point, the end point and the key point of the continuous sampling points included in the reference subset as reference sampling points; If not, continue to execute the step of taking the starting point and the end point of the continuous sampling points included in the reference subset as reference sampling points.

6. The method according to claim 4, characterized in that The motion state further includes straight movement, the sampling point set further includes a straight movement set, and the selecting a plurality of reference sampling points from the plurality of sampling points according to the motion states of the robot corresponding to the plurality of sampling groups further includes: Determine, according to the state information of the sampling points included in the straight set and the starting point and the end point of the continuous sampling points included in each of the reference subsets, a plurality of candidate subsets included in the straight set, wherein the sampling points included in each candidate subset are continuous sampling points in the initial teaching trajectory; The sampling points included in each candidate subset are used as reference sampling points.

7. The method according to claim 6, characterized in that Before taking the sampling points included in each candidate subset as reference sampling points, the method further comprises: For each candidate subset, determining a straight line equation corresponding to the candidate subset according to state information of continuous sampling points included in the candidate subset, wherein the straight line equation is used to characterize the motion trajectory of the sampling points included in the candidate subset; According to the straight line equation and the starting point and the end point of the continuous sampling points included in the candidate subset, determine the midpoint of the straight area corresponding to the candidate subset, and divide the straight area into a plurality of sub-areas, wherein the straight area refers to the line segment between the starting point and the end point of the continuous sampling points included in the candidate subset by the straight line equation; According to the midpoint of the straight area and the plurality of sub-areas, the sampling points included between the starting point and the end point of the continuous sampling points in the candidate subset are reallocated to each sub-area; wherein the number of the reallocated sampling points in each sub-area is positively correlated with the reference distance corresponding to the sub-area, and the reference distance corresponding to the sub-area refers to the distance between the midpoint of the sub-area and the midpoint of the straight area; For each sub-region, according to the straight line equation and the number of reallocated sampling points in the sub-region, the state information of the reallocated sampling points in the sub-region is determined to update the candidate subset.

8. A robot teaching trajectory optimization device, characterized in that: The device includes: An acquisition unit, used for acquiring an initial teaching trajectory of the robot, wherein the initial teaching trajectory includes state information of a plurality of sampling points; A determination unit, configured to generate a plurality of sampling groups based on a plurality of sampling points included in the initial teaching trajectory, each sampling group including at least two sampling points; For each sampling group, according to the state information of the sampling points included in the sampling group, determine the motion state corresponding to the sampling group, wherein the motion state refers to the motion state of the robot between the sampling points included in the sampling group; A selection unit, configured to select a plurality of reference sampling points from the plurality of sampling points according to the motion states of the robot corresponding to the plurality of sampling groups, wherein the reference sampling points include sampling points where the motion state of the robot changes; A generating unit is used to generate a target teaching trajectory according to the reference sampling point, so as to control the robot to track based on the target teaching trajectory.

9. A robot, characterized in that: The robot comprises: A sensor, used to detect status information of the robot; A logic operator for executing the method according to any one of claims 1 to 7.

10. The robot according to claim 9, characterized in that: The robot is a two-wheeled spherical robot, and the robot further comprises: A camera device, wherein the camera device is parallel to a horizontal plane when the robot is stationary, and is used for performing image acquisition to determine whether the robot performs a specified action, wherein the specified action includes the robot performing image acquisition at a specified sampling point in a specified posture.

Citation Information

Patent Citations

  • Planning method for robot teaching path

    CN107728619A

  • Robot system and robot control method

    CN111055265A

  • Segmented connection operation control method and device, computer equipment and storage medium

    CN114851170A

  • Robot teaching track generation method and device, equipment and medium

    CN116372927A

  • Topological path diagram generation method and device, robot and storage medium

    CN117553801A