Waypoint-based robotic arm path planning method

By determining the waypoints in the path planning of the robotic arm and utilizing inverse kinematics calculation and joint motion equalization strategies, the problem of high complexity in inverse kinematics calculation under redundant degrees of freedom is solved, thereby improving the efficiency and energy utilization of the robotic arm path planning.

CN120395817BActive Publication Date: 2026-05-12TSINGHUA UNIVERSITY +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TSINGHUA UNIVERSITY
Filing Date
2025-04-15
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing robotic arm path planning methods have high inverse computation complexity under redundant degrees of freedom, resulting in unnecessary energy waste and low efficiency during robotic arm movement.

Method used

By determining the path points of the target robotic arm's motion trajectory, and utilizing preset inverse kinematics calculation strategies and joint motion equalization strategies, joint motion commands can be directly written or interpolation segmentation operations can be performed, reducing the complexity and number of inverse kinematics calculations.

Benefits of technology

This greatly reduces the complexity and number of inverse kinematics calculations, improves the efficiency of robotic arm path planning, and optimizes the robotic arm's motion process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120395817B_ABST
    Figure CN120395817B_ABST
Patent Text Reader

Abstract

The application relates to a kind of mechanical arm path planning methods based on way point, wherein, method includes: the joint variable value corresponding to each joint in target mechanical arm at current way point is calculated, and the distance between current way point and next way point is determined, and whether the distance is not greater than preset interval value is judged;If not greater than preset interval value, each joint motion instruction from current way point to next way point is written by joint motion equalization strategy, otherwise interpolation segmentation is carried out between current way point and next way point, and the interpolation direction corresponding to current way point is determined, and each joint motion instruction in each interpolation segment is written according to interpolation direction and joint motion equalization strategy;The corresponding action of target mechanical arm is controlled by each joint motion instruction. Thus, it solves the problem that the existing method causes unnecessary waste of energy in the movement process of mechanical arm, and the inverse solution calculation complexity is higher when having redundant degree of freedom, which affects the path planning efficiency of mechanical arm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of robotic arm path planning technology, and in particular to a robotic arm path planning method based on waypoints. Background Technology

[0002] Robotic arm path planning is the process of calculating the poses of intermediate path points and the corresponding values ​​of each degree of freedom (joint) variable of the robotic arm based on the poses of the starting and ending points, as well as constraints related to kinematics, dynamics, and the environment. Different applications of the robotic arm impose different requirements on path planning. For applications such as machining and welding, each point on the robotic arm's motion trajectory has high precision requirements; while for applications such as handling, loading / unloading, assembly, and maintenance, the robotic arm's motion trajectory only has certain pose accuracy requirements for the ending point, and there are generally no strict requirements for the intermediate paths, even if several path points need to be specified for purposes such as obstacle avoidance.

[0003] There are many existing methods for path planning of robotic arms. Path planning, besides calculating the pose of each point on the motion trajectory, also requires calculating the values ​​of joint variables corresponding to each pose, i.e., inverse kinematics (IK) calculation. If analytical formulas for IK are available, linear motion interpolation functions can be implemented. After specifying the start and end points, the system can automatically interpolate intermediate points according to a linear trajectory, thus moving from the start point to the end point. This interpolation function can be embedded in the robotic arm control system, thereby simplifying the programming of the robotic arm motion program. For scenarios where the planning is done once and then reused for a long time, various teaching methods can be used to obtain the motion trajectory, i.e., recording the robotic arm's motion process during teaching, and then reproducing this process during use. If interpolation functionality is available, the control system can automatically interpolate the motion process between all adjacent points after interactively setting waypoints. For application scenarios where the start, end, and waypoints need to be specified at any time (such as maintenance points that are not fixed), path planning needs to be performed in real time, interpolating the complete motion trajectory, and simulation confirming that there will be no collisions or other dangers before execution. For robotic arms with a high number of degrees of freedom, IK calculation can be quite complex and computationally intensive.

[0004] For robotic arms used for handling, loading and unloading, assembly, and maintenance, it is unnecessary to strictly calculate their intermediate motion trajectories. On the contrary, requiring the robotic arm to move according to these strictly calculated trajectories imposes additional constraints on the movement of each joint, resulting in an inefficient motion process. For robotic arms with redundant degrees of freedom, the inverse solution calculation for each point of the path trajectory may be very complex, often resulting in multiple solutions. Furthermore, the optimization calculation of the entire path trajectory is highly complex and time-consuming, which urgently needs to be addressed. Summary of the Invention

[0005] This application provides a path planning method for robotic arms based on waypoints to solve the problems of unnecessary energy waste during the movement of robotic arms and high computational complexity of inverse kinematics when there are redundant degrees of freedom, which affect the efficiency of robotic arm path planning.

[0006] The first aspect of this application provides a path planning method for a robotic arm based on waypoints, comprising the following steps: determining all waypoints corresponding to the motion trajectory of a target robotic arm; calculating the joint variable values ​​corresponding to each joint in the target robotic arm at the current waypoint using a preset inverse kinematics calculation strategy; determining the distance between the current waypoint and the next waypoint; and determining whether the distance is not greater than a preset spacing value; if the distance is not greater than the preset spacing value, directly writing motion instructions for each joint from the current waypoint to the next waypoint using a preset joint motion equalization strategy; if the distance is not greater than the preset spacing value, then... If the distance is greater than the preset distance value, an interpolation segmentation operation is performed between the current path point and the next path point to obtain multiple interpolation segments between the current path point and the next path point. The interpolation direction of the target robotic arm at the current path point is determined, and the joint motion equalization strategy is used to write the joint motion instructions within each interpolation segment. Each path point except the endpoint is traversed to obtain the joint motion instructions from each path point to the next path point. Based on the joint motion instructions, the target robotic arm is controlled to perform corresponding actions.

[0007] Optionally, in one embodiment of this application, if the distance is not greater than the preset spacing value, then directly writing joint motion instructions from the current path point to the next path point through a preset joint motion equalization strategy includes: calculating an approximate value of the length of the end motion curve of the target robotic arm from the current path point to the next path point, and calculating the corresponding motion time based on a preset end motion linear velocity and the approximate value; determining the change amount corresponding to the joint variable value of each joint, and calculating the rotational angular velocity or translational velocity corresponding to the joint variable value of each joint according to the change amount corresponding to the joint variable value of each joint at the current path point and the motion time; and writing joint motion instructions from the current path point to the next path point based on the rotational angular velocity or translational velocity corresponding to the joint variable value of each joint and the preset target value or the change amount, and in conjunction with a preset robotic arm motion instruction specification.

[0008] Optionally, in one embodiment of this application, calculating the approximate length of the motion curve of the target robotic arm from the current path point to the next path point includes: calculating the straight-line distance between the current path point and the next path point and the change in each joint, and calculating the corresponding number of approximation segments based on the straight-line distance and a preset approximation straight-line length used to control the calculation accuracy; dividing the change in each joint by the number of approximation segments to obtain the approximation segment change corresponding to the joint variable value of each joint; based on the approximation segment change, sequentially increasing the joint variable value of each joint to obtain multiple approximation segment points, calculating the straight-line distance between adjacent approximation segment points among the multiple approximation segment points, and accumulating the straight-line distances of the approximation segment points to obtain the approximate length of the motion curve.

[0009] Optionally, in one embodiment of this application, if the distance is greater than the preset spacing value, an interpolation segmentation operation is performed between the current path point and the next path point to obtain multiple interpolation segments between the current path point and the next path point, and the interpolation direction of the target robotic arm corresponding to the current path point is determined. Based on the interpolation direction and the joint motion equalization strategy, motion instructions for each joint within each interpolation segment are written, including: calculating the number of interpolation segments between the current path point and the next path point based on the preset spacing value, and calculating the pose of each interpolation segment point according to a preset interpolation algorithm and the number of interpolation segments; determining whether the inverse kinematics calculation strategy considers the interpolation direction selection corresponding to the current path point; if the inverse kinematics calculation strategy considers the interpolation direction selection... If the selection is not considered, then the inverse kinematics calculation is performed on two directions: from the current path point to the next path point and from the next path point to the current path point, to obtain the joint variable value of each interpolation segment point in each direction. The motion curve length of the end effector corresponding to each direction is calculated, and the motion time corresponding to the two directions is calculated based on the preset end effector linear velocity and the motion curve length. The motion times corresponding to the two directions are compared, and the joint variable value of each interpolation segment point in the direction with the shorter motion time is selected as the final joint variable value. If the inverse kinematics calculation strategy does not consider the interpolation direction selection, then the pose of the interpolation segment point will be used as the final joint variable value. Based on the final joint variable value, the joint motion commands of each joint in each of the multiple interpolation segments are written sequentially.

[0010] A second aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the waypoint-based robotic arm path planning method as described in the above embodiments.

[0011] A third aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described waypoint-based robotic arm path planning method.

[0012] A fourth aspect of this application provides a computer program product, including a computer program that is executed to implement the above-described waypoint-based robotic arm path planning method.

[0013] Therefore, the embodiments of this application have the following beneficial effects:

[0014] The embodiments of this application can determine all path points corresponding to the motion trajectory of the target robotic arm, calculate the joint variable values ​​corresponding to each joint of the target robotic arm at the current path point based on a preset inverse kinematics calculation strategy, determine the distance between the current path point and the next path point, and determine whether the distance is not greater than a preset spacing value. If the distance is not greater than the preset spacing value, the motion instructions of each joint from the current path point to the next path point are directly written through a preset joint motion equalization strategy. If the distance is greater than the preset spacing value, an interpolation segmentation operation is performed between the current path point and the next path point to obtain multiple interpolation segments between the current path point and the next path point, and the interpolation direction of the target robotic arm at the current path point is determined. The motion instructions of each joint in each interpolation segment are written according to the interpolation direction and the joint motion equalization strategy. Each path point except the endpoint is traversed to obtain the motion instructions of each joint from each path point to the next path point, and the target robotic arm is controlled to perform corresponding actions by each joint motion instruction. This can greatly reduce the complexity and number of inverse kinematics calculations and improve computational efficiency. This solves the problems of unnecessary energy waste during the movement of the robotic arm and high computational complexity of inverse kinematics when there are redundant degrees of freedom, which affect the efficiency of robotic arm path planning.

[0015] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0016] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0017] Figure 1 This is a flowchart of a robotic arm path planning method based on waypoints provided in an embodiment of this application;

[0018] Figure 2 This is a schematic diagram of trajectory shape control according to an embodiment of this application;

[0019] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0020] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0021] The following describes a path planning method for a robotic arm based on waypoints according to embodiments of this application, with reference to the accompanying drawings. Addressing the problems mentioned in the background art, this application provides a path planning method for a robotic arm based on waypoints. In this method, by determining all waypoints corresponding to the motion trajectory of the target robotic arm, and using a preset inverse kinematics calculation strategy, the joint variable values ​​corresponding to each joint in the target robotic arm at the current waypoint are calculated, and the distance between the current waypoint and the next waypoint is determined, and it is determined whether the distance is not greater than a preset spacing value; if the distance is not greater than the preset spacing value, the joint motion equalization strategy is directly used to write motion instructions for each joint from the current waypoint to the next waypoint; if the distance is greater than the preset spacing value, the method proceeds as follows: The spacing value is determined by performing interpolation segmentation between the current path point and the next path point to obtain multiple interpolation segments between them. The interpolation direction of the target robotic arm at the current path point is then determined. Based on the interpolation direction and joint motion equalization strategy, motion commands for each joint within each interpolation segment are written. Each path point, except the endpoint, is traversed to obtain the motion commands for each joint from each path point to the next. Based on these motion commands, the target robotic arm is controlled to perform corresponding actions. This significantly reduces the complexity and number of inverse kinematics calculations, improving computational efficiency. Therefore, this method solves the problems of unnecessary energy waste during robotic arm movement and high inverse kinematics complexity affecting path planning efficiency when redundant degrees of freedom are present, as seen in existing robotic arm path planning methods.

[0022] Specifically, Figure 1 A flowchart illustrating a robotic arm path planning method based on waypoints provided in this application embodiment.

[0023] like Figure 1 As shown, the robotic arm path planning method based on waypoints includes the following steps:

[0024] In step S101, all path points corresponding to the target robotic arm's motion trajectory are determined. Based on a preset inverse kinematics calculation strategy, the joint variable values ​​corresponding to each joint in the target robotic arm at the current path point are calculated, and the distance between the current path point and the next path point is determined. It is also determined whether the distance is not greater than a preset spacing value.

[0025] In step S102, if the distance is not greater than the preset spacing value, then the joint motion commands from the current path point to the next path point are directly written through the preset joint motion equalization strategy.

[0026] In step S103, if the distance is greater than the preset spacing value, an interpolation segmentation operation is performed between the current path point and the next path point to obtain multiple interpolation segments between the current path point and the next path point, and the interpolation direction of the target robot arm at the current path point is determined. Based on the interpolation direction and the joint motion equalization strategy, the joint motion instructions in each interpolation segment are written.

[0027] In step S104, each path point except the endpoint is traversed to obtain the joint motion commands from each path point to the next path point, and the target robotic arm is controlled to perform the corresponding actions based on the joint motion commands.

[0028] The embodiments of this application first set all path points (including the start and end points) corresponding to the movement trajectory of the robotic arm, inversely calculate the joint variable values ​​corresponding to each joint in the target robotic arm at the current path point, and determine the distance between the current path point and the next path point. It is then determined whether the distance is not greater than the spacing value. When the distance is not greater than the spacing value, the embodiments of this application can directly write the joint movement instructions from the current path point to the next path point through a preset joint motion equalization strategy.

[0029] When the distance is greater than the spacing value, the embodiments of this application can perform interpolation segmentation operation between the current path point and the next path point to obtain multiple interpolation segments between the current path point and the next path point, and determine the interpolation direction of the robotic arm at the current path point, and write the joint motion instructions in each interpolation segment according to the interpolation direction and the joint motion equalization strategy.

[0030] Optionally, in one embodiment of this application, if the distance is greater than a preset spacing value, an interpolation segmentation operation is performed between the current path point and the next path point to obtain multiple interpolation segments between the current path point and the next path point, and the interpolation direction of the target robotic arm corresponding to the current path point is determined. Based on the interpolation direction and the joint motion equalization strategy, motion instructions for each joint within each interpolation segment are written, including: calculating the number of interpolation segments between the current path point and the next path point based on the preset spacing value, and calculating the pose of each interpolation segment point according to a preset interpolation algorithm and the number of interpolation segments; determining whether the inverse kinematics calculation strategy considers the selection of the interpolation direction corresponding to the current path point; if the inverse kinematics calculation strategy considers the selection of the interpolation direction, then... Inverse kinematics calculations are performed in two directions: from the current path point to the next path point and from the next path point to the current path point. This yields the joint variable values ​​for each interpolation segment in each direction. The length of the end effector curve for each direction is also calculated. Based on preset end effector linear velocity and curve length, the motion time for each direction is calculated. The motion times for the two directions are compared, and the joint variable value for each interpolation segment in the direction with the shorter motion time is selected as the final joint variable value. If the inverse kinematics calculation strategy does not consider the interpolation direction selection, the pose of the interpolation segment will be used as the final joint variable value. Based on the final joint variable values, motion commands for each joint in each interpolation segment are sequentially written.

[0031] It's important to note that in inverse kinematics (IK) calculations, it's difficult to perform global optimization of the entire path. Therefore, when calculating the next interpolation point, the optimization (if applicable) often only considers the pose movement from the current point to the next point (i.e., the two points). A common optimization strategy is to minimize joint changes, i.e., reaching the next point with the least amount of movement. If the robot arm shapes (the shape of the robot arm determined by the joint angles) at the starting and ending points differ significantly, then when interpolating from the starting point to the ending point using the above strategy, there will be situations where the robot arm shapes at the preceding points are very similar, but the robot arm shapes at the point before the ending point are very different from those at the ending point. This will cause the joint movements between the point before the ending point and the ending point to take a long time to complete. Conversely, a similar situation will occur when interpolating from the ending point to the starting point. In this case, the interpolation direction can be selected by comparing which of the two interpolation directions results in a shorter movement time. Whether this situation occurs and whether an interpolation direction needs to be selected depends on the IK algorithm used.

[0032] Specifically, the process of robotic arm path planning in this embodiment can be represented by the following pseudocode:

[0033] The inverse solution calculates the values ​​of each joint variable at the starting point (if unknown);

[0034] For all waypoints (including the start and end points):

[0035] {

[0036] If the end point has been reached, exit;

[0037] Inverse kinematics calculate the joint variable values of the next path point (if unknown);

[0038] Calculate the distance between the current point and the next point, denoted as D;

[0039] If D <= the preset spacing value ΔL, write the joint motion commands according to the joint motion equalization strategy (the specific method is shown later);

[0040] Otherwise, perform interpolation segmentation:

[0041] {

[0042] Calculate the interpolation segmentation number N according to the given ΔL;

[0043] Adopt linear interpolation (other interpolation algorithms can also be used) to calculate the poses of each interpolation segmentation point;

[0044] If the inverse kinematics algorithm needs to consider the selection of interpolation direction, then:

[0045] {

[0046] Perform inverse kinematics calculation in the direction from the current path point to the next path point to obtain the joint variable values of each interpolation segmentation point, calculate the curve length of the end motion (the approximation algorithm is given later), and calculate the motion time T1 according to the given end motion linear velocity v;

[0047] Perform inverse kinematics calculation in the direction from the next path point to the current path point to obtain the joint variable values of each interpolation segmentation point, calculate the curve length of the end motion (the approximation algorithm is given later), and calculate the motion time T2 according to the given end motion linear velocity v;

[0048] If T1 < T2, adopt the result of inverse kinematics calculation in the direction from the current path point to the next path point, otherwise adopt the result of inverse kinematics calculation in the direction from the next path point to the current path point.

[0049] }

[0050] Write the joint motion commands of all segments in sequence according to the joint motion equalization strategy.

[0051] }

[0052] }<​​​

[0054] Optionally, in one embodiment of this application, if the distance is not greater than a preset spacing value, the motion instructions for each joint from the current path point to the next path point are directly written using a preset joint motion equalization strategy. This includes: calculating an approximate value of the length of the motion curve of the end effector of the target robotic arm from the current path point to the next path point, and calculating the corresponding motion time based on a preset end effector linear velocity and an approximate value; determining the change in the joint variable value corresponding to each joint, and calculating the rotational angular velocity or translational velocity corresponding to the joint variable value of each joint based on the change in the joint variable value of each joint at the current path point and the motion time; and writing the motion instructions for each joint from the current path point to the next path point based on the rotational angular velocity or translational velocity corresponding to the joint variable value of each joint and a preset target value or change, combined with a preset robotic arm motion instruction specification.

[0055] It should be noted that during the movement from one point to another, each joint needs to rotate a certain angle (or move a certain displacement), and at its respective angular velocity, it takes a certain amount of time to complete the movement, forming a certain trajectory at the end point. If there are no strict requirements for the intermediate trajectory, the movement of each joint between two points can be completed in the same amount of time. That is, if a certain joint requires the longest movement time, denoted as Tmax, the movement of other joints does not need to be completed earlier; instead, the movement speed is reduced so that it is also completed at Tmax. This allows each joint motor to be in a better working state. This strategy is called joint motion equalization. Under this joint motion equalization strategy, the end-point trajectory is a curve.

[0056] Specifically, in the embodiments of this application, the process of writing joint motion instructions according to the joint motion equalization strategy is as follows:

[0057] 1. Calculate the length of the end-point motion curve from the current point to the next point;

[0058] 2. Calculate the motion time t based on the given terminal linear velocity v;

[0059] 3. Calculate the rotational angular velocity or translational velocity of each joint variable based on the change in each joint variable and t.

[0060] 4. Based on the robotic arm motion instruction specifications, write motion instructions for each joint according to the target value / change of each joint variable and the rotational angular velocity / translational velocity.

[0061] Therefore, the embodiments of this application utilize a joint motion balancing strategy to balance the motion time of each joint during the motion process between pathway points.

[0062] Optionally, in one embodiment of this application, calculating the approximate length of the motion curve of the target robotic arm from the current path point to the next path point includes: calculating the straight-line distance between the current path point and the next path point and the change in each joint, and calculating the corresponding number of approximation segments based on the straight-line distance and a preset approximation straight-line length used to control the calculation accuracy; dividing each joint change by the number of approximation segments to obtain the approximation segment change corresponding to the joint variable value of each joint; based on the approximation segment change, sequentially increasing the joint variable value of each joint to obtain multiple approximation segment points, and calculating the straight-line distance between adjacent approximation segment points among the multiple approximation segment points, and accumulating the straight-line distances of the approximation segment points to obtain an approximate value of the motion curve length.

[0063] In actual implementation, under the joint motion equalization strategy, the end-effector trajectory is a curve, and its shape may not meet the requirements, especially when the two points have large differences in posture or large distances, which may lead to collisions. Therefore, it is necessary to properly control the trajectory shape.

[0064] As one possible approach, such as Figure 2 As shown, embodiments of this application can interpolate several points between two points according to a preset spacing value ΔL, thus transforming a larger curve ( Figure 2 The medium-thick line is transformed into multiple small curves. Figure 2 (Medium-thin line); Each interpolation point requires one inverse solution calculation, therefore the choice of ΔL determines the number of interpolation points and the number of inverse solution calculations; compared with the dense interpolation calculations between two points in the linear interpolation function, the number of inverse solution calculations is greatly reduced. Considering that there are no strict requirements for the intermediate trajectory, the inverse solution algorithm does not need strict analytical calculations, but can use some approximate algorithms, which is essential for the inverse solution calculation of robotic arms with high redundant degrees of freedom.

[0065] In the specific implementation process, it is necessary to calculate the length of the end-effector curve between two points under the joint motion equalization strategy. In this embodiment, a linear approximation method can be used for approximate calculation. The length Δd of the approximation line is given to control the accuracy of the approximation. The specific process is as follows:

[0066] 1. Calculate the straight-line distance L between two points;

[0067] 2. Calculate the number of approximation segments N = L / Δd;

[0068] 3. Divide the change of each joint variable between two points by N to obtain the approximate piecewise change of each joint variable.

[0069] 4. Increase each joint variable sequentially according to the change of the approximation segment to obtain the approximation segment point. Calculate the straight-line distance between adjacent approximation segment points and sum them up to obtain the approximate curve length between the two points.

[0070] In summary, the embodiments of this application can greatly reduce the complexity and number of inverse kinematics calculations for application scenarios that only require specifying waypoints and do not have strict requirements for intermediate trajectories, thereby improving computational efficiency. They also balance the motion time of each joint during the movement between waypoints and allow for appropriate control over the shape of the motion trajectory. Furthermore, the embodiments of this application are applicable to application scenarios that only have certain pose accuracy requirements for the endpoint pose, while generally not having special requirements for the pose accuracy of intermediate waypoints, such as motion planning for robotic arms used for handling, loading / unloading, assembly, and maintenance.

[0071] According to the path planning method for robotic arms based on waypoints proposed in this application, by determining all waypoints corresponding to the motion trajectory of the target robotic arm, and using a preset inverse kinematics calculation strategy, the joint variable values ​​corresponding to each joint in the target robotic arm at the current waypoint are calculated, and the distance between the current waypoint and the next waypoint is determined, and it is determined whether the distance is not greater than a preset spacing value; if the distance is not greater than the preset spacing value, then the motion instructions for each joint from the current waypoint to the next waypoint are directly written using a preset joint motion equalization strategy; if the distance is greater than the preset spacing value, then in the current... Interpolation segmentation is performed between the current path point and the next path point to obtain multiple interpolation segments between the current path point and the next path point. The interpolation direction of the target robot arm at the current path point is determined. Based on the interpolation direction and the joint motion equalization strategy, the joint motion instructions for each interpolation segment are written. Each path point except the endpoint is traversed to obtain the joint motion instructions from each path point to the next path point. Based on the joint motion instructions, the target robot arm is controlled to perform the corresponding actions, which can greatly reduce the complexity and number of inverse kinematics calculations and improve computational efficiency.

[0072] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include:

[0073] The memory 301, the processor 302, and the computer program stored on the memory 301 and capable of running on the processor 302.

[0074] When the processor 302 executes the program, it implements the robotic arm path planning method based on waypoints provided in the above embodiments.

[0075] Furthermore, electronic devices also include:

[0076] Communication interface 304 is used for communication between memory 301 and processor 302.

[0077] The memory 301 is used to store computer programs that can run on the processor 302.

[0078] The memory 301 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0079] If the memory 301, processor 302, and communication interface 303 are implemented independently, then the communication interface 303, memory 301, and processor 302 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 3 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0080] Optionally, in a specific implementation, if the memory 301, processor 302, and communication interface 303 are integrated on a single chip, then the memory 301, processor 302, and communication interface 303 can communicate with each other through an internal interface.

[0081] Processor 302 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.

[0082] This application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described robotic arm path planning method based on waypoints.

[0083] This application also provides a computer program product, including a computer program, which, when executed, is used to implement the above-described robotic arm path planning method based on waypoints.

[0084] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0085] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0086] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0087] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0088] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0089] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0090] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0091] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.

Claims

1. A robotic arm path planning method based on waypoints, characterized in that, Includes the following steps: All path points corresponding to the motion trajectory of the target robotic arm are determined. Based on a preset inverse kinematics calculation method, the joint variable values ​​corresponding to each joint in the target robotic arm at the current path point are calculated, and the distance between the current path point and the next path point is determined. It is also determined whether the distance is not greater than a preset spacing value. If the distance is not greater than the preset spacing value, then the joint motion instructions from the current path point to the next path point are directly written through the preset joint motion equalization strategy. If the distance is greater than the preset spacing value, an interpolation segmentation operation is performed between the current path point and the next path point to obtain multiple interpolation segments between the current path point and the next path point, and the interpolation direction of the target robot arm corresponding to the current path point is determined. Based on the interpolation direction and the joint motion equalization strategy, the joint motion instructions in each interpolation segment are written. Traverse all the waypoints except the endpoint to obtain the joint motion commands from each waypoint to the next waypoint, and control the target robotic arm to perform the corresponding actions based on the joint motion commands. Wherein, if the distance is greater than the preset spacing value, an interpolation segmentation operation is performed between the current path point and the next path point to obtain multiple interpolation segments between the current path point and the next path point, and the interpolation direction of the target robotic arm corresponding to the current path point is determined. Based on the interpolation direction and the joint motion equalization strategy, motion commands for each joint within each interpolation segment are written, including: Based on the preset spacing value, the number of interpolation segments between the current path point and the next path point is calculated, and the pose of each interpolation segment point is calculated according to the preset interpolation algorithm and the number of interpolation segments. Determine whether the inverse solution calculation method considers the interpolation direction selection corresponding to the current forward point; If the inverse kinematics calculation method takes into account the interpolation direction selection, then inverse kinematics calculation is performed on two directions: from the current path point to the next path point and from the next path point to the current path point, to obtain the joint variable value of each interpolation segment point in each direction, and the motion curve length of the end point corresponding to each direction is calculated, so as to calculate the motion time corresponding to the two directions according to the preset end motion linear velocity and the motion curve length, and the motion time corresponding to the two directions is compared, so as to select the joint variable value of each interpolation segment point of the direction with the smaller motion time as the final joint variable value; If the inverse kinematics calculation method does not consider the interpolation direction selection, then the pose of the interpolation segment points will be used as the final joint variable value; Based on the final joint variable values, the joint motion commands for each interpolation segment in the plurality of interpolation segments are written sequentially.

2. The method according to claim 1, characterized in that, If the distance is not greater than the preset spacing value, then the joint motion commands from the current path point to the next path point are directly written using a preset joint motion equalization strategy, including: Calculate an approximate value of the length of the motion curve of the target robotic arm from the current path point to the next path point, and calculate the corresponding motion time based on the preset end motion linear velocity and the approximate value; Determine the change in the joint variable value of each joint, and calculate the rotational angular velocity or translational velocity corresponding to the joint variable value of each joint based on the change in the joint variable value of each joint at the current path point and the movement time. Based on the rotational angular velocity or translational velocity corresponding to the joint variable value of each joint, as well as the preset target value or the change amount, and in conjunction with the preset robotic arm motion command specifications, motion commands for each joint from the current path point to the next path point are written.

3. The method according to claim 2, characterized in that, The calculation of the approximate length of the motion curve of the target robotic arm from the current path point to the end of the next path point includes: Calculate the straight-line distance between the current path point and the next path point and the change in each joint, and calculate the corresponding number of approximation segments based on the straight-line distance and the preset approximation line length used to control the calculation accuracy. Divide the change of each joint by the number of approximation segments to obtain the change of the approximation segments corresponding to the joint variable value of each joint; Based on the approximation segment change, the joint variable value of each joint is increased sequentially to obtain multiple approximation segment points. The straight-line distance between adjacent approximation segment points is calculated and accumulated to obtain an approximate value of the motion curve length.

4. An electronic device, characterized in that, include: The memory, the processor, and the computer program stored in the memory and executable on the processor, the processor executing the program to implement the waypoint-based robotic arm path planning method as described in any one of claims 1-3.

5. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the waypoint-based robotic arm path planning method as described in any one of claims 1-3.

6. A computer program product, comprising a computer program, characterized in that, The computer program is executed to implement the waypoint-based robotic arm path planning method as described in any one of claims 1-3.