A method for dynamic planning of tasks for an industrial robot
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-15
- Publication Date
- 2026-08-11
AI Technical Summary
对于包含固定工装、夹具、料框、工作台边缘、安全围栏或禁入区域的工业站点,如果仅在运行时临时拼接连续运动段,或者仅对相邻运动段进行局部平滑,轨迹规划引擎难以及早获得完整运动段、关键工艺点和静态避障约束,融合过渡或路径缩短过程中仍可能出现侵入固定障碍物安全区域的风险
本申请将连续可融合运动指令段的识别、参数整理和子任务封装前移至程序编写阶段和/或统一编译阶段,减少任务执行阶段解释器向后查找、重复判断和临时参数拼接的计算负担。
Smart Images

Figure CN122539355A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of industrial robot control technology, specifically relating to a method for dynamic planning of industrial robot tasks. Background Technology
[0002] In applications such as material handling, welding, gluing, grinding, assembly, and loading / unloading, industrial robots are typically programmed by users using teach pendants or offline programming software. Robot programs include motion instructions such as MoveL, MoveJ, and MoveC, as well as logical instructions such as input / output control, waiting, decision-making, looping, and subroutine calls. For scenarios requiring continuous motion and production cycle time, programs often incorporate multiple consecutive motion instructions that are merged and executed using a fusion radius or transition zone parameter.
[0003] In existing control methods, robot programs are typically compiled or syntax-checked after being written, and then interpreted line by line by the task interpreter during the task execution phase. When the task interpreter executes a motion instruction, it usually needs to continue reading adjacent program lines, temporarily determine whether subsequent motion instructions still meet the fusion conditions, and then concatenate multiple motion instructions that meet the conditions before sending them to the trajectory planning engine.
[0004] While the above approach works in typical short programs, it presents a significant runtime computational burden in industrial settings with numerous points, multiple fused motion segments, and frequent user insertions or modifications to process logic. The task interpreter needs to repeatedly perform instruction type checks, context continuity checks, and parameter organization along the critical path. The trajectory planning engine obtains complete multi-segment motion data relatively late, which can cause the robot to wait for trajectory planning results when entering continuous motion segments.
[0005] Furthermore, some existing trajectory smoothing technologies focus on solving the problem of velocity continuity or path transition between two adjacent trajectory segments, typically targeting local transition smoothing; some robot program compilation technologies focus on solving instruction parsing, format conversion, or graphical program interpretation problems. For industrial sites containing fixed tooling, fixtures, material frames, workbench edges, safety fences, or restricted areas, if continuous motion segments are only temporarily spliced during runtime, or if only local smoothing is performed on adjacent motion segments, the trajectory planning engine will have difficulty obtaining complete motion segments, key process points, and static obstacle avoidance constraints in a timely manner. During the fusion transition or path shortening process, there is still a risk of intruding into the safe area of fixed obstacles. Summary of the Invention
[0006] This application provides a method for dynamic programming of industrial robot tasks to solve one of the aforementioned technical problems.
[0007] The technical solution adopted in this application is as follows: This application provides a method for dynamic planning of industrial robot tasks, including: S100, during the robot program writing stage and / or unified compilation stage, performs compilation checks on the newly added, deleted or modified program lines in the main task and the affected instruction windows formed by their adjacent program lines, and extracts the motion parameters and context continuity parameters of each motion instruction. S200, based on the context continuity parameter, identify a fused motion instruction segment composed of continuous motion instructions that satisfies the fusion condition; S300, generate a fusion planning subtask for the fusion motion instruction segment. The fusion planning subtask includes a coverage line number, a list of motion instructions, a set of critical path points, a set of static obstacle avoidance points, a set of constraint conditions, and version verification information. Establish a mapping between the starting program line of the fusion motion instruction segment and the fusion planning subtask in the main task node table and the subtask mapping table. S400, when the main task runs to the starting program line, the dynamic task planner triggers the corresponding fusion planning subtask according to the mapping, so that the task interpreter skips the fusion judgment of the remaining motion instructions that have not been reached in the fusion motion instruction segment, and the trajectory planning engine generates the overall fusion trajectory based on the set of critical path points, the set of static obstacle avoidance points and the set of constraint conditions. S500, after the overall fusion trajectory is executed, update the program count position of the main task to the next program line after the end of the fusion motion instruction segment program line; S600, when the program content of the affected instruction window changes, the associated fusion planning subtask is invalidated, split, merged, or regenerated according to the version verification information, and the mapping is updated.
[0008] According to one embodiment of this application, the motion parameters include instruction type, target point, velocity parameters, acceleration parameters, fusion radius or transition zone parameters, tool coordinate system, workpiece coordinate system, and motion mode; the context continuity parameters include a logical interruption flag between adjacent program lines, a coordinate system compatibility flag, a safety constraint compatibility flag, a fusion parameter validity flag, and a motion sequence flag.
[0009] According to one embodiment of this application, the fusion conditions include: adjacent program lines are all motion instructions; there are no logical instructions of the type of waiting, input / output control, condition judgment, loop jump, stop or pause between adjacent motion instructions; the tool coordinate system, workpiece coordinate system and safety constraints of adjacent motion instructions meet preset compatibility conditions; and each motion instruction has a fusion radius or transition zone parameter that allows fusion.
[0010] According to one embodiment of this application, in S200, the fused motion instruction segment is identified by a sliding window and / or a state machine; when two or more consecutive motion instructions meet the fusion condition, the first motion instruction that meets the fusion condition is taken as the starting point of the candidate segment, and when a program line that does not meet the fusion condition is detected, the previous motion instruction is taken as the ending point of the candidate segment.
[0011] According to one embodiment of this application, the fusion planning subtask further includes a subtask number, a main task number to which it belongs, a target point sequence, a fusion window set, time parameterization information, parameter verification values, and a subtask status; the version verification information includes the main task version number and parameter verification values generated from the motion parameters of the fusion motion command segment.
[0012] According to one embodiment of this application, the set of critical path points is obtained by parsing each motion command in the fused motion command segment. The set of critical path points includes at least three types of points: start point, end point, waypoint, corner point, process hold point, speed constraint point, attitude change point, and safety constraint point. Each critical path point includes at least four items of point coordinates, attitude information, point type, speed limit, acceleration limit, fusion radius, passage mode, and process flag.
[0013] According to one embodiment of this application, the set of static obstacle avoidance points is generated based on the robot workspace model, tooling fixture model, user-preset obstacle avoidance data and / or fixed obstacle information in the offline programming environment; each static obstacle avoidance point includes at least four of the following: obstacle avoidance point number, obstacle location, obstacle avoidance safety radius, obstacle type, action path segment, and constraint priority.
[0014] According to one embodiment of this application, in S400, the trajectory planning engine constructs a fused path constraint graph based on the set of critical path points, the set of static obstacle avoidance points, and the set of constraint conditions. The fused path constraint graph uses critical path points as path nodes and feasible connection relationships between adjacent critical path points as edges, and records velocity constraints, attitude constraints, fusion window constraints, and static obstacle avoidance constraints on the edges.
[0015] According to one embodiment of this application, when the feasible connection relationship in the fusion path constraint graph overlaps with the obstacle avoidance safety radius of the static obstacle avoidance point, the trajectory planning engine inserts an obstacle avoidance intermediate point in the corresponding path segment, and / or adjusts the fusion window range, curve control points, local weight factors, or node distribution so that the generated overall fusion trajectory bypasses the corresponding static obstacle avoidance point.
[0016] According to one embodiment of this application, in S400, the trajectory planning engine generates a continuous spatial path using B-spline curves, non-uniform rational B-spline curves, or piecewise polynomial curves, and performs unified time parameterization on the continuous spatial path; wherein, when the path curvature is greater than a preset curvature threshold, the path distance from the static obstacle avoidance point is less than a preset safety margin, or the path passes through a process holding point, the speed, acceleration, and / or jerk of the corresponding path segment are reduced.
[0017] Due to the adoption of the above technical solution, the beneficial effects achieved by this application are as follows: This application moves the identification, parameter organization, and subtask encapsulation of continuous and fusionable motion command segments to the program writing stage and / or unified compilation stage, reducing the computational burden of the interpreter searching backward, making repeated judgments, and concatenating temporary parameters during the task execution stage.
[0018] This application establishes a correspondence between the starting program line and the fusion planning subtask by using a main task node table and a subtask mapping table, so that the complete subtask can be triggered when the main task executes to the first line of the fusion motion segment, thus shortening the link between task interpretation and trajectory planning triggering.
[0019] The fusion planning subtask of this application includes a set of critical path points, a set of static obstacle avoidance points, and a set of constraints, enabling the trajectory planning engine to plan the entire continuous motion segment as a whole, while considering path continuity, process maintenance requirements, robot motion constraints, and fixed obstacle safety constraints.
[0020] This application utilizes version verification information to invalidate, split, merge, or regenerate fusion planning subtasks after partial program modifications, thereby reducing the risk of inconsistencies between the planning results after program modifications and the actual program content.
[0021] This application does not require users to manually define fusion subtasks, and users can still maintain the original robot programming habits such as MoveL, MoveJ, and MoveC, which has good engineering compatibility. Attached Figure Description
[0022] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A flowchart for integrating planning during the runtime of traditional methods; Figure 2 This invention provides a flowchart of the task dynamic planning method that integrates pre-planning of subtasks. Figure 3 This is a schematic diagram of the system structure of the present invention; Figure 4 A diagram showing the mapping relationship between the main task and the integrated planning sub-tasks; Figure 5 A schematic diagram illustrating the unified trajectory planning within the integrated planning sub-tasks. Detailed Implementation
[0023] To more clearly illustrate the overall concept of this application, a detailed explanation is provided below with reference to the accompanying drawings.
[0024] Many specific details are set forth in the following description to provide a thorough understanding of this application. However, this application may also be implemented in other ways different from those described herein. Therefore, the scope of protection of this application is not limited to the specific embodiments disclosed below. It should be noted that, unless otherwise specified, the embodiments of this application and the features thereof can be combined with each other.
[0025] In this application, unless otherwise expressly specified and limited, the "above" or "below" of the second feature can mean that the first and second features are in direct contact, or that the first and second features are in indirect contact through an intermediate medium. In the description of this specification, references to terms such as "an embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described can be combined in any suitable manner in one or more embodiments or examples.
[0026] Example 1 like Figure 1 As shown, traditional industrial robot task execution typically involves a task interpreter interpreting the main task program line by line during runtime. After reading the current motion instruction, the interpreter needs to search for adjacent motion instructions and temporarily determine whether these adjacent instructions meet the fusion condition. If the fusion condition is met, the interpreter also needs to organize multiple motion parameters during runtime and send a planning request to the trajectory planning engine. Because the fusion condition judgment, adjacent instruction search, and parameter organization are all located within the runtime execution chain, this can easily increase the runtime interpretation burden in complex robot programs or scenarios with multiple continuous motions, leading to a later triggering of trajectory planning.
[0027] like Figure 2As shown, the industrial robot task dynamic planning method provided in this embodiment moves the identification of continuous and fusionable motion command segments, the generation of fusion planning subtasks, and the establishment of the mapping between the main task and subtasks to the writing and compilation stage. Specifically, when the user writes or modifies the robot program, the system performs real-time compilation checks on the affected command windows and identifies continuous and fusionable motion command segments. During the unified compilation process, the system generates fusion planning subtasks and establishes a main task node table and a subtask mapping table. When the main task enters the execution stage and runs to the first line of the fusion planning subtask, the dynamic task planner can trigger the corresponding fusion planning subtask according to the mapping relationship, without the task interpreter needing to continue judging the remaining motion commands in the fusion motion command segment line by line.
[0028] like Figure 3 As shown, the industrial robot task dynamic planning system in this embodiment may include a teach pendant or offline programming software, a real-time compilation and checking module, a fusion motion recognition module, a fusion planning sub-task generation module, a dynamic task planner, a task interpreter, a trajectory planning engine, a task execution engine, and a robot body. The teach pendant or offline programming software receives robot programs input by the user; the real-time compilation and checking module performs lexical checks, syntax checks, instruction type recognition, motion parameter checks, and context continuity checks on program lines; the fusion motion recognition module determines continuous motion instruction segments that meet fusion conditions; the fusion planning sub-task generation module generates fusion planning sub-tasks including a motion instruction list, a set of critical path points, a set of static obstacle avoidance points, a set of constraint conditions, and version verification information; the dynamic task planner maintains a main task node table and a sub-task mapping table, and triggers corresponding fusion planning sub-tasks during the execution phase; the trajectory planning engine generates an overall fusion trajectory based on the fusion planning sub-tasks; and the task execution engine drives the robot body to execute the overall fusion trajectory.
[0029] like Figure 4 As shown, in the main task program, continuous mergeable motion instruction segments can be mapped to merge planning subtask nodes. For example, when lines 10 to 12 are continuous MoveL motion instructions, merge planning subtask S1 can be generated; when lines 14 to 15 are continuous MoveJ motion instructions, merge planning subtask S2 can be generated. The dynamic task planner represents ordinary program lines as ordinary nodes and merged motion instruction segments as merge planning subtask nodes in the main task node table, and records the merge planning subtask number, starting program line, and ending program line in the subtask mapping table. When the main task executes to the starting program line of a merge planning subtask, the dynamic task planner triggers the corresponding merge planning subtask according to the subtask mapping table; when the merge planning subtask is completed, the program counter jumps to the next program line after the ending program line of the merge planning subtask.
[0030] like Figure 5 As shown, the fusion planning subtask can include a list of motion instructions, a set of critical path points, a set of static obstacle avoidance points, and a set of constraints. The trajectory planning engine constructs a fusion path constraint graph based on this data and generates a continuous spatial path based on the graph. When generating the continuous spatial path, the engine can set process-maintaining points as interpolation constraint points that must be precisely traversed, and allow approximate transition points as fitting constraint points or optimization control points. When a path segment overlaps with the safe radius of a static obstacle avoidance point, the engine can insert an obstacle avoidance intermediate point, or adjust the fusion window range, curve control points, local weight factors, or node distribution to ensure the overall fusion trajectory avoids the static obstacle area. After generating the continuous spatial path, the engine performs unified time parameterization on the entire path to obtain an overall fusion trajectory that satisfies motion continuity, process-maintaining requirements, robot dynamics constraints, and static obstacle avoidance constraints.
[0031] This embodiment provides a method for dynamic task planning of an industrial robot. This method can be executed by an industrial robot control system, which includes a teach pendant or offline programming software 10, a real-time compilation and checking module 20, a motion recognition fusion module 30, a sub-task generation fusion module 40, a dynamic task planner 50, a task interpreter 60, a trajectory planning engine 70, a task execution engine 80, and a robot body 90.
[0032] The robot program includes: a teach pendant or offline programming software 10 for receiving robot programs written, deleted, or modified by the user; a real-time compilation check module 20 for performing compilation checks on program lines and extracting motion command-related parameters; a fusion motion recognition module 30 for recognizing continuous fusionable motion command segments; a fusion planning subtask generation module 40 for generating fusion planning subtasks based on the recognition results; a dynamic task planner 50 for maintaining the main task node table and subtask mapping table, and triggering corresponding fusion planning subtasks during the execution of the main task; a task interpreter 60 for interpreting ordinary program instructions; a trajectory planning engine 70 for generating the overall fusion trajectory based on the fusion planning subtasks; and a task execution engine 80 for controlling the robot body 90 to execute ordinary instructions or the overall fusion trajectory.
[0033] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the described embodiments are only some embodiments of the present invention, and not all embodiments. Other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are all within the protection scope of the present invention.
[0034] In this embodiment, the method for dynamic planning of industrial robot tasks includes the following steps.
[0035] S100, during the robot program writing and / or unified compilation stage, performs compilation checks on the newly added, deleted or modified program lines in the main task and the affected instruction windows formed by their adjacent program lines, and extracts the motion parameters and context continuity parameters of each motion instruction.
[0036] In this embodiment, the main task refers to the robot program task written by the user through a teach pendant or offline programming software 10. The main task may include motion instructions and non-motion logic instructions. The motion instructions may include MoveL, MoveJ, MoveC, or other instructions used to control the robot body 90 to perform linear motion, joint motion, circular motion, or compound motion. The non-motion logic instructions may include input / output control instructions, wait instructions, condition judgment instructions, loop jump instructions, stop instructions, pause instructions, or subroutine call instructions.
[0037] When a user adds, deletes, or modifies a program line, the real-time compilation check module 20 does not only check the program line itself, nor does it necessarily rescan the entire main task. Instead, it selects the program line and several adjacent program lines before and after it to form an affected instruction window, centered on the modified program line. The range of the affected instruction window can be determined based on the maximum allowable fusion segment length of the robot program, the controller's computing power, user configuration, or preset rules. For example, it can select three lines before and after the modified program line, five lines before and after the modified program line, or a set of program lines extending forward and backward from the modified program line to the point where a logical interruption instruction is encountered.
[0038] The real-time compilation and inspection module 20 performs lexical checks, syntax checks, instruction type identification, motion parameter validity checks, and context continuity checks on the affected instruction windows. For program lines identified as motion instructions, the real-time compilation and inspection module 20 extracts the motion parameters of the motion instruction. The motion parameters are used to characterize the motion attributes and plannable attributes of a single motion instruction, enabling subsequent modules to determine whether the motion instruction meets the basic conditions for participating in fusion planning.
[0039] Meanwhile, the real-time compilation check module 20 also extracts context continuity parameters. These parameters characterize whether there are contextual factors between adjacent program lines that disrupt continuous motion execution. For example, when a wait instruction, input / output control instruction, or conditional judgment instruction is inserted between two motion instructions, although the two motion instructions are close in the program text, their motion execution logic has been interrupted by non-motion logic instructions. In this case, they should not be directly identified as the same fused motion instruction segment.
[0040] Through the above processing, S100 converts the "local program content being edited by the user" into a data object that can be judged, compared, and verified, providing a data foundation for the recognition of subsequent continuous fusion motion command segments. The technical effect of this step is that local changes that may affect the fusion plan can be discovered during the program writing or local modification process, avoiding the need for the task interpreter 60 to search and temporarily organize parameters line by line when the robot is running.
[0041] S200, based on the context continuity parameter, identify a fused motion instruction segment composed of continuous motion instructions that satisfies the fusion condition.
[0042] In this embodiment, the motion recognition module 30 receives motion parameters and context continuity parameters output by the real-time compilation and inspection module 20, and determines whether there are continuous motion instruction segments in the affected instruction window that can be used as overall planning objects based on these parameters.
[0043] Specifically, the motion recognition module 30 can sequentially read program lines starting from the initial program line of the affected instruction window. When the current program line is identified as a motion instruction, and the subsequent program line is also a motion instruction, the motion recognition module 30 further checks the context continuity parameters between the two. If there is no logical interruption between them, and the coordinate system, safety constraints, fusion radius, or transition zone parameters meet preset compatibility conditions, then these two motion instructions are considered to meet the fusion conditions. If subsequent consecutive program lines continue to meet the above fusion conditions, then these consecutive motion instructions are grouped into the same fused motion instruction segment.
[0044] For example, a user enters the following consecutive lines of code: MoveL P1,V1,Z10; MoveL P2,V1,Z10; MoveL P3,V1,Z0.
[0045] If there are no logical interruption instructions such as input / output control, waiting, condition judgment, loop jump, stop or pause among the above three MoveL instructions, and the tool coordinate system, workpiece coordinate system and safety constraints used by the three instructions meet the compatibility conditions, and each instruction has a fusion radius or transition zone parameter that allows fusion, then the fusion motion recognition module 30 will recognize the above three motion instructions as a fusion motion instruction segment.
[0046] Conversely, if the user inserts a wait instruction, such as Wait 1s, between the second and third MoveL instructions, this wait instruction will disrupt the continuous motion execution relationship. In this case, even if the third MoveL instruction is still a motion instruction, the motion recognition module 30 will not merge the motion instructions before and after the wait instruction into the same fused motion instruction segment.
[0047] Through the above processing, S200 does not simply determine the fusion object based on "whether the program lines are continuous" or "whether the instruction names are the same," but rather combines motion parameters and context continuity parameters to determine whether continuous motion has a basis for overall planning. The technical effect of this step is that it can avoid incorrectly encapsulating motion instructions that are interrupted by logical control, pauses, safety conditions, or coordinate system switching into fusion planning subtasks, thereby ensuring that subsequent overall trajectory planning does not violate the original program logic and safety constraints.
[0048] S300, generate a fusion planning subtask for the fusion motion command segment. The fusion planning subtask includes a coverage line number, a list of motion commands, a set of critical path points, a set of static obstacle avoidance points, a set of constraints, and version verification information. Establish a mapping between the starting program line of the fusion motion command segment and the fusion planning subtask in the main task node table and the subtask mapping table.
[0049] In this embodiment, after the motion recognition module 30 determines a motion command segment, the motion planning subtask generation module 40 generates a corresponding motion planning subtask based on the motion command segment. The motion planning subtask is a data unit that the trajectory planning engine 70 can directly process. It does not change the user's original program text in the main task, nor does it change the order of motion commands in the main task. Instead, it establishes a task planning structure outside the main task execution logic for advance planning and rapid triggering.
[0050] The coverage line number is used to indicate the start and end program lines covered by the fusion planning subtask in the main task. For example, when lines n to n+2 of the main task contain three motion instructions that satisfy the fusion conditions, the coverage line number records that the fusion planning subtask covers lines n to n+2.
[0051] The motion instruction list is used to store each motion instruction in the fused motion instruction segment and its corresponding motion parameters. The motion instruction list may include the instruction type, target point, velocity parameters, acceleration parameters, fusion radius or transition zone parameters, tool coordinate system, workpiece coordinate system, motion mode, and safety constraints for each motion instruction. Therefore, when the trajectory planning engine 70 receives the fused planning subtask, it no longer needs the task interpreter 60 to extract these parameters one by one at runtime.
[0052] The critical path point set describes the points in the continuous motion command segment that need to be used as path constraints during trajectory planning. For example, the critical path point set may include start point, end point, waypoints, corner points, process hold points, velocity constraint points, attitude change points, and safety constraint points. For process hold points in welding, gluing, grinding, or assembly tasks, the trajectory planning engine 70 can determine, based on the critical path point set, which points must be traversed precisely and which points are allowed to be approximated within the fusion radius.
[0053] The static obstacle avoidance point set describes fixed obstacles or restricted areas that need to be avoided in the robot's workspace. For example, the static obstacle avoidance point set may include fixture edge points, tooling protrusion points, material frame boundary points, workbench edge points, safety fence boundary points, or restricted area boundary points. By incorporating the static obstacle avoidance point set into the fusion planning subtask, the trajectory planning engine 70 can simultaneously consider the safety constraints of fixed obstacles during the overall trajectory generation stage, rather than only performing local smoothing between adjacent trajectory segments.
[0054] The constraint set is used to record the constraints related to the generation of the overall fusion trajectory, including velocity constraints, acceleration constraints, jerk constraints, attitude change constraints, fusion window constraints, robot joint restriction constraints, singularity avoidance constraints, process retention constraints, and static obstacle avoidance constraints.
[0055] The version verification information is used to determine whether the fusion planning subtask is still consistent with the current main task program content. Version verification information may include the main task version number, the fusion motion command segment version number, parameter verification values, or timestamps. When the user modifies the points, velocities, fusion radius, coordinate system, or safety constraints within the fusion motion command segment, the version verification information will change, and the dynamic task planner 50 can use this information to determine whether the original fusion planning subtask needs to be invalidated or regenerated.
[0056] After generating the fusion planning subtask, the dynamic task planner 50 represents the fusion motion instruction segment as a fusion planning subtask node in the main task node table, and establishes a mapping relationship between the starting program line of the fusion motion instruction segment and the fusion planning subtask in the subtask mapping table. Thus, when the main task runs to this starting program line, the system can directly locate the complete fusion planning subtask through the mapping relationship.
[0057] Through the above processing, S300 encapsulates multiple motion instructions originally scattered in the main task into a fusion planning subtask that the trajectory planning engine 70 can directly process, and establishes the mapping relationship required for rapid runtime triggering. The technical effect of this step is to reduce the time spent on runtime parameter processing, fusion judgment, and interface conversion, enabling the trajectory planning engine 70 to obtain complete continuous motion segments and their path constraint information earlier.
[0058] S400, when the main task runs to the starting program line, the dynamic task planner triggers the corresponding fusion planning subtask according to the mapping, so that the task interpreter skips the fusion judgment of the remaining motion instructions that have not been reached in the fusion motion instruction segment, and the trajectory planning engine generates the overall fusion trajectory based on the set of critical path points, the set of static obstacle avoidance points and the set of constraint conditions.
[0059] In this embodiment, after the main task starts running, the task interpreter 60 interprets the program nodes in the main task sequentially according to the program count position. When the program count position reaches a certain program line, the dynamic task planner 50 queries the main task node table and the subtask mapping table to determine whether the program line is the starting program line of a certain fusion planning subtask.
[0060] When the program line corresponds to a normal instruction, the task interpreter 60 interprets and executes the instruction in a normal manner. When the program line is the starting line of a fusion planning subtask, the dynamic task planner 50 determines the corresponding fusion planning subtask based on the subtask mapping table and sends the subtask number or complete subtask data of the fusion planning subtask to the trajectory planning engine 70. At this time, the task interpreter 60 no longer continues to interpret the remaining motion instructions that have not yet arrived within the fusion motion instruction segment, nor does it temporarily determine whether these remaining motion instructions still meet the fusion conditions during runtime.
[0061] After receiving the fusion planning subtask, the trajectory planning engine 70 uses this subtask as the overall planning object, rather than simply smoothing local corners between two adjacent motion commands. The trajectory planning engine 70 generates the overall fused trajectory based on the critical path point set, the static obstacle avoidance point set, and the constraint condition set. Specifically, the trajectory planning engine 70 can first determine the path skeleton of continuous motion segments based on the critical path point set, then determine whether the initial path intrudes into the obstacle avoidance safety radius of fixed obstacles based on the static obstacle avoidance point set, and comprehensively constrain the path shape, speed changes, attitude changes, and process maintenance requirements based on the constraint condition set.
[0062] In one specific implementation, the trajectory planning engine 70 can construct a fused path constraint graph based on the set of critical path points and generate a continuous spatial path according to the fused path constraint graph. For process hold points that must be traversed precisely, the trajectory planning engine 70 sets them as interpolation constraint points; for transition points that are allowed to be traversed approximately, the trajectory planning engine 70 can perform offset optimization within the fusion radius or transition zone to improve trajectory continuity and operational efficiency. For path segments that overlap with the safety radius of static obstacle avoidance points, the trajectory planning engine 70 can insert obstacle avoidance intermediate points, or adjust curve control points, local weight factors, node distribution, or fusion window range to make the overall fused trajectory bypass the corresponding fixed obstacles.
[0063] Through the above processing, S400 enables the main task to directly trigger the complete fusion planning subtask when it reaches the first motion instruction in the fusion motion instruction segment. The technical effect of this step is that it avoids the task interpreter 60 from continuing to read, judge, and splice the remaining motion instructions during runtime, shortening the link between task interpretation and trajectory planning triggering; at the same time, the trajectory planning engine 70 can perform overall path generation and overall time parameterization based on complete continuous motion segments, improving the continuity, safety, and process stability of multi-segment motion fusion trajectories.
[0064] S500, after the overall fusion trajectory is executed, the program count position of the main task is updated to the next program line after the end of the fusion motion instruction segment.
[0065] In this embodiment, the task execution engine 80 receives the overall fused trajectory output by the trajectory planning engine 70 and controls the robot body 90 to perform continuous motion according to the overall fused trajectory. After the overall fused trajectory is completed, the dynamic task planner 50 determines the end program line of the fused motion instruction segment according to the coverage line number in the fused planning subtask, and updates the program count position of the main task to the next program line after the end program line.
[0066] For example, if the fusion planning subtask S1 covers lines n to n+2 of the main task, then after the overall fusion trajectory corresponding to S1 is executed, the program counter position is updated to line n+3. At this time, the main task continues to execute the normal instruction corresponding to line n+3 or the next fusion planning subtask.
[0067] The above method of updating the program counter position does not change the logical order of the motion instructions from line n to line n+2 in the original main task. Rather, because these three motion instructions have already been executed as a whole as a fusion planning subtask, the main task does not need to execute these overwritten motion instructions one by one again. Therefore, it reduces redundant processing by the runtime interpreter while ensuring that the main task continues to run in the original program order.
[0068] Through the above processing, S500 solves the problem of how the main task connects to subsequent programs after the fusion planning subtask is completed. Its technical effect is that, while skipping the fusion judgment of each remaining motion instruction within the fusion motion instruction segment during runtime, it still maintains the consistency of the main task program execution order and program counting logic, avoiding duplicate execution, missed execution, or program jump errors.
[0069] S600, when the program content of the affected instruction window changes, the associated fusion planning subtask is invalidated, split, merged, or regenerated according to the version verification information, and the mapping is updated.
[0070] In this embodiment, the user may modify the program lines that have already formed the fusion planning subtask during the program writing process. For example, the user may modify the motion point, velocity parameters, acceleration parameters, fusion radius, tool coordinate system, or workpiece coordinate system. The user may also insert input / output control instructions, wait instructions, condition judgment instructions, loop jump instructions, stop instructions, or pause instructions into the continuous motion instruction segment. All of the above modifications may result in inconsistencies between the original fusion planning subtask and the current main task program content.
[0071] When a change in the program content of the affected instruction window is detected, the real-time compilation check module 20 recompiles and checks the affected instruction window, and the motion fusion recognition module 30 re-determines whether there is a motion fusion instruction segment in the affected instruction window that meets the fusion conditions. The dynamic task planner 50 determines whether the original fusion planning subtask is still valid based on the version verification information.
[0072] When a user only modifies the target point, speed, fusion radius, or coordinate system parameters of a certain motion command, although the fused motion command segment may still remain continuous, the parameter verification values in the original fused planning subtask are inconsistent with the current program content. At this time, the dynamic task planner 50 can mark the original fused planning subtask as invalid, and the fused planning subtask generation module 40 can regenerate the fused planning subtask.
[0073] When a user inserts a waiting instruction, input / output control instruction, or conditional judgment instruction into the original fused motion instruction segment, the original continuous motion relationship is interrupted. At this time, the dynamic task planner 50 can split the original fused planning subtask into two or more new fused planning subtasks, or restore some program lines to ordinary task nodes.
[0074] When a user deletes a logical interrupt instruction that was originally located between two fused motion instruction segments, and the motion instructions before and after the deletion meet the fusion conditions, the dynamic task planner 50 can merge two adjacent fused planning subtasks into a new fused planning subtask.
[0075] When a user deletes a motion instruction in the fusion motion instruction segment, resulting in insufficient remaining consecutive motion instructions to form a fusion planning subtask, the dynamic task planner 50 can mark the original fusion planning subtask as invalid and restore the relevant program lines to ordinary task nodes.
[0076] Through the above processing, S600 enables the fusion planning subtasks to be dynamically updated as the program content changes. Its technical effect is to ensure that the main task node table, subtask mapping table, and fusion planning subtasks are always consistent with the current main task program content, avoiding mismatches between trajectory planning results and the actual program caused by users calling old fusion planning subtasks after editing the program.
[0077] In one optional implementation, the motion parameters include instruction type, target point, velocity parameters, acceleration parameters, fusion radius or transition zone parameters, tool coordinate system, workpiece coordinate system, and motion mode; the context continuity parameters include a logical interruption flag between adjacent program lines, a coordinate system compatibility flag, a safety constraint compatibility flag, a fusion parameter validity flag, and a motion sequence flag.
[0078] Specifically, the instruction type distinguishes whether the current program line contains motion instructions such as MoveL, MoveJ, and MoveC, or non-motion logic instructions such as input / output control, wait, judgment, loop, or pause. The target point determines the position that the robot's end effector or joint needs to reach. Velocity and acceleration parameters determine the allowable velocity and acceleration range during motion. The blending radius or transition zone parameter determines whether a continuous transition between adjacent motion segments is allowed at corners. The tool coordinate system and workpiece coordinate system determine the spatial reference relationship of the motion points. The motion mode distinguishes between linear motion, articulated motion, circular motion, or other composite motion modes.
[0079] The logic interruption flag indicates whether there are non-motion logic instructions between adjacent motion commands that would disrupt the continuous motion execution relationship. The coordinate system compatibility flag indicates whether the tool coordinate system and workpiece coordinate system used by adjacent motion commands can be used continuously in the same fusion planning subtask. The safety constraint compatibility flag indicates whether the safety zones, speed limits, or prohibited zones corresponding to adjacent motion commands conflict. The fusion parameter validity flag indicates whether each motion command has a fusion radius or transition zone parameter that allows fusion. The motion sequence flag indicates whether the sequential execution relationship of each motion command in the main task can be maintained.
[0080] By extracting motion parameters and context continuity parameters separately, this implementation can simultaneously determine whether a single motion instruction itself has a fusion basis, and whether adjacent program lines have continuous fusion context conditions, avoiding making a fusion judgment based solely on the same instruction type.
[0081] In one optional implementation, the fusion conditions include: adjacent program lines are all motion instructions; there are no logical instructions of the type of waiting, input / output control, condition judgment, loop jump, stop or pause between adjacent motion instructions; the tool coordinate system, workpiece coordinate system and safety constraints of adjacent motion instructions meet preset compatibility conditions; and each motion instruction has a fusion radius or transition zone parameter that allows fusion.
[0082] Specifically, the fundamental condition for forming a fused motion instruction segment is that adjacent program lines are both motion instructions. If any program line in an adjacent program line is a waiting, input / output control, judgment, loop, stop, or pause instruction, it indicates that the robot program has process waiting, external equipment interaction, safety control, or process branching requirements at that point. In this case, it is not advisable to forcibly merge the motion instructions before and after that logical instruction into the same fused planning subtask.
[0083] The tool coordinate system and the workpiece coordinate system satisfy a preset compatibility condition to prevent adjacent motion commands from being incorrectly planned as the same continuous path in different spatial reference systems. For example, if the previous motion command defines the target point in the first workpiece coordinate system, while the subsequent motion command defines the target point in the second workpiece coordinate system, and there is no known transformation relationship between the two, then the fusion condition is not met.
[0084] The requirement that safety constraints meet preset compatibility conditions is to ensure that the fusion planning subtasks do not bypass the safety restrictions in the original program. For example, if a certain motion command is only allowed to be executed within a specific safety area, while an adjacent motion command corresponds to another safety area or speed limit policy, it is necessary to determine whether the two can uniformly meet the safety requirements within the same overall trajectory.
[0085] Each motion command has a fusion radius or transition zone parameter that allows fusion, in order to ensure that the trajectory planning engine 70 can generate a continuous transition trajectory between adjacent motion segments. If the fusion radius of a certain motion command is zero, or is set to require precise stopping, then this command should not be continuously fused with subsequent motion commands.
[0086] By combining the above-mentioned multiple conditions for judgment, this implementation method can ensure that the program line identified as a fusion motion instruction segment has both continuous motion attributes and will not disrupt the process control, safety constraints and motion sequence set by the user.
[0087] In one optional implementation, in S200, the fused motion instruction segment is identified through a sliding window and / or a state machine; when two or more consecutive motion instructions meet the fusion condition, the first motion instruction that meets the fusion condition is taken as the starting point of the candidate segment, and when a program line that does not meet the fusion condition is detected, the previous motion instruction is taken as the ending point of the candidate segment.
[0088] Specifically, the sliding window approach is suitable for scenarios involving program writing or partial modifications. When a user adds, deletes, or modifies a line of code, the system only needs to re-identify it within the affected instruction window near that line, thereby reducing the computational load of real-time compilation checks and improving editing response speed.
[0089] The state machine approach is suitable for unified compilation scenarios. The state machine can include a state of not entering a candidate segment, a candidate fusion segment state, and a candidate segment end state. When the state machine reads the first motion instruction that meets the conditions, it can enter the candidate fusion segment state; as subsequent motion instructions continue to meet the fusion conditions, the candidate fusion segment continues to extend; when the state machine reads a program line that does not meet the fusion conditions, the candidate fusion segment ends, and the previous motion instruction that met the conditions is taken as the endpoint of the candidate segment.
[0090] For example, if MoveL P1, MoveL P2, MoveL P3, Wait, MoveL P4, and MoveLP5 exist sequentially in the main task, the state machine can identify MoveL P1 to MoveL P3 as a candidate fused motion command segment and end the candidate segment when the Wait command is read; subsequently, the state machine continues scanning and can identify MoveL P4 to MoveL P5 as another candidate fused motion command segment.
[0091] By combining sliding windows and state machines, this implementation method can meet both the local rapid update requirements of the program editing stage and the integrity requirements of the global identification of the main task in the unified compilation stage.
[0092] In one optional implementation, the fusion planning subtask further includes a subtask number, a main task number to which it belongs, a target point sequence, a fusion window set, time parameterization information, parameter verification values, and a subtask status; the version verification information includes the main task version number and parameter verification values generated from the motion parameters of the fusion motion command segment.
[0093] Specifically, the subtask number is used to uniquely identify a fusion planning subtask. The dynamic task planner 50 can query, trigger, update, or invalidate the corresponding fusion planning subtask using the subtask number. The parent task number is used to identify which parent task the fusion planning subtask originates from, in order to avoid subtask confusion when multiple parent tasks exist in parallel.
[0094] The target point sequence records the order of target points corresponding to each motion command in the fused motion command segment. The trajectory planning engine 70 can determine the basic path direction of the overall fused trajectory based on the target point sequence. The fusion window set records the spatial range or parameter range that allows for fusion transitions between adjacent motion segments. The time parameterization information records time-related information such as velocity planning, acceleration planning, jerk planning, or beat constraints, enabling the trajectory planning engine 70 to perform unified time parameterization after generating the spatial path.
[0095] The parameter verification value can be calculated from the target point, velocity parameters, acceleration parameters, fusion radius, tool coordinate system, workpiece coordinate system, and safety constraint parameters of the fused motion command segment. The calculation can employ hash algorithms, checksum algorithms, or other calculation methods capable of characterizing changes in the parameter set. When any key parameter in the fused motion command segment changes, the parameter verification value changes accordingly, enabling the dynamic task planner 50 to quickly determine whether the cached fused planning subtask is still reusable.
[0096] The subtask status indicates whether the fusion planning subtask is currently in a state such as active, pending planning, planned, cached, invalid, pending update, or executing. By maintaining the subtask status, the dynamic task planner 50 can schedule and manage the fusion planning subtasks according to the main task's running progress and program editing status.
[0097] Through the aforementioned data structure expansion, the fusion planning subtask can not only be directly processed by the trajectory planning engine 70, but also has the attributes of being indexable, verifiable, cacheable, invalidable, and dynamically updatable.
[0098] In one optional implementation, the set of critical path points is obtained by parsing each motion command in the fused motion command segment. The set of critical path points includes at least three categories of starting point, ending point, waypoint, corner point, process holding point, speed constraint point, attitude change point, and safety constraint point. Each critical path point includes at least four items of point coordinates, attitude information, point type, speed limit, acceleration limit, fusion radius, passage mode, and process flag.
[0099] Specifically, the starting point indicates the initial position of the robot's end effector or joint space when the fused motion command segment begins execution, and the ending point indicates the target position when the fused motion command segment ends execution. Waypoints indicate intermediate points traversed during continuous motion. Corner points indicate locations where direction changes occur between adjacent motion segments. Process holding points indicate critical locations that need to meet process requirements, such as welding arc initiation points, adhesive application start points, adhesive application end points, assembly positioning points, and grinding contact points. Velocity constraint points indicate locations where speed, acceleration, or jerk needs to be limited. Attitude change points indicate locations where the robot's end effector attitude changes significantly. Safety constraint points indicate locations where safety boundaries need to be avoided or special safety strategies need to be implemented.
[0100] Point coordinates represent the location of the critical path point in the corresponding coordinate system, while attitude information represents the robot's end effector's attitude at that point. Point type distinguishes whether the critical path point is a start point, end point, corner point, process hold point, or safety constraint point. Velocity and acceleration limits constrain the robot's motion near the point. Blend radius indicates the range within which transitional blending is allowed near the point. Passage mode indicates whether the point must be traversed precisely, whether approximate traversal within the blend radius is allowed, or whether offset based on trajectory optimization is allowed. Process flags identify whether the point is related to processes such as welding, gluing, grinding, handling, or assembly.
[0101] By setting a set of critical path points, the trajectory planning engine 70 no longer uses only the original list of motion instructions as input, but can instead convert continuous motion instruction segments into path constraint objects that include a path skeleton, process requirements, and local motion constraints. This approach allows the trajectory planning engine 70 to balance continuity, process maintenance, and safety constraints during overall planning.
[0102] In one optional implementation, the set of static obstacle avoidance points is generated based on the robot workspace model, tooling fixture model, user-preset obstacle avoidance data and / or fixed obstacle information in the offline programming environment; each static obstacle avoidance point includes at least four of the following: obstacle avoidance point number, obstacle location, obstacle avoidance safety radius, obstacle type, action path segment, and constraint priority.
[0103] Specifically, the robot workspace model describes the robot's reachable space and its surrounding fixed structures. The tooling and fixture model describes the position and shape of fixed tooling such as fixtures, positioning blocks, support frames, and clamping mechanisms within the workstation. User-preset obstacle avoidance data can be manually configured by the user in the teach pendant or offline programming software 10; for example, the user can set a certain area as a restricted area. Fixed obstacle information in the offline programming environment can be derived from the workstation 3D model, equipment layout model, or process simulation model.
[0104] The obstacle avoidance point number uniquely identifies a static obstacle avoidance point. The obstacle location indicates the position of this static obstacle avoidance point in the robot's base coordinate system, workpiece coordinate system, or other preset coordinate system. The obstacle avoidance safety radius indicates the minimum safe distance that should be maintained between the robot's end effector, tool, or robotic arm and this static obstacle avoidance point. The obstacle type identifies whether the static obstacle avoidance point belongs to a fixture, tooling, material frame, workbench edge, safety fence, equipment boundary, or restricted area. The action path segment indicates which segment of the path in the fusion planning subtask is effective for this static obstacle avoidance point. The constraint priority indicates the importance of the obstacle avoidance constraints corresponding to this static obstacle avoidance point.
[0105] For example, in a welding workstation, the edge of a fixture might only affect the path segment from P1 to P2 of the welding torch, but not the path segment from P2 to P3. In this case, the effective path segment of the static obstacle avoidance point corresponding to the fixture edge can be set to P1 to P2. For safety fences or restricted area boundaries, their constraint priority can be set to high priority, so that the trajectory planning engine 70 prioritizes satisfying the obstacle avoidance constraint when generating the path.
[0106] By incorporating the set of static obstacle avoidance points into the fusion planning subtask, this implementation enables the trajectory planning engine 70 to simultaneously consider the safety constraints of fixed obstacles during the overall fusion planning stage, reducing the risk of intruding into the obstacle safety zone due to fusion transition, path shortening, or curve optimization.
[0107] In an optional implementation, in S400, the trajectory planning engine constructs a fused path constraint graph based on the set of critical path points, the set of static obstacle avoidance points, and the set of constraints. The fused path constraint graph uses critical path points as path nodes and feasible connection relationships between adjacent critical path points as edges, and records velocity constraints, attitude constraints, fused window constraints, and static obstacle avoidance constraints on the edges.
[0108] Specifically, the fused path constraint graph is used to organize critical path points, path segments, and various types of constraints into a unified data structure. In the fused path constraint graph, each critical path point can be considered a path node, and candidate connecting paths between adjacent critical path points can be considered edges. Each edge not only represents the motion connection between two critical path points but also records the constraint information on that path segment.
[0109] Velocity constraints represent the maximum or minimum speed allowed on the path segment, or the rules governing speed variation. Attitude constraints represent the range of attitude variations or attitude interpolation methods for the robot's end effector on the path segment. Fusion window constraints represent the spatial range or parameter range within which trajectory fusion is allowed between the path segment and adjacent path segments. Static obstacle avoidance constraints represent the static obstacle avoidance points, safety radii, and obstacle avoidance priorities that the path segment must avoid.
[0110] After constructing the fusion path constraint graph, the trajectory planning engine 70 can determine whether the connection between adjacent critical path points is feasible within the graph structure. When a path segment simultaneously satisfies velocity constraints, attitude constraints, fusion window constraints, and static obstacle avoidance constraints, the path segment can be used as part of the overall fusion trajectory. When a path segment conflicts with the safe area of a static obstacle avoidance point, or fails to meet process maintenance requirements, the trajectory planning engine 70 can adjust the path segment.
[0111] By constructing a fusion path constraint graph, this implementation can transform the overall planning problem of continuous motion segments into a constrained path connection and path optimization problem, enabling the trajectory planning engine 70 to uniformly handle critical path points, static obstacle avoidance points, and motion constraints, avoiding the neglect of the entire path constraint while only performing local smoothing based on adjacent motion segments.
[0112] In one alternative implementation, when the feasible connection relationship in the fusion path constraint graph overlaps with the obstacle avoidance safety radius of the static obstacle avoidance point, the trajectory planning engine inserts an obstacle avoidance intermediate point in the corresponding path segment, and / or adjusts the fusion window range, curve control points, local weight factors, or node distribution so that the generated overall fusion trajectory bypasses the corresponding static obstacle avoidance point.
[0113] Specifically, after constructing the fused path constraint graph, the trajectory planning engine 70 can perform obstacle avoidance detection on each candidate connection path. If a candidate connection path overlaps with the obstacle avoidance safety radius of a static obstacle avoidance point, it indicates that the robot end effector, tool, or robotic arm may enter the safe zone of a fixed obstacle while moving along that path. In this case, the trajectory planning engine 70 does not directly adopt the candidate connection path, but instead adjusts the obstacle avoidance of that path segment.
[0114] In one implementation, the trajectory planning engine 70 can insert obstacle avoidance intermediate points in overlapping path segments. These intermediate points are located far from the safety radius of static obstacle avoidance points and are used to guide the overall fused trajectory around fixed obstacles.
[0115] In another implementation, the trajectory planning engine 70 can adjust the range of the fusion window. For example, when the original fusion window is too large, causing the trajectory to be excessively shortened and close to obstacles at corners, the fusion window can be appropriately reduced to make the trajectory closer to the original path point.
[0116] In another implementation, when the trajectory planning engine 70 uses B-spline curves or non-uniform rational B-spline curves to generate a continuous spatial path, it can adjust the curve control points, local weight factors, or node distribution to make the curve move away from the static obstacle avoidance point in a local area, while maintaining the positional continuity, velocity continuity, and acceleration continuity of the entire path.
[0117] By using the obstacle avoidance adjustment method described above, this implementation method can achieve the avoidance of fixed obstacles without splitting the overall fusion trajectory into multiple discontinuous local trajectories, thereby balancing continuous motion efficiency and industrial site safety.
[0118] In one optional implementation, in S400, the trajectory planning engine generates a continuous spatial path using B-spline curves, non-uniform rational B-spline curves, or piecewise polynomial curves, and performs unified time parameterization on the continuous spatial path; wherein, when the path curvature is greater than a preset curvature threshold, the path distance from the static obstacle avoidance point is less than a preset safety margin, or the path passes through a process holding point, the speed, acceleration, and / or jerk of the corresponding path segment are reduced.
[0119] Specifically, when generating the overall fused trajectory, the trajectory planning engine 70 can first generate a continuous spatial path, and then perform temporal parameterization on the continuous spatial path. The continuous spatial path is used to determine the motion geometry of the robot's end effector or joint space, and the temporal parameterization is used to determine the changes in velocity, acceleration, and jerk as the robot moves along the spatial path.
[0120] B-spline curves can describe the shape of a continuous path using control points, order, and node vectors, making them suitable for generating continuous paths with good smoothness. Non-uniform rational B-spline curves introduce weighting factors on top of B-spline curves, allowing for more flexible adjustment of local path shapes. Piecewise polynomial curves can generate continuous path segments based on boundary conditions between adjacent critical path points, and achieve position, velocity, or acceleration continuity through boundary constraints.
[0121] After generating a continuous spatial path, the trajectory planning engine 70 performs unified time parameterization on the entire continuous spatial path. This unified time parameterization can employ trapezoidal velocity planning, S-curve velocity planning, or time calibration methods for constrained jerk. Through unified time parameterization, the trajectory planning engine 70 can uniformly allocate velocity, acceleration, and jerk across the entire fused path, rather than planning each original motion command in isolation.
[0122] When the path curvature exceeds a preset curvature threshold, it indicates a significant change in direction for that path segment. Continuing to traverse at a high speed could lead to robot motion impact or increased trajectory following errors. Therefore, the trajectory planning engine 70 reduces the speed, acceleration, or jerk of that path segment. When the path distance to a static obstacle avoidance point is less than a preset safety margin, it indicates that the path segment is close to a fixed obstacle. The trajectory planning engine 70 improves safety and controllability when traversing this area by reducing speed. When the path passes through process holding points, such as welding arc initiation points, adhesive application start and end points, or assembly positioning points, the trajectory planning engine 70 can reduce the speed of the corresponding path segment to ensure process execution stability and positional accuracy.
[0123] By generating continuous spatial paths and unifying time parameters as described above, this implementation method enables the overall fused trajectory to simultaneously meet the requirements of path smoothness, speed continuity, obstacle avoidance safety, and process maintenance, thereby improving the execution efficiency and reliability of continuous motion tasks of industrial robots.
[0124] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
[0125] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for dynamic programming of industrial robot tasks, characterized in that, include: S100, during the robot program writing stage and / or unified compilation stage, performs compilation checks on the newly added, deleted or modified program lines in the main task and the affected instruction windows formed by their adjacent program lines, and extracts the motion parameters and context continuity parameters of each motion instruction. S200, based on the context continuity parameter, identify a fused motion instruction segment composed of continuous motion instructions that satisfies the fusion condition; S300, generate a fusion planning subtask for the fusion motion instruction segment. The fusion planning subtask includes a coverage line number, a list of motion instructions, a set of critical path points, a set of static obstacle avoidance points, a set of constraint conditions, and version verification information. Establish a mapping between the starting program line of the fusion motion instruction segment and the fusion planning subtask in the main task node table and the subtask mapping table. S400, when the main task runs to the starting program line, the dynamic task planner triggers the corresponding fusion planning subtask according to the mapping, so that the task interpreter skips the fusion judgment of the remaining motion instructions that have not been reached in the fusion motion instruction segment, and the trajectory planning engine generates the overall fusion trajectory based on the set of critical path points, the set of static obstacle avoidance points and the set of constraint conditions. S500, after the overall fusion trajectory is executed, update the program count position of the main task to the next program line after the end of the fusion motion instruction segment program line; S600, when the program content of the affected instruction window changes, the associated fusion planning subtask is invalidated, split, merged, or regenerated according to the version verification information, and the mapping is updated.
2. A method of industrial robot task dynamic planning according to claim 1, characterized in that, The motion parameters include instruction type, target point, velocity parameters, acceleration parameters, fusion radius or transition zone parameters, tool coordinate system, workpiece coordinate system, and motion mode; the context continuity parameters include logical interruption flags between adjacent program lines, coordinate system compatibility flags, safety constraint compatibility flags, fusion parameter validity flags, and motion sequence flags.
3. The method of task dynamic planning of an industrial robot according to claim 1, characterized in that, The fusion conditions include: adjacent program lines are all motion instructions; there are no logical instructions of the type of waiting, input / output control, condition judgment, loop jump, stop or pause between adjacent motion instructions; the tool coordinate system, workpiece coordinate system and safety constraints of adjacent motion instructions meet the preset compatibility conditions; and each motion instruction has a fusion radius or transition zone parameter that allows fusion.
4. The method of task dynamic planning of an industrial robot according to claim 1, characterized in that, In S200, the fused motion instruction segment is identified through a sliding window and / or a state machine; when two or more consecutive motion instructions meet the fusion condition, the first motion instruction that meets the fusion condition is taken as the starting point of the candidate segment, and when a program line that does not meet the fusion condition is detected, the previous motion instruction is taken as the ending point of the candidate segment.
5. The method of industrial robot task dynamic planning according to claim 1, characterized in that, The fusion planning subtask also includes a subtask number, a parent main task number, a target point sequence, a fusion window set, time parameterization information, parameter verification values, and a subtask status; the version verification information includes the parent main task version number and parameter verification values generated from the motion parameters of the fusion motion command segment.
6. The method of industrial robot task dynamic planning according to claim 1, characterized in that, The set of critical path points is obtained by parsing each motion command in the fusion motion command segment. The set of critical path points includes at least three of the following: start point, end point, waypoint, corner point, process hold point, speed constraint point, attitude change point, and safety constraint point. Each critical path point includes at least four of the following: point coordinates, attitude information, point type, speed limit, acceleration limit, fusion radius, passage mode, and process indicator.
7. The method of industrial robot task dynamic planning according to claim 1, characterized in that, The set of static obstacle avoidance points is generated based on the robot workspace model, tooling fixture model, user-preset obstacle avoidance data and / or fixed obstacle information in the offline programming environment; each static obstacle avoidance point includes at least four of the following: obstacle avoidance point number, obstacle location, obstacle avoidance safety radius, obstacle type, action path segment and constraint priority.
8. The method of task dynamic planning of an industrial robot according to claim 1, characterized in that, In S400, the trajectory planning engine constructs a fused path constraint graph based on the set of critical path points, the set of static obstacle avoidance points, and the set of constraint conditions. The fused path constraint graph uses critical path points as path nodes and feasible connection relationships between adjacent critical path points as edges, and records velocity constraints, attitude constraints, fused window constraints, and static obstacle avoidance constraints on the edges.
9. A method of industrial robot task dynamic planning according to claim 8, characterized in that, When the feasible connection relationship in the fusion path constraint graph overlaps with the obstacle avoidance safety radius of the static obstacle avoidance point, the trajectory planning engine inserts an obstacle avoidance intermediate point in the corresponding path segment, and / or adjusts the fusion window range, curve control points, local weight factors, or node distribution so that the generated overall fusion trajectory bypasses the corresponding static obstacle avoidance point.
10. The method for dynamic programming of industrial robot tasks according to claim 1, characterized in that, In S400, the trajectory planning engine uses B-spline curves, non-uniform rational B-spline curves, or piecewise polynomial curves to generate continuous spatial paths, and performs unified time parameterization on the continuous spatial paths; wherein, when the path curvature is greater than a preset curvature threshold, the path distance from the static obstacle avoidance point is less than a preset safety margin, or the path passes through a process holding point, the speed, acceleration, and / or jerk of the corresponding path segment are reduced.