Terminal path optimization method, device, storage medium and electronic device
By obtaining the pose information of the path point to be optimized at the end of the robotic arm, the target path point is determined and optimized to control the attitude change of the robotic arm, which solves the problem in the existing technology that path point optimization only considers position information, and improves the stability of the robotic arm control. performance and computational efficiency.
Patent Information
- Application Number
- CN202410764698.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-06-14
AI Technical Summary
The existing terminal path optimization method only considers the position information of the path point and fails to effectively handle the attitude changes during the movement of the manipulator, resulting in unpredictable risks in the control process.
By obtaining the pose information of multiple path points to be optimized at the end of the robotic arm, the target path point is determined so that the attitude change angle of the robotic arm when passing the target path point is less than the angle threshold, and the target path point is optimized to reduce control The amount of computation required.
It effectively avoids attitude changes caused by path point compression, improves the stability and calculation efficiency of robotic arm control, and reduces risks caused by path point compression.
Smart Images

Figure CN118342518B
Abstract
Description
Technical Field
[0001] The present application relates to the field of automatic control, and in particular to a terminal path optimization method, device, storage medium and electronic device. Background Art
[0002] In the context of the rapid development of industrial automation and robotics technology, robots with multi-axis redundant manipulators are gradually becoming the research focus in the field of robotics due to their outstanding performance and broad application potential. However, in actual applications, it is found that although many path points can be planned for the end of the robot to achieve smooth movement, this also causes the robot to consume a lot of computing resources during the control process, which requires the planned path points to be compressed and eliminated. However, in practice, it is found that the existing methods only compress and optimize the position information of the path points without considering the changes in posture, which leads to unexpected risks when controlling the robot movement according to the compressed path points. Summary of the invention
[0003] In order to overcome at least one of the deficiencies in the prior art, the present application provides a terminal path optimization method, device, storage medium and electronic device, specifically including:
[0004] In a first aspect, the present application provides a terminal path optimization method, the method comprising:
[0005] Acquire position and posture information of a plurality of path points to be optimized, wherein the plurality of path points to be optimized are represented as discrete path points planned at the end of the robotic arm;
[0006] Determine a target path point from the multiple path points to be optimized according to the posture information of the multiple path points to be optimized, wherein the posture change angle of the end of the robotic arm when passing through the target path point is less than an angle threshold;
[0007] The position information of the target path point is optimized to reduce the amount of calculation required to control the robotic arm.
[0008] In combination with the optional implementation manner of the first aspect, determining the target path point from the multiple path points to be optimized according to the position and posture information of the multiple path points to be optimized includes:
[0009] For two adjacent path points to be optimized among the plurality of path points to be optimized, obtaining, according to the posture information of the two path points to be optimized, a posture change angle when the end of the robotic arm passes through the two path points to be optimized;
[0010] If the posture change angle is less than the angle threshold, the target path point is determined from the two path points to be optimized.
[0011] In conjunction with the optional implementation manner of the first aspect, determining the target path point from the two path points to be optimized includes:
[0012] The one at the front of the two path points to be optimized is determined as the target path point.
[0013] In conjunction with the optional implementation manner of the first aspect, before acquiring the position and posture information of the plurality of path points to be optimized, the method further includes:
[0014] Acquire position information of a plurality of path points, wherein the plurality of path points represent a task path planned for the end of the robotic arm;
[0015] According to the position information of the multiple path points, the multiple path points are divided into at least one point set to be optimized, wherein the maximum change amplitude of the path segment corresponding to each of the point sets to be optimized is less than an amplitude threshold;
[0016] The multiple path points in each of the to-be-optimized point sets are respectively used as the multiple to-be-optimized path points.
[0017] In combination with the optional implementation manner of the first aspect, dividing the multiple path points into at least one point set to be optimized according to the position information of the multiple path points includes:
[0018] Taking the plurality of path points as a set of points to be segmented;
[0019] According to the position information of each path point in the current set of points to be segmented, the maximum change amplitude of the path segment corresponding to the set of points to be segmented is obtained;
[0020] If the maximum change amplitude of the path segments corresponding to the set of points to be segmented is greater than or equal to the amplitude threshold, a path segmentation point is determined from the set of points to be segmented, wherein the path segmentation point represents the path point in the set of points to be segmented that produces the maximum change amplitude;
[0021] According to the path segmentation point, the set of points to be segmented is divided into two new sets of points to be segmented, and the maximum change amplitude of the path segments corresponding to the set of points to be segmented is obtained according to the position information of each path point in the current set of points to be segmented;
[0022] If the maximum change amplitude of the path segments corresponding to the to-be-segmented point set is less than the amplitude threshold, the to-be-segmented point set is used as the to-be-optimized point set.
[0023] In combination with an optional implementation manner of the first aspect, obtaining the maximum change amplitude of the path segment corresponding to the set of points to be segmented according to the position information of each path point in the set of points to be segmented includes:
[0024] According to the position information of each path point in the set of points to be segmented, the distance between each path point in the set of points to be segmented and a reference line is obtained, wherein the reference line is a line connecting the beginning and the end of the path corresponding to the set of points to be segmented;
[0025] According to the distance between each path point in the segmentation point set and the reference line, the largest one is selected as the maximum variation amplitude.
[0026] In conjunction with the optional implementation manner of the first aspect, the step of optimizing the position and posture information of the target path point includes:
[0027] Eliminating posture information from the position and posture information of the target path point;
[0028] Alternatively, the position and posture information of the target path point is removed from the position and posture information of the multiple path points to be optimized.
[0029] In a second aspect, the present application provides a terminal path optimization device, the device comprising:
[0030] A path point acquisition module, used to acquire position and posture information of a plurality of path points to be optimized, wherein the plurality of path points to be optimized are represented as discrete path points planned at the end of the robotic arm;
[0031] A path point screening module, used to determine a target path point from the multiple path points to be optimized according to the posture information of the multiple path points to be optimized, wherein the posture change angle when the end of the robot arm passes through the target path point is less than an angle threshold;
[0032] The path point optimization module is used to optimize the target path point to reduce the amount of calculation required to control the robotic arm.
[0033] In conjunction with the optional implementation manner of the second aspect, the path point screening module is further specifically configured to:
[0034] For two adjacent path points to be optimized among the plurality of path points to be optimized, obtaining, according to the posture information of the two path points to be optimized, a posture change angle when the end of the robotic arm passes through the two path points to be optimized;
[0035] If the posture change angle is less than the angle threshold, the target path point is determined from the two path points to be optimized.
[0036] In conjunction with the optional implementation manner of the second aspect, the path point screening module is further specifically configured to:
[0037] The one at the front of the two path points to be optimized is determined as the target path point.
[0038] In conjunction with the optional implementation manner of the second aspect, before acquiring the position and posture information of the plurality of path points to be optimized, the path point acquisition module is further used to:
[0039] Acquire position information of a plurality of path points, wherein the plurality of path points represent a task path planned for the end of the robotic arm;
[0040] According to the position information of the multiple path points, the multiple path points are divided into at least one point set to be optimized, wherein the maximum change amplitude of the path segment corresponding to each of the point sets to be optimized is less than an amplitude threshold;
[0041] The multiple path points in each of the to-be-optimized point sets are respectively used as the multiple to-be-optimized path points.
[0042] In conjunction with the optional implementation manner of the second aspect, the path point acquisition module is further specifically configured to:
[0043] Taking the plurality of path points as a set of points to be segmented;
[0044] According to the position information of each path point in the current set of points to be segmented, the maximum change amplitude of the path segment corresponding to the set of points to be segmented is obtained;
[0045] If the maximum change amplitude of the path segments corresponding to the set of points to be segmented is greater than or equal to the amplitude threshold, a path segmentation point is determined from the set of points to be segmented, wherein the path segmentation point represents the path point in the set of points to be segmented that produces the maximum change amplitude;
[0046] According to the path segmentation point, the set of points to be segmented is divided into two new sets of points to be segmented, and the maximum change amplitude of the path segments corresponding to the set of points to be segmented is obtained according to the position information of each path point in the current set of points to be segmented;
[0047] If the maximum change amplitude of the path segments corresponding to the to-be-segmented point set is less than the amplitude threshold, the to-be-segmented point set is used as the to-be-optimized point set.
[0048] In conjunction with the optional implementation manner of the second aspect, the path point acquisition module is further specifically configured to:
[0049] According to the position information of each path point in the set of points to be segmented, the distance between each path point in the set of points to be segmented and a reference line is obtained, wherein the reference line is a line connecting the beginning and the end of the path corresponding to the set of points to be segmented;
[0050] According to the distance between each path point in the segmentation point set and the reference line, the largest one is selected as the maximum variation amplitude.
[0051] In conjunction with the optional implementation manner of the second aspect, the path point optimization module is further specifically configured to:
[0052] Eliminating posture information from the position and posture information of the target path point;
[0053] Alternatively, the position and posture information of the target path point is removed from the position and posture information of the multiple path points to be optimized.
[0054] In a third aspect, the present application also provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the terminal path optimization method is implemented.
[0055] In a fourth aspect, the present application further provides an electronic device, comprising a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the terminal path optimization method is implemented.
[0056] Compared with the prior art, this application has the following beneficial effects:
[0057] The present application provides a terminal path optimization method, device, storage medium and electronic device. Among them, the electronic device obtains the posture information of multiple path points to be optimized, wherein the multiple path points to be optimized are represented as discrete path points planned for the end of the robot arm; according to the posture information of the multiple path points to be optimized, a target path point is determined from the multiple path points to be optimized, wherein the posture change angle when the end of the robot arm passes through the target path point is less than an angle threshold; the target path point is optimized to reduce the amount of calculation required to control the robot arm. In this way, since only the path points with smaller posture changes are optimized, large posture changes of the robot arm due to path point compression are avoided. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0059] Figure 1 One of the flow charts of the terminal path optimization method provided in the embodiment of the present application;
[0060] Figure 2 The second flowchart of the terminal path optimization method provided in the embodiment of the present application;
[0061] Figure 3 A schematic diagram of the path points at the end of the robotic arm provided in an embodiment of the present application;
[0062] Figure 4 Flow chart 3 of the terminal path optimization method provided in the embodiment of the present application;
[0063] Figure 5 A schematic diagram of the segmentation principle of the point set to be segmented provided in an embodiment of the present application;
[0064] Figure 6 A schematic diagram of the structure of a terminal path optimization device provided in an embodiment of the present application;
[0065] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0066] Icons: 11-path point acquisition module; 12-path point screening module; 13-path point optimization module; 21-memory; 22-processor; 23-communication unit; 24-system bus. DETAILED DESCRIPTION
[0067] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.
[0068] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0069] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0070] In the description of the present application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inside", "outside", etc. indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, or the positions or positional relationships in which the invented product is usually placed when in use. They are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific position, be constructed and operated in a specific position, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
[0071] In addition, the terms "comprises," "comprising," or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0072] In addition, the terms "horizontal", "vertical", "overhanging" and the like do not mean that the components are required to be absolutely horizontal or overhanging, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical", and does not mean that the structure must be completely horizontal, but can be slightly tilted.
[0073] In the description of this application, it should also be noted that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0074] Based on the above statement, as introduced in the background technology, the existing trajectory point compression method only compresses and optimizes the position information of the path point without considering the change of posture, which leads to unexpected risks when controlling the robot movement according to the compressed path point. The robot involved in this embodiment can be, but is not limited to, a medical robot, an industrial robot, a server robot, and an educational robot. Among them, the industrial robot can include an automated assembly robot, a welding robot, a painting robot, a handling robot, a stacking robot, and a detection robot. Medical robots can include surgical robots, prosthetic robots, disinfection robots, medical teaching robots, exoskeleton robots, and the like.
[0075] Taking surgical robots as an example, in order for surgical robots to adapt to different surgical scenarios, the robot's mechanical arm needs to be able to better realize path planning and obstacle avoidance. Therefore, redundant mechanical arms with more than six degrees of freedom are usually used. However, in long-term surgical tasks, surgical robot systems will encounter a lot of problems such as difficulty in storing data, low computing efficiency, and information redundancy. The traditional robot path point compression and elimination method is to reduce the processing path points without affecting the trajectory by setting a threshold. However, the traditional method only compresses and optimizes the position information of the path points without considering the change in posture. This means that if the path points with small position changes and large posture changes are deleted, there may be great risks during the operation, and then the patient's safety cannot be guaranteed.
[0076] Based on the discovery of the above technical problems, the inventors have proposed the following technical solutions to solve or improve the above problems through creative work. It should be noted that the defects in the solutions in the above prior art are the results obtained by the inventors after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed in the embodiments of the present application for the above problems below should all be the contributions made by the inventors to the present application in the process of invention and creation, and should not be understood as technical contents known to those skilled in the art.
[0077] In view of the above technical problems, this embodiment provides a terminal path optimization method applied to an electronic device. In this method, the electronic device obtains the posture information of multiple path points to be optimized, wherein the multiple path points to be optimized are represented as discrete path points planned for the end of the robotic arm; according to the posture information of the multiple path points to be optimized, a target path point is determined from the multiple path points to be optimized, wherein the posture change angle of the end of the robotic arm when passing through the target path point is less than the angle threshold; the target path point is optimized to reduce the amount of calculation required to control the robotic arm. In this way, since only the path points with smaller posture changes are optimized, large posture changes of the robotic arm due to path point compression are avoided.
[0078] It should be noted that the electronic device implementing the method may be, but is not limited to, a host computer, an embedded device for integration with the robot body. When it is a host computer, the host computer may be a mobile terminal, a tablet computer, a laptop computer, a desktop computer, etc. These devices may establish a communication connection with the controller in the robot arm, and send control instructions to the controller to control the movement of the robot arm.
[0079] To make the solution provided by this embodiment clearer, the following takes the host computer as an example and combines Figure 1 Each step of the method is described in detail. However, it should be understood that the operations of the flowchart may not be implemented in order, and steps without logical contextual relationships may be reversed in order or implemented simultaneously. In addition, those skilled in the art may add one or more other operations to the flowchart, or remove one or more operations from the flowchart under the guidance of the content of this application. Figure 1 As shown, the method includes:
[0080] S4, obtaining position information of multiple path points to be optimized.
[0081] It should be noted that pose information is a concept in robotics that describes the position and orientation of an object in three-dimensional space. Specifically, pose usually includes two main parts: position information and pose information. Position information refers to the coordinate value of the center point of the object in the three-dimensional coordinate system; while pose information describes the direction of the object relative to a reference coordinate system, which can be expressed in a variety of ways such as rotation matrix, quaternion or Euler angle.
[0082] Given that the multiple path points to be optimized are represented as discrete path points planned for the end of the robot, as an optional implementation, the end path represented by these path points to be optimized can be the task path planned for the end of the robot, that is, the path from the task start point to the task end point. This optimization method does not need to consider the change amplitude of the task path, but only cares about the posture change of the end of the robot between two adjacent path points to be optimized.
[0083] As another optional implementation, the above-mentioned multiple path points to be optimized actually correspond to a path segment, that is, obtained by segmenting the task path planned by the end of the robot arm. In this regard, it should be noted that in order to avoid the end of the robot arm deviating from the planned task path due to the path point compression operation, this embodiment divides the task path into a certain number of path segments, and then regards the multiple path points in each path segment as multiple path points to be optimized, and performs optimization operations in segments. Therefore, Figure 2 As shown, before step S4, the terminal path optimization method provided by this embodiment further includes:
[0084] S1, obtain location information of multiple path points.
[0085] Among them, multiple path points represent a task path planned by the end of the robot. It should be noted that multiple path points can be obtained through existing end path planning algorithms, such as sampling-based path planning algorithms (RRT algorithms), search-based path planning algorithms (A* algorithms or Dijkstra algorithms), potential field-based path planning algorithms, and machine learning-based path planning algorithms. Since these algorithms are relatively mature path planning algorithms in this field, they will not be described in detail in this embodiment.
[0086] For example, Figure 3 As shown, the first The waypoints are represented as , and the distance between two adjacent path points is expressed as , Determines the sparsity between path points, that is The larger the value, the sparser the path points. The pose of a path point is represented as , and get the pose of each path point by:
[0087] First, define Pointed The axis direction is vector; then, the positive direction of the path Defined as , and assuming The axis direction is perpendicular to the plane formed by the normal direction and the positive direction, so, The axis direction can be obtained according to the right-hand rule, defined as Similarly, The axis direction can be calculated as In this way, the posture of each path point can be obtained in turn through the posture determination method in the above example.
[0088] Based on the position and posture of each path point obtained in the above embodiment, it was found during the research process that the end of the robot arm is close to the global coordinate system. In this regard, in an optional implementation provided by this embodiment, each path point in the complete task path can be projected to the global coordinate system. of Axis plane, and calculate the projection point and the global coordinate system The distance between the origins of the task paths is calculated, and the projection point with the closest distance is determined from it; then, the path point corresponding to the projection point is used as the segmentation position to divide the complete task path into two task paths, and then the path points in each task path are optimized respectively.
[0089] It should be noted that the above examples are provided for ease of understanding in this implementation, but the coordinate system and terminal posture information in the above examples should not be regarded as limitations on the present application, but rather adaptive adjustments can be made in the art when implementing the present application.
[0090] Combined with the introduction of multiple path points representing the task path in the above embodiment, continue to refer to Figure 2 The terminal path optimization method provided in this implementation also includes:
[0091] S2: Divide the multiple path points into at least one point set to be optimized according to the location information of the multiple path points.
[0092] Among them, the maximum change amplitude of the path segment corresponding to each point set to be optimized is less than the amplitude threshold. It can be understood that in this embodiment, the point set to be optimized includes multiple path points, and these path points can constitute a path segment. When the change amplitude of the path segment is too large, if optimization operations such as compressing the path are continued for it, it may cause a large deviation between the optimized path segment and the original path segment. Therefore, this embodiment adopts a cautious optimization strategy, that is, by limiting the change amplitude of the optimized path segment, it ensures that the optimized path segment can be as close to the original path segment as possible. Figure 4 As shown, for Figure 2 In step S2 of the embodiment, this embodiment provides the following optional implementation method to divide multiple path points into at least one point set to be optimized:
[0093] S2-1, taking multiple path points as a set of points to be segmented.
[0094] S2-2, according to the position information of each path point in the current set of points to be segmented, obtain the maximum change amplitude of the path segment corresponding to the set of points to be segmented.
[0095] In this embodiment, the position farthest from the end-to-end line of the path segment in the path segment corresponding to the set of points to be segmented is taken as the maximum change amplitude. Therefore, the host computer can obtain the distance between each path point in the set of points to be segmented and the reference line according to the position information of each path point in the set of points to be segmented, wherein the reference line is the end-to-end line of the path corresponding to the set of points to be segmented; according to the distance between each path point in the set of points to be segmented and the reference line, the largest one is selected as the maximum change amplitude.
[0096] In addition, in this embodiment, the path point with the largest change amplitude is called the path segmentation point. It can be understood that the greater the distance between the path segmentation point and the reference line, the greater the change amplitude of the path segment corresponding to the set of points to be segmented. In order to avoid a large deviation between the optimized path segment and the original path segment, the set of points to be segmented needs to be divided into two new sets of points to be segmented using the path segmentation point. Therefore, step S2 also includes:
[0097] S2-3, determine whether the maximum change amplitude of the path segment corresponding to the to-be-segmented point set is greater than or equal to the amplitude threshold; if not, execute step S2-4; if yes, execute step S2-6.
[0098] S2-4, determining the path segmentation points from the set of points to be segmented.
[0099] The path segmentation point represents the path point that produces the largest change range in the set of points to be segmented.
[0100] S2-5, dividing the set of points to be segmented into two new sets of points to be segmented according to the path segmentation points, and returning to S2-2.
[0101] S2-6, taking the point set to be segmented as the point set to be optimized.
[0102] For example, Figure 5 As shown, assuming that the set of points to be segmented includes 50 path points, these path points are represented as follows according to the movement direction of the end of the robot arm. .because is the first path point in the current set of points to be segmented. is the last path point in the current set of points to be segmented, so and The host computer calculates the shortest distance between other path points and the reference line, and selects the largest one as the reference line. Figure 5 The maximum magnitude of change in the path segment shown. Figure 5 Any path point and path point and A triangle can be formed, and the shortest distance between the path point and the reference line is actually the height of the triangle. Therefore, the shortest distance between the path point and the reference line can be calculated using Heron's formula.
[0103] If after comparison, it is found that the path point to be segmented is a set of points Waypoints in The distance between the reference line and the reference line is the largest, and the distance is greater than the set amplitude threshold, then As the path splitting point, Figure 5 The 50 path points in and Two new points to be segmented. Then, the host computer will and The current set of points to be segmented is determined, and further judgment is made as to whether it needs to be further segmented. For example, due to is the first path point in the current set of points to be segmented. is the last path point in the current set of points to be segmented, so and The lines between them are the points to be segmented The reference line is calculated and the shortest distance between the path point and the reference line is calculated. and the set of points to be segmented The distance between the reference lines is the largest, and the distance is less than the set amplitude threshold, then there is no need to treat the segmentation point set Continue to segment and use it as the point set to be optimized, and optimize the points to be optimized. The same method is used to determine whether further segmentation is required, which will not be described in detail here. In this way, multiple path points can be divided into at least one point set to be optimized.
[0104] It should be noted that the above examples are provided for ease of understanding in this implementation, but the number of path points in the above examples should not be regarded as a limitation on the present application, but rather can be adaptively adjusted when implementing the present application in the art.
[0105] S3, taking multiple path points in each set of points to be optimized as multiple path points to be optimized.
[0106] Based on the multiple path points to be optimized obtained in the above embodiment, continue to refer to Figure 1 or Figure 2 After step S4, the terminal path optimization method provided in this embodiment further includes:
[0107] S5, determining a target path point from the multiple path points to be optimized according to the position and posture information of the multiple path points to be optimized.
[0108] Among them, the attitude change angle when the end of the robot arm passes through the target path point is less than the angle threshold. In this embodiment, for two adjacent path points to be optimized among the multiple path points to be optimized, the upper computer obtains the attitude change angle when the end of the robot arm passes through the two path points to be optimized based on the attitude information of the two path points to be optimized; if the attitude change angle is less than the angle threshold, the target path point is determined from the two path points to be optimized. It can be understood that in this embodiment, points with smaller attitude changes are selected for optimization, while points with larger attitude changes are retained. As an optional implementation, if the attitude change angle when the end of the robot arm passes through two path points to be optimized is less than the angle threshold, the one with a forward position among the two path points to be optimized is determined as the target path point.
[0109] Exemplarily, two adjacent path points to be optimized are represented as , , the end of the robot arm passes through Exercise to The calculation formula for the resulting attitude change angle is:
[0110] ;
[0111] In the formula, Indicates the path point to be optimized The posture matrix, Indicates the path point to be optimized The posture matrix, Indicates the attitude change angle. Less than angle threshold , then The target path point is determined. Similarly, the host computer then determines whether the end of the robot arm is from the path point to be optimized. Move to the path point to be optimized Required attitude change angle , if it is also less than the angle threshold , then As the target path point. And so on, all the target path points are screened out from multiple path points to be optimized.
[0112] Continue to see Figure 1 or Figure 2 After determining the target path point, the terminal path optimization method provided in this embodiment further includes:
[0113] S6, optimizing the position and posture information of the target path point to reduce the amount of calculation required to control the robotic arm.
[0114] This embodiment provides a variety of optimization methods to process the position and posture information of the target path point to reduce the amount of calculation required to control the robot arm. In an optional implementation, the host computer can remove the posture information from the position and posture information of the target path point. It can be understood that this implementation only retains the position information of the target path point and removes the posture information, so that when the end of the robot passes the target path point, the posture of the previous path point remains unchanged, thereby saving the resources required to calculate the posture change. For example, for , , Three path points to be optimized, is the target path point, After the posture information is removed, the end of the robot changes from Exercise to When, keep Position posture.
[0115] In other optional implementations, the host computer can also remove the pose information of the target path point from the pose information of multiple path points to be optimized. It can be understood that the target path point is a redundant path point at this time, and removing it can also reduce the consumption of computing resources. , , Take three path points to be optimized as an example. is the target path point, After the posture information of Exercise to time, without having to go through .
[0116] Based on the same inventive concept as the terminal path optimization method provided in this embodiment, this embodiment also provides a terminal path optimization device. The device includes at least one software function module that can be stored in a memory or fixed in an electronic device in the form of software. The processor in the electronic device is used to execute the executable module stored in the memory 21. For example, the software function module and computer program included in the terminal path optimization device. Please refer to Figure 6 , from the functional point of view, the terminal path optimization device can include:
[0117] A path point acquisition module 11 is used to acquire position and posture information of multiple path points to be optimized, wherein the multiple path points to be optimized are represented as discrete path points planned at the end of the robot arm;
[0118] A path point screening module 12 is used to determine a target path point from the multiple path points to be optimized according to the posture information of the multiple path points to be optimized, wherein the posture change angle of the end of the robot arm when passing through the target path point is less than an angle threshold;
[0119] The path point optimization module 13 is used to optimize the target path points to reduce the amount of calculation required to control the robot arm.
[0120] In this embodiment, the path point acquisition module 11 is used to implement Figure 1 In step S4, the path point screening module 12 is used to implement Figure 1 In step S5, the path point optimization module 13 is used to implement Figure 1 For detailed description of each of the above modules, please refer to the specific implementation of the corresponding step. In addition, since the terminal path optimization method provided in the above embodiment has the same inventive concept, the path point acquisition module 11, the path point screening module 12 and the path point optimization module 13 can also be used to implement the steps or sub-steps of the method, which will not be described in detail in this embodiment.
[0121] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0122] It should also be understood that if the above implementation is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application.
[0123] Therefore, this embodiment further provides a storage medium, which is a computer-readable storage medium. The storage medium stores a computer program, and when the computer program is executed by a processor, the terminal path optimization method provided in this embodiment is implemented. Among them, the storage medium can be a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, etc., which can store program codes.
[0124] This embodiment also provides an electronic device for implementing the terminal path optimization method. Figure 7 As shown, the electronic device may include a processor 22 and a memory 21. In addition, the memory 21 stores a computer program, and the processor implements the terminal path optimization method provided in this embodiment by reading and executing the computer program corresponding to the above implementation in the memory 21.
[0125] Continue to see Figure 7 The electronic device further includes a communication unit 23. The memory 21, the processor 22 and the communication unit 23 are electrically connected to each other directly or indirectly through a system bus 24 to achieve data transmission or interaction.
[0126] The memory 21 may be an information recording device based on any electronic, magnetic, optical or other physical principle, used to record execution instructions, data, etc. In some embodiments, the memory 21 may be, but is not limited to, a volatile memory, a non-volatile memory, a storage drive, etc.
[0127] In some embodiments, the volatile memory may be a random access memory (RAM); in some embodiments, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), a flash memory, etc.; in some embodiments, the storage drive may be a disk drive, a solid-state drive, any type of storage disk (such as a CD, a DVD, etc.), or a similar storage medium, or a combination thereof, etc.
[0128] The communication unit 23 is used to send and receive data through a network. In some embodiments, the network may include a wired network, a wireless network, a fiber optic network, a telecommunication network, an intranet, the Internet, a local area network (LAN), a wide area network (WAN), a wireless local area network (WLAN), a metropolitan area network (MAN), a wide area network (WAN), a public switched telephone network (PSTN), a Bluetooth network, a ZigBee network, or a near field communication (NFC) network, or any combination thereof. In some embodiments, the network may include one or more network access points. For example, the network may include a wired or wireless network access point, such as a base station and / or a network switching node, and one or more components of the service request processing system may be connected to the network through the access point to exchange data and / or information.
[0129] The processor 22 may be an integrated circuit chip with signal processing capability, and the processor may include one or more processing cores (e.g., a single-core processor or a multi-core processor). By way of example only, the processor may include a central processing unit (CPU), an application specific integrated circuit (ASIC), an application specific instruction set processor (ASIP), a graphics processing unit (GPU), a physical processing unit (PPU), a digital signal processor (DSP), a field programmable gate array (FPGA), a programmable logic device (PLD), a controller, a microcontroller unit, a reduced instruction set computer (RISC), or a microprocessor, or any combination thereof.
[0130] Understandably, Figure 7 The structure shown is for illustration only. The electronic device may also have Figure 7 More or fewer components than shown, or with Figure 7 Different configurations shown. Figure 7 The components shown may be implemented in hardware, software or a combination thereof.
[0131] It should be understood that the apparatus and method disclosed in the above-mentioned embodiments can also be implemented in other ways. The apparatus embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the apparatus, methods and computer program products according to the multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0132] The above are only various implementations of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A terminal path optimization method, characterized in that: The method comprises: Acquire position and posture information of a plurality of path points to be optimized, wherein the plurality of path points to be optimized are represented as discrete path points planned at the end of the robotic arm; According to the posture information of the multiple path points to be optimized, a target path point is determined from the multiple path points to be optimized, wherein the posture change angle when the end of the robot arm passes through the target path point is less than an angle threshold, and the step specifically includes: For two adjacent path points to be optimized among the plurality of path points to be optimized, obtaining, according to the posture information of the two path points to be optimized, a posture change angle when the end of the robotic arm passes through the two path points to be optimized; If the posture change angle is less than the angle threshold, determining the target path point from the two path points to be optimized; Optimizing the position and posture information of the target path point to reduce the amount of calculation required to control the robotic arm, the step specifically includes: Eliminating posture information from the position and posture information of the target path point; Alternatively, the position and posture information of the target path point is removed from the position and posture information of the multiple path points to be optimized.
2. The terminal path optimization method according to claim 1, characterized in that: The step of determining the target path point from the two path points to be optimized includes: The one at the front of the two path points to be optimized is determined as the target path point.
3. The terminal path optimization method according to claim 1, characterized in that: Before obtaining the position and posture information of the plurality of path points to be optimized, the method further includes: Acquire position information of a plurality of path points, wherein the plurality of path points represent a task path planned for the end of the robotic arm; According to the position information of the multiple path points, the multiple path points are divided into at least one point set to be optimized, wherein the maximum change amplitude of the path segment corresponding to each of the point sets to be optimized is less than an amplitude threshold; The multiple path points in each of the to-be-optimized point sets are respectively used as the multiple to-be-optimized path points.
4. The terminal path optimization method according to claim 3, characterized in that: The step of dividing the plurality of path points into at least one point set to be optimized according to the position information of the plurality of path points comprises: Taking the plurality of path points as a set of points to be segmented; According to the position information of each path point in the current set of points to be segmented, the maximum change amplitude of the path segment corresponding to the set of points to be segmented is obtained; If the maximum change amplitude of the path segments corresponding to the set of points to be segmented is greater than or equal to the amplitude threshold, a path segmentation point is determined from the set of points to be segmented, wherein the path segmentation point represents the path point in the set of points to be segmented that produces the maximum change amplitude; According to the path segmentation point, the set of points to be segmented is divided into two new sets of points to be segmented, and the maximum change amplitude of the path segments corresponding to the set of points to be segmented is obtained according to the position information of each path point in the current set of points to be segmented; If the maximum change amplitude of the path segments corresponding to the to-be-segmented point set is less than the amplitude threshold, the to-be-segmented point set is used as the to-be-optimized point set.
5. The terminal path optimization method according to claim 4, characterized in that: The step of obtaining the maximum change amplitude of the path segments corresponding to the set of points to be segmented according to the position information of each path point in the set of points to be segmented includes: According to the position information of each path point in the set of points to be segmented, the distance between each path point in the set of points to be segmented and a reference line is obtained, wherein the reference line is a line connecting the beginning and the end of the path segment corresponding to the set of points to be segmented; According to the distance between each path point in the segmentation point set and the reference line, the largest one is selected as the maximum variation amplitude.
6. A terminal path optimization device, characterized in that: The device comprises: A path point acquisition module, used to acquire position and posture information of a plurality of path points to be optimized, wherein the plurality of path points to be optimized are represented as discrete path points planned at the end of the robot arm; A path point screening module is used to determine a target path point from the multiple path points to be optimized according to the posture information of the multiple path points to be optimized, wherein the posture change angle when the end of the robot arm passes through the target path point is less than an angle threshold; the path point screening module is also specifically used to: For two adjacent path points to be optimized among the plurality of path points to be optimized, obtaining, according to the posture information of the two path points to be optimized, a posture change angle when the end of the robotic arm passes through the two path points to be optimized; If the posture change angle is less than the angle threshold, determining the target path point from the two path points to be optimized; A path point optimization module is used to optimize the target path point to reduce the amount of calculation required to control the robotic arm; the path point optimization module is also specifically used to: Eliminating posture information from the position and posture information of the target path point; Alternatively, the position and posture information of the target path point is removed from the position and posture information of the multiple path points to be optimized.
7. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the terminal path optimization method described in any one of claims 1 to 5 is implemented.
8. An electronic device, characterized in that: The electronic device includes a processor and a memory, the memory stores a computer program, and when the computer program is executed by the processor, the terminal path optimization method described in any one of claims 1-5 is implemented.
