Track planning method of multi-axis equipment, electronic equipment and computer program product
By performing reverse and forward scanning adjustment of the path segments of multi-axis equipment, the problem of trajectory planning failure is solved, synchronous operation and smooth transition of multi-axis equipment are achieved, and production efficiency and stability are improved.
Patent Information
- Application Number
- CN202510529085.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-08-01
AI Technical Summary
In the continuous trajectory planning of multi-axis robots, due to the assumption of rigid velocity constraints or arbitrary time expansion, the trajectory planning fails and cannot generate feasible trajectories, especially when the start and end velocity difference is too large or the displacement is insufficient.
By verifying the constraint conditions of each path segment in the path segment list, reverse scanning adjusts the starting speed and termination speed to ensure that the trajectory can be executed, and then forward scanning calculates the running time period and target constraint conditions, realizes synchronous processing of each axis, and generates feasible trajectory planning.
Feasible path planning for multi-axis equipment is realized in various application scenarios, reducing the number of frequent starts and stops, shortening the working beat time, and improving production efficiency and equipment operation stability.
Smart Images

Figure CN120406296A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of control technologies, and particularly to a trajectory planning method, an electronic device, and a computer program product for a multi-axis device. Background Art
[0002] With the rapid development of industrial automation and intelligent manufacturing, the multi-axis synchronous control technology of robots has become one of the key technologies to improve production efficiency and ensure product quality. Multiple axes of a robot coordinate their movements within the same time to ensure that the robot can complete tasks according to a predetermined trajectory.
[0003] In the continuous trajectory planning process of a multi-axis robot, due to the assumptions of rigid speed constraints or arbitrary time extension, the application scenarios have certain limitations; when the starting and ending speeds are too large or the displacement is insufficient, or simply relying on extending the time cannot meet the synchronous operation of each axis, a feasible trajectory cannot be generated, resulting in the failure of the motion path planning of the multi-axis device. Summary of the Invention
[0004] According to various embodiments of the present application, there is provided a trajectory planning method, an electronic device, and a computer program product for a multi-axis device; it can be applicable to the path planning of a multi-axis device in various scenarios, and achieve multi-axis synchronous operation and smooth transition.
[0005] In a first aspect, the present application provides a trajectory planning method for a multi-axis device, the method including: verifying whether each path segment satisfies the trajectory executable condition based on the constraint conditions and the expected displacement of each path segment in the path segment list; when a path segment does not satisfy the trajectory executable condition, starting from the last path segment, scanning backward, and adjusting the starting speed and the ending speed of the path segment based on the constraint conditions and the expected displacement; starting from the first path segment, scanning forward, and calculating each running time period and the target constraint conditions of the path segment based on the adjusted starting speed, the adjusted ending speed, the constraint conditions, and the expected displacement; synchronizing the trajectories of each axis of the path segment based on the running time period and the target constraint conditions to generate the trajectory planning information corresponding to each axis; generating motion trajectory points based on the trajectory planning information, and the motion trajectory points are used to indicate the position information during the operation of the multi-axis device.
[0006] In the above manner, based on the constraint conditions of each path segment, the feasibility of each path segment is verified; when there is an infeasible path segment, the starting speed of each path segment is adjusted by reverse scanning; and after the reverse scanning is completed, the target constraint conditions of each path segment are recalculated by forward scanning, and trajectory planning is performed based on the target constraint conditions to keep the axes of the multi-axis device running synchronously; the problem that path planning cannot be performed due to rigid speed constraints or arbitrary extension of time is solved, and feasible path planning in various application scenarios is realized; through scanning adjustment, smooth transitions of the position, speed, and non-zero speed connection between adjacent path segments are achieved, reducing the number of frequent starts and stops of the multi-axis device during the execution of the movement, shortening the cycle time of the operation, realizing stable control of the operation process of the multi-axis device, and improving production efficiency; it has strong usability and practicality.
[0007] In a second aspect, the present application provides an electronic device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the method described in any item of the first aspect is implemented.
[0008] In a third aspect, the present application provides a computer program product, which when running on a device causes the device to execute the method described in any item of the first aspect above.
[0009] It can be understood that the beneficial effects of the above second aspect to fifth aspect can refer to the relevant descriptions in the first aspect above, and will not be elaborated here. Description of the Drawings
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0011] Figure 1 It is a schematic diagram of the implementation process of the trajectory planning method for a multi-axis device provided by an embodiment of the present application;
[0012] Figure 2 It is a schematic diagram of each path segment provided by an embodiment of the present application;
[0013] Figure 3 It is a schematic diagram of the corresponding changes of each parameter provided by an embodiment of the present application;
[0014] Figure 4 It is a schematic diagram of the structure of the trajectory planning device for a multi-axis device provided by an embodiment of the present application;
[0015] Figure 5 This is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0016] The embodiments of the technical solutions of the present application will be described in detail below with reference to the accompanying drawings. The following embodiments are only used to illustrate the technical solutions of the present application more clearly, and thus are only examples and should not be used to limit the protection scope of the present application.
[0017] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above drawings are intended to cover non-exclusive inclusion.
[0018] In the description of the embodiments of this application, technical terms such as "first" and "second" are only used to distinguish different objects and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity, specific order or primary-secondary relationship of the indicated technical features. In the description of the embodiments of this application, the meaning of "a plurality" is more than two, unless otherwise specifically defined.
[0019] Referring to "embodiments" herein means that specific features, structures or characteristics described in connection with the embodiments can be included in at least one embodiment of this application. The phrase appears in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0020] In the description of the embodiments of this application, the term "and / or" is only a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " herein generally represents an "or" relationship between the associated objects before and after.
[0021] During the continuous trajectory planning process of a multi-axis robot, in order to synchronize the axes during operation, the operating time of the non-maximum-time axis is usually extended to achieve multi-axis coordinated operation. However, due to the critical speed and acceleration limitations of multi-axis devices, the movement time of the joints can only be within a certain time interval, making it impossible to always arbitrarily extend the operating time of the non-maximum-time axis. Alternatively, during the path planning process, the default limit is that the maximum speed that can be used must be between the start and end speeds for path planning. However, in actual scenarios, this limitation may need to be exceeded. For example, during emergency deceleration or dynamic path adjustment, if the difference between the start and end speeds is too large or the displacement is insufficient, a feasible trajectory cannot be generated, resulting in the failure of trajectory planning for the multi-axis device.
[0022] In response to the above technical problems, an embodiment of the present application provides a trajectory planning method for a multi-axis device. By verifying the constraints of each path segment in the path segment list, when there is a path segment with infeasible constraints, the constraints are adjusted by reverse scanning the path segment until the trajectory executable conditions are met, and then the adjusted path segment is scanned forward, the trajectory of each axis of each path segment is synchronized, and trajectory planning is performed to generate the motion trajectory of the multi-axis device; the embodiment of the present application solves the problem of trajectory planning failure caused by rigid speed constraints and arbitrary extension of time through trajectory verification, reverse scanning to adjust the constraints, and forward scanning to synchronize each axis. It can realize trajectory planning of multi-axis equipment in a variety of application scenarios, reduce the probability of trajectory planning failure, and is suitable for a variety of application scenarios; through continuous scanning and adjustment of each trajectory segment, the position, speed and non-zero speed connection of the multi-axis device between two adjacent path segments are smoothly transitioned, the number of frequent starts and stops of the multi-axis device during the execution of the movement is reduced, the cycle time of the operation is shortened, and stable control of the operation process of the multi-axis device is achieved, thereby improving production efficiency.
[0023] The following describes a specific implementation process of a trajectory planning method for a multi-axis device provided by the present application through an embodiment.
[0024] See Figure 1 , Figure 1 This is a schematic diagram of the implementation flow of the trajectory planning method for a multi-axis device provided in an embodiment of the present application. The execution subject of this method can be a multi-axis device, such as a six-axis device; Figure 1 As shown, the method may include the following steps:
[0025] S101 , based on the constraints and expected displacement of each path segment in the path segment list, verify whether each path segment meets the trajectory executable condition.
[0026] In the embodiments of the present application, the path segment list may be a sequence of path segments or a sequence of path points generated based on an instruction input by a user; the instruction may be a motion control instruction (such as the target position, path type, and speed that the end or joint of a multi-axis device needs to reach); it may also be a task instruction, such as task instructions like "spray the target area" and "weld the target weld seam". The path segment list includes the starting coordinates, ending coordinates, starting speed, ending speed, and various parameters in the constraint conditions of each path segment.
[0027] Exemplarily, each path segment in the path segment list corresponds to a set of constraint conditions. The constraint conditions may be the conditions specified in the instruction input by the user, or may be conditions automatically generated based on the instruction input by the user and combined with the system performance. The desired displacement can be determined based on the instruction input by the user, or can be automatically generated based on the instruction input by the user; for example, when the user inputs a motion control instruction and directly specifies the relative displacement that needs to be moved, the relative displacement is used as the desired displacement; or when the user inputs a task instruction and sets the movement range of the target task (such as the starting coordinates and ending coordinates), the system calculates the desired displacement based on this movement range.
[0028] Exemplarily, the constraint conditions may include restrictions on the starting speed, ending speed, maximum speed, maximum acceleration, and maximum jerk corresponding to each path segment. During the trajectory planning process of a multi-axis device, while ensuring the continuity of the speed at the connection points of adjacent path segments, the feasibility of the constraint conditions and the desired displacement of each path segment are verified to check whether each path segment meets the trajectory executable conditions. The information corresponding to each path segment in the path segment list may also include the starting coordinates and ending coordinates. Based on the starting coordinates and ending coordinates, the desired displacement corresponding to each path segment can be determined according to the distance formula between two points, that is, the actual displacement between the two points.
[0029] Among them, in some application scenarios, if the desired displacement is short and the difference between the starting speed and the ending speed is too large, it may not be possible to complete the change from the starting speed to the ending speed while meeting the desired displacement under the acceleration and jerk conditions specified in the constraint conditions. Therefore, it is necessary to verify the motion feasibility of the multi-axis device during the motion process through the trajectory executable conditions; for example, whether the desired displacement between the starting point and the ending point of each path segment conforms to the actual moving distance under the current constraint conditions; or, based on the various parameters in the constraint conditions, calculate the minimum actual moving distance, and by comparing the minimum actual moving distance with the desired displacement, determine whether the desired displacement is reachable, or whether the desired displacement can satisfy the change from the starting speed to the ending speed.
[0030] In some embodiments, since, for the same displacement, the speed change caused by a single acceleration or deceleration during the movement process is the largest; thus, for the scenario of a single acceleration or deceleration, based on the constraint conditions and the expected displacement of each path segment in the path segment list, it is verified whether each path segment meets the trajectory executable condition.
[0031] Among them, for the above extreme cases, when the starting speed is less than the ending speed, it corresponds to the scenario of a single acceleration; when the starting speed is greater than the ending speed, it corresponds to the scenario of a single deceleration. For these two extreme cases, based on the constraint conditions, the minimum actual moving distance of the multi-axis device is calculated, and based on the relationship between the minimum actual moving distance and the expected displacement, it is determined whether the trajectory executable condition is met. If, in this extreme case, the change from the starting speed to the ending speed of the path segment cannot be achieved within the expected displacement, then other cases are not possible.
[0032] Correspondingly, when verifying whether the trajectory is executable, the acceleration duration is calculated based on two acceleration cases, one case is that the maximum acceleration can be reached, and the other case is that the maximum acceleration cannot be reached. When the maximum acceleration can be reached, the acceleration segment can be accelerated corresponding to a pair of jerk pulses; while when the maximum acceleration cannot be reached, the acceleration segment is accelerated corresponding to less than a pair of jerk pulses.
[0033] Among them, a pair of jerk pulses corresponds to an acceleration process where the acceleration increases from zero to a certain value (which may be the maximum acceleration or other value) and then decreases to zero. Therefore, before calculating the actual moving distance corresponding to a single acceleration or deceleration case, first, based on the constraint conditions, it is determined whether the expected displacement of the path segment can be executed under a pair of jerk pulses, that is, whether the maximum acceleration can be reached.
[0034] When the maximum acceleration can be reached, based on the maximum acceleration and the maximum jerk, the jerk pulse duration is determined; based on the jerk pulse duration, the starting speed, the ending speed, and the maximum acceleration, the reference displacement of the path segment is calculated; based on the magnitude relationship between the expected displacement and the reference displacement, it is verified whether the path segment meets the trajectory executable condition.
[0035] Exemplarily, in the scenario of a single acceleration or deceleration, when the maximum jerk can be reached and there is a part with zero jerk, the first jerk pulse duration determined based on the maximum acceleration and the maximum jerk in the constraint conditions is less than the second jerk pulse duration determined based on the starting speed, the ending speed, and the maximum jerk; thus, the smaller first jerk pulse duration is selected to calculate the minimum actual moving distance, that is, the reference displacement; based on the magnitude relationship between the reference displacement and the expected displacement, the feasibility of the path segment is verified.
[0036] When the maximum acceleration cannot be reached, based on the starting velocity, the ending velocity, and the maximum jerk, determine the jerk pulse duration; based on the jerk pulse duration, the starting velocity, and the ending velocity, calculate the reference displacement of the path segment; based on the magnitude relationship between the desired displacement and the reference displacement, verify whether the path segment meets the trajectory executable condition.
[0037] Exemplarily, in a single acceleration or deceleration scenario, when the maximum jerk cannot be reached, the first jerk pulse duration determined based on the maximum acceleration and the maximum jerk in the constraint conditions is greater than the second jerk pulse duration determined based on the starting velocity, the ending velocity, and the maximum jerk; thus, select the latter smaller second jerk pulse duration and calculate the actual moving distance, that is, the reference displacement; based on the magnitude relationship between the reference displacement and the desired displacement, verify the feasibility of the path segment.
[0038] Correspondingly, when the desired displacement is greater than the reference displacement, the trajectory executable condition is met; when the desired displacement is less than the reference displacement, the trajectory executable condition is not met.
[0039] Exemplarily, based on the constraint conditions, the jerk pulse duration in a single acceleration or deceleration scenario can be calculated, that is, the duration of a single jerk pulse; as shown in formula (1), for the two cases where the acceleration is reachable and unreachable, take the minimum value of the two calculation methods, so that the minimum actual moving distance, that is, the reference displacement, can be calculated based on the minimum duration.
[0040]
[0041] Among them, is the jerk pulse duration. When the maximum acceleration is reachable, When the maximum acceleration is unreachable, a max is the maximum acceleration, j max is the maximum jerk, v s is the starting velocity, v e is the ending velocity.
[0042] Correspondingly, when the maximum acceleration is reachable, based on the jerk pulse duration and the duration with zero jerk, calculate the total acceleration duration, and take the product of the average value of the starting velocity and the ending velocity and the total acceleration duration as the reference displacement; among them, the duration with zero jerk is the absolute value of the difference between the starting velocity and the ending velocity divided by the maximum acceleration, and this ratio includes another jerk pulse duration. When the maximum acceleration is unreachable, then calculate the sum of the starting velocity and the ending velocity, and take the product of this sum and the jerk pulse duration as the reference displacement.
[0043] Exemplarily, the expression for calculating the reference displacement through the following formula (2) and verifying whether each path segment meets the trajectory executable condition is:
[0044]
[0045] Where h is the desired displacement, and the calculation formula on the right side of the above expression is the calculation method of the reference displacement, corresponding to the cases where the maximum acceleration is unreachable and the maximum acceleration is reachable respectively. Based on each parameter in the constraint conditions, the jerk pulse duration is calculated through the two calculation methods in formula (1). Based on the magnitudes of the calculation results of the two calculation methods, it can be determined whether the maximum jerk corresponding to this path segment is reachable; for example, if the calculated first jerk pulse duration is greater than the second jerk pulse duration, it means that the maximum jerk is reachable; on the contrary, it is unreachable. Furthermore, the reference displacement is calculated through the expression of formula (2), and the reference displacement is compared with the desired displacement. In addition, the above embodiments are described by taking a single acceleration scenario as an example. The implementation principle corresponding to a single deceleration scenario is the same, only the sign of the acceleration is different.
[0046] If the above expression holds, the constraint condition of this path segment meets the trajectory executable condition; if the inequality does not hold, it does not meet the trajectory executable condition, and the constraint condition needs to be further adjusted.
[0047] S102. When the path segment does not meet the trajectory executable condition, start reverse scanning from the last path segment, and based on the constraint condition and the desired displacement, adjust the starting speed and the ending speed of the path segment.
[0048] In the embodiments of the present application, since when verifying the constraint conditions of each path segment, it is necessary to ensure that the speeds of the connection points of two adjacent path segments are the same, that is, the ending speed of the first path segment is the starting speed of the second path segment, and the first path segment and the second path segment are two adjacent path segments before and after. In the path segment list, as long as the constraint condition of one path segment does not meet the executable condition, the constraint condition of this path segment needs to be adjusted. Since the speeds of the connection points of two adjacent path segments are the same, other path segments also need to be further adjusted.
[0049] Exemplarily, by reverse scanning each path segment in the path segment list, it is ensured that there is no sudden change in the connection speed between each path segment, and by adjusting the starting speed of each path segment, the trajectory of each path segment is made feasible, that is, the adjusted constraint condition meets the trajectory executable condition.
[0050] Exemplarily, the reverse scan starts from the last path segment in the path segment list. If the multi-axis device needs to finally stop at the end point during the task execution, the termination speed of the last path segment can be 0; or in some other task scenarios where it is not required to stop at the end point, the termination speed of the last path segment can also be set to other values, which can be specifically set based on the requirements of the actual application scenario. For example, when the number of path segments in the path segment list is large, it can be divided into multiple path segment sets for reverse scan processing, so that the termination speed of the last path segment in the middle path segment set is the same as the start speed of the first path segment in the next path segment set.
[0051] Correspondingly, during the reverse scan process, by adjusting the start speed of the current path segment, verify whether the path executable condition is satisfied. After adjusting the start speed of the current path segment, correspondingly adjust the termination speed of the previous path segment of the current path segment. Based on the adjusted termination speed, verify whether the previous path segment satisfies the path executable condition. If not, continue to adjust the start speed of the previous path segment until the first path segment is adjusted in turn.
[0052] In some embodiments, the start speed of the path segment is taken as the root of the equation. Based on the maximum acceleration, termination speed, expected displacement, and calculated jerk pulse duration in the constraint conditions, construct the discriminant of the root of the equation for solving the start speed, and adjust the start speed based on this discriminant. When adjusting the start speed, adjustments are made for two cases: when the maximum acceleration is reachable and when the maximum acceleration is not reachable.
[0053] In the first scenario, when the start speed is greater than the termination speed and the maximum acceleration is reachable (i.e., there is a part with zero jerk), based on the value of the discriminant of the root of the preset equation, determine the start speed of the (i + 1)-th path segment; based on the start speed of the (i + 1)-th path segment, adjust the termination speed of the i-th path segment, and the termination speed of the i-th path segment is equal to the start speed of the (i + 1)-th path segment. Wherein, i is an integer greater than or equal to 1, the preset equation is the equation for solving the start speed, and the discriminant of the root is determined based on the jerk pulse duration, maximum acceleration, expected displacement, and termination speed.
[0054] Exemplarily, as Figure 2 shown, for the (i + 1)-th path segment L in the path segment list i+1 , if it is detected that the constraint condition does not satisfy the trajectory executable condition for this path segment, the start speed of this path segment is greater than the termination speed, the maximum acceleration is reachable, and there is a part with zero jerk, that is, V s >V e and Based on the terminal velocity, desired displacement, maximum acceleration, and jerk pulse duration of the path segment, a root discriminant for solving the initial velocity of the path segment is constructed. Based on the value of the root discriminant, the corresponding available values of the initial velocity are further determined. For example, the root discriminant can correspond to three cases: greater than zero, equal to zero, and less than zero.
[0055] In some embodiments, when the value of the root discriminant is less than zero, the starting velocity and the terminal velocity of the path segment are adjusted to zero; when the value of the root discriminant is greater than or equal to zero, the starting velocity is adjusted to the root of a preset equation.
[0056] Exemplarily, the expression of the root discriminant is the following formula (3):
[0057]
[0058] where δ is the root discriminant, h is the desired displacement, is the jerk pulse duration, a max is the maximum acceleration, j max is the maximum jerk, v s is the starting velocity, v e is the terminal velocity.
[0059] Exemplarily, when the value of the root discriminant is less than zero, it indicates that the equation has no solution and the trajectory of the path segment cannot be made feasible by adjusting the initial velocity. Then, both the starting velocity and the terminal velocity of the path segment are set to zero, and the path segments that have completed the reverse scan are recursively modified to ensure the velocity continuity between adjacent path segments. Correspondingly, after the adjustment, the feasibility of the adjusted path segment can be re-verified, and if the feasibility is not met, the initial velocity is adjusted again.
[0060] Exemplarily, when the value of the root discriminant is greater than or equal to zero, the starting velocity is adjusted to the root of the preset equation, and the values of the adjusted initial velocity are calculated by the following formulas (4) and (5) respectively.
[0061] When the value of the root discriminant is equal to zero, the expression for solving the starting velocity is:
[0062]
[0063] When the value of the root discriminant is greater than zero, the expression for solving the starting velocity is:
[0064]
[0065] where δ is the root discriminant, h is the desired displacement, is the jerk pulse duration, a max is the maximum acceleration, j maxis the maximum jerk, v s is the starting velocity, v e is the ending velocity.
[0066] In the second scenario, when the starting velocity is greater than the ending velocity and the maximum acceleration cannot be reached, the starting velocity is adjusted based on the desired displacement, the jerk pulse duration, and the ending velocity.
[0067] Exemplarily, for the (i + 1)-th path segment L in the path segment list i+1 , if it is detected that the constraint conditions do not meet the trajectory executable conditions for this path segment, the starting velocity of this path segment is greater than the ending velocity, the maximum acceleration cannot be reached, and there is no zero jerk part, that is, V s > V e and Based on the following formula (6), calculate the adjusted value of the starting velocity:
[0068]
[0069] where h is the desired displacement, [[ID=2,6]]is the jerk pulse duration, v s is the starting velocity, v e is the ending velocity.
[0070] Correspondingly, in order to ensure the velocity continuity between path segments, as Figure 2 shown, when updating the starting velocity V s_i+1 of the (i + 1)-th path segment, synchronously update the ending velocity V e_i of the previous i-th path segment; when scanning the i-th path segment, based on the updated ending velocity, determine the new constraint conditions and verify whether the new constraint conditions are trajectory feasible. If feasible, continue to scan the (i - 1)-th path segment. If not feasible, adjust the initial velocity V s_i of the i-th path segment in the above manner; and so on. After completing the scanning of this path segment, continue to load the next path segment from back to front until all path segments are scanned.
[0071] It should be noted that during the reverse scan process, the starting speed of the path segment is modified, so that the next path segment to be scanned (i.e., the previous path segment of this path segment) needs to synchronously adjust the termination speed. After adjusting the termination speed, it is possible to verify whether this path segment meets the trajectory executable condition based on S101. If the verification fails, based on S102, the starting speed of this path segment is adjusted; that is, the above S101 and S102 are not limited to the front and back execution order in the above-described process. During the reverse scan process, after the constraint conditions of the path segment change, it is possible to verify again based on S101, and when the verified trajectory is infeasible, the initial speed is adjusted based on S102.
[0072] S103. Start a forward scan from the first path segment, and calculate the respective running time periods and target constraint conditions of the path segment based on the adjusted starting speed, adjusted termination speed, constraint conditions, and expected displacement.
[0073] In some embodiments, after the reverse scan, each path segment in the path segment list meets the trajectory executable condition, and then the running time periods included in each path segment and the corresponding target constraint conditions are determined by a forward scan.
[0074] Exemplarily, the constraint conditions of the path segment further include the maximum speed; during the forward scan process, for the case of the maximum speed of the multi-axis device during actual operation, it is divided into two cases: the maximum speed is reachable and the maximum speed is unreachable. For these two cases, the running time periods and target constraint conditions of each trajectory segment are calculated. Among them, when the maximum speed is reachable, there are also two sub-cases: the maximum acceleration is reachable and the maximum acceleration is unreachable; the calculation process of each running time period and target constraint condition is introduced for each case below.
[0075] The first case: The maximum speed is reachable
[0076] In some embodiments, when the maximum speed is reachable and the maximum acceleration of the acceleration segment is reachable, based on the maximum acceleration of the acceleration segment, the starting speed, and the maximum jerk, calculate the acceleration time period of the path segment; when the maximum speed is reachable and the maximum acceleration of the deceleration segment is reachable, based on the maximum acceleration of the deceleration segment, the termination speed, and the maximum jerk, calculate the deceleration time period of the path segment; when the maximum speed is reachable, based on the expected displacement, the maximum speed, the starting speed, the acceleration time period, the deceleration time period, and the termination speed, calculate the constant speed time period of the path segment; among them, each running time period includes the acceleration time period, the deceleration time period, and the constant speed time period.
[0077] In some embodiments, when the maximum speed can be reached but the maximum acceleration in the acceleration phase cannot be reached, the acceleration time period is calculated based on the maximum speed, the starting speed, and the maximum jerk; when the maximum speed can be reached but the maximum acceleration in the deceleration phase cannot be reached, the deceleration time period is calculated based on the maximum speed, the ending speed, and the maximum jerk; when the maximum speed can be reached, the constant-speed time period of the path segment is calculated based on the desired displacement, the maximum speed, the starting speed, the acceleration time period, the deceleration time period, and the ending speed; wherein, each operation time period includes an acceleration time period, a deceleration time period, and a constant-speed time period.
[0078] Exemplarily, when the maximum speed in the constraint conditions is greater than or equal to the starting speed and the ending speed of this path segment, it is confirmed that the operation condition of this path segment is to accelerate first and then decelerate. When the maximum speed can be reached, that is, the maximum value of the speed is equal to the maximum speed (V max ), it is determined whether the maximum acceleration can be reached based on formulas (7) and (8):
[0079] a max 2 -(v max -v s )j max >0 (7)
[0080] a max 2 -(v max -v e )j max >0 (8)
[0081] When formula (7) holds, it indicates that when accelerating from the starting speed of this path segment to the maximum speed, the maximum acceleration cannot be reached (i.e., there is no zero jerk in the acceleration phase); when formula (8) holds, it indicates that when decelerating from the maximum speed to the ending speed, the reverse maximum acceleration cannot be reached (i.e., there is no zero jerk in the deceleration phase). Among them, formula (7) and formula (8) correspond to the same path segment.
[0082] Correspondingly, for the acceleration phase:
[0083] When formula (7) holds, that is, when the maximum speed in the acceleration phase can be reached and the maximum acceleration cannot be reached, the jerk pulse duration of the acceleration phase is calculated based on the maximum speed, the initial speed, and the maximum jerk; the acceleration time period is calculated based on the jerk pulse duration. For example, the acceleration time period is calculated by formula (9):
[0084]
[0085] wherein, j max is the maximum jerk, v s is the starting speed, T j1is the duration of a single snap acceleration pulse in the acceleration phase; T a is the acceleration time period.
[0086] When formula (7) does not hold, that is, when the maximum speed and maximum acceleration in the acceleration phase can be reached, calculate the duration of the snap acceleration pulse in the acceleration phase based on the maximum acceleration and maximum snap acceleration; calculate the acceleration time period based on the duration of the snap acceleration pulse in the acceleration phase, the maximum speed, the starting speed, and the maximum acceleration. For example, calculate the acceleration time period through formula (10):
[0087]
[0088] where j max is the maximum snap acceleration, v s is the starting speed, T j1 is the duration of a single snap acceleration pulse in the acceleration phase, such as the time period from 0 to t1 shown in Figure 3 ; T a is the acceleration time period, as shown in Figure 3 , when the maximum acceleration can be reached, in the acceleration phase, it also includes the time period from t1 to t2, so as to calculate the difference between the maximum speed and the starting speed, and take the ratio of this difference to the maximum acceleration as the time period from t1 to t3; a max is the maximum acceleration.
[0089] Correspondingly, for the deceleration phase:
[0090] When formula (8) holds, that is, when the maximum speed in the deceleration phase can be reached and the reverse maximum acceleration cannot be reached (when decelerating from the maximum acceleration to the terminal speed, the reverse maximum acceleration cannot be reached), calculate the duration of the snap acceleration pulse in the deceleration phase based on the maximum speed, the terminal speed, and the maximum acceleration; calculate the deceleration time period based on the duration of the snap acceleration pulse in the deceleration phase; for example, calculate the deceleration time period through formula (11):
[0091]
[0092] where T j2 is the duration of a single snap acceleration pulse in the deceleration phase; T d is the deceleration time period; j max is the maximum snap acceleration; v max is the maximum speed; v e is the terminal speed.
[0093] When formula (8) is not valid, that is, when the maximum acceleration of the deceleration section is achievable and the reverse maximum acceleration is achievable (when decelerating from the maximum acceleration to the terminal speed, the reverse maximum acceleration is achievable), the jerk pulse duration of the deceleration section is calculated based on the maximum acceleration and the maximum jerk; the deceleration time period is calculated based on the jerk pulse duration and the maximum speed, the terminal speed, and the maximum acceleration; for example, the deceleration time period is calculated using formula (12):
[0094]
[0095] Among them, T j2 is the duration of a single acceleration pulse in the deceleration section, such as Figure 3 The time period from t4 to t5 shown in FIG; max is the maximum acceleration; v max is the maximum speed; T d is the deceleration time period, such as Figure 3 As shown, when the maximum acceleration is reached, the deceleration section also includes the time period from t5 to t6, thereby calculating the difference between the maximum speed and the terminal speed, and the ratio of the difference to the maximum acceleration is used as the time period from t5 to t7; e is the termination speed.
[0096] Accordingly, when the maximum speed is achievable, there may be a constant speed operation phase. Based on the expected displacement, acceleration period, deceleration period, starting speed, ending speed, and maximum speed, the constant speed period corresponding to the path segment is calculated. For example, the constant speed period is calculated using formula (13):
[0097]
[0098] Where h is the expected displacement; v s is the starting speed, v e is the terminal speed, T a is the acceleration time period, such as Figure 3 The time period from 0 to t3 shown in FIG; T d is the deceleration time period, such as Figure 3 The time period from t4 to t7 shown in FIG; T v is a constant speed period, such as Figure 3 The time period from t3 to t4 shown in FIG; max is the maximum speed.
[0099] In some embodiments, during the constant speed period T calculated above, v When it is greater than 0, the maximum speed can be reached, and the various time periods calculated based on formulas (9) to (12) can be used to calculate the actual running trajectory.
[0100] Among them, T j1The jerk j in the acceleration phase max or -j max with a constant duration, i.e., the duration of a single jerk pulse in the acceleration phase, such as Figure 3 the time period from 0 to t1, or the time period from t2 to t3 in j2 The jerk j in the deceleration phase max or -j max with a constant duration, i.e., the duration of a single jerk pulse in the deceleration phase, such as Figure 3 the time period from t4 to t5, or the time period from t6 to t7 in a + T v + T d .
[0101] Figure 3 The S-shaped curve shown in a only exemplarily illustrates the respective time periods of the path segment, i.e., assuming that the maximum jerk in the acceleration phase is the same as the maximum jerk in the deceleration phase, the maximum acceleration in the acceleration phase is the same as the reverse maximum acceleration in the deceleration phase, and the maximum speed in the acceleration phase is the same as the maximum speed in the deceleration phase, the division of each time period; in the acceleration phase, when time t ∈ [0, T a , it is a linear curve where the acceleration increases from zero to the maximum value and then returns to zero, and the speed increases; in the maximum speed phase, when time t ∈ [T a , T v + T a + T v , it has a constant speed; in the deceleration phase, when time t ∈ [T a + T v + T d , where T = T
[0102] The second case: The maximum speed is not reachable
[0103] In some embodiments, when the constant speed time period T v calculated in the above embodiments is less than 0, it indicates that the maximum value of the actual speed of the path segment is less than the maximum speed V max in the constraint conditions, that is, there is no constant speed segment in the trajectory of this path segment, i.e., T v = 0; when the maximum accelerations (the reverse maximum acceleration in the deceleration phase) in both the acceleration phase and the deceleration phase are reachable, calculate the jerk pulse duration in the acceleration phase or the deceleration phase based on the maximum acceleration and the maximum jerk; calculate the acceleration time period and the deceleration time period based on the jerk pulse duration, the starting speed, the ending speed, and the desired displacement; for example, when the maximum speed is not reachable and the maximum accelerations in both the acceleration phase and the deceleration phase are reachable, calculate the acceleration time period and the deceleration time period of the path segment based on formula (14):
[0104]
[0105] where h is the desired displacement, a max is the maximum acceleration, j max is the maximum jerk, v s is the starting velocity, v e is the ending velocity, T j1 is the jerk pulse duration in the acceleration phase, T j2 is the jerk pulse duration in the deceleration phase, T a is the acceleration time period, T b is the deceleration time period, Δ is an intermediate variable determined based on the maximum acceleration, maximum jerk, starting velocity, ending velocity, and desired displacement, v max is the maximum velocity.
[0106] In some embodiments, if the acceleration time period is less than twice the jerk pulse duration in the acceleration phase, or the deceleration time period is less than twice the jerk pulse duration in the deceleration phase, then the maximum acceleration is adjusted from a first value to a second value until the acceleration time period is greater than twice the jerk pulse duration in the acceleration phase and the deceleration time period is greater than twice the jerk pulse duration in the deceleration phase; wherein, the second value is less than the first value.
[0107] Exemplarily, when T a < 2T j1 or T d < 2T j2 it indicates that at least one of the maximum acceleration or the reverse maximum acceleration in the acceleration phase and the deceleration phase is unattainable, and thus the respective operating time periods cannot be calculated by the above formula (14); thereby an approximate value of the maximum acceleration is sought through an iterative method.
[0108] For example, by gradually decreasing the value of the maximum acceleration a max such as adjusting the maximum acceleration from the first value to a slightly smaller second value until T a > 2T j1 and T d > 2T j2 are both satisfied, and then the respective operating time periods are calculated by formula (14).
[0109] In some embodiments, during the process of calculating the appropriate maximum acceleration through the above iterative method, it may also occur that the calculated result of the acceleration time period is negative or the calculated result of the deceleration time period is negative; when one of them is negative, the path segment is determined as the limit scenario corresponding to single acceleration or single deceleration. For example, during the process of adjusting the maximum acceleration, when T a > 0, Td When it is <0, the path segment corresponds to a single acceleration scenario, and a single acceleration segment is retained; or, at T a <0, T d >0, the path segment corresponds to a single deceleration scenario, and a single deceleration segment is retained.
[0110] Exemplarily, during the acceleration time period T a less than zero, there is only a deceleration segment, and the deceleration time period is calculated based on the following formula (15):
[0111]
[0112] where h is the desired displacement, j max is the maximum jerk, v s is the starting velocity, v e is the ending velocity, T j2 is the jerk pulse duration of the deceleration segment, T d is the deceleration time period.
[0113] Correspondingly, T d is the total duration of the deceleration segment, T j2 is the duration of a single jerk pulse in the deceleration segment; in the single deceleration scenario, there is no acceleration segment and no constant velocity segment, T d is the total trajectory duration T.
[0114] Exemplarily, during the deceleration time period T d less than zero, there is only an acceleration segment, and the acceleration time period is calculated based on the following formula (16):
[0115]
[0116] where h is the desired displacement, j max is the maximum jerk, v s is the starting velocity, v e is the ending velocity, T j1 is the deceleration period, T a is the acceleration time period.
[0117] Correspondingly, T a is the total duration of the acceleration segment, T j1 is the duration of a single jerk pulse in the acceleration segment; in the single deceleration scenario, there is no deceleration segment and no constant velocity segment, T a is the total trajectory duration T.
[0118] In some embodiments, based on the acceleration time period, deceleration time period, starting velocity, ending velocity, and desired displacement, the constrained maximum acceleration and constrained maximum velocity are calculated; wherein the target constraint conditions include the constrained maximum acceleration and the constrained maximum velocity.
[0119] Exemplarily, the starting speed and the ending speed of each path segment are adjusted by reverse scanning to make the trajectory of each path segment feasible; by forward scanning, the respective time periods corresponding to each path segment and the total trajectory duration are calculated; thus, based on the adjusted starting speed, acceleration time period, deceleration time period, adjusted ending speed, and expected displacement, the maximum acceleration of the acceleration segment, the reverse maximum acceleration of the deceleration segment, and the maximum speed of the path segment can be calculated respectively, and the constraint conditions are re-determined, that is, the target constraint conditions are obtained.
[0120] For example, based on the speed relationship, a first equation about the maximum acceleration of the acceleration segment and the reverse maximum acceleration of the deceleration segment is established from the known starting speed, ending speed, acceleration time period, and deceleration time period; based on the displacement relationship, a second equation about the maximum acceleration and the reverse maximum acceleration of the deceleration segment is established from the known expected displacement, starting speed, ending speed, acceleration time period, and deceleration time period; by solving the system of binary equations of the first equation and the second equation, the value of the maximum acceleration of the acceleration segment or the deceleration segment is obtained; furthermore, based on the value of the maximum acceleration, the starting speed, the ending speed, and the acceleration time period and deceleration time period, the maximum speed that can be achieved in the path segment is calculated.
[0121] In the embodiments of the present application, the information correspondingly included in the path segment list includes the starting speed, ending speed, constraint conditions, and expected displacement corresponding to each axis of the multi-axis device; the calculated respective operation time periods are the operation time periods of each axis of the multi-axis device in each path segment, and the calculated target constraint conditions are the constraint conditions of each axis in each path segment.
[0122] S104, based on the operation time period and the target constraint conditions, synchronize the trajectories of each axis of the path segment to generate trajectory planning information corresponding to each axis.
[0123] In some embodiments, the multi-axis (or multi-joint) linkage of the multi-axis device is realized based on the time synchronization of each axis. After determining the operation time periods and target constraint conditions of each axis of the multi-axis device, the operation times of each axis can be synchronized; and after time synchronization, based on the operation duration of each axis, trajectory planning information corresponding to each axis is generated.
[0124] Exemplarily, based on the operation time periods of each axis, taking the operation time of the axis with the maximum operation duration as a benchmark, extend the operation times of other axes with non-maximum operation durations to synchronize the operation times of all axes for coordinated operation; based on the synchronized operation times of each axis, calculate the target constraint conditions corresponding to each axis, such as the maximum acceleration, jerk, etc.; furthermore, based on the target constraint conditions, generate trajectory planning information.
[0125] Exemplarily, the trajectory planning information is a set of motion parameters corresponding to each axis that satisfy time synchronization and motion constraints, such as time-velocity curves, time-acceleration curves, and time-displacement curves, etc.
[0126] In some cases, the axes with non-maximum running durations among all axes cannot be arbitrarily extended. Due to the non-zero constraints on the initial velocity and the terminal velocity, it is necessary to synchronize each joint. For example, by separately obtaining the S-shaped acceleration and deceleration curves of each independent joint, with the running duration of the joint with the longest planned total running time as the target, the velocity of other joints is optimized and adjusted. That is, after obtaining the running time periods of each joint, the running duration (i.e., the reference running duration of the axis with the maximum running duration) T0 of the joint with the longest running time is selected as the benchmark, and the running time of other joints is extended. However, due to the velocity and acceleration limitations of the robotic arm joints, the running time of some joints may only exist within a certain time interval τ ∈ [h0, h1]. However, during the running duration when, for example, T0 > h1, it is impossible to arbitrarily extend the running time of other axes with non-maximum running durations.
[0127] In some embodiments, based on the desired displacement, acceleration time period, starting velocity, deceleration time period, and terminal velocity, it can be determined whether the axes with non-maximum running durations in the path segment meet the extension conditions.
[0128] Exemplarily, when determining whether the running durations of the axes with non-maximum running durations can meet the given time, based on the first product of the starting velocity and the acceleration time period of the path segment and the second product of the terminal velocity and the deceleration time period, the target displacement parameter is calculated. Based on the magnitude relationship between the desired displacement and the target displacement parameter, it is determined whether the axes with non-maximum running durations in the path segment meet the extension conditions; for example, based on the following formula (17), it is determined whether the axes with non-maximum running durations meet the extension conditions:
[0129]
[0130] where h is the desired displacement, T a is the acceleration time period, T b is the deceleration time period, v s is the starting velocity, v e is the terminal velocity; when the above expression holds, the axes with non-maximum running durations meet the extension conditions, and the running durations of the axes with non-maximum running durations can be arbitrarily extended; when the above expression does not hold, the axes with non-maximum running durations do not meet the extension conditions, and the running durations of the axes with non-maximum running durations cannot be arbitrarily extended.
[0131] If formula (17) holds, it indicates that under the condition of satisfying the current initial velocity and terminal velocity, by changing the value of the desired maximum velocity, the arbitrary extension of the running duration can be achieved. If formula (17) does not hold, it means that the running duration cannot be arbitrarily extended, and the allowed maximum running duration is selected through the bisection iteration method.
[0132] Correspondingly, T in the above formula (17) a , T d are respectively the times required to decelerate from the initial velocity V s and the terminal velocity V e to zero under the given maximum acceleration and jerk constraints, and can be obtained through the following formula:
[0133] If v s j max < a max 2 , then:
[0134]
[0135] Otherwise:
[0136]
[0137] Similarly, if v e j max < a max 2 , then:
[0138]
[0139] Otherwise:
[0140]
[0141] where a max is the maximum acceleration, j max is the maximum jerk, v s is the initial velocity, v e is the terminal velocity, T j1 is the jerk pulse duration in the acceleration phase, T j2 is the jerk pulse duration in the deceleration phase, T a is the acceleration time period, T b is the deceleration time period.
[0142] In some embodiments, when the axis with non-maximum operating duration meets the extension condition, the expected maximum speed of the axis with non-maximum operating duration is adjusted based on the binary iteration method, and time synchronization of each axis is performed to obtain the trajectory planning information of each axis; when the axis with non-maximum operating duration does not meet the extension condition, the allowed maximum operating duration of the axis with non-maximum operating duration is calculated based on the allowed maximum speed; when the reference operating duration of the axis with maximum operating duration is less than the allowed maximum operating duration, the expected maximum speed of the axis with non-maximum operating duration is adjusted so that the operating durations of all axes are the same; when the reference operating duration of the axis with maximum operating duration is greater than the allowed maximum operating duration, the starting speed and the ending speed of the path segment are adjusted, and the steps of forward scanning and subsequent steps are executed.
[0143] Exemplarily, when formula (17) holds, the axis with non-maximum operating duration meets the extension condition, and the length of the path segment satisfies that under the conditions of the current starting speed and ending speed, by adjusting the value of the expected maximum speed, any extension of the operating duration can be achieved. For example, the value of the expected maximum speed can be obtained by the iteration formula of the binary iteration method. By setting the interval of the expected maximum speed and continuously iterating to narrow the interval, the value of the expected maximum speed is adjusted.
[0144] Exemplarily, when formula (17) does not hold, the axis with non-maximum operating duration does not meet the extension condition, that is, the operating duration cannot be arbitrarily extended. Then, the allowed maximum operating duration of the axis with non-maximum operating duration is calculated by the iteration formula of the binary iteration method. For example, by setting the interval of the allowed maximum operating duration and continuously iterating to narrow the interval, the value of the allowed maximum operating duration is selected.
[0145] Correspondingly, when formula (17) holds, by adjusting the value of the expected maximum speed, when the following formula (22) is satisfied, the value of the expected maximum speed is determined:
[0146]
[0147] where h is the expected displacement, T a is the acceleration time period, T b is the deceleration time period, v s is the starting speed, v e is the ending speed, v lim is the expected maximum speed. T a and T b are determined by formula (18) and formula (21). Based on the binary iteration method, the expected maximum speed v lim is continuously adjusted so that formula (22) holds; when formula (22) holds, the allowed maximum operating duration T max = T a + T d .
[0148] Accordingly, the running duration of the joint with the longest running time (i.e., the reference running duration of the axis with the maximum running duration) T0 < T max When this is the case, the desired maximum speed can be adjusted through the above iterative method to obtain the allowable maximum speed, so that the running duration of the joint can be scaled down to T0; if T0 > T max or the desired maximum speed calculated by the binary iteration formula exceeds the allowable value, then reduce the starting speed and the ending speed of the path segment, return to the forward scanning stage, and adjust the ending speed of the path segment before this path segment and the starting speed of the path segment after this path segment, and continue to execute the steps of the forward scanning stage and subsequent steps.
[0149] Accordingly, when it is determined through adjusting the desired maximum speed that the running duration of the axis with a non-maximum running duration can be arbitrarily extended, then synchronize the running durations of each axis to the same running time.
[0150] By determining whether the running duration can be arbitrarily extended as described above and adjusting the starting speed and the ending speed of the path segment when it cannot be arbitrarily extended, the problem of trajectory planning failure caused by the inability to be arbitrarily extended is solved, and it can be applied to a variety of application scenarios to achieve time synchronization of multiple axes.
[0151] In some embodiments, after trajectory synchronization, calculate speed constraints, acceleration constraints, and jerk constraints based on the acceleration time period, deceleration time period, starting speed, ending speed, and desired displacement of the path segment; the trajectory planning information includes the speed constraints, acceleration constraints, and jerk constraints.
[0152] Exemplarily, after obtaining each time period of the S-shaped trajectory, adjust the planned speed constraints, acceleration constraints, and jerk constraints according to the constraint conditions of the path segment. Among them, the speed constraint includes the maximum speed constraint v lim ; the acceleration constraint includes the maximum acceleration constraint a lima and the minimum acceleration constraint a limd ; the jerk constraint includes the maximum jerk constraint J max and the minimum jerk constraint J min .
[0153] Exemplarily, calculate the speed constraint through the following formula (23):
[0154]
[0155] where h is the desired displacement, T a is the acceleration time period, T b is the deceleration time period, v s is the starting speed, v e is the ending speed, v lim is the speed constraint, T vThis is the constant speed time period. The acceleration time period, deceleration time period, and constant speed time period in this formula are the respective time periods corresponding to the adjusted running duration.
[0156] Exemplarily, the acceleration constraint includes the maximum acceleration constraint in the acceleration section and the minimum acceleration constraint in the deceleration section, and the jerk constraint includes the maximum jerk constraint in the acceleration section and the minimum jerk constraint in the deceleration section. The acceleration constraint and jerk constraint are calculated respectively through the following formula (24) and formula (25):
[0157]
[0158] where a lima is the maximum acceleration constraint, J max is the maximum jerk constraint, a limd is the minimum acceleration constraint, J min is the minimum jerk constraint, v s is the starting speed, v e is the ending speed, T j1 is the jerk pulse duration in the acceleration section, T j2 is the jerk pulse duration in the deceleration section, T a is the acceleration time period, T b is the deceleration time period, v lim is the speed constraint. Based on the above operations, the trajectory planning information of the S-shaped trajectory of the path segment is obtained.
[0159] S105. Based on the trajectory planning information, generate motion trajectory points, which are used to indicate the position information during the operation of the multi-axis device.
[0160] In some embodiments, using the trajectory planning information of each axis, the position of each axis at a certain moment t can be obtained, and thus the synchronous planning of multiple axes can be completed.
[0161] Exemplarily, based on the trajectory planning information, motion trajectory points of the acceleration section, constant speed section, and deceleration section are generated respectively. For example, the motion trajectory points are calculated based on the following formulas (26) to (32):
[0162] Acceleration section:
[0163]
[0164] Constant speed section:
[0165]
[0166] Deceleration section:
[0167]
[0168] Where t is any running moment, T is the running duration, q(t) is the position at moment t, is the velocity at moment t, is the acceleration at moment t, is the jerk at moment t.
[0169] The above formula calculates the trajectory points for a single axis. By using the same time parameter t, the trajectory point information corresponding to each axis can be obtained. Substituting a certain moment t into the above equation can obtain the expected position, expected velocity, and other information corresponding to the axis.
[0170] The embodiments of the present application achieve feasible path planning in various application scenarios; through scanning adjustment, smooth transitions of the position, velocity, and non-zero velocity connection between adjacent two path segments are achieved, reducing the number of frequent starts and stops of the multi-axis device during the execution of the movement, shortening the cycle time of the operation, realizing stable control of the multi-axis device during the operation process, and improving production efficiency.
[0171] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not imply the order of execution. The execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0172] Corresponding to the method for trajectory planning of a multi-axis device provided in the above embodiments, Figure 4 FIG. shows a schematic structural diagram of a trajectory planning device for a multi-axis device provided in an embodiment of the present application. For the sake of illustration, only the parts related to the embodiments of the present application are shown.
[0173] Referring to Figure 4 , the trajectory planning device for the multi-axis device includes:
[0174] A path verification unit 41, configured to verify whether each path segment meets the trajectory executable condition based on the constraint conditions and expected displacements of each path segment in the path segment list;
[0175] A reverse scanning unit 42, configured to, when the path segment does not meet the trajectory executable condition, perform reverse scanning starting from the last path segment, and adjust the starting velocity and ending velocity of the path segment based on the constraint conditions and expected displacements;
[0176] A forward scanning unit 43, configured to perform forward scanning starting from the first path segment, and calculate each running time period and target constraint condition of the path segment based on the adjusted starting velocity, adjusted ending velocity, the constraint conditions, and the expected displacement;
[0177] A synchronization processing unit 44, configured to perform synchronization processing on the trajectories of each axis of the path segment based on the running time period and the target constraint condition, and generate trajectory planning information corresponding to each axis;
[0178] A trajectory planning unit 45 is configured to generate motion trajectory points based on the trajectory planning information, and the motion trajectory points are used to indicate the position information during the operation of the multi-axis device.
[0179] In a possible implementation manner, each of the above units is further configured to execute each step in the above method embodiments.
[0180] Figure 5 The schematic hardware structure of the electronic device 5 is shown.
[0181] As Figure 5 shown, the electronic device 5 in this embodiment includes at least one processor 50 ( Figure 5 only one is shown in the figure), a memory 51, and a computer program 52 that can run on the processor 50 is stored in the memory 51. When the processor 50 executes the computer program 52, the steps in the above method embodiments are implemented, such as Figure 1 S101 to S105 shown in the figure. Alternatively, when the processor 50 executes the computer program 52, the functions of each module / unit in the above device embodiments are implemented.
[0182] It can be understood that the structure schematically shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 5. In other embodiments of the present application, the electronic device 5 may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0183] The electronic device 5 may be the multi-axis device or multi-axis robotic arm in the above embodiments, including, but not limited to, the processor 50 and the memory 51. Those skilled in the art can understand that Figure 5 merely examples of the electronic device 5 do not constitute a limitation on the electronic device 5, and it may include more or fewer components than those shown in the figure, or combine certain components, or have different components. For example, the server may further include an input and sending device, a network access device, a bus, etc.
[0184] The processor 50 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0185] The processor 50 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 50 is a cache memory. This memory can store instructions or data that the processor 50 has just used or is reusing. If the processor 50 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces the processor 50's waiting time, and thus improves system efficiency.
[0186] In some embodiments, the memory 51 may be an internal storage unit of the electronic device 5, such as a hard disk or memory of the electronic device 5. The memory 51 may also be an external storage device of the electronic device 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. equipped on the electronic device 5. Furthermore, the memory 51 may include both an internal storage unit of the electronic device 5 and an external storage device. The memory 51 is used to store an operating system, application programs, a boot loader, data, and other programs, such as the program code of a computer program. The memory 51 may also be used to temporarily store data that has been sent or is about to be sent.
[0187] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0188] It should be noted that the structure of the above-mentioned electronic device is only illustrative, and based on different application scenarios, it may also include other physical structures, and the physical structure of the electronic device is not limited here.
[0189] In the above embodiments, the descriptions of the respective embodiments have their own focuses. For parts not described or recorded in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0190] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, which when executed by a processor can implement the steps in the above-mentioned method embodiments.
[0191] An embodiment of the present application provides a computer program product, which when running on a server enables the server to implement the steps in the above-mentioned method embodiments.
[0192] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above-mentioned method embodiments of the present application, it can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0193] The electronic device, computer storage medium, and computer program product provided in the above embodiments of the present application are all used to execute the method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects corresponding to the method provided above, and will not be elaborated here.
[0194] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.
[0195] It should be understood that the above is only to help those skilled in the art better understand the embodiments of the present application, rather than to limit the scope of the embodiments of the present application. Those skilled in the art can obviously make various equivalent modifications or changes according to the above examples. For example, some steps in the various embodiments of the above detection method may not be necessary, or some steps may be newly added, etc. Or any combination of any two or any multiple of the above embodiments. The solutions after such modifications, changes or combinations also fall within the scope of the embodiments of the present application.
[0196] It should also be understood that the classification of the manners, situations, categories, and embodiments in the embodiments of the present application is only for the convenience of description and should not constitute a special limitation. The features in various manners, categories, situations, and embodiments can be combined without conflict.
[0197] It should further be understood that in the various embodiments of the present application, if there is no special description and logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced to each other. The technical features in different embodiments can be combined to form new embodiments according to their internal logical relationships.
[0198] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0199] In the embodiments provided in the present application, it should be understood that the disclosed device / network device and method can be implemented in other ways. For example, the device / network device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical, mechanical or other form.
[0200] The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they can be located in one place, or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0201] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the protection scope of the present application.
[0202] Finally, it should be noted that the above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or replacements within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claimed rights.
Claims
1. A trajectory planning method for a multi-axis device, characterized in that The method includes: Based on the constraint conditions and expected displacements of each path segment in the path segment list, verifying whether each path segment meets the trajectory executable conditions; When the path segment does not meet the trajectory executable conditions, starting from the last path segment, scanning backward, and adjusting the starting speed and ending speed of the path segment based on the constraint conditions and expected displacements; Starting from the first path segment, scanning forward, and calculating each running time period and target constraint conditions of the path segment based on the adjusted starting speed, adjusted ending speed, the constraint conditions, and the expected displacement; Based on the running time period and the target constraint conditions, synchronously processing the trajectories of each axis of the path segment to generate trajectory planning information corresponding to each axis; Based on the trajectory planning information, generating motion trajectory points, where the motion trajectory points are used to indicate the position information during the operation of the multi-axis device.
2. The method according to claim 1, wherein The constraint conditions include maximum acceleration and maximum jerk; the verifying whether each path segment meets the trajectory executable conditions based on the constraint conditions and expected displacements of each path segment in the path segment list includes: When the maximum acceleration is achievable, determining the jerk pulse duration based on the maximum acceleration and the maximum jerk; Calculating the reference displacement of the path segment based on the jerk pulse duration, the starting speed, the ending speed, and the maximum acceleration; Verifying whether the path segment meets the trajectory executable conditions based on the magnitude relationship between the expected displacement and the reference displacement; Wherein, when the expected displacement is greater than the reference displacement, the trajectory executable conditions are met, and when the expected displacement is less than the reference displacement, the trajectory executable conditions are not met.
3. The method according to claim 1, wherein The constraint conditions include maximum acceleration and maximum jerk; the verifying whether each path segment meets the trajectory executable conditions based on the constraint conditions and expected displacements of each path segment in the path segment list further includes: When the maximum acceleration is not achievable, determining the jerk pulse duration based on the starting speed, the ending speed, and the maximum jerk; Calculating the reference displacement of the path segment based on the jerk pulse duration, the starting speed, and the ending speed; Verifying whether the path segment meets the trajectory executable conditions based on the magnitude relationship between the expected displacement and the reference displacement; Wherein, when the expected displacement is greater than the reference displacement, the trajectory executable conditions are met, and when the expected displacement is less than the reference displacement, the trajectory executable conditions are not met.
4. The method according to claim 2 or 3, characterized in that, The expression for verifying whether each path segment meets the trajectory executable conditions is: where h is the desired displacement, is the jerk pulse duration, when the maximum acceleration is achievable, when the maximum acceleration is not achievable, a max is the maximum acceleration, j max is the maximum jerk, v s is the starting velocity, v e is the ending velocity; if the above expression holds, the condition for the trajectory to be executable is satisfied; if the inequality does not hold, the condition for the trajectory to be executable is not satisfied; the desired displacement is determined based on the starting coordinates and ending coordinates of the path segment.
5. The method according to claim 2, characterized in that, The adjusting the starting speed and ending speed of the path segment based on the constraint conditions and expected displacement includes: When the starting speed is greater than the ending speed and the maximum acceleration is achievable, determining the starting speed of the (i + 1)-th path segment based on the value of the discriminant of the preset equation; Adjust the termination speed of the $i$-th path segment based on the starting speed of the $(i + 1)$-th path segment, where the termination speed of the $i$-th path segment is equal to the starting speed of the $(i + 1)$-th path segment; where $i$ is an integer greater than or equal to 1, the preset equation is an equation for solving the starting speed, and the discriminant is determined based on the jerk pulse duration, the maximum acceleration, the desired displacement, and the termination speed.
6. The method according to claim 5, characterized in that, Determining the starting speed of the $(i + 1)$-th path segment based on the value of the discriminant of the preset equation includes: When the value of the discriminant is less than zero, adjust the starting speed and the termination speed of the path segment to zero; When the value of the discriminant is greater than or equal to zero, adjust the starting speed to the root of the preset equation.
7. The method according to claim 6, wherein The step of adjusting the starting speed to the root of the preset equation when the value of the discriminant is greater than or equal to zero includes: The expression of the discriminant is: When the value of the discriminant is equal to zero, the expression for solving the starting speed is: When the value of the discriminant is greater than zero, the expression for solving the starting speed is: Among them, δ is the root discriminant, h is the expected displacement, is the jerk pulse duration, a max is the maximum acceleration, j max is the maximum jerk, v s is the initial velocity, v e is the final velocity.
8. The method according to claim 3, wherein Adjusting the starting speed of the path segment based on the constraint conditions and the desired displacement includes: When the starting speed is greater than the termination speed and the maximum acceleration cannot be reached, adjust the starting speed based on the desired displacement, the jerk pulse duration, and the termination speed.
9. The method according to claim 8, wherein Adjusting the starting speed based on the desired displacement, the jerk pulse duration, and the termination speed includes: Calculate the adjusted value of the starting speed based on the following expression: where h is the desired displacement, is the jerk pulse duration, v s is the initial velocity, v e is the final velocity.
10. The method according to claim 2, wherein The constraint conditions also include the maximum speed; calculating the respective running time periods of the path segment based on the adjusted starting speed, the adjusted termination speed, the constraint conditions, and the desired displacement includes: When the maximum speed can be reached and the maximum acceleration in the acceleration phase can be reached, calculate the acceleration time period of the path segment based on the maximum acceleration in the acceleration phase, the starting speed, and the maximum jerk; When the maximum speed can be reached and the maximum acceleration in the deceleration phase can be reached, calculate the deceleration time period of the path segment based on the maximum acceleration in the deceleration phase, the termination speed, and the maximum jerk; When the maximum speed can be reached, calculate the constant speed time period of the path segment based on the desired displacement, the maximum speed, the starting speed, the acceleration time period, the deceleration time period, and the termination speed; where the respective running time periods include the acceleration time period, the deceleration time period, and the constant speed time period.
11. The method according to claim 3, characterized in that, The constraint conditions also include the maximum speed; calculating the respective running time periods of the path segment based on the adjusted starting speed, the adjusted termination speed, the constraint conditions, and the desired displacement includes: When the maximum speed can be reached and the maximum acceleration in the acceleration phase cannot be reached, calculate the acceleration time period based on the maximum speed, the starting speed, and the maximum jerk; When the maximum speed can be reached and the maximum acceleration in the deceleration phase cannot be reached, calculate the deceleration time period based on the maximum speed, the terminal speed, and the maximum jerk. When the maximum speed can be reached, calculate the constant speed time period of the path segment based on the desired displacement, the maximum speed, the starting speed, the acceleration time period, the deceleration time period, and the terminal speed. Wherein, each operation time period includes the acceleration time period, the deceleration time period, and the constant speed time period.
12. The method according to claim 2 or 3, characterized in that, Calculating each operation time period of the path segment based on the adjusted starting speed, the adjusted terminal speed, the constraint condition, and the desired displacement includes: When the maximum speed cannot be reached and the maximum accelerations in both the acceleration phase and the deceleration phase can be reached, calculate the acceleration time period and the deceleration time period of the path segment based on the following expression: where h is the desired displacement, a max is the maximum acceleration, j max is the maximum jerk, v s is the initial velocity, v e is the final velocity, T j1 is the jerk pulse duration in the acceleration phase, T j2 is the jerk pulse duration in the deceleration phase, T a is the acceleration time period, T b is the deceleration time period, Δ is an intermediate variable determined based on the maximum acceleration, maximum jerk, initial velocity, final velocity, and desired displacement, v max is the maximum velocity.
13. The method according to claim 12, wherein The method further includes: If the acceleration time period is less than twice the jerk pulse duration in the acceleration phase, or the deceleration time period is less than twice the jerk pulse duration in the deceleration phase, adjust the maximum acceleration from the first value to the second value until the acceleration time period is greater than twice the jerk pulse duration in the acceleration phase and the deceleration time period is greater than twice the jerk pulse duration in the deceleration phase; the second value is less than the first value.
14. The method according to any one of claims 10 to 12, characterized in that, The method further includes: Calculate the constrained maximum acceleration and the constrained maximum speed based on the acceleration time period, the deceleration time period, the starting speed, the terminal speed, and the desired displacement. Wherein, the target constraint condition includes the constrained maximum acceleration and the constrained maximum speed.
15. The method according to any one of claims 10 to 12, characterized in that Synchronizing the trajectories of each axis of the path segment based on the operation time period and the target constraint condition to generate trajectory planning information corresponding to each axis includes: Based on the desired displacement, the acceleration time period, the starting speed, the deceleration time period, and the terminal speed, determine whether the axis with a non-maximum operation duration of the path segment meets the extension condition.
16. The method according to claim 15, characterized in that The method further includes: When the axis with a non-maximum operation duration meets the extension condition, adjust the desired maximum speed of the axis with a non-maximum operation duration based on the binary iteration method, perform time synchronization for each axis, and obtain the trajectory planning information of each axis. When the axis with a non-maximum operation duration does not meet the extension condition, calculate the allowed maximum operation duration of the axis with a non-maximum operation duration based on the allowed maximum speed. When the reference operation duration of the axis with the maximum operation duration is less than the allowed maximum operation duration, adjust the desired maximum speed of the axis with a non-maximum operation duration so that the operation durations of each axis are the same. When the reference operation duration of the axis with the maximum operation duration is greater than the allowed maximum operation duration, adjust the starting speed and the terminal speed of the path segment, and execute the steps of forward scanning and subsequent steps.
17. The method according to claim 15, wherein Determining whether the axis with a non-maximum operation duration of the path segment meets the extension condition based on the desired displacement, the acceleration time period, the starting speed, the deceleration time period, and the terminal speed includes: Based on the following expression, determine whether the axis with non-maximum running duration meets the extension condition: where h is the expected displacement, T a is the acceleration time period, T b is the deceleration time period, v s is the starting speed, v e is the ending speed; when the above expression holds, the axis with a non-maximum running duration satisfies the expansion condition; when the above expression does not hold, the axis with a non-maximum running duration does not satisfy the expansion condition.
18. The method according to claim 16, characterized in that, The method further includes: Based on the following expression, determine the adjusted expected maximum speed: where h is the desired displacement, T a is the acceleration period, T b is the deceleration period, v s is the starting velocity, v e is the ending velocity, v lim is the desired maximum velocity.
19. The method according to claim 16, characterized in that, The method further includes: After trajectory synchronization, based on the acceleration period, deceleration period, starting speed, ending speed, and expected displacement of the path segment, calculate the speed constraint, acceleration constraint, and jerk constraint; the trajectory planning information includes the speed constraint, the acceleration constraint, and the jerk constraint.
20. The method according to claim 19, wherein The method further includes: Calculate the target maximum speed constraint through the following expression: where h is the desired displacement, T a is the acceleration time period, T b is the deceleration time period, v s is the starting speed, v e is the ending speed, v lim is the speed constraint, T v is the constant speed time period; The acceleration constraint includes the maximum acceleration constraint in the acceleration segment and the minimum acceleration constraint in the deceleration segment, and the jerk constraint includes the maximum jerk constraint in the acceleration segment and the minimum jerk constraint in the deceleration segment. Calculate the acceleration constraint and the jerk constraint through the following expressions: where a lima is the maximum acceleration constraint, J max is the maximum jerk constraint, a limd is the minimum acceleration constraint, J min is the minimum jerk constraint, v s is the initial velocity, v e is the terminal velocity, T j1 is the jerk pulse duration in the acceleration phase, T j2 is the jerk pulse duration in the deceleration phase, T a is the acceleration time period, T b is the deceleration time period, v lim is the velocity constraint.
21. The method according to claim 20, characterized in that, The generating of the motion trajectory points based on the trajectory planning information includes: Based on the trajectory planning information, generate motion trajectory points for the acceleration segment, constant speed segment, and deceleration segment respectively.
22. An electronic device, characterized in that, It includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, it implements the method according to any one of claims 1 to 21.
23. A computer program product, characterized in that, When the computer program product runs on a device, it causes the device to execute the method according to any one of claims 1 to 21.