Palletizing process procedure generation method, control method, device, and readable storage medium

By constructing a general process program and an independent palletizing action configuration file, the problems of limited process program storage resources and cumbersome operation in the existing technology are solved, and the palletizing process is flexibly adapted and its stability is improved.

CN123047338APending Publication Date: 2026-11-06ZHUHAI GREE INTELLIGENT EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611354535.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-02
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

In existing palletizing process packages, the process procedures are strongly tied to specific workpiece specifications and palletizing schemes, resulting in tight storage resources, cumbersome operation, poor stability, and difficulty in flexibly adapting to the needs of multi-station and multi-specification operations.

Method used

By extracting the common execution logic in the palletizing process, a general process program is constructed. Combined with the teaching trajectory to limit the spatial position of the action, an independent palletizing action configuration file is generated, so that the process program can be reused for different pallet types. Only the configuration file needs to be changed to switch pallet types.

Benefits of technology

It reduces storage resource consumption, simplifies stacking type switching operations, improves program stability and versatility, and adapts to the stacking needs of multi-station and multi-specification workpieces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123047338A_ABST
    Figure CN123047338A_ABST
Patent Text Reader

Abstract

This application provides a method, control method, apparatus, and readable storage medium for generating palletizing process programs. The method extracts general execution logic independent of configuration parameters from the palletizing process flow to construct a general process program. It then combines this with a teaching trajectory to define the spatial position of each action, generating a universally applicable palletizing process program. Furthermore, it independently constructs the actual placement points, which depend on specific pallet type parameters, as palletizing action configuration files, allowing the palletizing process program to be reused for different pallet types. When switching to a new pallet type, only the corresponding palletizing action configuration file needs to be generated; the palletizing process program does not need to be reconstructed. This reduces redundant programs, lowers storage resource consumption, reduces operational repetition, and improves program stability at the source of program generation. It also endows the process package with the versatility and scalability to flexibly adapt to the palletizing needs of multiple workstations and various workpiece specifications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of robot control technology, and more specifically, to a method for generating palletizing process programs, a control method, an apparatus, and a readable storage medium. Background Technology

[0002] In existing palletizing process packages, the process procedures are strongly tied to specific workpiece specifications and palletizing schemes; that is, one palletizing scheme corresponds to one independent process procedure. This strong binding mode leads to:

[0003] When a robot needs to handle stacking operations at multiple workstations and with various pallet types, the controller needs to store a large number of process programs of different specifications, causing storage resource shortages. When switching pallet types, the corresponding process programs need to be switched synchronously, which is cumbersome and causes great inconvenience to the debugging and maintenance of automation projects, affecting work efficiency. Frequent switching may also cause anomalies such as loss of user-written program points and content being refreshed, reducing system stability. At the same time, this binding mode also results in poor versatility of process packages, making it difficult to flexibly adapt to the needs of multi-workstation and multi-specification operations, and also making it difficult to extend to other types of industrial robot process packages.

[0004] Therefore, this application aims to solve the technical problem of how to effectively decouple the process program from the specific palletizing parameters in the palletizing process package, so as to reduce storage occupation, simplify palletizing switching operations, ensure program stability and improve the versatility of the process package. Summary of the Invention

[0005] The main objective of this application is to provide a method, control method, apparatus, and readable storage medium for generating palletizing process programs, so as to at least partially solve the technical problems of excessive storage space occupied by process programs, complex pallet type switching operations, and poor program stability in the prior art.

[0006] To achieve the above objectives, according to a first aspect of this application, a method for generating a palletizing process program is provided, the method comprising:

[0007] Obtain configuration parameters and generate a configuration file based on the configuration parameters; wherein, the configuration parameters include workpiece parameters, layer type parameters, and stack type parameters;

[0008] Extract common execution logic that is independent of the configuration parameters from the palletizing process, and construct a general process program based on the common execution logic; the general process program is used to control the robot to perform preset actions in a preset order.

[0009] The teaching trajectory is obtained, which is used to define the execution order and spatial position reference points of the preset action, and the spatial position reference points are used to limit the spatial position range of the preset action during execution.

[0010] Obtain the target task, which includes stack position information and reference point information for each stack position;

[0011] Based on the configuration file and the reference point information of each stack position, calculate the actual placement point of each workpiece in the stack position coordinate system of each stack position, and generate a stacking action configuration file based on the actual placement point.

[0012] Based on the general process procedure, the teaching trajectory, and the stacking action configuration file, a palletizing process procedure is generated.

[0013] Optionally, a configuration file is generated based on the configuration parameters, including:

[0014] The workpiece configuration file is determined based on the workpiece parameters, and the workpiece identifier of the workpiece configuration file is determined.

[0015] The layer configuration file is determined based on the layer parameters, and the layer identifier of the layer configuration file is determined.

[0016] Based on the stack type parameters, a stack type configuration file is determined, and a stack type identifier is generated from the stack type configuration file.

[0017] Establish the association relationship between the workpiece identifier, the layer identifier, and the stack identifier, and generate the configuration file based on the association relationship.

[0018] Optionally, general execution logic independent of the configuration parameters is extracted from the palletizing process, including:

[0019] Separate the action flow that is independent of the configuration parameters from the palletizing process, and extract the execution logic and execution order of the preset actions from the action flow; the preset actions include at least gripping actions, moving actions, and stacking actions;

[0020] The execution logic and execution order of the preset actions are encapsulated into the general execution logic.

[0021] Optionally, the teaching trajectory includes at least the grasping reference point corresponding to the grasping action, the path reference point corresponding to the moving action, and the placement reference point corresponding to the stacking action.

[0022] According to a second aspect of this application, a control method is provided, the method comprising:

[0023] Obtain the palletizing process program, which is constructed using the palletizing process program generation method described above;

[0024] Run the palletizing process program to control the robot to perform the palletizing operation.

[0025] Optionally, the method further includes:

[0026] In response to the stack type switching control command, obtain the new configuration file corresponding to the new stack type;

[0027] Determine a new stacking action configuration file based on the new configuration file;

[0028] The new palletizing action configuration file is called through the palletizing process program, and the palletizing process program is executed to control the robot to perform the palletizing operation of the new pallet type.

[0029] According to a third aspect of this application, a palletizing process program generation apparatus is provided, comprising:

[0030] A configuration unit is used to acquire configuration parameters and generate a configuration file based on the configuration parameters; wherein, the configuration parameters include workpiece parameters, layer type parameters, and stack type parameters;

[0031] A general process construction unit is used to extract general execution logic unrelated to the configuration parameters from the palletizing process flow, and construct a general process program based on the general execution logic; the general process program is used to control the robot to execute preset actions in a preset order;

[0032] The teaching unit is used to acquire the teaching trajectory, which is used to define the execution order and spatial position reference points of the preset action, and the spatial position reference points are used to limit the spatial position range of the preset action during execution.

[0033] The first data acquisition unit is used to acquire the target task, which includes stack position information and reference point information of each stack position.

[0034] The stacking action configuration unit is used to calculate the actual placement point of each workpiece in the stacking coordinate system of each stacking position according to the configuration file and the reference point information of each stacking position, and generate the stacking action configuration file according to the actual placement point.

[0035] The generation unit is used to generate a palletizing process program based on the general process program, the teaching trajectory, and the palletizing action configuration file.

[0036] According to a fourth aspect of this application, a manufacturing apparatus is provided, comprising:

[0037] The second data acquisition unit is used to acquire the palletizing process program, which is constructed using the palletizing process program generation method described above.

[0038] The control unit is used to run the palletizing process program and control the robot to perform the palletizing operation.

[0039] Optionally, the second data acquisition unit is further configured to acquire a new configuration file corresponding to the new stack type in response to the stack type switching control command;

[0040] The control unit is also used to determine a new stacking action configuration file based on the new configuration file; to call the new stacking action configuration file through the palletizing process program, to execute the palletizing process program, and to control the robot to perform the stacking operation of the new pallet type.

[0041] According to a fifth aspect of this application, a readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the above-described palletizing process program generation method, or implements the above-described control method.

[0042] By applying the technical solution of this application, a general process program is constructed by extracting general execution logic independent of configuration parameters from the palletizing process flow to control the robot to execute preset actions in a preset order. This is then combined with the teaching trajectory to limit the spatial position of each action, generating a universally applicable palletizing process program. Furthermore, the actual placement points, which depend on specific pallet type parameters, are independently constructed as palletizing action configuration files, allowing the palletizing process program to be reused for different pallet types. When switching to a new pallet type, only the corresponding palletizing action configuration file needs to be generated; there is no need to rebuild the palletizing process program. This reduces redundant programs at the source of program generation, lowers storage resource consumption, reduces operational repetition, improves program stability, and gives the process package the versatility and scalability to flexibly adapt to the palletizing needs of multiple workstations and various workpiece specifications. Attached Figure Description

[0043] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0044] Figure 1 A hardware structure block diagram of a mobile terminal for executing a palletizing process program generation method according to an embodiment of this application is shown.

[0045] Figure 2 A schematic flowchart of a palletizing process program generation method provided in an embodiment of this application is shown.

[0046] Figure 3 A schematic diagram of a teaching trajectory provided in an embodiment according to this application is shown;

[0047] Figure 4 A flowchart illustrating a control method provided in an embodiment of this application is shown;

[0048] Figure 5A schematic diagram of a palletizing process program generation apparatus provided in an embodiment of this application is shown.

[0049] Figure 6 A schematic diagram of the structure of a control device provided in an embodiment of this application is shown.

[0050] The above figures include the following reference numerals:

[0051] 102. Processor; 104. Memory; 106. Transmission device; 108. Input / output device; 501. Configuration unit; 502. General process construction unit; 503. Teaching unit; 504. First data acquisition unit; 505. Stamping action configuration unit; 506. Generation unit; 601. Second data acquisition unit; 602. Control unit. Detailed Implementation

[0052] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0053] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0054] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0055] As described in the background section, in existing palletizing process packages, the process program is strongly bound to the specific workpiece specifications and pallet type scheme; that is, one pallet type corresponds to one independent process program. When the robot switches between different workstations and different pallet types, the corresponding process program needs to be switched synchronously. This results in the robot controller needing to store a large number of process programs of different specifications, which not only consumes a lot of storage resources and puts a lot of storage pressure on the robot controller, but also increases the difficulty of debugging and maintaining automation projects. The switching process is cumbersome, affecting work efficiency. At the same time, frequent switching of process programs may also cause anomalies such as the loss of user-written program points and content being refreshed, further reducing the stability and convenience of automated operations.

[0056] To at least partially solve the above technical problems, embodiments of this application provide a palletizing process program generation method, control method, apparatus, and readable storage medium.

[0057] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0058] The palletizing process program generation method or control method provided in this application embodiment can be executed on a mobile terminal, computer terminal, or similar computing device. Taking the palletizing process program generation method running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for a palletizing process program generation method according to an embodiment of the present invention. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0059] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the palletizing process program generation method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby realizing the palletizing process program generation method described above. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device 106 is used to receive or send data via a network. Specific examples of the aforementioned networks may include wireless networks provided by the mobile terminal's communication provider. In one instance, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0060] This embodiment provides a method for generating palletizing process programs that runs on a mobile terminal, computer terminal, or similar computing device. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0061] For ease of description, the following explains some of the nouns or terms used in the embodiments of this application:

[0062] Workpiece parameters: Data used to describe the physical properties of the workpiece, including at least the workpiece's length, width, height, and weight.

[0063] Layer type parameters: Data used to describe the way workpieces are placed in a single layer on the pallet, including at least pallet parameters, workpiece placement method, number of workpieces per layer, and workpiece spacing.

[0064] Stack type parameters: Data used to describe the complete stack type structure, including at least the total number of stack types, the corresponding layer type of each layer, and the total height limit of the stack type.

[0065] General process program: A program skeleton that defines the robot's motion logic but is independent of specific workpiece parameters and stacking parameters. It includes the motion sequence and execution order, but does not include the specific spatial coordinates of each motion.

[0066] Stacking action configuration file: An independent data entity containing the placement point data of each workpiece in the target stack position in the actual stack position coordinate system, which is independent of the general process program.

[0067] Teaching trajectory: The trajectory data collected when the robot is manually operated to complete a full grasping, moving, and stacking action process. It is used to define the execution order of each action and the spatial position reference point.

[0068] Reference point information: The reference origin of each stack position specified in the target task, used to determine the origin position of the coordinate system of each stack position.

[0069] The embodiments of this application provide a method for generating palletizing process programs. The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.

[0070] Figure 2 This is a flowchart of a palletizing process procedure generation method according to an embodiment of this application. Figure 2 As shown, the method includes the following steps:

[0071] Step S201: Obtain configuration parameters and generate a configuration file based on the configuration parameters; the configuration parameters include workpiece parameters, layer type parameters, and stack type parameters.

[0072] Configuration parameters are a set of parameters defined by the user according to actual stacking requirements, including workpiece parameters, layer parameters, and stack parameters. Workpiece parameters describe the physical properties of the workpiece, such as its length, width, height, and weight, which determine the spatial dimensions and quality characteristics of a single workpiece. Layer parameters describe the arrangement of workpieces in a single layer on the pallet, determining the arrangement pattern of workpieces in each layer. Stack parameters describe the structure of the complete stack, such as the total number of layers and the layer type used for each layer, determining the spatial structure of the entire stack. After obtaining the above configuration parameters, the system generates one or more configuration files according to a preset data structure for reading and referencing in subsequent steps. By independently acquiring and file-based storing configuration parameters, the specification definition of the stacking operation is separated from the program logic, providing a data foundation for the construction of subsequent general process programs. It is understood that configuration parameters can come from manual input by the user through the human-machine interface, from pre-stored configuration templates, or from task instructions issued by the host computer. This application does not limit the specific method of acquiring configuration parameters.

[0073] For example, in actual operation, users can input or set workpiece parameters through a human-machine interface, including the workpiece's length, width, height, and weight. The system generates a workpiece configuration file based on the input parameters. Users can also input or set layer parameters, including pallet parameters, workpiece placement method (e.g., horizontal or vertical), number of workpieces per layer, and workpiece spacing. The system generates a layer configuration file based on the input parameters. Users can also input or set stacking parameters, including the number of stack layers, the corresponding layer type for each layer, and the total height limit of the stack. The system generates a stacking configuration file based on the input parameters.

[0074] Users can select the desired workpiece configuration file, layer configuration file, and stack configuration file to generate the final configuration file. The configuration file can be in JSON format for easy data storage, retrieval, and transmission.

[0075] Step S202: Extract the general execution logic that is independent of the configuration parameters from the palletizing process flow, and construct a general process program based on the general execution logic; the general process program is used to control the robot to execute preset actions in a preset order.

[0076] In the palletizing process, there are some common logic components that are independent of specific workpiece specifications and stack structures. For example, the robot needs to perform one action, then another, and finally yet another. This execution sequence and the transitional movements between actions are common to most palletizing processes and do not change due to variations in parameters such as workpiece size or the number of stack layers. This step extracts these common logic components, independent of configuration parameters, from the complete palletizing process and encapsulates them into a general process program. This general process program is essentially a program skeleton that defines which preset actions the robot needs to perform and the execution order of these preset actions, but does not contain any spatial coordinates bound to a specific work scenario. The general process program constructed in this way has good portability and can be reused for palletizing operations of different stack types and at different workstations. For example, regardless of whether the workpiece being palletized is large or small, and regardless of whether the final stack has 3 or 10 layers, the robot needs to perform a movement action after performing the grasping action. This execution logic is universal and can be extracted and solidified in the general process program.

[0077] Step S203: Obtain the teaching trajectory. The teaching trajectory is used to define the execution order and spatial reference points of the preset actions. The spatial reference points are used to limit the spatial position range of the preset actions during execution.

[0078] Specifically, the teaching trajectory can be general trajectory data obtained through manual teaching. During the teaching process, the operator moves the robot to a reference point (e.g., the lower left corner of the pallet) and then manually operates the robot to execute each preset action in sequence, completing a full grasping, moving, and stacking action flow. The system simultaneously records the robot's motion trajectory. This teaching trajectory defines the execution order of each preset action and the corresponding spatial position reference points for each action. For example, for the grasping action, a grasping reference point is defined to limit the execution position of the grasping action; for the moving action, a series of path reference points are defined, such as the grasping top point, the moving direction auxiliary point, the pallet entry point, and the placement top point, which define the start point, end point, and moving direction of the moving action; for the stacking action, a placement reference point is defined to describe the approximate position when the stacking action is executed. These reference points are used to limit the spatial position range of the corresponding action during execution. It should be noted that the teaching trajectory itself is general; the reference points it provides are spatial position references for different actions and do not depend on specific pallet parameters (such as workpiece size, quantity, etc.), and therefore can be reused for different pallet types. When generating the palletizing process program, the general process program and the teaching trajectory are compared through specific action flow (both the general process program and the teaching trajectory contain action sequence information). The general process program refers to the reference points and path structure defined in the teaching trajectory to finally generate the palletizing process program for performing the palletizing operation.

[0079] Step S204: Obtain the target task, which includes stack location information and reference point information for each stack location.

[0080] The target task is an overall description of this stacking operation. Stack location information describes the number and spatial distribution of target stack locations, such as which workstations need to stack different types of stacks and what type of stack needs to be stacked at each workstation. Reference point information is the spatial location reference for each stack location, such as the coordinates of the lower left corner of a stack location in the world coordinate system. Its purpose is to determine the origin of the coordinate system for each stack location, ensuring that all subsequent point calculations for that stack location are performed within that coordinate system. The purpose of obtaining the target task is to associate the general process program and configuration files with the actual operational task, clarifying the target stack locations and their spatial positions for this stacking operation.

[0081] Step S205: Based on the configuration file and the reference point information of each stack position, calculate the actual placement point of each workpiece in the stack position coordinate system of each stack position, and generate a stacking action configuration file based on the actual placement point.

[0082] In step S201, the configuration file defines the workpiece dimensions, layer structure, and stack structure; in step S204, the target task provides the reference point information for each stack position. This step combines the above two. For each stack position, the origin of the stack position coordinate system is determined using its reference point information. Then, based on the workpiece dimensions, placement method, and stack structure in the configuration file, the actual placement point of each workpiece on that stack position is calculated. The basic principle of the calculation is: given the origin of the stack position coordinate system, workpiece dimensions, workpiece placement method for each layer, and the total number of layers, the precise coordinates of each workpiece in the stack position coordinate system are determined sequentially through spatial coordinate transformation and array arrangement calculations. These actual placement points are precise spatial coordinate values, directly used to guide the robot to place the workpiece in the designated position. All the calculated actual placement points are collected into an independent data file, namely the stacking action configuration file. This configuration file is independent of the aforementioned general process program. This independence means that when the stack structure changes subsequently, only this configuration file needs to be replaced without affecting the general process program itself.

[0083] Step S206: Generate a palletizing process program based on the general process program, teaching trajectory, and palletizing action configuration file.

[0084] The general process program constructed in step S202 is combined with the teaching trajectory obtained in step S203 to generate a palletizing process program. This palletizing process program contains the complete motion logic required for the robot to perform the palletizing operation (i.e., the motion sequence and execution order provided by the general process program) and the spatial position reference frame of the motion (i.e., the reference points and path structure provided by the teaching trajectory). However, this program does not contain the precise placement points of each workpiece in a specific pallet type; these precise placement points are stored independently in the palletizing motion configuration file. During runtime, the palletizing process program obtains the actual placement point of each workpiece by calling the palletizing motion configuration file generated in step S205, thereby driving the robot to perform the palletizing operation according to the motion logic and precise points. This architectural relationship between the general process program, the teaching trajectory, and the palletizing motion configuration file means that when switching pallet types, only the called palletizing motion configuration file needs to be replaced, without regenerating or replacing the entire palletizing process program.

[0085] Through steps S201 to S206 above, this embodiment extracts general execution logic unrelated to configuration parameters from the palletizing process to construct a general process program to control the robot to execute preset actions in a preset order. Then, by combining the taught trajectory to limit the spatial position of each action, a universally applicable palletizing process program is generated. Furthermore, the actual placement points, which depend on specific pallet type parameters, are independently constructed as palletizing action configuration files, allowing the palletizing process program to be reused for different pallet types. When switching to a new pallet type, only the corresponding palletizing action configuration file needs to be generated; there is no need to rebuild the palletizing process program. This reduces redundant programs at the source of program generation, lowers storage resource consumption, reduces operational repetition, improves program stability, and gives the process package the versatility and scalability to flexibly adapt to the palletizing needs of multiple workstations and various workpiece specifications.

[0086] In some embodiments, generating a configuration file based on configuration parameters includes: determining a workpiece configuration file based on workpiece parameters and determining a workpiece identifier for the workpiece configuration file; determining a layer configuration file based on layer type parameters and determining a layer type identifier for the layer configuration file; determining a stack configuration file based on stack type parameters and determining a stack type identifier for the stack configuration file; constructing an association relationship between the workpiece identifier, layer type identifier, and stack type identifier; and generating a configuration file based on the association relationship. This embodiment achieves hierarchical management of configuration files by generating a unique identifier for each configuration file and establishing an association relationship, enabling the same workpiece parameter or layer type parameter to be shared and referenced by multiple stack type configurations, reducing repetitive configuration operations in multi-stack type scenarios, and further reducing storage pressure.

[0087] For example, the rule for generating a workpiece identifier can be "date + time + workpiece type". The workpiece identifier serves as an index, allowing reference to the corresponding workpiece configuration file in subsequent steps. When a layer configuration file is generated, the corresponding workpiece identifier is associated with it and stored, indicating which workpiece configuration the layer is based on. When a stack configuration file is generated, the corresponding layer identifier is associated with it and stored, indicating which layers the stack is built upon. Through this three-level identifier association mechanism, when a user needs to create a new stack, they can directly reference existing workpiece and layer configurations without repeatedly entering the same information.

[0088] In some embodiments, extracting general execution logic independent of configuration parameters from the palletizing process includes: separating action flows independent of configuration parameters from the palletizing process; extracting the execution logic and execution order of preset actions from the action flows; the preset actions include at least gripping actions, moving actions, and stacking actions; and encapsulating the execution logic and execution order of the preset actions into general execution logic. This embodiment clarifies the extraction object and extraction result of the general execution logic, that is, extracting the action execution order and transition mode independent of parameters such as workpiece size and stack structure from the complete palletizing action flow to form a reusable program skeleton, thereby ensuring the stability and consistency of the general process program under different stack configurations.

[0089] For example, the complete workflow of a palletizing process typically includes: the robot moves to the gripping position → performs the gripping action → lifts to the gripping top point → moves to the pallet entry point after passing through several intermediate auxiliary points → reaches the placement top point → performs the placement action. The execution sequence of "grip → move → place" and the transitional movements between each action are common to all palletizing processes, regardless of the specific workpiece specifications or the pallet arrangement. Therefore, it can be extracted as general execution logic and encapsulated into a general process program.

[0090] In some embodiments, the teaching trajectory includes at least a grasping reference point corresponding to the grasping action, a path reference point corresponding to the moving action, and a placement reference point corresponding to the stacking action. This embodiment limits the teaching trajectory to include at least three types of reference points, corresponding to the three core actions of grasping, moving, and stacking, respectively, providing the necessary spatial location reference for the subsequent calculation of the actual placement point.

[0091] For example, such as Figure 3 As shown, during manual teaching, the operator moves the robot sequentially to the gripping position (gripping reference point), gripping top point, auxiliary point 1, auxiliary point 2, auxiliary point 3, stack entry point, placement top point, and placement position (placement reference point). The system records the coordinate data of these points, as well as the movement path and speed parameters between each point. After teaching is completed, this reference point data is stored in the point data field of the stack configuration file.

[0092] In some embodiments, based on the configuration file and the reference point information of each stack, the actual placement point of each workpiece in the stack coordinate system of each stack is calculated. This includes: calculating the actual placement point of each workpiece in each stack according to a preset array algorithm based on the workpiece size parameters in the workpiece parameters, the workpiece placement method and workpiece spacing in the layer type parameters, and the reference point information of each stack. This embodiment defines the basis and method for calculating the actual placement point, that is, based on the workpiece size, placement method, spacing and reference point, the precise placement point of all workpieces is automatically generated through an array algorithm.

[0093] For example, for a stacking pattern using an array, the system uses a reference point as the origin of the stacking coordinate system. It calculates the coordinates of each workpiece's placement point sequentially based on its width and length, the number of horizontal and vertical placements, the layer height, and the current layer number. When the workpieces are arranged in a rectangular array within each layer, the X-coordinate of the workpiece in the i-th row and j-th column is calculated as: X-coordinate of the reference point + i × (workpiece width + horizontal spacing); Y-coordinate of the reference point is calculated as: Y-coordinate of the reference point + j × (workpiece length + vertical spacing); Z-coordinate of the reference point is calculated as: Z-coordinate of the reference point + (current layer number - 1) × workpiece height. For different layer types (e.g., different placement directions and quantities per layer), the calculations are performed separately according to the placement method and workpiece spacing corresponding to each layer type.

[0094] Specifically, the actual placement point of each workpiece in each stack is calculated according to the preset array algorithm, including: determining the origin of the stack coordinate system based on the reference point information; and using the origin of the stack coordinate system as the reference, calculating the placement point coordinates of each workpiece sequentially according to the following formula:

[0095] P = offset(P_home, x·m + y·n, x·k + y·l, z·cnt);

[0096] Where P represents the coordinates of the current workpiece placement point, P_home represents the coordinates of the reference point, x represents the width of the workpiece, y represents the length of the workpiece, z represents the current layer height, m ​​represents the number of workpieces placed horizontally in the X direction, n represents the number of workpieces placed vertically in the X direction, k represents the number of workpieces placed horizontally in the Y direction, l represents the number of workpieces placed vertically in the Y direction, and cnt represents the layer number. This embodiment provides a specific implementation method for array arrangement algorithm, which can calculate the placement points of all workpieces in the stack using a unified formula, resulting in high computational efficiency and ease of implementation in a computer program.

[0097] For example, suppose a workpiece has a width x = 0.4m, a length y = 0.3m, and a height z = 0.2m. A layer has two workpieces placed horizontally and one vertically in the X direction, and one horizontally and two vertically in the Y direction, with layer number cnt = 1. For the first workpiece in the X direction and the first workpiece in the Y direction in the first layer, its coordinate offset is (0.4×1 + 0.3×0, 0.4×0 + 0.3×1, 0.2×1) = (0.4, 0.3, 0.2). If the reference point coordinates are (1.0, 1.0, 0.5), then the actual placement point coordinates are (1.4, 1.3, 0.7).

[0098] The embodiments of this application also provide a control method that can be applied to a robot controller. The technical solutions in the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings.

[0099] Figure 4 This is a flowchart of a control method according to an embodiment of this application. Figure 4 As shown, the method includes the following steps:

[0100] Step S401: Obtain the palletizing process program.

[0101] The palletizing process program is constructed using the palletizing process program generation method described above;

[0102] Step S402: Run the palletizing process program and control the robot to perform the palletizing operation.

[0103] This control method can be executed directly on the robot controller. The controller loads the generated palletizing process program and drives the robot to complete the palletizing operation according to the sequence of actions specified in the program and the actual placement points.

[0104] In some embodiments, the above-described robot palletizing control method further includes a pallet type switching step: in response to a pallet type switching control command, obtaining a new configuration file corresponding to the new pallet type; determining a new placement action configuration file based on the new configuration file; calling the new placement action configuration file through the palletizing process program, executing the palletizing process program, and controlling the robot to perform the placement operation of the new pallet type. This embodiment realizes online switching of pallet types—without generating a new palletizing process program, only replacing the called placement action configuration file is required to complete the placement of the new pallet type. Since the palletizing process program itself (including the general process program and the teaching trajectory) remains unchanged, the program logic and custom point data written by the user will not be lost or overwritten due to the switching, ensuring the stability of the program and the integrity of the data.

[0105] For example, when a user needs to switch the current palletizing operation from pallet type A to pallet type B, the system responds to the switching command and regenerates the palletizing action configuration file corresponding to pallet type B based on the configuration parameters of pallet type B. After the robot completes the palletizing of the current pallet type, the system replaces the palletizing action configuration file (pallet type A) called by the current palletizing process program with the palletizing action configuration file of pallet type B, and then runs the palletizing process program. The robot then continues to perform the palletizing operation according to the position data of the new pallet type, and there is no need to regenerate the palletizing process program during the switching process.

[0106] The embodiments of this application also provide a palletizing process program generation device. The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.

[0107] Figure 5 This is a schematic diagram of a palletizing process program generation device according to an embodiment of this application. Figure 5As shown, the device includes: a configuration unit 501, a general process construction unit 502, a teaching unit 503, a first data acquisition unit 504, a stacking action configuration unit 505, and a generation unit 506.

[0108] The configuration unit 501 is used to obtain configuration parameters and generate a configuration file based on the configuration parameters; wherein, the configuration parameters include workpiece parameters, layer type parameters and stack type parameters.

[0109] The general process construction unit 502 is used to extract general execution logic that is independent of configuration parameters from the palletizing process, and construct a general process program based on the general execution logic; the general process program is used to control the robot to execute preset actions in a preset order.

[0110] The teaching unit 503 is used to acquire the teaching trajectory. The teaching trajectory is used to define the execution order and spatial position reference points of the preset actions. The spatial position reference points are used to limit the spatial position range of the preset actions during execution.

[0111] The first data acquisition unit 504 is used to acquire the target task, which includes stack position information and reference point information of each stack position.

[0112] The stacking action configuration unit 505 is used to calculate the actual placement point of each workpiece in the stacking coordinate system of each stacking position according to the configuration file and the reference point information of each stacking position, and generate the stacking action configuration file according to the actual placement point.

[0113] The generation unit 506 is used to generate a palletizing process program based on the general process program, the teaching trajectory, and the palletizing action configuration file.

[0114] It should be noted that the above configuration unit 501, general process construction unit 502, teaching unit 503, first data acquisition unit 504, code placement action configuration unit 505, and generation unit 506 correspond to steps S201 to S206 in the above embodiments. The six units and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the above embodiments.

[0115] As can be seen from the above, in the solution described in the above embodiments of the present invention, the configuration unit 501 can be used to obtain configuration parameters and generate a configuration file based on the configuration parameters; wherein, the configuration parameters include workpiece parameters, layer type parameters, and stack type parameters; the general process construction unit 502 can be used to extract general execution logic unrelated to the configuration parameters from the palletizing process flow, and construct a general process program based on the general execution logic, the general process program is used to control the robot to execute preset actions in a preset order; the teaching unit 503 can be used to obtain the teaching trajectory, the teaching trajectory is used to define the execution order of the preset actions and the spatial position reference points, the spatial position reference points are used to limit the spatial position range of the preset actions during execution; the first data acquisition unit 504 can be used to obtain the target task, the target task includes stack position information and reference point information of each stack position; the stacking action configuration unit 505 can be used to calculate the actual placement point of each workpiece in the stack position coordinate system of each stack position based on the configuration file and the reference point information of each stack position, and generate a stacking action configuration file based on the actual placement point; the generation unit 506 can be used to generate a palletizing process program based on the general process program, the teaching trajectory, and the stacking action configuration file. This embodiment extracts generic execution logic, independent of configuration parameters, from the palletizing process to construct a generic process program. This program controls the robot to execute preset actions in a preset sequence. The spatial position of each action is then defined by the taught trajectory, generating a universally applicable palletizing process program. Furthermore, the actual placement points, dependent on specific pallet type parameters, are independently constructed as palletizing action configuration files, allowing the palletizing process program to be reused across different pallet types. When switching to a new pallet type, only the corresponding palletizing action configuration file needs to be generated; the palletizing process program does not need to be reconstructed. This reduces redundant programs, lowers storage resource consumption, reduces operational repetition, and improves program stability at the program generation source. It also endows the process package with the versatility and scalability to flexibly adapt to the palletizing needs of multiple workstations and various workpiece specifications.

[0116] Therefore, the technical solutions provided by the embodiments of the present invention solve the technical problems of excessive storage space occupied by process programs, complex stacking type switching operations, and poor program stability in the prior art.

[0117] Optionally, the configuration unit 501 is specifically used to determine the workpiece configuration file according to the workpiece parameters and determine the workpiece identifier of the workpiece configuration file; determine the layer configuration file according to the layer type parameters and determine the layer type identifier of the layer configuration file; determine the stack configuration file according to the stack type parameters and determine the stack type identifier of the stack configuration file; construct the association relationship between the workpiece identifier, the layer type identifier and the stack type identifier, and generate the configuration file according to the association relationship.

[0118] Optionally, the general process construction unit 502 is specifically used to separate the action flow that is independent of the configuration parameters from the palletizing process flow, extract the execution logic and execution order of the preset actions from the action flow; the preset actions include at least the grabbing action, the moving action and the stacking action; and encapsulate the execution logic and execution order of the preset actions into general execution logic.

[0119] Optionally, the teaching unit 503 is specifically used to acquire the teaching trajectory, which includes at least the grasping reference point corresponding to the grasping action, the path reference point corresponding to the moving action, and the placement reference point corresponding to the stacking action.

[0120] The embodiments of this application also provide a control device. The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.

[0121] Figure 6 This is a schematic diagram of a control device according to an embodiment of this application. Figure 6 As shown, the device includes a second data acquisition unit 601 and a control unit 602.

[0122] The second data acquisition unit 601 is used to acquire the palletizing process program, which is constructed using the palletizing process program generation method described above.

[0123] The control unit 602 is used to run the palletizing process program and control the robot to perform the palletizing operation.

[0124] It should be noted that the second data acquisition unit 601 and the control unit 602 mentioned above correspond to steps S401 to S402 in the above embodiments. The two units and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the above embodiments.

[0125] As can be seen from the above, in the solution described in the above embodiments of the present invention, the second data acquisition unit 601 can be used to acquire the palletizing process program, which is constructed using the palletizing process program generation method described above; the control unit 602 can be used to run the palletizing process program and control the robot to perform the palletizing operation. This embodiment can reduce redundant programs, reduce storage resource consumption, reduce repetitive operations, and improve program stability when switching to a new pallet type, thereby improving the flexibility and stability of the robot's work.

[0126] Optionally, the second data acquisition unit 601 is further configured to acquire a new configuration file corresponding to the new pallet type in response to the pallet type switching control command; the control unit 602 is further configured to determine a new stacking action configuration file based on the new configuration file; and execute the palletizing process program by calling the new stacking action configuration file through the palletizing process program to control the robot to perform the stacking operation of the new pallet type.

[0127] According to another aspect of the present invention, a processor is also provided, the processor being configured to run a program, wherein the program, when running, executes the palletizing process program generation method of any one of the above, the method comprising the following steps:

[0128] Step S201: Obtain configuration parameters and generate a configuration file based on the configuration parameters; the configuration parameters include workpiece parameters, layer type parameters, and stack type parameters.

[0129] Configuration parameters are a set of parameters defined by the user according to actual stacking requirements, including workpiece parameters, layer parameters, and stack parameters. Workpiece parameters describe the physical properties of the workpiece, such as its length, width, height, and weight, which determine the spatial dimensions and quality characteristics of a single workpiece. Layer parameters describe the arrangement of workpieces in a single layer on the pallet, determining the arrangement pattern of workpieces in each layer. Stack parameters describe the structure of the complete stack, such as the total number of layers and the layer type used for each layer, determining the spatial structure of the entire stack. After obtaining the above configuration parameters, the system generates one or more configuration files according to a preset data structure for reading and referencing in subsequent steps. By independently acquiring and file-based storing configuration parameters, the specification definition of the stacking operation is separated from the program logic, providing a data foundation for the construction of subsequent general process programs. It is understood that configuration parameters can come from manual input by the user through the human-machine interface, from pre-stored configuration templates, or from task instructions issued by the host computer. This application does not limit the specific method of acquiring configuration parameters.

[0130] For example, in actual operation, users can input or set workpiece parameters through a human-machine interface, including the workpiece's length, width, height, and weight. The system generates a workpiece configuration file based on the input parameters. Users can also input or set layer parameters, including pallet parameters, workpiece placement method (e.g., horizontal or vertical), number of workpieces per layer, and workpiece spacing. The system generates a layer configuration file based on the input parameters. Users can also input or set stacking parameters, including the number of stack layers, the corresponding layer type for each layer, and the total height limit of the stack. The system generates a stacking configuration file based on the input parameters.

[0131] Users can select the desired workpiece configuration file, layer configuration file, and stack configuration file to generate the final configuration file. The configuration file can be in JSON format for easy data storage, retrieval, and transmission.

[0132] Step S202: Extract the general execution logic that is independent of the configuration parameters from the palletizing process flow, and construct a general process program based on the general execution logic; the general process program is used to control the robot to execute preset actions in a preset order.

[0133] In the palletizing process, there are some common logic components that are independent of specific workpiece specifications and stack structures. For example, the robot needs to perform one action, then another, and finally yet another. This execution sequence and the transitional movements between actions are common to most palletizing processes and do not change due to variations in parameters such as workpiece size or the number of stack layers. This step extracts these common logic components, independent of configuration parameters, from the complete palletizing process and encapsulates them into a general process program. This general process program is essentially a program skeleton that defines which preset actions the robot needs to perform and the execution order of these preset actions, but does not contain any spatial coordinates bound to a specific work scenario. The general process program constructed in this way has good portability and can be reused for palletizing operations of different stack types and at different workstations. For example, regardless of whether the workpiece being palletized is large or small, and regardless of whether the final stack has 3 or 10 layers, the robot needs to perform a movement action after performing the grasping action. This execution logic is universal and can be extracted and solidified in the general process program.

[0134] Step S203: Obtain the teaching trajectory. The teaching trajectory is used to define the execution order and spatial reference points of the preset actions. The spatial reference points are used to limit the spatial position range of the preset actions during execution.

[0135] Specifically, the teaching trajectory can be general trajectory data obtained through manual teaching. During the teaching process, the operator moves the robot to a reference point (e.g., the lower left corner of the pallet) and then manually operates the robot to execute each preset action in sequence, completing a full grasping, moving, and stacking action flow. The system simultaneously records the robot's motion trajectory. This teaching trajectory defines the execution order of each preset action and the corresponding spatial position reference points for each action. For example, for the grasping action, a grasping reference point is defined to limit the execution position of the grasping action; for the moving action, a series of path reference points are defined, such as the grasping top point, the moving direction auxiliary point, the pallet entry point, and the placement top point, which define the start point, end point, and moving direction of the moving action; for the stacking action, a placement reference point is defined to describe the approximate position when the stacking action is executed. These reference points are used to limit the spatial position range of the corresponding action during execution. It should be noted that the teaching trajectory itself is general; the reference points it provides are spatial position references for different actions and do not depend on specific pallet parameters (such as workpiece size, quantity, etc.), and therefore can be reused for different pallet types. When generating the palletizing process program, the general process program and the teaching trajectory are compared through specific action flow (both the general process program and the teaching trajectory contain action sequence information). The general process program refers to the reference points and path structure defined in the teaching trajectory to finally generate the palletizing process program for performing the palletizing operation.

[0136] Step S204: Obtain the target task, which includes stack location information and reference point information for each stack location.

[0137] The target task is an overall description of this stacking operation. Stack location information describes the number and spatial distribution of target stack locations, such as which workstations need to stack different types of stacks and what type of stack needs to be stacked at each workstation. Reference point information is the spatial location reference for each stack location, such as the coordinates of the lower left corner of a stack location in the world coordinate system. Its purpose is to determine the origin of the coordinate system for each stack location, ensuring that all subsequent point calculations for that stack location are performed within that coordinate system. The purpose of obtaining the target task is to associate the general process program and configuration files with the actual operational task, clarifying the target stack locations and their spatial positions for this stacking operation.

[0138] Step S205: Based on the configuration file and the reference point information of each stack position, calculate the actual placement point of each workpiece in the stack position coordinate system of each stack position, and generate a stacking action configuration file based on the actual placement point.

[0139] In step S201, the configuration file defines the workpiece dimensions, layer structure, and stack structure; in step S204, the target task provides the reference point information for each stack position. This step combines the above two. For each stack position, the origin of the stack position coordinate system is determined using its reference point information. Then, based on the workpiece dimensions, placement method, and stack structure in the configuration file, the actual placement point of each workpiece on that stack position is calculated. The basic principle of the calculation is: given the origin of the stack position coordinate system, workpiece dimensions, workpiece placement method for each layer, and the total number of layers, the precise coordinates of each workpiece in the stack position coordinate system are determined sequentially through spatial coordinate transformation and array arrangement calculations. These actual placement points are precise spatial coordinate values, directly used to guide the robot to place the workpiece in the designated position. All the calculated actual placement points are collected into an independent data file, namely the stacking action configuration file. This configuration file is independent of the aforementioned general process program. This independence means that when the stack structure changes subsequently, only this configuration file needs to be replaced without affecting the general process program itself.

[0140] Step S206: Generate a palletizing process program based on the general process program, teaching trajectory, and palletizing action configuration file.

[0141] The general process program constructed in step S202 is combined with the teaching trajectory obtained in step S203 to generate a palletizing process program. This palletizing process program contains the complete motion logic required for the robot to perform the palletizing operation (i.e., the motion sequence and execution order provided by the general process program) and the spatial position reference frame of the motion (i.e., the reference points and path structure provided by the teaching trajectory). However, this program does not contain the precise placement points of each workpiece in a specific pallet type; these precise placement points are stored independently in the palletizing motion configuration file. During runtime, the palletizing process program obtains the actual placement point of each workpiece by calling the palletizing motion configuration file generated in step S205, thereby driving the robot to perform the palletizing operation according to the motion logic and precise points. This architectural relationship between the general process program, the teaching trajectory, and the palletizing motion configuration file means that when switching pallet types, only the called palletizing motion configuration file needs to be replaced, without regenerating or replacing the entire palletizing process program.

[0142] In some embodiments, generating a configuration file based on configuration parameters includes: determining a workpiece configuration file based on workpiece parameters and determining a workpiece identifier for the workpiece configuration file; determining a layer configuration file based on layer type parameters and determining a layer type identifier for the layer configuration file; determining a stack configuration file based on stack type parameters and determining a stack type identifier for the stack configuration file; constructing an association relationship between the workpiece identifier, layer type identifier, and stack type identifier; and generating a configuration file based on the association relationship. This embodiment achieves hierarchical management of configuration files by generating a unique identifier for each configuration file and establishing an association relationship, enabling the same workpiece parameter or layer type parameter to be shared and referenced by multiple stack type configurations, reducing repetitive configuration operations in multi-stack type scenarios, and further reducing storage pressure.

[0143] For example, the rule for generating a workpiece identifier can be "date + time + workpiece type". The workpiece identifier serves as an index, allowing reference to the corresponding workpiece configuration file in subsequent steps. When a layer configuration file is generated, the corresponding workpiece identifier is associated with it and stored, indicating which workpiece configuration the layer is based on. When a stack configuration file is generated, the corresponding layer identifier is associated with it and stored, indicating which layers the stack is built upon. Through this three-level identifier association mechanism, when a user needs to create a new stack, they can directly reference existing workpiece and layer configurations without repeatedly entering the same information.

[0144] In some embodiments, extracting general execution logic independent of configuration parameters from the palletizing process includes: separating action flows independent of configuration parameters from the palletizing process; extracting the execution logic and execution order of preset actions from the action flows; the preset actions include at least gripping actions, moving actions, and stacking actions; and encapsulating the execution logic and execution order of the preset actions into general execution logic. This embodiment clarifies the extraction object and extraction result of the general execution logic, that is, extracting the action execution order and transition mode independent of parameters such as workpiece size and stack structure from the complete palletizing action flow to form a reusable program skeleton, thereby ensuring the stability and consistency of the general process program under different stack configurations.

[0145] For example, the complete workflow of a palletizing process typically includes: the robot moves to the gripping position → performs the gripping action → lifts to the gripping top point → moves to the pallet entry point after passing through several intermediate auxiliary points → reaches the placement top point → performs the placement action. The execution sequence of "grip → move → place" and the transitional movements between each action are common to all palletizing processes, regardless of the specific workpiece specifications or the pallet arrangement. Therefore, it can be extracted as general execution logic and encapsulated into a general process program.

[0146] In some embodiments, the teaching trajectory includes at least a grasping reference point corresponding to the grasping action, a path reference point corresponding to the moving action, and a placement reference point corresponding to the stacking action. This embodiment limits the teaching trajectory to include at least three types of reference points, corresponding to the three core actions of grasping, moving, and stacking, respectively, providing the necessary spatial location reference for the subsequent calculation of the actual placement point.

[0147] For example, such as Figure 3 As shown, during manual teaching, the operator moves the robot sequentially to the gripping position (gripping reference point), gripping top point, auxiliary point 1, auxiliary point 2, auxiliary point 3, stack entry point, placement top point, and placement position (placement reference point). The system records the coordinate data of these points, as well as the movement path and speed parameters between each point. After teaching is completed, this reference point data is stored in the point data field of the stack configuration file.

[0148] In some embodiments, based on the configuration file and the reference point information of each stack, the actual placement point of each workpiece in the stack coordinate system of each stack is calculated. This includes: calculating the actual placement point of each workpiece in each stack according to a preset array algorithm based on the workpiece size parameters in the workpiece parameters, the workpiece placement method and workpiece spacing in the layer type parameters, and the reference point information of each stack. This embodiment defines the basis and method for calculating the actual placement point, that is, based on the workpiece size, placement method, spacing and reference point, the precise placement point of all workpieces is automatically generated through an array algorithm.

[0149] For example, for a stacking pattern using an array, the system uses a reference point as the origin of the stacking coordinate system. It calculates the coordinates of each workpiece's placement point sequentially based on its width and length, the number of horizontal and vertical placements, the layer height, and the current layer number. When the workpieces are arranged in a rectangular array within each layer, the X-coordinate of the workpiece in the i-th row and j-th column is calculated as: X-coordinate of the reference point + i × (workpiece width + horizontal spacing); Y-coordinate of the reference point is calculated as: Y-coordinate of the reference point + j × (workpiece length + vertical spacing); Z-coordinate of the reference point is calculated as: Z-coordinate of the reference point + (current layer number - 1) × workpiece height. For different layer types (e.g., different placement directions and quantities per layer), the calculations are performed separately according to the placement method and workpiece spacing corresponding to each layer type.

[0150] Specifically, the actual placement point of each workpiece in each stack is calculated according to the preset array algorithm, including: determining the origin of the stack coordinate system based on the reference point information; and using the origin of the stack coordinate system as the reference, calculating the placement point coordinates of each workpiece sequentially according to the following formula:

[0151] P = offset(P_home, x·m + y·n, x·k + y·l, z·cnt);

[0152] Where P represents the coordinates of the current workpiece placement point, P_home represents the coordinates of the reference point, x represents the width of the workpiece, y represents the length of the workpiece, z represents the current layer height, m ​​represents the number of workpieces placed horizontally in the X direction, n represents the number of workpieces placed vertically in the X direction, k represents the number of workpieces placed horizontally in the Y direction, l represents the number of workpieces placed vertically in the Y direction, and cnt represents the layer number. This embodiment provides a specific implementation method for array arrangement algorithm, which can calculate the placement points of all workpieces in the stack using a unified formula, resulting in high computational efficiency and ease of implementation in a computer program.

[0153] For example, suppose a workpiece has a width x = 0.4m, a length y = 0.3m, and a height z = 0.2m. A layer has two workpieces placed horizontally and one vertically in the X direction, and one horizontally and two vertically in the Y direction, with layer number cnt = 1. For the first workpiece in the X direction and the first workpiece in the Y direction in the first layer, its coordinate offset is (0.4×1 + 0.3×0, 0.4×0 + 0.3×1, 0.2×1) = (0.4, 0.3, 0.2). If the reference point coordinates are (1.0, 1.0, 0.5), then the actual placement point coordinates are (1.4, 1.3, 0.7).

[0154] According to another aspect of the present invention, a processor is also provided, the processor being used to run a program, wherein the program executes the control method described in any one of the above-mentioned methods during runtime, the method comprising the following steps:

[0155] Step S401: Obtain the palletizing process program.

[0156] The palletizing process program is constructed using the palletizing process program generation method described above;

[0157] Step S402: Run the palletizing process program and control the robot to perform the palletizing operation.

[0158] This control method can be executed directly on the robot controller. The controller loads the generated palletizing process program and drives the robot to complete the palletizing operation according to the sequence of actions specified in the program and the actual placement points.

[0159] In some embodiments, the above-described robot palletizing control method further includes a pallet type switching step: in response to a pallet type switching control command, obtaining a new configuration file corresponding to the new pallet type; determining a new placement action configuration file based on the new configuration file; calling the new placement action configuration file through the palletizing process program, executing the palletizing process program, and controlling the robot to perform the placement operation of the new pallet type. This embodiment realizes online switching of pallet types—without generating a new palletizing process program, only replacing the called placement action configuration file is required to complete the placement of the new pallet type. Since the palletizing process program itself (including the general process program and the teaching trajectory) remains unchanged, the program logic and custom point data written by the user will not be lost or overwritten due to the switching, ensuring the stability of the program and the integrity of the data.

[0160] For example, when a user needs to switch the current palletizing operation from pallet type A to pallet type B, the system responds to the switching command and regenerates the palletizing action configuration file corresponding to pallet type B based on the configuration parameters of pallet type B. After the robot completes the palletizing of the current pallet type, the system replaces the palletizing action configuration file (pallet type A) called by the current palletizing process program with the palletizing action configuration file of pallet type B, and then runs the palletizing process program. The robot then continues to perform the palletizing operation according to the position data of the new pallet type, and there is no need to regenerate the palletizing process program during the switching process.

[0161] According to another aspect of the present invention, a readable storage medium is also provided, the readable storage medium including a stored program, wherein the program executes the palletizing process program generation method of any one of the above-described methods when it runs, the method including the following steps:

[0162] Step S201: Obtain configuration parameters and generate a configuration file based on the configuration parameters; the configuration parameters include workpiece parameters, layer type parameters, and stack type parameters.

[0163] Configuration parameters are a set of parameters defined by the user according to actual stacking requirements, including workpiece parameters, layer parameters, and stack parameters. Workpiece parameters describe the physical properties of the workpiece, such as its length, width, height, and weight, which determine the spatial dimensions and quality characteristics of a single workpiece. Layer parameters describe the arrangement of workpieces in a single layer on the pallet, determining the arrangement pattern of workpieces in each layer. Stack parameters describe the structure of the complete stack, such as the total number of layers and the layer type used for each layer, determining the spatial structure of the entire stack. After obtaining the above configuration parameters, the system generates one or more configuration files according to a preset data structure for reading and referencing in subsequent steps. By independently acquiring and file-based storing configuration parameters, the specification definition of the stacking operation is separated from the program logic, providing a data foundation for the construction of subsequent general process programs. It is understood that configuration parameters can come from manual input by the user through the human-machine interface, from pre-stored configuration templates, or from task instructions issued by the host computer. This application does not limit the specific method of acquiring configuration parameters.

[0164] For example, in actual operation, users can input or set workpiece parameters through a human-machine interface, including the workpiece's length, width, height, and weight. The system generates a workpiece configuration file based on the input parameters. Users can also input or set layer parameters, including pallet parameters, workpiece placement method (e.g., horizontal or vertical), number of workpieces per layer, and workpiece spacing. The system generates a layer configuration file based on the input parameters. Users can also input or set stacking parameters, including the number of stack layers, the corresponding layer type for each layer, and the total height limit of the stack. The system generates a stacking configuration file based on the input parameters.

[0165] Users can select the desired workpiece configuration file, layer configuration file, and stack configuration file to generate the final configuration file. The configuration file can be in JSON format for easy data storage, retrieval, and transmission.

[0166] Step S202: Extract the general execution logic that is independent of the configuration parameters from the palletizing process flow, and construct a general process program based on the general execution logic; the general process program is used to control the robot to execute preset actions in a preset order.

[0167] In the palletizing process, there are some common logic components that are independent of specific workpiece specifications and stack structures. For example, the robot needs to perform one action, then another, and finally yet another. This execution sequence and the transitional movements between actions are common to most palletizing processes and do not change due to variations in parameters such as workpiece size or the number of stack layers. This step extracts these common logic components, independent of configuration parameters, from the complete palletizing process and encapsulates them into a general process program. This general process program is essentially a program skeleton that defines which preset actions the robot needs to perform and the execution order of these preset actions, but does not contain any spatial coordinates bound to a specific work scenario. The general process program constructed in this way has good portability and can be reused for palletizing operations of different stack types and at different workstations. For example, regardless of whether the workpiece being palletized is large or small, and regardless of whether the final stack has 3 or 10 layers, the robot needs to perform a movement action after performing the grasping action. This execution logic is universal and can be extracted and solidified in the general process program.

[0168] Step S203: Obtain the teaching trajectory. The teaching trajectory is used to define the execution order and spatial reference points of the preset actions. The spatial reference points are used to limit the spatial position range of the preset actions during execution.

[0169] Specifically, the teaching trajectory can be general trajectory data obtained through manual teaching. During the teaching process, the operator moves the robot to a reference point (e.g., the lower left corner of the pallet) and then manually operates the robot to execute each preset action in sequence, completing a full grasping, moving, and stacking action flow. The system simultaneously records the robot's motion trajectory. This teaching trajectory defines the execution order of each preset action and the corresponding spatial position reference points for each action. For example, for the grasping action, a grasping reference point is defined to limit the execution position of the grasping action; for the moving action, a series of path reference points are defined, such as the grasping top point, the moving direction auxiliary point, the pallet entry point, and the placement top point, which define the start point, end point, and moving direction of the moving action; for the stacking action, a placement reference point is defined to describe the approximate position when the stacking action is executed. These reference points are used to limit the spatial position range of the corresponding action during execution. It should be noted that the teaching trajectory itself is general; the reference points it provides are spatial position references for different actions and do not depend on specific pallet parameters (such as workpiece size, quantity, etc.), and therefore can be reused for different pallet types. When generating the palletizing process program, the general process program and the teaching trajectory are compared through specific action flow (both the general process program and the teaching trajectory contain action sequence information). The general process program refers to the reference points and path structure defined in the teaching trajectory to finally generate the palletizing process program for performing the palletizing operation.

[0170] Step S204: Obtain the target task, which includes stack location information and reference point information for each stack location.

[0171] The target task is an overall description of this stacking operation. Stack location information describes the number and spatial distribution of target stack locations, such as which workstations need to stack different types of stacks and what type of stack needs to be stacked at each workstation. Reference point information is the spatial location reference for each stack location, such as the coordinates of the lower left corner of a stack location in the world coordinate system. Its purpose is to determine the origin of the coordinate system for each stack location, ensuring that all subsequent point calculations for that stack location are performed within that coordinate system. The purpose of obtaining the target task is to associate the general process program and configuration files with the actual operational task, clarifying the target stack locations and their spatial positions for this stacking operation.

[0172] Step S205: Based on the configuration file and the reference point information of each stack position, calculate the actual placement point of each workpiece in the stack position coordinate system of each stack position, and generate a stacking action configuration file based on the actual placement point.

[0173] In step S201, the configuration file defines the workpiece dimensions, layer structure, and stack structure; in step S204, the target task provides the reference point information for each stack position. This step combines the above two. For each stack position, the origin of the stack position coordinate system is determined using its reference point information. Then, based on the workpiece dimensions, placement method, and stack structure in the configuration file, the actual placement point of each workpiece on that stack position is calculated. The basic principle of the calculation is: given the origin of the stack position coordinate system, workpiece dimensions, workpiece placement method for each layer, and the total number of layers, the precise coordinates of each workpiece in the stack position coordinate system are determined sequentially through spatial coordinate transformation and array arrangement calculations. These actual placement points are precise spatial coordinate values, directly used to guide the robot to place the workpiece in the designated position. All the calculated actual placement points are collected into an independent data file, namely the stacking action configuration file. This configuration file is independent of the aforementioned general process program. This independence means that when the stack structure changes subsequently, only this configuration file needs to be replaced without affecting the general process program itself.

[0174] Step S206: Generate a palletizing process program based on the general process program, teaching trajectory, and palletizing action configuration file.

[0175] The general process program constructed in step S202 is combined with the teaching trajectory obtained in step S203 to generate a palletizing process program. This palletizing process program contains the complete motion logic required for the robot to perform the palletizing operation (i.e., the motion sequence and execution order provided by the general process program) and the spatial position reference frame of the motion (i.e., the reference points and path structure provided by the teaching trajectory). However, this program does not contain the precise placement points of each workpiece in a specific pallet type; these precise placement points are stored independently in the palletizing motion configuration file. During runtime, the palletizing process program obtains the actual placement point of each workpiece by calling the palletizing motion configuration file generated in step S205, thereby driving the robot to perform the palletizing operation according to the motion logic and precise points. This architectural relationship between the general process program, the teaching trajectory, and the palletizing motion configuration file means that when switching pallet types, only the called palletizing motion configuration file needs to be replaced, without regenerating or replacing the entire palletizing process program.

[0176] In some embodiments, generating a configuration file based on configuration parameters includes: determining a workpiece configuration file based on workpiece parameters and determining a workpiece identifier for the workpiece configuration file; determining a layer configuration file based on layer type parameters and determining a layer type identifier for the layer configuration file; determining a stack configuration file based on stack type parameters and determining a stack type identifier for the stack configuration file; constructing an association relationship between the workpiece identifier, layer type identifier, and stack type identifier; and generating a configuration file based on the association relationship. This embodiment achieves hierarchical management of configuration files by generating a unique identifier for each configuration file and establishing an association relationship, enabling the same workpiece parameter or layer type parameter to be shared and referenced by multiple stack type configurations, reducing repetitive configuration operations in multi-stack type scenarios, and further reducing storage pressure.

[0177] For example, the rule for generating a workpiece identifier can be "date + time + workpiece type". The workpiece identifier serves as an index, allowing reference to the corresponding workpiece configuration file in subsequent steps. When a layer configuration file is generated, the corresponding workpiece identifier is associated with it and stored, indicating which workpiece configuration the layer is based on. When a stack configuration file is generated, the corresponding layer identifier is associated with it and stored, indicating which layers the stack is built upon. Through this three-level identifier association mechanism, when a user needs to create a new stack, they can directly reference existing workpiece and layer configurations without repeatedly entering the same information.

[0178] In some embodiments, extracting general execution logic independent of configuration parameters from the palletizing process includes: separating action flows independent of configuration parameters from the palletizing process; extracting the execution logic and execution order of preset actions from the action flows; the preset actions include at least gripping actions, moving actions, and stacking actions; and encapsulating the execution logic and execution order of the preset actions into general execution logic. This embodiment clarifies the extraction object and extraction result of the general execution logic, that is, extracting the action execution order and transition mode independent of parameters such as workpiece size and stack structure from the complete palletizing action flow to form a reusable program skeleton, thereby ensuring the stability and consistency of the general process program under different stack configurations.

[0179] For example, the complete workflow of a palletizing process typically includes: the robot moves to the gripping position → performs the gripping action → lifts to the gripping top point → moves to the pallet entry point after passing through several intermediate auxiliary points → reaches the placement top point → performs the placement action. The execution sequence of "grip → move → place" and the transitional movements between each action are common to all palletizing processes, regardless of the specific workpiece specifications or the pallet arrangement. Therefore, it can be extracted as general execution logic and encapsulated into a general process program.

[0180] In some embodiments, the teaching trajectory includes at least a grasping reference point corresponding to the grasping action, a path reference point corresponding to the moving action, and a placement reference point corresponding to the stacking action. This embodiment limits the teaching trajectory to include at least three types of reference points, corresponding to the three core actions of grasping, moving, and stacking, respectively, providing the necessary spatial location reference for the subsequent calculation of the actual placement point.

[0181] For example, such as Figure 3 As shown, during manual teaching, the operator moves the robot sequentially to the gripping position (gripping reference point), gripping top point, auxiliary point 1, auxiliary point 2, auxiliary point 3, stack entry point, placement top point, and placement position (placement reference point). The system records the coordinate data of these points, as well as the movement path and speed parameters between each point. After teaching is completed, this reference point data is stored in the point data field of the stack configuration file.

[0182] In some embodiments, based on the configuration file and the reference point information of each stack, the actual placement point of each workpiece in the stack coordinate system of each stack is calculated. This includes: calculating the actual placement point of each workpiece in each stack according to a preset array algorithm based on the workpiece size parameters in the workpiece parameters, the workpiece placement method and workpiece spacing in the layer type parameters, and the reference point information of each stack. This embodiment defines the basis and method for calculating the actual placement point, that is, based on the workpiece size, placement method, spacing and reference point, the precise placement point of all workpieces is automatically generated through an array algorithm.

[0183] For example, for a stacking pattern using an array, the system uses a reference point as the origin of the stacking coordinate system. It calculates the coordinates of each workpiece's placement point sequentially based on its width and length, the number of horizontal and vertical placements, the layer height, and the current layer number. When the workpieces are arranged in a rectangular array within each layer, the X-coordinate of the workpiece in the i-th row and j-th column is calculated as: X-coordinate of the reference point + i × (workpiece width + horizontal spacing); Y-coordinate of the reference point is calculated as: Y-coordinate of the reference point + j × (workpiece length + vertical spacing); Z-coordinate of the reference point is calculated as: Z-coordinate of the reference point + (current layer number - 1) × workpiece height. For different layer types (e.g., different placement directions and quantities per layer), the calculations are performed separately according to the placement method and workpiece spacing corresponding to each layer type.

[0184] Specifically, the actual placement point of each workpiece in each stack is calculated according to the preset array algorithm, including: determining the origin of the stack coordinate system based on the reference point information; and using the origin of the stack coordinate system as the reference, calculating the placement point coordinates of each workpiece sequentially according to the following formula:

[0185] P = offset(P_home, x·m + y·n, x·k + y·l, z·cnt);

[0186] Where P represents the coordinates of the current workpiece placement point, P_home represents the coordinates of the reference point, x represents the width of the workpiece, y represents the length of the workpiece, z represents the current layer height, m ​​represents the number of workpieces placed horizontally in the X direction, n represents the number of workpieces placed vertically in the X direction, k represents the number of workpieces placed horizontally in the Y direction, l represents the number of workpieces placed vertically in the Y direction, and cnt represents the layer number. This embodiment provides a specific implementation method for array arrangement algorithm, which can calculate the placement points of all workpieces in the stack using a unified formula, resulting in high computational efficiency and ease of implementation in a computer program.

[0187] For example, suppose a workpiece has a width x = 0.4m, a length y = 0.3m, and a height z = 0.2m. A layer has two workpieces placed horizontally and one vertically in the X direction, and one horizontally and two vertically in the Y direction, with layer number cnt = 1. For the first workpiece in the X direction and the first workpiece in the Y direction in the first layer, its coordinate offset is (0.4×1 + 0.3×0, 0.4×0 + 0.3×1, 0.2×1) = (0.4, 0.3, 0.2). If the reference point coordinates are (1.0, 1.0, 0.5), then the actual placement point coordinates are (1.4, 1.3, 0.7).

[0188] According to another aspect of the present invention, a readable storage medium is also provided, the readable storage medium including a stored program, wherein the program executes the control method of any one of the above, the method including the following steps:

[0189] Step S401: Obtain the palletizing process program.

[0190] The palletizing process program is constructed using the palletizing process program generation method described above;

[0191] Step S402: Run the palletizing process program and control the robot to perform the palletizing operation.

[0192] This control method can be executed directly on the robot controller. The controller loads the generated palletizing process program and drives the robot to complete the palletizing operation according to the sequence of actions specified in the program and the actual placement points.

[0193] In some embodiments, the above-described robot palletizing control method further includes a pallet type switching step: in response to a pallet type switching control command, obtaining a new configuration file corresponding to the new pallet type; determining a new placement action configuration file based on the new configuration file; calling the new placement action configuration file through the palletizing process program, executing the palletizing process program, and controlling the robot to perform the placement operation of the new pallet type. This embodiment realizes online switching of pallet types—without generating a new palletizing process program, only replacing the called placement action configuration file is required to complete the placement of the new pallet type. Since the palletizing process program itself (including the general process program and the teaching trajectory) remains unchanged, the program logic and custom point data written by the user will not be lost or overwritten due to the switching, ensuring the stability of the program and the integrity of the data.

[0194] For example, when a user needs to switch the current palletizing operation from pallet type A to pallet type B, the system responds to the switching command and regenerates the palletizing action configuration file corresponding to pallet type B based on the configuration parameters of pallet type B. After the robot completes the palletizing of the current pallet type, the system replaces the palletizing action configuration file (pallet type A) called by the current palletizing process program with the palletizing action configuration file of pallet type B, and then runs the palletizing process program. The robot then continues to perform the palletizing operation according to the position data of the new pallet type, and there is no need to regenerate the palletizing process program during the switching process.

[0195] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0196] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0197] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0198] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0199] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0200] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0201] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0202] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0203] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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, they should be considered to be within the scope of this specification.

[0204] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0205] As can be seen from the above description, the embodiments of this application achieve the following technical effects:

[0206] By extracting generic execution logic independent of configuration parameters from the palletizing process flow to construct a generic process program, a robot is controlled to execute preset actions in a preset sequence. This, combined with the taught trajectory to define the spatial position of each action, generates a universally applicable palletizing process program. Furthermore, the actual placement points, dependent on specific pallet type parameters, are independently constructed as palletizing action configuration files, allowing the palletizing process program to be reused across different pallet types. When switching to a new pallet type, only the corresponding palletizing action configuration file needs to be generated; the palletizing process program does not need to be reconstructed. This reduces redundant programs, lowers storage resource consumption, reduces operational repetition, and improves program stability at the program generation source. It also endows the process package with the versatility and scalability to flexibly adapt to the palletizing needs of multiple workstations and various workpiece specifications.

[0207] The above description is merely a preferred embodiment of this application and is not intended to limit 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 protection scope of this application.

Claims

1. A palletizing process procedure generation method characterized by, The method includes: Obtain configuration parameters and generate a configuration file based on the configuration parameters; wherein, the configuration parameters include workpiece parameters, layer type parameters, and stack type parameters; Extract common execution logic that is independent of the configuration parameters from the palletizing process, and construct a general process program based on the common execution logic; the general process program is used to control the robot to perform preset actions in a preset order. The teaching trajectory is obtained, which is used to define the execution order and spatial position reference points of the preset action, and the spatial position reference points are used to limit the spatial position range of the preset action during execution. Obtain the target task, which includes stack position information and reference point information for each stack position; Based on the configuration file and the reference point information of each stack position, calculate the actual placement point of each workpiece in the stack position coordinate system of each stack position, and generate a stacking action configuration file based on the actual placement point. Based on the general process procedure, the teaching trajectory, and the stacking action configuration file, a palletizing process procedure is generated.

2. The method according to claim 1, characterized in that, Generate a configuration file based on the configuration parameters, including: The workpiece configuration file is determined based on the workpiece parameters, and the workpiece identifier of the workpiece configuration file is determined. The layer configuration file is determined based on the layer parameters, and the layer identifier of the layer configuration file is determined. Based on the stack type parameters, a stack type configuration file is determined, and a stack type identifier is generated from the stack type configuration file. Establish the association relationship between the workpiece identifier, the layer identifier, and the stack identifier, and generate the configuration file based on the association relationship.

3. The method according to claim 1, characterized in that, Extracting generic execution logic from the palletizing process that is independent of the configuration parameters, including: Separate the action flow that is independent of the configuration parameters from the palletizing process, and extract the execution logic and execution order of the preset actions from the action flow; the preset actions include at least gripping actions, moving actions, and stacking actions; The execution logic and execution order of the preset actions are encapsulated into the general execution logic.

4. The method according to claim 3, characterized in that, The teaching trajectory includes at least the grasping reference point corresponding to the grasping action, the path reference point corresponding to the moving action, and the placement reference point corresponding to the stacking action.

5. A control method, characterized in that, The method includes: Obtain a palletizing process program, wherein the palletizing process program is constructed using the method described in any one of claims 1 to 4; Run the palletizing process program to control the robot to perform the palletizing operation.

6. The method according to claim 5, characterized in that, The method further includes: In response to the stack type switching control command, obtain the new configuration file corresponding to the new stack type; Determine a new stacking action configuration file based on the new configuration file; The new palletizing action configuration file is called through the palletizing process program, and the palletizing process program is executed to control the robot to perform the palletizing operation of the new pallet type.

7. A palletizing process program generation device, characterized in that, include: A configuration unit is used to acquire configuration parameters and generate a configuration file based on the configuration parameters; wherein, the configuration parameters include workpiece parameters, layer type parameters, and stack type parameters; A general process construction unit is used to extract general execution logic unrelated to the configuration parameters from the palletizing process flow, and construct a general process program based on the general execution logic; the general process program is used to control the robot to execute preset actions in a preset order; The teaching unit is used to acquire the teaching trajectory, which is used to define the execution order and spatial position reference points of the preset action, and the spatial position reference points are used to limit the spatial position range of the preset action during execution. The first data acquisition unit is used to acquire the target task, which includes stack position information and reference point information of each stack position. The stacking action configuration unit is used to calculate the actual placement point of each workpiece in the stacking coordinate system of each stacking position according to the configuration file and the reference point information of each stacking position, and generate the stacking action configuration file according to the actual placement point. The generation unit is used to generate a palletizing process program based on the general process program, the teaching trajectory, and the palletizing action configuration file.

8. A control device, characterized in that, include: The second data acquisition unit is used to acquire the palletizing process program, which is constructed using the method described in any one of claims 1 to 4; The control unit is used to run the palletizing process program and control the robot to perform the palletizing operation.

9. The apparatus according to claim 8, characterized in that, The second data acquisition unit is also used to acquire the new configuration file corresponding to the new stack type in response to the stack type switching control command; The control unit is also used to determine a new stacking action configuration file based on the new configuration file; to call the new stacking action configuration file through the palletizing process program, to execute the palletizing process program, and to control the robot to perform the stacking operation of the new pallet type.

10. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 4, or implements the method as described in any one of claims 5 to 6.