Trajectory planning method and device, robot and computer readable storage medium

By planning the transition path between robot motion segments, utilizing joint velocity, acceleration, and torque constraints, and combining discretization and weighted information fitting, the instability problem in continuous trajectory motion of multi-motion segments of the robot is solved, and a more stable and smooth transition is achieved.

CN115488898BActive Publication Date: 2026-07-07SHANGHAI JIEKA ROBOT TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI JIEKA ROBOT TECH CO LTD
Filing Date
2022-10-31
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

In existing technologies, robots exhibit poor transition effects during continuous trajectory motion across multiple motion segments, leading to unstable speeds and discontinuous transitions, which affects the robot's normal movement.

Method used

By determining the transition path between the first and second motion segments and performing trajectory planning based on constraint information, including joint velocity, acceleration, and torque constraints, a smooth transition is achieved by fitting the transition path using discretization and weighting information.

Benefits of technology

It improves the stability and smoothness of continuous trajectory motion in multiple motion segments of the robot, reduces abrupt changes in posture and position, and enhances the transition stability of the robot between multiple motion segments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115488898B_ABST
    Figure CN115488898B_ABST
Patent Text Reader

Abstract

This application provides a trajectory planning method, apparatus, robot, and computer-readable storage medium, relating to the field of robotics. The method includes: determining a transition path between a first motion segment and a second motion segment; wherein the first and second motion segments include any one of a linear motion segment, a circular motion segment, and a joint motion segment; and performing trajectory planning on the first motion segment, the second motion segment, and the transition path based on constraint information to obtain a target trajectory; wherein the constraint information includes at least one of joint velocity constraint information, joint acceleration constraint information, and joint torque constraint information of the robot joint. This application can calculate transition paths between various types of motion segments and plan the motion trajectories of multiple motion segments and transition paths based on constraint information during robot joint movement, thereby achieving smooth transitions between various types of motion segments and improving the effectiveness of smooth transitions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field, and more specifically, to a trajectory planning method, apparatus, robot, and computer-readable storage medium. Background Technology

[0002] Robots typically perform point-to-point motion and continuous trajectory motion. Point-to-point motion refers to motion where both the initial and final velocities of a single motion segment are zero. Therefore, in multi-segment work programs, frequent starts and stops are necessary, which not only negatively impacts the robot's lifespan but also reduces its efficiency. To improve efficiency in actual robot operations, at teaching points where precise positioning isn't required, the robot can directly transition to the next trajectory segment without stopping, thus improving the overall cycle time—a feature known as continuous trajectory transition between multi-segment motions. If, between multiple motion segments, trajectory planning is simply performed with a non-zero final velocity between segments, speed jumps will occur at the transition points, causing robot jitter and affecting its normal movement.

[0003] Currently, smooth transition algorithms are commonly used to improve robot speed, reduce the number of deceleration stops, and enable the robot to transition as smoothly as possible without jitter or impact. However, current smooth transition algorithms have poor smoothing effects. In continuous trajectory motion with multiple motion segments, the robot still suffers from unstable speed and discontinuous transitions, making it impossible for the robot to perform effective smooth transitions between multiple motion segments. Summary of the Invention

[0004] In view of this, the purpose of this application is to provide a trajectory planning method, device, robot, and computer-readable storage medium to improve the problem of poor transition effect when a robot performs continuous trajectory motion with multiple motion segments in the prior art.

[0005] To address the aforementioned problems, in a first aspect, embodiments of this application provide a trajectory planning method, the method comprising:

[0006] Determine the transition path between the first motion segment and the second motion segment; wherein the first motion segment and the second motion segment include any one of the following: linear motion segment, circular motion segment, and joint motion segment;

[0007] Based on the constraint information, trajectory planning is performed on the first motion segment, the second motion segment, and the transition path to obtain the target trajectory; wherein, the constraint information includes at least one of the following: joint velocity constraint information, joint acceleration constraint information, and joint torque constraint information of the robot joint.

[0008] In the above implementation process, when transitioning between various types of motion segments in different trajectory planning spaces, the transition path between the two can be calculated based on the first motion segment before the transition and the second motion segment after the transition. This reduces the adverse effects of discontinuity and speed instability caused by commanded speed and acceleration during robot transition. The constraints on robot joints in the motion segment are converted into constraint information for the path, enabling trajectory planning for the first motion segment before the transition, the transition path during the transition, and the second motion segment after the transition, resulting in a target trajectory that allows for a smooth transition. This approach enables smooth and stable transitions between various types of motion segments in different trajectory planning spaces, expanding the range of transitions and making it suitable for various transition situations. It also effectively reduces jumps in robot posture and position during transitions, thereby improving the smoothness of transitions in continuous trajectory motions with multiple motion segments and enhancing the stability of continuous trajectory motions with multiple motion segments.

[0009] Optionally, determining the transition path between the first motion segment and the second motion segment includes:

[0010] The first motion segment and the second motion segment are discretized to obtain multiple discrete points; wherein, the discrete points represent the position and pose of the robot joint in the joint coordinate space;

[0011] The transition discrete point among the plurality of discrete points is determined based on the transition parameters;

[0012] The transition path is obtained by fitting the weight information of the transition discrete points.

[0013] In the above implementation process, when obtaining the transition path between the first and second motion segments, to reduce the adverse effects of commanded velocity and acceleration on the path, the motion segments can be discretized to determine discrete points that characterize the position and pose of the robot joints in the joint coordinate space. Based on the range determined by the transition parameters, transition discrete points are determined from among these discrete points. By combining the weight information of these transition discrete points, a smooth transition path is obtained. This ensures a smoother transition path that does not exhibit adverse changes with velocity variations, thereby reducing instability and discontinuity during the transition and improving the accuracy and stability of the transition path.

[0014] Optionally, the discretization of the first motion segment and the second motion segment to obtain multiple discrete points includes:

[0015] Obtain motion information of the first motion segment or the second motion segment; wherein, the motion information includes at least one of: start point, end point, motion segment distance, and direction vector;

[0016] Determine the discrete parameters of the first motion segment or the second motion segment; wherein the discrete parameters include discrete point interval and / or discrete progress.

[0017] Based on the discrete parameters and the motion information, multiple discrete points in the joint coordinate space are determined.

[0018] In the above implementation process, during discretization, the specific motion information within the motion segment can be processed, and combined with the corresponding discrete parameters of the motion segment, various types of motion segments in different planning spaces, such as Cartesian coordinate space and joint coordinate space, are converted into discrete points in joint coordinate space. This achieves a smooth transition between various motion segments in different trajectory planning spaces. Unifying the discretization of multiple types of motion segments into discrete points in joint coordinate space allows for the acquisition of the robot's joint position and pose at that position. This enables the combination of the robot's path during movement with the robot's joint motion, improving the uniformity and accuracy of the discrete points.

[0019] Optionally, the first motion segment or the second motion segment is the linear motion segment or the circular motion segment, and determining the plurality of discrete points in the joint coordinate space based on the discrete parameters and the motion information includes:

[0020] Based on the discrete progress, the distance of the motion segment, and the direction vector, determine the pose data of the first motion segment or the second motion segment in the Cartesian coordinate space;

[0021] The pose data is subjected to inverse kinematics processing to determine multiple discrete points of the robot joint in the joint coordinate space.

[0022] In the above implementation process, when the first or second motion segment includes a linear motion segment or a circular motion segment in Cartesian coordinate space, in order to perform unified discretization processing, discretization processing in Cartesian coordinate space can be performed first. Based on the discrete parameters and motion information, the pose data of each robot joint in Cartesian coordinate space is determined. Then, through inverse kinematics processing, the pose in Cartesian coordinate space is converted into position and pose in joint coordinate space, thereby obtaining multiple corresponding discrete points. This can quickly and accurately convert multiple pose data in the motion segment corresponding to Cartesian coordinate space into discrete points in joint coordinate space, thereby enabling smoothing of the transition between linear motion segments and joint motion segments, or circular motion segments and joint motion segments, i.e., between various motion segments in Cartesian coordinate space and joint coordinate space. This achieves trajectory planning between different motion segments in different planning spaces, effectively expanding the range of trajectory planning during transitions and making it applicable to more transition scenarios.

[0023] Optionally, determining the transition discrete point among the plurality of discrete points based on the transition parameter includes:

[0024] Based on the preset transition parameters, a first transition segment in the first motion segment and a second transition segment in the second motion segment are determined; wherein the first transition segment and the second transition segment intersect.

[0025] The discrete points are selected from the discrete points in the first transition segment and the second transition segment as the transition discrete points.

[0026] In the above implementation process, the two motion segments are separately extracted using preset transition parameters to determine the intersecting transition segment. Based on this transition segment, multiple discrete points within the two motion segments are then selected, with the discrete points contained within the transition segment serving as the transition discrete points during the transition. By limiting the range of the transition discrete points, the effectiveness and accuracy of the transition discrete points are effectively improved.

[0027] Optionally, the fitting based on the weight information of the transition discrete points to obtain the transition path includes:

[0028] Path parameters are determined based on the multiple discrete points;

[0029] Based on the transition requirements, determine the weight information for each of the transition discrete points;

[0030] The transition path is obtained by fitting multiple discrete transition points based on the path parameters and the weight information.

[0031] In the above implementation process, during fitting, corresponding path parameters can be determined based on discrete points to characterize the specific situation of each discrete point. To enable the robot to make smooth transitions instead of directly turning at discrete points of the motion segment, the weight information of each transition discrete point can be determined based on whether the transition requires passing through each discrete point. This weight information distinguishes the path during a smooth transition from the actual turning point, allowing for fitting of multiple transition discrete points using both path parameters and weight information to obtain a smooth transition path. By setting weight information, the path of the original transition segment between two motion segments can be modified to obtain a smooth transition path, thus achieving smooth transitions between multiple motion segments.

[0032] Optionally, the step of performing trajectory planning on the first motion segment, the second motion segment, and the transition path based on constraint information to obtain the target trajectory includes:

[0033] Based on the constraints of the first motion segment and the second motion segment, the constraint information of the path parameters is determined;

[0034] The parameter values ​​corresponding to each discrete point in the initial trajectory are determined based on the constraint information; wherein, the initial trajectory is a trajectory composed of the first motion segment, the transition path, and the second motion segment;

[0035] Multiple target joint information is determined based on multiple parameter values ​​to obtain the target trajectory including the multiple target joint information; wherein, the target joint information includes target joint position and target joint pose.

[0036] In the above implementation process, during trajectory planning, the constraints set for motion segments can be converted into constraints on path parameters, that is, the constraints set for motion segments are converted into constraints on each discrete point. Under the constraints of multiple constraints, the parameter values ​​of the path parameters corresponding to each discrete point in the initial trajectory composed of the first motion segment, the second motion segment, and the transition path are determined. Then, based on the relationship between the path parameters and the joint positions and poses, the target joint information including position and pose is determined, thus obtaining a target trajectory composed of multiple target joint information. This allows for the determination of a high-speed and stable target trajectory under constraints, reducing the disadvantages such as discontinuous and unstable speeds and jumps in posture and position during transitions when the robot moves along the target trajectory. This enables the robot to smoothly and stably achieve continuous trajectory motion of multiple motion segments, improving the stability of the robot's continuous trajectory motion of multiple motion segments.

[0037] Secondly, embodiments of this application provide a trajectory planning device, the device comprising:

[0038] A transition module is used to determine the transition path between the first motion segment and the second motion segment; wherein the first motion segment and the second motion segment include any one of the following: a linear motion segment, a circular motion segment, and a joint motion segment;

[0039] The planning module is used to plan the trajectory of the first motion segment, the second motion segment, and the transition path according to the constraint information to obtain the target trajectory; wherein, the constraint information includes at least one of the following: joint velocity constraint information, joint acceleration constraint information, and joint torque constraint information of the robot joint.

[0040] Thirdly, this application also provides a robot, which includes a memory and a processor. The memory stores program instructions, and when the processor reads and runs the program instructions, it executes the steps in any of the above-described implementations of the trajectory planning method.

[0041] Fourthly, embodiments of this application also provide a computer-readable storage medium storing computer program instructions, which, when read and executed by a processor, perform steps in any of the above-described implementations of the trajectory planning method.

[0042] In summary, this application provides a trajectory planning method, apparatus, robot, and computer-readable storage medium. By calculating the transition paths between various types of motion segments and planning the motion trajectories of multiple motion segments and transition paths based on the constraint information during robot joint movement, a smooth transition between various types of motion segments is achieved, improving the effect of smooth transition. Attached Figure Description

[0043] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0044] Figure 1 A flowchart illustrating a trajectory planning method provided in an embodiment of this application;

[0045] Figure 2 A detailed flowchart of step S100 provided for an embodiment of this application;

[0046] Figure 3 A detailed flowchart of step S110 provided for an embodiment of this application;

[0047] Figure 4 A detailed flowchart of step S113 provided for an embodiment of this application;

[0048] Figure 5 A detailed flowchart of step S120 provided for an embodiment of this application;

[0049] Figure 6 A schematic diagram illustrating the intersection of a first motion segment and a second motion segment, provided for an embodiment of this application;

[0050] Figure 7 A detailed flowchart of step S130 provided for an embodiment of this application;

[0051] Figure 8 A detailed flowchart of step S200 provided for an embodiment of this application;

[0052] Figure 9A comparison diagram of a target trajectory and an initial trajectory provided for an embodiment of this application;

[0053] Figure 10 This is a schematic diagram of the structure of a trajectory planning device provided in an embodiment of this application.

[0054] Icons: 123 - First motion segment; 124 - Second motion segment; 125 - Connection point; 126 - First transition point; 127 - Second transition point; 128 - First transition segment; 129 - Second transition segment; 241 - Initial trajectory; 242 - Target trajectory; 243 - Joint motion segment; 244 - Linear motion segment; 245 - Transition path; 300 - Trajectory planning device; 310 - Transition module; 320 - Planning module. Detailed Implementation

[0055] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of the embodiments of this application.

[0056] Currently used smooth transition algorithms have several limitations. Some are unsuitable for transitions between motion segments in different planning spaces, some fail to guarantee velocity continuity at transition points, and some have transition paths that vary with the velocity and acceleration of the motion segment. Furthermore, when transitioning between multiple segments, the robot is also affected by commanded velocity and acceleration, leading to unstable velocity, discontinuous transitions, and abrupt changes in posture and position due to velocity and other issues. These factors prevent the robot from achieving effective smooth transitions between multiple motion segments.

[0057] Therefore, in order to solve the above problems, this application provides a trajectory planning method for use in robots. The robots can be of various types, including but not limited to six-axis robots, seven-axis robots, etc.

[0058] Optionally, the robot may include a memory, a memory controller, a processor, etc. The components and structure of the robot can be configured according to the actual situation.

[0059] The aforementioned memory, storage controller, and processor are electrically connected directly or indirectly to enable data transmission or interaction. For example, these components can be electrically connected via one or more communication buses or signal lines. The processor is used to execute executable modules stored in the memory.

[0060] The memory can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), and Electrically Erasable Programmable Read-Only Memory (EEPROM). The memory stores programs, and after receiving execution instructions, the processor executes the programs. The method executed by the robot as defined in any embodiment of this application can be applied to the processor or implemented by the processor.

[0061] The aforementioned processor may be an integrated circuit chip with signal processing capabilities. It can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a digital signal processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor.

[0062] Optionally, this method can also be applied to electronic devices connected to and used to control the robot. These electronic devices can be servers, personal computers (PCs), tablets, smartphones, personal digital assistants (PDAs), or other electronic devices with logic computing capabilities. They can connect to the robot via networks, Bluetooth, or other means to control the robot's movement.

[0063] The robot in this embodiment can be used to execute various steps in the trajectory planning methods provided in the embodiments of this application. The implementation process of the trajectory planning methods is described in detail below through several embodiments.

[0064] Please see Figure 1 , Figure 1 This is a flowchart illustrating a trajectory planning method provided in an embodiment of this application. The method may include steps S100-S200.

[0065] Step S100: Determine the transition path between the first motion segment and the second motion segment.

[0066] During the transition, the first motion segment can be the motion segment before the transition, and the second motion segment can be the motion segment after the transition. The transition path between the two can be calculated based on the first motion segment before the transition and the second motion segment after the transition, thereby reducing the adverse effects of discontinuity and speed instability caused by the command speed and command acceleration during the robot's transition.

[0067] Optionally, linear motion, circular motion, and joint motion are the three commonly used motion types for robots to execute work programs. Linear motion refers to the trajectory of the robot tool's end effector being a straight line in Cartesian coordinate space, while circular motion refers to the trajectory of the robot tool's end effector being an arc in Cartesian coordinate space. Trajectory planning for linear and circular motions is usually completed in Cartesian coordinate space. Joint motion refers to the trajectory planning motion performed by the robot in joint coordinate space, where the trajectory of the robot tool's end effector is unpredictable. Cartesian coordinate space can include rectangular coordinate systems and oblique coordinate systems, while joint coordinate space can include all joint vectors in the robot. For example, the end effector pose of a robot arm with n degrees of freedom is determined by n joint variables, which are collectively called n-dimensional joint vectors and can be represented by q.

[0068] Therefore, correspondingly, the first motion segment before the transition and the second motion segment after the transition in this application may include motion segments corresponding to various types of motion, such as linear motion segments, circular motion segments, and joint motion segments.

[0069] Under these three motion types, the transition types between motion segments can include the following: joint motion segment to joint motion segment; joint motion segment to linear motion segment; joint motion segment to circular motion segment; linear motion segment to linear motion segment; linear motion segment to joint motion segment; linear motion segment to circular motion segment; circular motion segment to circular motion segment; circular motion segment to joint motion segment; and circular motion segment to linear motion segment. It can smoothly transition between various types of motion segments in Cartesian coordinate space and joint coordinate space, realizing transitions between Cartesian coordinate spaces, between joint coordinate spaces, and between Cartesian coordinate spaces and joint coordinate spaces, thus expanding the range of transitions and making it suitable for a variety of different transition situations.

[0070] Step S200: Based on the constraint information, perform trajectory planning for the first motion segment, the second motion segment, and the transition path to obtain the target trajectory.

[0071] The constraint information may include at least one of the following: joint velocity constraint information, joint acceleration constraint information, and joint torque constraint information of the robot joint. The constraints on the robot joints in the motion segment are converted into constraint information for the path, so as to perform trajectory planning for the first motion segment before the transition, the transition path during the transition, and the second motion segment after the transition, to obtain a target trajectory that can transition smoothly.

[0072] exist Figure 1 In the illustrated embodiment, the jumps in posture and position during robot transitions are effectively reduced, thereby improving the smoothness of transitions during continuous trajectory motion of the robot in multiple motion segments, and thus improving the stability of continuous trajectory motion of the robot in multiple motion segments.

[0073] Optionally, please refer to Figure 2 , Figure 2 This is a detailed flowchart of step S100 provided in an embodiment of the present application. Step S100 may include steps S110-S130.

[0074] Step S110: Discretize the first motion segment and the second motion segment to obtain multiple discrete points.

[0075] In order to reduce the adverse effects of command speed and command acceleration on the path when obtaining the transition path between the first motion segment and the second motion segment, the two motion segments can be discretized to determine multiple discrete points. The discrete points represent the position and pose of the robot joint in the joint coordinate space.

[0076] Step S120: Determine the transition discrete point among multiple discrete points based on the transition parameters.

[0077] When a smooth transition is required between motion segments, a non-zero smooth transition parameter can be set according to the specific requirements of the transition and the specific situation of the motion segment. Then, the transition discrete point is obtained by filtering multiple discrete points based on the transition parameter.

[0078] Step S130: Fit the transition path based on the weight information of the transition discrete points.

[0079] Among them, the weight information of the transition discrete point is the information that characterizes the error between the fitted value and the true value of the discrete point. By combining the weight information of the transition discrete point, it is possible to determine whether the fitting will pass through the transition discrete point and reduce the influence of speed change, thereby fitting the corresponding transition path.

[0080] exist Figure 2 In the illustrated embodiment, the transition path is fitted based on the weight information of discrete points during the transition, so that the transition path is smoother and does not change adversely with speed variations. This reduces various adverse conditions such as speed instability and discontinuity during the transition, and improves the accuracy and stability of the transition path.

[0081] Optionally, please refer to Figure 3 , Figure 3 This is a detailed flowchart of step S110 provided in an embodiment of the present application. Step S110 may include steps S111-S113.

[0082] Step S111: Obtain motion information of the first motion segment or the second motion segment.

[0083] The motion information can include various data related to the motion segment, such as the starting point, ending point, distance of the motion segment, and direction vector. For example, taking a straight-line motion segment, the motion information can include the starting point, ending point, Cartesian distance of the motion segment, and unit direction vector. Based on the motion trajectory of the motion segment, calculations can be performed in the coordinate system of the corresponding planning space to obtain various types of motion information.

[0084] Step S112: Determine the discrete parameters of the first motion segment or the second motion segment.

[0085] The discrete parameters include discrete point interval and / or discrete progress. The discrete point interval and discrete progress can be set according to the needs of discrete processing and the actual situation of the motion segment. For example, when the motion segment is long, the discrete point interval can be set to a larger interval, and when the motion segment is short, the discrete point interval can be set to a shorter interval. When starting discrete processing, the discrete progress can be set to 0 to facilitate processing.

[0086] Step S113: Based on discrete parameters and motion information, determine multiple discrete points in the joint coordinate space.

[0087] This involves processing the specific motion information within the motion segment in conjunction with the corresponding discrete parameters of the motion segment, converting various types of motion segments in different planning spaces, such as Cartesian coordinate space and joint coordinate space, into discrete points in joint coordinate space, thereby achieving a smooth transition between various motion segments in different trajectory planning spaces.

[0088] exist Figure 3In the illustrated embodiment, the discrete processing of various types of motion segments can be uniformly converted into discrete points in the joint coordinate space, which can acquire the position of the robot joint and its pose at that position, so as to combine the robot's path during movement with the robot's joint movement, thereby improving the uniformity and accuracy of the discrete points.

[0089] Optionally, please refer to Figure 4 , Figure 4 This is a detailed flowchart of step S113 provided in an embodiment of the present application. Step S113 may include steps S1131-S1132.

[0090] Step S1131: Determine the pose data of the first or second motion segment in Cartesian coordinate space based on the discrete progress, motion segment distance, and direction vector.

[0091] When the first or second motion segment is a linear motion segment or a circular motion segment, which involves the discretization of motion segments in Cartesian coordinate space, the discretization can be performed first in Cartesian coordinate space to obtain the pose data of multiple points in Cartesian coordinate space.

[0092] Optionally, during discretization, the discrete progress and the distance of the motion segment can be compared to determine whether discretization can be performed. If the discrete progress is greater than the distance of the motion segment, the discrete progress is reset to be equal to the distance of the motion segment; if the discrete progress is less than or equal to the distance of the motion segment, the pose data of discrete points of multiple joints in Cartesian coordinate space are calculated based on the discrete progress, the distance of the motion segment, and the direction vector.

[0093] Step S1132: Perform inverse kinematics processing on the pose data to determine multiple discrete points of the robot joints in the joint coordinate space.

[0094] Specifically, by performing inverse kinematics calculations on the pose data of multiple discrete points in Cartesian coordinate space, the data in Cartesian coordinate space can be converted into data in joint coordinate space, resulting in multiple discrete points of the robot joints in joint coordinate space, each containing both position and pose. For example, in a six-axis robot, the obtained discrete points can be represented as: q discrete =[q1, q2, q3, q4, q5, q6].

[0095] Alternatively, when discretizing the joint coordinate space, the discretization can be performed directly in the joint coordinate space to obtain the corresponding discrete points.

[0096] exist Figure 4In the illustrated embodiment, the transition between various motion segments in Cartesian coordinate space and joint coordinate space can be smoothed, enabling trajectory planning between different motion segments in different planning spaces. This effectively expands the range of trajectory planning during transitions and is applicable to more transition scenarios.

[0097] Optionally, please refer to Figure 5 , Figure 5 This is a detailed flowchart of step S120 provided in an embodiment of the present application. Step S120 may include steps S121-S122.

[0098] Step S121: Determine the first transition segment in the first motion segment and the second transition segment in the second motion segment according to the preset transition parameters.

[0099] When the first and second movement segments need to transition, they intersect at a certain point, which can be used as the connection point between the movement segments. The preset transition parameter can be a proportional data, such as 0.25, which means that the transition point of the movement segment is located at a distance of 0.25 times the total length of the movement segment from the connection point. Thus, the road segment between the transition point and the connection point is used as the first transition segment and the second transition segment in the first and second movement segments, respectively, and the first transition segment and the second transition segment intersect at the connection point.

[0100] Optionally, please refer to Figure 6 , Figure 6 This is a schematic diagram of the intersection of a first motion segment and a second motion segment provided in an embodiment of this application. Taking a linear motion segment as an example, the first motion segment 123 and the second motion segment 124 in the figure intersect at the connection point 125. Based on the first transition point 126 and the second transition point 127 determined by the transition parameters, the first transition segment 128 between the first transition point 126 and the connection point 125 in the first motion segment 123 and the second transition segment 129 between the second transition point 127 and the connection point 125 in the second motion segment 124 are determined.

[0101] Step S122: Select multiple discrete points and use the discrete points in the first transition segment and the second transition segment as transition discrete points.

[0102] In this process, multiple discrete points in the two motion segments are selected based on the transition segment, and the discrete points contained in the transition segment are used as the transition discrete points during the transition.

[0103] exist Figure 5 In the illustrated embodiment, by limiting the range of the transition discrete points, the effectiveness and accuracy of the transition discrete points are effectively improved.

[0104] Optionally, please refer to Figure 7 , Figure 7 This is a detailed flowchart of step S130 provided in an embodiment of the present application. Step S130 may include steps S131-S133.

[0105] Step S131: Determine the path parameters based on multiple discrete points.

[0106] In the process of discretization, the corresponding path parameters can be determined to describe the discrete points of each robot joint.

[0107] Optionally, the path parameter s can be set as a piecewise cubic polynomial to describe the situation of discrete points from multiple aspects such as velocity, acceleration, and torque.

[0108] Step S132: Determine the weight information of each transition discrete point according to the transition requirements.

[0109] Since the path parameters strictly pass through every discrete point when describing the path, appropriate weight information can be set according to the transition requirements to ensure a smooth transition. The transition requirements can be used to determine whether data from a particular transition discrete point needs to be passed through. For example, the probability of passing through the first discrete point is 0.5, and the probability of passing through the second discrete point is 0.8, determining the probability values ​​for whether to pass through each discrete point during the transition. Therefore, based on the transition requirements, weight information representing the error between the fitted value and the true value at the transition discrete point is set.

[0110] For example, the greater the weight information, the smaller the error between the fitted value representing the transition discrete point and the true value, and the higher the probability of passing through that transition discrete point.

[0111] Step S133: Fit multiple transition discrete points based on path parameters and weight information to obtain the transition path.

[0112] In order to achieve a smooth transition, a smaller weight range can be set so that the weight information corresponding to multiple transition discrete points is within this weight range. By substituting the smaller weight information into the path parameters for fitting, the original transition segment in the two motion segments can be modified to obtain a smoother transition path.

[0113] For example, when fitting a sequence x to a discrete point y, the expression for the function that minimizes the path parameters is as follows:

[0114]

[0115] Where n represents the number of transition discrete points, w(j) represents the weight of the j-th transition discrete point, y(j) represents the value of the j-th transition discrete point, x(j) represents the x-value corresponding to the j-th transition discrete point, f(x(j)) represents the fitted value corresponding to y(j), and D 2 f(t) represents the second derivative of f, and p represents the smoothness of the fitting effect, i.e., the smoothness coefficient. The smoothness coefficient can be selected and adjusted according to the transition requirements and actual situation.

[0116] exist Figure 7 In the illustrated embodiment, by setting weight information, the original transition path of the two motion segments is modified to obtain a smooth transition path, thereby achieving a smooth transition between multiple motion segments.

[0117] Optionally, please refer to Figure 8 , Figure 8 This is a detailed flowchart of step S200 provided in an embodiment of the present application. Step S200 may include steps S210-S230.

[0118] Step S210: Determine the constraint information of the path parameters based on the constraints of the first motion segment and the second motion segment.

[0119] This allows the acquisition of the original constraints set for the motion segment, such as joint velocity constraints, joint acceleration constraints, and joint torque constraints. These constraints are then converted into constraint information for the path parameter s.

[0120] Step S220: Determine the parameter values ​​corresponding to each discrete point in the initial trajectory based on the constraint information.

[0121] The initial trajectory is composed of the first motion segment, the transition path, and the second motion segment.

[0122] It should be noted that the initial trajectory does not include all discrete points in the first and second motion segments, but rather includes discrete points from the starting point of the first and second motion segments to the transition point, as well as transition discrete points in the transition path.

[0123] By substituting various constraint information into the path parameter S, the joint position, velocity, and acceleration of each discrete point can all be represented by the path parameter S.

[0124]

[0125] Where q'(s) represents the first derivative with respect to the path parameters. Let q″(s) represent the path velocity, and let q″(s) represent the second derivative with respect to the path parameters. q represents path acceleration, and q represents joint position. Indicates joint velocity. This represents joint acceleration. After obtaining the relationship between joint variables and path parameters, the constraints in the joint space, such as joint velocity constraints, joint acceleration constraints, and joint torque constraints, can be transformed into constraints on the path parameters and their derivatives, i.e., constraint information. For example, the joint velocity constraint information can be expressed as... Joint acceleration constraint information can be represented as Joint torque constraint information can be represented as [τ] min , τ max ].

[0126] For example, under the constraints of joint velocity constraints, the allowable range of derivatives of path parameters is as follows:

[0127]

[0128] Under the constraint of joint acceleration information, the allowable range of the path derivative is as follows:

[0129]

[0130] Under the constraints of joint moment constraints, the expression for path parameter constraints is:

[0131]

[0132] Where A is the inertia matrix in the robot dynamics equations, B is the Coriolis force and centripetal force matrix, and f is the gravitational torque in the robot dynamics equations. Calculations can be performed based on various constraints on path parameters. An optimized solution method is used to find the maximum path velocity at each discrete point that satisfies all constraints, thereby further increasing the robot's motion speed while ensuring a smooth transition. The parameter value corresponding to the path parameter s is then determined based on the maximum path velocity.

[0133] Step S230: Determine multiple target joint information based on multiple parameter values ​​to obtain a target trajectory including multiple target joint information.

[0134] The target joint information includes the target joint position and the target joint pose. Based on the relationship between path parameters and joint positions, and by combining piecewise cubic polynomial calculations, the target joint information for each discrete point can be obtained, thereby enabling trajectory planning and yielding a target trajectory that includes multiple key target information.

[0135] Optionally, when calculating the target joint information, the calculation order can be determined according to the actual position of the discrete points, thereby planning multiple discrete points.

[0136] Optionally, since the robot's motion and trajectory planning are carried out simultaneously, when planning the trajectory, if the planning of the first motion segment before the transition has exceeded the transition point in the first motion segment, the planning can be abandoned and the robot can move directly with the original trajectory of the first motion segment. If the robot has not exceeded the transition point in the first motion segment, the robot can move with the planned target trajectory.

[0137] Optionally, during transitions from joint motion to joint motion segments, stopping at the transition point between joint motion segments can be effectively avoided. Similarly, during transitions from joint motion to linear motion segments, stopping at the transition point between joint motion and linear motion segments can be avoided. During transitions from joint motion to circular motion segments, stopping at the transition point between joint motion and circular motion segments can also be avoided. Furthermore, during transitions from linear motion to circular motion segments, a continuous circular arc trajectory can be obtained. This improves the robot's operational efficiency, and the continuous motion linear velocity curve is smooth and without jumps. When modifying joint motion speed and acceleration, the planned target trajectory remains the same, thus unaffected by commanded speed and acceleration.

[0138] Optionally, please refer to Figure 9 , Figure 9 This is a comparison diagram of a target trajectory and an initial trajectory provided in an embodiment of this application. Figure 9 The figure illustrates an initial trajectory 241 and a target trajectory 242 for the transition between joint motion and linear motion segments. The initial trajectory 241 and the target trajectory 242 respectively include a joint motion segment 243 for the joint motion and a linear motion segment 244 for the linear motion. The initial trajectory 241 is a solid line, and the target trajectory 242 is a dashed line. As can be seen from the figure, the initial trajectory before smoothing is a point-to-point joint motion trajectory, requiring movement to the corresponding point to transition between motion segments. After trajectory planning, the target trajectory 242 can transition smoothly via a transition path 245, thus achieving a smooth transition between joint motion and linear motion segments and improving the smooth transition effect.

[0139] exist Figure 8 In the illustrated embodiment, a high-speed and stable target trajectory can be determined under constraints, reducing the disadvantages such as discontinuity and instability of the robot's speed when moving along the target trajectory, as well as the jumps in posture and position during transitions. This enables the robot to smoothly and stably achieve continuous trajectory motion of multiple motion segments, thereby improving the stability of the robot's continuous trajectory motion of multiple motion segments.

[0140] Please see Figure 10 , Figure 10 This is a schematic diagram of a trajectory planning device provided in an embodiment of this application. The trajectory planning device 300 is installed in a robot or an electronic device connected to the robot, and may include:

[0141] The transition module 310 is used to determine the transition path between the first motion segment and the second motion segment; wherein the first motion segment and the second motion segment include any one of the following: linear motion segment, circular motion segment, and joint motion segment;

[0142] The planning module 320 is used to plan the trajectory of the first motion segment, the second motion segment, and the transition path according to the constraint information to obtain the target trajectory; wherein, the constraint information includes at least one of the following: joint velocity constraint information, joint acceleration constraint information, and joint torque constraint information of the robot joint.

[0143] In an optional implementation, the transition module 310 may further include a discrete submodule, a filtering submodule, and a fitting submodule;

[0144] The discrete submodule is used to discretize the first motion segment and the second motion segment to obtain multiple discrete points; where the discrete points represent the position and pose of the robot joint in the joint coordinate space.

[0145] The filtering submodule is used to determine the transition discrete point among multiple discrete points based on the transition parameters.

[0146] The fitting submodule is used to fit the transition path based on the weight information of the transition discrete points.

[0147] In an optional implementation, the discrete submodule may further include an acquisition unit, a determination unit, and a processing unit;

[0148] The acquisition unit is used to acquire motion information of a first motion segment or a second motion segment; wherein the motion information includes at least one of: starting point, ending point, motion segment distance, and direction vector;

[0149] A determining unit is used to determine the discrete parameters of the first motion segment or the second motion segment; wherein, the discrete parameters include the discrete point interval and / or the discrete progress.

[0150] The processing unit is used to determine multiple discrete points in the joint coordinate space based on discrete parameters and motion information.

[0151] In an optional implementation, the processing unit may further include a pose subunit and a transformation subunit;

[0152] The pose sub-unit is used to determine the pose data of the first or second motion segment in the Cartesian coordinate space based on the discrete progress, motion segment distance, and direction vector.

[0153] The transformation subunit is used to perform inverse kinematics processing on the pose data to determine multiple discrete points of the robot joints in the joint coordinate space.

[0154] In an optional implementation, the filtering submodule is further configured to determine a first transition segment in the first motion segment and a second transition segment in the second motion segment according to preset transition parameters; wherein the first transition segment and the second transition segment intersect; and to filter multiple discrete points, using the discrete points in the first transition segment and the second transition segment as transition discrete points.

[0155] In an optional implementation, the fitting submodule may further include a parameter unit, a weight unit, and a fitting unit;

[0156] The parameter unit is used to determine path parameters based on multiple discrete points;

[0157] The weighting unit is used to determine the weight information of each transition discrete point according to the transition requirements.

[0158] The fitting unit is used to fit multiple discrete transition points based on path parameters and weight information to obtain the transition path.

[0159] In an optional implementation, the planning module 320 may further include a constraint submodule and a determination submodule;

[0160] The constraint submodule is used to determine the constraint information of the path parameters based on the constraint conditions of the first motion segment and the second motion segment; and to determine the parameter values ​​corresponding to each discrete point in the initial trajectory based on the constraint information; wherein, the initial trajectory is the trajectory composed of the first motion segment, the transition path and the second motion segment;

[0161] The determination submodule is used to determine the information of multiple target joints based on multiple parameter values, and obtain the target trajectory including the information of multiple target joints; wherein, the target joint information includes the target joint position and the target joint pose.

[0162] Since the principle of the trajectory planning device 300 in this embodiment is similar to that of the aforementioned trajectory planning method embodiment, the implementation of the trajectory planning device 300 in this embodiment can refer to the description in the above-mentioned trajectory planning method embodiment, and the repeated parts will not be repeated.

[0163] This application also provides a computer-readable storage medium storing computer program instructions. When the computer program instructions are read and executed by a processor, they perform the steps of any of the trajectory planning methods provided in this embodiment.

[0164] In summary, the embodiments of this application provide a trajectory planning method, device, robot, and computer-readable storage medium. By calculating the transition paths between various types of motion segments and planning the motion trajectories of multiple motion segments and transition paths based on the constraint information during robot joint movement, a smooth transition between various types of motion segments is achieved, improving the effect of smooth transition.

[0165] In the several embodiments provided in this application, it should be understood that the disclosed device can also be implemented in other ways. The device embodiments described above are merely illustrative; for example, the block diagrams in the accompanying drawings illustrate the possible architecture, functions, and operations of the device according to various embodiments of this application. In this regard, each block in the block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram, and combinations of block diagrams, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0166] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0167] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0168] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0169] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

[0170] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. A trajectory planning method, characterized in that, The method includes: Determine the transition path between the first motion segment and the second motion segment; wherein the first motion segment and the second motion segment include any one of the following: linear motion segment, circular motion segment, and joint motion segment; Based on the constraint information, trajectory planning is performed on the first motion segment, the second motion segment, and the transition path to obtain the target trajectory; wherein, the constraint information includes at least one of the following: joint velocity constraint information, joint acceleration constraint information, and joint torque constraint information of the robot joint; Determining the transition path between the first motion segment and the second motion segment includes: discretizing the first motion segment and the second motion segment to obtain multiple discrete points; wherein, the discrete points represent the position and pose of the robot joint in the joint coordinate space; determining the transition discrete point among the multiple discrete points according to the transition parameters; and fitting the transition path based on the weight information of the transition discrete points; wherein, the transition parameters are non-zero parameters set based on the transition requirements and the cases of the first motion segment and the second motion segment, and the weight information is information representing the error between the fitted value and the true value of the transition discrete point.

2. The method according to claim 1, characterized in that, The discretization process of the first motion segment and the second motion segment yields multiple discrete points, including: Obtain motion information of the first motion segment or the second motion segment; wherein, the motion information includes at least one of: start point, end point, motion segment distance, and direction vector; Determine the discrete parameters of the first motion segment or the second motion segment; wherein the discrete parameters include discrete point interval and / or discrete progress. Based on the discrete parameters and the motion information, multiple discrete points in the joint coordinate space are determined.

3. The method according to claim 2, characterized in that, The first motion segment or the second motion segment is the linear motion segment or the circular motion segment. The step of determining multiple discrete points in the joint coordinate space based on the discrete parameters and the motion information includes: Based on the discrete progress, the distance of the motion segment, and the direction vector, determine the pose data of the first motion segment or the second motion segment in the Cartesian coordinate space; The pose data is subjected to inverse kinematics processing to determine multiple discrete points of the robot joint in the joint coordinate space.

4. The method according to any one of claims 1-3, characterized in that, The step of determining the transition discrete point among the plurality of discrete points based on the transition parameter includes: Based on the preset transition parameters, a first transition segment in the first motion segment and a second transition segment in the second motion segment are determined; wherein the first transition segment and the second transition segment intersect. The discrete points are selected from the discrete points in the first transition segment and the second transition segment as the transition discrete points.

5. The method according to any one of claims 1-3, characterized in that, The process of fitting the transition path based on the weight information of the transition discrete points includes: Path parameters are determined based on the multiple discrete points; Based on the transition requirements, determine the weight information for each of the transition discrete points; The transition path is obtained by fitting multiple discrete transition points based on the path parameters and the weight information.

6. The method according to claim 5, characterized in that, The step of performing trajectory planning on the first motion segment, the second motion segment, and the transition path based on constraint information to obtain the target trajectory includes: Based on the constraints of the first motion segment and the second motion segment, the constraint information of the path parameters is determined; The parameter values ​​corresponding to each discrete point in the initial trajectory are determined based on the constraint information; wherein, the initial trajectory is a trajectory composed of the first motion segment, the transition path, and the second motion segment; Multiple target joint information is determined based on multiple parameter values ​​to obtain the target trajectory including the multiple target joint information; wherein, the target joint information includes target joint position and target joint pose.

7. A trajectory planning device, characterized in that, The device includes: A transition module is used to determine the transition path between the first motion segment and the second motion segment; wherein the first motion segment and the second motion segment include any one of the following: a linear motion segment, a circular motion segment, and a joint motion segment; The planning module is used to plan the trajectory of the first motion segment, the second motion segment, and the transition path according to the constraint information to obtain the target trajectory; wherein, the constraint information includes at least one of the following: joint velocity constraint information, joint acceleration constraint information, and joint torque constraint information of the robot joint; The transition module is specifically used for: discretizing the first motion segment and the second motion segment to obtain multiple discrete points; wherein, the discrete points represent the position and pose of the robot joint in the joint coordinate space; determining the transition discrete point among the multiple discrete points according to the transition parameters; and fitting the transition path based on the weight information of the transition discrete points; wherein, the transition parameters are non-zero parameters set based on the transition requirements and the cases of the first motion segment and the second motion segment, and the weight information is information representing the error between the fitted value and the true value of the transition discrete point.

8. A robot, characterized in that, The robot includes a memory and a processor. The memory stores program instructions, and when the processor executes the program instructions, it performs the steps of the method according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The readable storage medium stores computer program instructions, which, when executed by a processor, perform the steps of the method according to any one of claims 1-6.