Robot control method and device, electronic equipment and readable storage medium
By using pre-set instruction templates and instantiated instructions, the problems of complex robot motion trajectories and poor program reusability are solved, achieving efficient robot control and reducing programming difficulty and cost.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NETEASE (HANGZHOU) NETWORK CO LTD
- Filing Date
- 2023-07-17
- Publication Date
- 2026-05-12
AI Technical Summary
In existing technologies, robot motion trajectories are complex and programs have poor reusability and high programming difficulty, resulting in a poor user experience.
The robot is controlled to complete its task by determining the action to be executed through a pre-set instruction template, configuring the target configuration variables, generating instantiated instructions, and executing them in the order of the actions.
It improves program reusability, reduces programming difficulty, and saves manpower and time costs.
Smart Images

Figure CN117021073B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotics, specifically to a robot control method, device, electronic equipment, and computer-readable storage medium. Background Technology
[0002] With the continuous development of robotics technology, more and more industries are using robots to replace manual labor in various tasks. For example, robots are used in logistics for sorting and delivery, and in factories for material transportation. The emergence of robots has reduced labor costs, achieved automation, and made manual labor more efficient.
[0003] Currently, robot control is mostly achieved through programming. The robot's movement trajectory is programmed to control its actions. However, with increasing uncertainties in application scenarios, robots may have many different movement trajectories in practice. For example, a robot may need to transport items from different starting positions to different delivery locations. Changing the robot's movement trajectory often requires redesigning the program, resulting in poor program reusability. Furthermore, as the robot's movement trajectories become increasingly complex, the programming difficulty increases, and program maintenance requires significant time and effort, leading to a poor user experience. Summary of the Invention
[0004] This application provides a robot control method, device, electronic device, and computer-readable storage medium, which can improve program reusability and reduce the programming difficulty of programs controlling robot movement. The specific solution is as follows:
[0005] In a first aspect, embodiments of this application provide a robot control method, the method comprising:
[0006] Identify the actions required to complete the task at hand;
[0007] A target instruction template matching the action to be executed is determined from a pre-set instruction template, wherein the instruction template includes configuration variables on which the corresponding action depends;
[0008] In response to a parameter configuration instruction for a target configuration variable in the target instruction template, the target configuration variable is configured to obtain an instantiated instruction for controlling the robot to perform the action to be performed;
[0009] The instantiation instructions are executed in the order of the actions to be performed, so as to control the robot to perform the tasks to be performed.
[0010] Secondly, embodiments of this application provide a robot control device, the device comprising:
[0011] The first determining unit is used to determine the actions to be performed required to complete the task to be performed;
[0012] The second determining unit is used to determine a target instruction template that matches the action to be executed from a pre-set instruction template, wherein the instruction template includes configuration variables on which the corresponding action depends;
[0013] The parameter configuration unit is used to configure the target configuration variable in response to the parameter configuration instruction for the target configuration variable in the target instruction template, so as to obtain the instantiated instruction for controlling the robot to perform the action to be performed;
[0014] The instruction execution unit is used to execute the instantiated instructions according to the order of the actions to be executed, so as to control the robot to perform the tasks to be executed.
[0015] Thirdly, this application also provides an electronic device, including:
[0016] Processor; and
[0017] A memory for storing a data processing program, which, when the electronic device is powered on and runs through the processor, executes the method described in the first aspect.
[0018] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a data processing program that is executed by a processor to perform the method described in the first aspect.
[0019] Compared with the prior art, this application has the following advantages:
[0020] The robot control method provided in this application involves: determining the actions to be performed required to complete the task; determining a target instruction template that matches the actions to be performed from a pre-set instruction template, wherein the instruction template includes configuration variables on which the corresponding actions depend; configuring the target configuration variables in response to a parameter configuration instruction for the target configuration variables in the target instruction template to obtain an instantiation instruction for controlling the robot to perform the actions to be performed; and executing the instantiation instruction in the order of execution of the actions to be performed to control the robot to perform the task.
[0021] Since all tasks performed by the robot consist of actions, any complex task to be performed can be composed of multiple ordered actions, such as Action 1 → Action 2 → Action 3 → Action 4 → Action 5, which constitutes Task A. Because this application pre-sets instruction templates, a target instruction template matching the multiple actions to be performed and containing the configuration variables required to execute the corresponding actions can be determined from the pre-set instruction templates. Then, the target configuration variables in the determined target instruction template can be configured to obtain the instantiation instructions corresponding to the actions to be performed. Since the task to be performed consists of actions to be performed, the instructions controlling the robot to execute the actions to be performed consist of the instantiation instructions corresponding to the actions to be performed. Therefore, when executing the instantiation instructions according to the order of the actions to be performed, the robot can be successfully controlled to execute the required actions in the task to be performed according to the order of the actions to be performed, thereby achieving the purpose of the robot performing the task to be performed.
[0022] As can be seen, the robot control method provided in this application divides the task to be executed into multiple required actions, instantiates the instruction templates corresponding to the actions to be executed, and executes the instantiated instructions according to the order of the actions to be executed. In this way, regardless of the complexity of the task to be executed, the corresponding actions with instruction templates can be determined. By configuring the parameters through the instruction templates corresponding to the actions to be executed, the instantiated instructions corresponding to the actions to be executed can be obtained quickly, and the instantiated instructions can be executed quickly according to the order of the actions to be executed, thereby controlling the robot to execute the task to be executed. Moreover, the instruction templates are applicable to the same type of actions in different tasks. Therefore, the robot control method provided in this application improves the reusability of the program, reduces the programming difficulty, and saves the manpower and time costs of programming. Attached Figure Description
[0023] Figure 1 This is a schematic diagram of the control system of the robot provided in the embodiments of this application;
[0024] Figure 2 This is a flowchart of the robot control method provided in the embodiments of this application;
[0025] Figure 3 This is a schematic diagram of a front-end page in the robot control method provided in the embodiments of this application;
[0026] Figure 4 This is another example of a front-end page diagram in the robot control method provided in the embodiments of this application;
[0027] Figure 5 This is a schematic diagram of a shelf in an application scenario of the robot control method provided in this application embodiment;
[0028] Figure 6 This is a structural block diagram of an example of the robot control device provided in the embodiments of this application;
[0029] Figure 7 This is a structural block diagram of an example of an electronic device provided in an embodiment of this application. Detailed Implementation
[0030] Many specific details are set forth in the following description to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application; therefore, this application is not limited to the specific embodiments disclosed below.
[0031] It should be noted that the terms "first," "second," "third," etc., in the claims, specification, and drawings of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. Such data are interchangeable where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that shown or described herein. Furthermore, the terms "comprising," "having," and their variations are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes 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 these processes, methods, products, or apparatuses.
[0032] Labor-intensive industries require a large workforce for manual labor, resulting in significant labor costs. Therefore, an increasing number of labor-intensive industries are using robots to replace human workers. The emergence of robots not only saves labor costs but also achieves highly efficient automated labor.
[0033] However, for many industries, manual labor is not static, which necessitates designing robot motion trajectories based on specific circumstances. For example, in logistics, sorting item A requires a robot to move it from position 1 to position 2, potentially navigating obstacles a, b, c, etc. Similarly, sorting item B requires moving it from position 3 to position 4, again encountering obstacles c, d, e, etc. As the number of manual labor-related elements in the application scenario increases, the robot's motion trajectories become increasingly complex and cumbersome. Consequently, the design of the corresponding control programs for the robot's movement becomes more complex and intricate, requiring the design of a specific control program for each motion trajectory, thus increasing the programming difficulty in robot control.
[0034] For the reasons mentioned above, in order to improve the reusability of the program and reduce the programming difficulty of the program for controlling the robot's movement, the first embodiment of this application provides a robot control method. This method is applied to an electronic device, which may be a desktop computer, laptop computer, mobile phone, tablet computer, server, terminal device, etc., or other electronic devices capable of running the robot control method. This application embodiment is not specifically limited.
[0035] Before introducing the robot control method provided in the embodiments of this application, the following will first describe... Figure 1 The application of the robot control method provided in the embodiments of this application in the robot control system is described.
[0036] like Figure 1 The diagram shown is a schematic of a robot control system provided in an embodiment of this application. The robot control system 100 includes a terminal device 10 and a robot 20. The terminal device 10 and the robot 20 are connected via a network. Figure 1 The process includes the following steps S101 to S105.
[0037] Step S101: On the terminal device 10, in response to the selection instruction for the target instruction template, the selected target instruction template is obtained;
[0038] Step S102: On the terminal device 10, in response to the parameter configuration instruction for the target instruction template, the configuration parameters are filled into the corresponding configuration variables to obtain the instantiation instruction;
[0039] Step S103: In response to the sequence arrangement instruction of the instantiation instruction, the sequence arrangement instruction is arranged in sequence according to the arrangement order indicated by the sequence arrangement instruction to obtain a continuous action instruction set;
[0040] Step S104: Send a continuous action instruction set;
[0041] Step S105: Receive and execute a set of continuous motion instructions to control the robot to perform tasks.
[0042] For a detailed explanation of steps S101 to S105, please refer to the following detailed description of the art resource processing method provided in the embodiments of this application.
[0043] like Figure 2 The diagram shown is a flowchart of a robot control method provided in an embodiment of this application, including the following steps S201 to S204.
[0044] Step S201: Determine the actions to be performed required to complete the task to be performed.
[0045] In this step, the task to be performed is the task that the robot will perform. The robot in this application may be, for example, a robot used for sorting goods in the logistics field, or a robot used for transporting materials in a factory. In this embodiment of the application, a robot used for sorting goods is used as an example. Accordingly, the task to be performed may include at least one of the following: moving goods from one location to another, classifying multiple goods, batch sorting multiple goods, and charging after sorting.
[0046] In practical applications, robots typically use robotic arms to load and unload goods. A robot may have one or more robotic arms. When a robot has multiple robotic arms, the robotic arm used to grasp goods and the robotic arm used to unload goods may be the same or different. In practical applications, corresponding functions can be pre-programmed onto multiple robotic arms. This way, when facing different needs, the robotic arm supporting the corresponding function can be selected. The robotic arms used in the subsequent steps of this application are robotic arms that support the corresponding functions.
[0047] Since each task performed by the robot in an application scenario can be broken down into individual actions, and each individual action is a single action performed by the robot, multiple individual actions can be combined into a complete task. Therefore, the task to be performed in this application can be decomposed into at least one action to be performed. The more complex the task, the more actions it may require. Specifically, the actions required to complete the task can be determined based on the actual scenario in which the robot performs the task.
[0048] As shown in Table 1, which provides examples of tasks and actions to be performed, the robot's task to be performed is to transfer goods 1 from shelf a to shelf b and then return to the charging point. At this time, the robot needs to perform 7 actions: move from the current position to shelf a, load goods 1, move from shelf a to shelf b, raise the robotic arm, unload goods 1, lower the robotic arm, and move from shelf b to the charging point.
[0049] Table 1. Examples of tasks and actions to be performed
[0050]
[0051]
[0052] In practical applications, each task performed by a robot in an application scenario can be broken down into individual actions. That is, the individual actions corresponding to the robot in the execution of a certain task can be combined in a certain order to form the entire execution process of the robot in executing that task.
[0053] The purpose of this step is to break down the task to be performed into specific actions to be performed. By doing so, tasks of any complexity are broken down into specific actions to be performed, thus providing a basis for simplifying complex tasks.
[0054] Step S202: Determine the target instruction template that matches the action to be executed from the pre-set instruction templates.
[0055] The instruction template includes configuration variables that are required to execute the corresponding action.
[0056] Since the automated execution of tasks by the robot is controlled by a program, each action to be executed corresponding to the task is also controlled by the program. Each individual action in this application can have a pre-set corresponding instruction template, which is an instruction without parameter configuration for configuration variables. Therefore, in step S202, a target instruction template matching each action to be executed can be determined from the pre-set instruction templates based on the actions to be executed determined in step S201. One action to be executed corresponds to one instruction template, and each instruction template can be distinguished by different instruction identifiers or different instruction names; this application does not specifically limit this.
[0057] Since the configuration variables in each instruction template are the configuration variables that the corresponding action depends on, the target configuration variables in the target instruction template are the configuration variables that the corresponding action to be executed depends on. For example, for a movement action, the configuration variables in the instruction template can be the position coordinates of the movement start point and the movement end point.
[0058] Step 203: In response to the parameter configuration instruction for the target configuration variable in the target instruction template, configure the parameters of the target configuration variable to obtain the instantiated instruction used to control the robot to perform the action to be performed.
[0059] Since the configuration variables in the instruction template have not yet been configured, in order to obtain instructions that can control the robot to execute the action to be executed, the parameters of the target instruction template that matches the determined action to be executed can be configured to obtain the instantiated instruction, thereby realizing the instantiation of the instruction.
[0060] As shown in Table 2, this application provides a parameter configuration example table for instantiating movement actions into instructions. The actions to be executed in Table 2 are actions 1, 3 and 7 in Table 1.
[0061] Table 2. Example of parameter configuration when instantiating a movement action command.
[0062]
[0063] In this way, the parameters of the target instruction template corresponding to each action to be executed can be configured to obtain the instantiated instruction corresponding to each target instruction template. Based on the obtained instantiated instructions, the robot can be controlled to execute the corresponding action to be executed.
[0064] Step S204: Execute the instantiation instructions according to the order of the actions to be executed, so as to control the robot to perform the tasks to be executed.
[0065] The purpose of this step is to control the robot to execute the task according to the instantiated instructions. Since the actions required to complete the task have a certain order, the robot can complete the task by executing the actions in that order. Therefore, the instantiated instructions also have a certain execution order, which is the order of the corresponding actions.
[0066] In this step, the corresponding instantiation instructions can be executed according to the order of the actions to be executed to control the robot to perform the task. Alternatively, the instantiation instructions can be arranged in order according to the order of the actions to be executed to obtain an arranged set of instantiation instructions. By executing the arranged set of instantiation instructions, the robot can be controlled to execute each action to be executed in sequence to achieve the purpose of performing the task.
[0067] The robot control method provided in this application involves: determining the actions to be performed required to complete the task; determining a target instruction template that matches the actions to be performed from a pre-set instruction template, wherein the instruction template includes configuration variables on which the corresponding actions depend; configuring the target configuration variables in response to a parameter configuration instruction for the target configuration variables in the target instruction template to obtain an instantiation instruction for controlling the robot to perform the actions to be performed; and executing the instantiation instruction in the order of execution of the actions to be performed to control the robot to perform the task.
[0068] Since all tasks performed by the robot consist of actions, any complex task to be performed can be composed of multiple ordered actions, such as Action 1 → Action 2 → Action 3 → Action 4 → Action 5, which constitutes Task A. Because this application pre-sets instruction templates, a target instruction template matching the multiple actions to be performed and containing the configuration variables required to execute the corresponding actions can be determined from the pre-set instruction templates. Then, the target configuration variables in the determined target instruction template can be configured to obtain the instantiation instructions corresponding to the actions to be performed. Since the task to be performed consists of actions to be performed, the instructions controlling the robot to execute the actions to be performed consist of the instantiation instructions corresponding to the actions to be performed. Therefore, when executing the instantiation instructions according to the order of the actions to be performed, the robot can be successfully controlled to execute the required actions in the task to be performed according to the order of the actions to be performed, thereby achieving the purpose of the robot performing the task to be performed.
[0069] As can be seen, the robot control method provided in this application divides the task to be executed into multiple required actions, instantiates the instruction templates corresponding to the actions to be executed, and executes the instantiated instructions according to the order of the actions to be executed. In this way, regardless of the complexity of the task to be executed, the corresponding actions with instruction templates can be determined. By configuring the parameters through the instruction templates corresponding to the actions to be executed, the instantiated instructions corresponding to the actions to be executed can be obtained quickly, and the instantiated instructions can be executed quickly according to the order of the actions to be executed, thereby controlling the robot to execute the task to be executed. Moreover, the instruction templates are applicable to the same type of actions in different tasks. Therefore, the robot control method provided in this application improves the reusability of the program, reduces the programming difficulty, and saves the manpower and time costs of programming.
[0070] Optionally, prior to step S201, the robot control method provided in this application may further include the following steps:
[0071] Determine the robot's individual actions within the scene;
[0072] The single action is modeled based on its position, and the corresponding instruction template is obtained.
[0073] Accordingly, the configuration variables include the action position for performing the corresponding action. The "configuring parameters for the target configuration variables" in step S203 can be achieved through the following steps:
[0074] Determine the target action location for the action to be performed;
[0075] Configure the parameters of the target configuration variables according to the target action position.
[0076] In practical applications, if two actions are of the same type, such as actions A and B being movement actions targeting different start and end points, for example, action A is moving from position a at coordinates (1, 2) to position b at coordinates (3, 5), and action B is moving from position c at coordinates (0, 1) to position c at coordinates (6, 8), since the actions performed by the robot are both movement actions, the control instructions corresponding to actions A and B may only differ in the configuration parameters of the configuration variables.
[0077] To improve the programming efficiency of programs controlling robots to perform tasks, this application provides an instruction template for single actions of the same type. By configuring different configuration parameters for the configuration variables in the instruction template, instantiated instructions for controlling actual actions in the real-world scenario can be obtained. Since there may be multiple actions of the same type in a single action corresponding to a robot performing a task, and there may also be multiple actions of the same type in two different tasks, the corresponding instruction template can be used to generate programs for a certain type of single action. This allows the instruction template to be reused and improves the programming speed.
[0078] Each individual action corresponds to an action type. If the actions to be executed in Table 1 are classified according to their action types, then actions 1, 3, and 7 are movement actions; action 2 is a loading action; action 4 is the action of raising the robotic arm; action 5 is the action of unloading; and action 6 is the action of lowering the robotic arm. Therefore, the target instruction templates for actions 1, 3, and 7 in Table 1 are the same instruction template.
[0079] This application designs corresponding instruction templates for each possible single action of the robot in the application scenario. The single action includes, but is not limited to, one or more of the following single actions: moving, raising the robotic arm, lowering the robotic arm, loading, unloading, avoiding obstacles, raising the chassis, lowering the chassis, charging, etc.
[0080] Specifically, a single action can be modeled based on its execution position, resulting in an instruction template that includes the configuration variable of the corresponding action's execution position. The execution position of a single action, combined with the application scenario, can be understood as including at least the starting and ending positions of the action. For example, the action position for a movement action is the starting and ending positions, while the action position for unloading is the starting and ending positions.
[0081] It should be noted that, generally speaking, for a single action in which the robot's position does not change during the execution of that single action, the starting position and the ending position of that single action will not change. The position where the single action is executed is called the execution position, meaning that the execution position corresponds to one position. For a single action in which the robot's position changes during the execution of that single action, the starting position and the ending position of that single action are not the same position. That is, the execution position corresponds to at least two positions.
[0082] When instantiating a target instruction template, the target action position for executing the action to be performed can be determined according to the actual scenario, and the target configuration variables can be configured according to the target action position.
[0083] In this way, modeling is first performed based on the robot's possible individual actions and the corresponding action positions for each action to obtain the instruction templates for each possible action. When faced with a task to be executed, the parameter configuration of the action positions for the instruction templates corresponding to the actions required to complete the task can be quickly performed according to the actual scenario. By quickly configuring the parameters of the instruction templates for each action to be executed for the task, the control instructions for the task can be completed efficiently. By setting instruction templates, the reusability of the program is improved, thereby increasing programming efficiency and saving programming time.
[0084] The instruction template can contain instructions and configuration variables with comments. Based on this, users can quickly determine what kind of information the configuration variable describes based on the comments, making it easy to write and modify, and improving the maintenance efficiency of the instruction template.
[0085] To unify the management of instruction templates, each instruction template can be saved to an instruction template library. This way, for each individual action, there is a corresponding instruction template in the library. Furthermore, by setting up a unified instruction template library, users can centrally maintain various instruction templates, improving the efficiency of instruction maintenance.
[0086] It should be noted that for different tasks, the corresponding individual movements may depend on different pre-constraints. For example, if the robot needs to perform the task of unloading goods from shelf B, then the individual action of "raising the robotic arm" will depend on "the robot already being in the position of shelf B." In other words, the corresponding action will be performed only if the pre-constraints are met. Therefore, the configuration variables also include the pre-condition judgment function for performing the corresponding action, that is, the pre-condition (also called constraint) for the execution of the corresponding action. The judgment function can be used to determine whether the pre-condition is met to determine whether the corresponding action can be executed.
[0087] Accordingly, step S203, "configuring parameters for the target configuration variable," may include the following steps:
[0088] Determine the target precondition function for executing the action to be performed;
[0089] The target configuration variables are configured based on the target precondition judgment function.
[0090] The precondition function can be customized by the user according to the actual scenario. For example, when the robot performs a relatively complex task, the precondition function can be that the battery level is not less than 50%; when the robot performs a picking task, the precondition function can be that the robotic arm corresponding to the picking task is idle; when the robot performs a task of unloading at a certain location, the precondition function can be that the robot has reached that location.
[0091] The precondition function is used to determine whether the robot possesses the basic conditions to perform the corresponding action. If the precondition function is not met, the corresponding instantiation instruction will fail to execute, and the corresponding action will not be completed. By setting the precondition function, the cause of the action execution failure can be analyzed and located when an action fails during the execution of the instantiation instruction.
[0092] Optionally, the precondition judgment function includes a space state judgment function and / or a component state judgment function.
[0093] Therefore, the step "determine the target precondition function when performing the action to be performed" can be achieved through the following steps:
[0094] The spatial state judgment function is determined based on the execution position of the action to be executed within the target action position; and / or,
[0095] The component status judgment function is determined based on the target identifier corresponding to the component performing the action to be performed.
[0096] Among them, the spatial state judgment function is used to determine whether the robot has reached the execution position of the corresponding action and started to execute the corresponding action, and the accessory state judgment function is used to determine whether the accessory in the robot that is executing the corresponding action is in a state where the corresponding action can be executed.
[0097] For spatial state judgment functions, after determining the target action position of the action to be executed, the spatial judgment function can be automatically determined based on the execution position of the action to be executed from the target action position. For example, action 3 in Table 1 is moving from shelf a to shelf b, then the corresponding spatial state judgment function can be whether the robot has reached shelf a. Similarly, action 4 in Table 1 is raising the robotic arm, then the corresponding spatial state judgment function can be whether the robot has reached shelf b where the robotic arm is raised.
[0098] The accessory status determination function can determine whether the accessory being used is in a usable state. If the robot in this application has only one accessory, such as a robotic arm, then all accessories required to perform the action to be executed will use that accessory. Therefore, when there is only one accessory, the accessory status determination function only needs to be determined based on the accessory's identifier. If the robot in this application has multiple accessories, the accessory status determination function can be set based on the identifier of each accessory. When each accessory is in a usable state, the accessory being used will definitely be in a usable state. Similarly, the accessory status determination function can also be automatically generated.
[0099] In the field of logistics robots, robot accessories may include, but are not limited to, at least one of the following: picking robotic arms, unloading robotic arms, chassis, and storage racks.
[0100] In this way, when designing instruction templates, individual actions can be modeled based on the spatial state judgment function and / or accessory state judgment function in the precondition judgment function. For example, for an unloading template, it can be set whether the unloading position x has been reached and whether the unloading robot arm y is available. In this way, when instantiating the instruction, the user can fill in the parameters of position x and robot arm y according to the actual situation, or the parameters can be automatically determined and filled in based on the already filled parameters.
[0101] Table 3 shows an example of the precondition judgment functions corresponding to each action to be executed in Table 1.
[0102] Table 3. Example table of precondition judgment functions for each action to be executed.
[0103]
[0104]
[0105] Optionally, when the robot includes multiple parts, the configuration variables include the identifier of the robot part used to perform the corresponding action. Accordingly, step S203, "configuring parameters for the target configuration variable," may further include the following steps:
[0106] Identify the target component among multiple components used to perform the action to be performed;
[0107] Configure the parameters of the target configuration variables based on the component identifier of the target component.
[0108] In this way, when designing instruction templates, variables specifying the robotic arm used to perform the corresponding action can be set in the configuration variables. For example, for an unloading template, it can be set whether the robotic arm 'y' used for unloading is available. Then, during instruction instantiation, the user can fill in the identifier of the robotic arm used according to the actual situation to the corresponding robotic arm 'y'. Thus, when the robot includes multiple accessories, the parameters of the instruction template matching the action can be filled in based on the accessory used to perform a certain action in the actual scenario, without requiring the user to write instructions for using accessories to perform the action, further improving the programming efficiency of robot control.
[0109] In practical applications, users can arrange the sequence of instantiation instructions for corresponding actions according to the actual scenario. Therefore, optionally, before step S204, the robot control method provided in this application embodiment may further include the following steps:
[0110] In response to drag commands on the front-end page for the component corresponding to the instantiation command, obtain the order of the actions to be executed indicated by the drag command.
[0111] Specifically, this application can deploy a workflow engine, allowing users to sequentially arrange the action instructions for individual actions on the front-end page of the workflow engine according to actual needs. For example, if the task performed by the robot in Table 1 is to transfer goods 1 from shelf a to shelf b and then back to the charging point, the user can arrange the sequence of the seven actions performed in this process on the front-end page. The arranged sequence is shown in Table 4: move from the current position to shelf a → load goods 1 → move from shelf a to shelf b → raise the robotic arm → unload goods 1 → lower the robotic arm → move from shelf b to the charging point.
[0112] Table 4. Example Table of Execution Sequence for Individual Actions
[0113]
[0114] Workflow is an abstract and generalized description of a workflow and the business rules between its various operational steps. A workflow engine is a set of implementation tools that drive workflows. Since a workflow is essentially an abstraction of a business flow, different categories of business flows form different workflows, and therefore different workflow engines are responsible for defining and implementing different types of workflows.
[0115] The front-end page corresponding to the workflow engine is essentially a low-code technology platform. A low-code technology platform is a development platform that allows for the rapid generation of applications with little or no code. Through a visual approach to front-end page development, developers with varying experience levels can create web pages and mobile applications using a graphical user interface, drag-and-drop components, and model-driven logic. Therefore, users can also orchestrate the flow of various instantiation instructions within the workflow engine's front-end page by dragging and dropping components.
[0116] Specifically, in the front-end page corresponding to the workflow engine, each instantiation instruction is abstracted into a component, and the flow process between each instantiation instruction is abstracted into a process. Through the visual arrangement of each component corresponding to each instantiation instruction, the flow process of each instantiation instruction can be quickly arranged, reducing the arrangement difficulty of multiple instantiation instruction flow processes, saving costs, and improving the arrangement efficiency of multiple instantiation instruction flow processes.
[0117] In this application, the instantiation of instruction templates can be achieved by deploying an instruction template engine. The instruction template engine is used to populate the corresponding configuration variables with configuration parameters to obtain the corresponding instantiated instructions.
[0118] In one possible implementation, the instruction template engine page and the workflow engine page correspond to the same front-end page. Users can fill in the configuration parameters of the instruction template for a single action through the front-end page to obtain instantiated action instructions, and arrange the execution order of the filled instantiated action instructions through the front-end page to obtain a set of continuous action instructions arranged according to the execution order of actions in the actual scenario.
[0119] like Figure 3 The diagram shown is a front-end page illustration of a robot control method provided in this application embodiment. The front-end page 1 may include an instruction template library module, a parameter configuration area module, and an execution order setting module. The instruction template library module can be obtained by modeling and encapsulating an instruction template library. Users can trigger and select instructions from the instruction templates displayed in the instruction template library module. The parameter configuration area module displays the user-selected instruction templates, and users can configure the parameters of the selected instruction templates according to the actual scenario. The instruction template engine can then populate the configuration variables in the selected instruction templates with parameters to obtain the corresponding instantiated instructions. Next, in the execution order setting module, users can drag and drop the instantiated instructions to set the execution order according to actual needs. The workflow engine can then sort the instantiated instructions according to the user-set execution order to obtain a continuous action instruction set.
[0120] The instruction module engine can be nested within the workflow engine, and the workflow engine can also call the instruction module engine through an interface call. This application does not specifically limit this.
[0121] In another possible implementation, the instruction template engine page and the workflow engine page correspond to different front-end pages. Users can fill in configuration parameters for instruction templates of single actions using the front-end page corresponding to the instruction template engine page to obtain instantiated action instructions. Then, the front-end page corresponding to the workflow engine page can arrange the execution order of these instantiated action instructions to obtain a continuous set of action instructions arranged according to the actual action execution order in the scenario. In this case, the front-end pages corresponding to the instruction template engine page and the workflow engine page can communicate with each other; the front-end page corresponding to the instruction template engine page can send the instantiated action instructions to the front-end page corresponding to the workflow engine page.
[0122] like Figure 4 The diagram shown illustrates another example of a front-end page in the robot control method provided in this application, including interface (a) and interface (b). Interface (a) shows front-end page 2, which corresponds to the instruction template engine page, and interface (b) shows front-end page 3, which corresponds to the workflow engine page. Front-end page 2 may include an instruction template library module and a parameter configuration area, where users can fill in parameters for various configuration variables. Front-end page 3 may include an instruction instantiation module and an execution order setting module. Detailed descriptions of front-end page 2 and front-end page 3 can be found in [reference needed]. Figure 3 The description in front-end page 1 is omitted here.
[0123] Optionally, when one action is performed after another action has been completed, the precondition function for the subsequent action can also be determined based on the previously performed action. Specifically, before the step of "determining the target precondition function for executing the action to be performed", the robot control method provided in this application embodiment may further include the following steps:
[0124] Determine the order in which the actions to be performed are arranged.
[0125] The step of "determining the target precondition function for executing the action to be performed" can be achieved through the following steps:
[0126] For the actions to be executed, excluding the first action, the condition of whether the first action is in a completed state is determined as the target precondition judgment function for the second action; wherein, the second action is triggered after the first action is completed.
[0127] For the first action to be executed, the target preconditions corresponding to the first action to be executed are determined based on the execution position where the first action to be executed begins.
[0128] Understandably, the dependencies between the actions to be executed can be obtained based on the order of the actions to be executed. For example, from the order of the seven actions to be executed in Table 4, "move from current position to shelf a → load goods 1 → move from shelf a to shelf b → raise robotic arm → unload goods 1 → lower robotic arm → move from shelf b to charging point", we can see that the dependencies between the actions to be executed are as follows: the triggering of the action "load goods 1" depends on the completion of the action "move from current position to shelf a", the triggering of the action "move from shelf a to shelf b" depends on the completion of the action "load goods 1", the triggering of the action "raise robotic arm" depends on the completion of the action "move from shelf a to shelf b", the triggering of the action "unload goods 1" depends on the completion of the action "raise robotic arm", the triggering of the action "lower robotic arm" depends on the completion of the action "unload goods 1", and the triggering of the action "move from shelf b to charging point" depends on the completion of the action "lower robotic arm".
[0129] In this way, the precondition function of each action to be executed can be determined according to the order of the actions to be executed in the arrangement, making the setting of the precondition function more efficient.
[0130] In practical applications, during the execution of actions, the robot's state can be updated upon completion of each individual action, including the state of all robotic arms, the robot's battery status, and its current position. The precondition function can include checking at least one of the robot's robotic arm states, battery status, or current position.
[0131] For each action to be executed except for the first action, during the execution of each instantiation instruction in the order of the actions to be executed, the robot's state can be obtained when each instantiation instruction is completed. Based on the robot's spatial state and / or accessory state when the instantiation instruction of the first action is completed, it is determined whether the target precondition judgment function corresponding to the second action in each of the other actions is satisfied, so as to control the robot to execute the task to be executed if the target precondition judgment function is satisfied; wherein, the second action is triggered after the first action is completed.
[0132] Since the programming language used to control the robot to perform tasks may be C or C++, in order to adapt to different computer programming languages and to reduce programming difficulty, this application can use a domain-specific language (DSL) to design instruction templates.
[0133] Accordingly, the instantiation instruction is a DSL type instantiation instruction, and the step S204 "execute the instantiation instructions according to the order of the actions to be executed" can be implemented according to the following steps:
[0134] The instantiation instructions are arranged sequentially according to the order of the actions to be executed to obtain a continuous action instruction set;
[0135] The continuous action instruction set is parsed to obtain computer language code, and then the computer language code is executed.
[0136] A DSL (Domain Specific Language) is a language specifically tailored for a particular application, service, framework, or domain. It is written solely based on the concepts and characteristics of that domain and can only be parsed within that domain. Therefore, a DSL is a syntax that describes how programs are generated, their flow structures, and their decision logic within a specific domain. Compared to computer programming languages, DSLs are easier to understand and do not require general programming knowledge to edit. By customizing syntax specifically for a particular program domain, DSLs provide unique productivity, helping users quickly understand certain usages. For example, HTML is a DSL language used to describe hypertext markup for web pages, CSS is a DSL language used to describe page styles, and SQL is a DSL language used to create and retrieve data from relational databases.
[0137] Compared to computer programming languages, DSL languages possess the ability to provide structured data information. For example, a regular expression (Regex) only specifies a string pattern, and its engine determines whether the current string matches the regular expression based on the pattern. Similarly, the Structured Query Language (SQL) statement is not actually executed during use; the input SQL statement is processed by the database, which can extract useful information from the SQL statement and return the expected results. Furthermore, general-purpose programming languages, compared to domain-specific languages, are designed to solve more abstract problems and are not limited to a specific domain. Therefore, DSL languages do not have the concepts of computation and execution; they do not need to directly represent computation and only require declaring rules, facts, and the hierarchy and relationships between certain elements.
[0138] Because the process structure and judgment logic of DSLs are easier to understand, they can be edited without requiring general programming knowledge. Thus, by generating computer programming language code based on DSL-type instruction templates, users do not need to directly write code with strict syntax and logic, which reduces programming difficulty and thus lowers the requirements for users. In addition, using DSL-type instruction templates also shortens programming time and improves programming efficiency.
[0139] For example, the following is a DSL type instruction template corresponding to the robot performing the single action of unloading:
[0140]
[0141] The action type enumeration can include any one of the following: loading, unloading, charging, moving, etc.
[0142] The system ID of a shelf, also known as a shelf identifier, can be understood as the "ID number" of the shelf in the application scenario. Each shelf in the application scenario has a unique identifier, and there is a one-to-one correspondence between the shelf and the system ID of the shelf. The system ID can be a string of characters or a vector, and this application does not specifically limit it.
[0143] In the unloading instruction template of the example above, the instruction template engine can respond to the parameter configuration instructions for the instruction template, fill in the actual parameters at the $ placeholders, and output the result after parameter filling.
[0144] Therefore, the "configuring parameters for the target configuration variables of the target instruction template" in step S203 is essentially achieved through the following steps:
[0145] The configuration parameters of the target configuration variables are determined based on the scenario information during the execution of the task to be executed.
[0146] The target configuration variables of the target instruction template are populated by configuring parameters.
[0147] Among them, the scenario information during the execution of the task to be executed, combined with the application scenario, can be understood as: the picking action is to pick up the goods at which location and on which shelf.
[0148] Understandably, the various positions in a robot's working environment can be determined by setting coordinates. In this way, each position in the environment corresponds to a unique coordinate. In practical applications, one position may correspond to multiple shelves, or one position may correspond to one shelf containing multiple storage lockers. This application uses the example of multiple shelves corresponding to one position for illustration and is not intended to limit this application.
[0149] like Figure 5 The diagram shown is a schematic of a shelf in an application scenario of the robot control method provided in this application embodiment. Shelves 1-5 are in the same position, shelves 6-10 are in the same position, and shelves 11-15 are in the same position. That is, the coordinates corresponding to shelves 1-5 are the same, the coordinates corresponding to shelves 6-10 are the same, and the coordinates corresponding to shelves 11-15 are the same. The goods that the robot needs to retrieve are located on shelf 8, which is the shelf with a layer number of 3 in the coordinates corresponding to shelves 6-10. When configuring the parameters of the configuration variables in the instruction template, the coordinates corresponding to shelf 8 and the layer number corresponding to shelf 8 at that position can be configured to obtain the instantiated retrieval instruction. In this way, the robot can retrieve the goods from the corresponding shelf 8 according to the instantiated retrieval instruction.
[0150] In a specific implementation, after the user drags and drops the instantiation instruction on the front-end page, the back-end generates a DSL type data structure corresponding to the continuous action instruction set with a certain execution order. Since the DSL type data structure does not conform to the conventions of computer programming languages, when the robot is directly controlled by the DSL type continuous action instruction set, the code compilation result will be incorrect. Therefore, in order for the code to be compiled and run normally, in practical applications, it is necessary to parse the DSL type continuous action instruction set and generate computer programming language type code.
[0151] The code used to control the robot's actions must be a computer-recognizable code type, including but not limited to Python, Java, C, and C++. To enable the robot to "understand" continuous action instruction sets, DSL-type continuous action instruction sets can be parsed to generate code in a computer programming language. Specifically, the inheritance, dependency, and association relationships between modules within the DSL-type continuous action instruction set can be parsed, and code conforming to the corresponding syntax rules can be generated based on the parsing results.
[0152] In specific implementations, an Abstract Syntax Tree (AST) can be used to parse the continuous action instruction set of the DSL type. The AST represents the abstract syntactic structure of the DSL type continuous action instruction set in a tree-like form, where each node in the tree represents a structure within the DSL type continuous action instruction set. Other tools can also be used to parse the DSL type continuous action instruction set in this application, and this application does not specifically limit their use.
[0153] This technique allows us to determine the actions required to complete a task, obtain corresponding instantiated instructions based on the instruction templates for each action, and arrange the execution order of each instantiated instruction according to the execution order of each action to obtain a continuous action instruction set. This DSL-type continuous action instruction set is then converted into code that a computer can recognize, which can be used to control the robot to perform the corresponding task.
[0154] In this way, continuous action instruction sets can be assembled from the instruction templates of each instantiated instruction, much like "building blocks," to meet the robot's task execution needs in different scenarios and more efficiently support diverse requirements. Furthermore, this approach reduces programming difficulty, increases program reusability, and saves programming time.
[0155] In the example above, post-processing can be understood as providing prompts to describe the robot's completion of the action, and these prompts are triggered when the robot completes the corresponding action.
[0156] In one alternative implementation, the prompt message can be set in the instruction template to be triggered when the robot completes the corresponding action. For example, the instruction template for a movement action can include a "movement action completed" prompt message, which is triggered when the movement action from shelf a to shelf b is completed; similarly, the instruction template for an unloading action can include a "unloading action completed" prompt message, which is triggered when the robot completes the unloading action on shelf b.
[0157] In another optional implementation, the prompt message can also be user-defined or generated from the already filled action position for more detailed prompt messages. Therefore, the configuration variable also includes prompt messages, and step 203, "configuring parameters for the target configuration variable," can also include the following steps:
[0158] The information containing the target action location and the action to be completed is identified as the target prompt information; the target configuration variables are configured according to the target prompt information.
[0159] For example, regarding the robot's action of unloading goods at location A, after the action is completed, a voice message "Unloading completed at location A" can be broadcast, or the user's terminal can be notified of the same message. This way, the user doesn't need to monitor the robot's movements in real time; they only need to know which action the robot has performed through the notification message triggered upon completion. Furthermore, in scenarios with multiple robots, specific notification messages allow the user to quickly grasp the actions completed by each robot.
[0160] In addition, the robot control method provided in this application embodiment may also include at least one feedback information in the instruction template, such as robot battery level, robot abnormal status, and time to complete the corresponding action. The feedback information is generated based on the real-time acquired robot battery level, robot abnormal status, and time to complete the corresponding action, and then sent to the user.
[0161] Furthermore, in this application, a sequentially arranged set of continuous action instructions can be sent to the robot that needs to execute the task. The robot then parses and generates the code locally and runs it, thereby controlling the robot to execute the corresponding task. In this way, when a large number of robots are executing different tasks in an application scenario, the local parsing of each robot and its corresponding continuous instruction set can avoid data congestion and improve the execution efficiency of the task.
[0162] Corresponding to the robot control method provided in the first embodiment of this application, the second embodiment of this application also provides a robot control device, such as... Figure 6 As shown, the robot's control device 600 includes:
[0163] The first determining unit 601 is used to determine the actions to be performed required to complete the task to be performed;
[0164] The second determining unit 602 is used to determine a target instruction template that matches the action to be executed from a pre-set instruction template, wherein the instruction template includes configuration variables on which the corresponding action depends;
[0165] The parameter configuration unit 603 is used to configure the target configuration variable in response to the parameter configuration instruction for the target configuration variable in the target instruction template, so as to obtain an instantiated instruction for controlling the robot to perform the action to be performed;
[0166] The instruction execution unit 604 is used to execute the instantiated instructions according to the order of the actions to be executed, so as to control the robot to perform the tasks to be executed.
[0167] Optionally, the robot control device 600 further includes a modeling unit, which is used to: determine a single action of the robot in the scene; and model the single action according to the action position of the single action to obtain an instruction template corresponding to the single action.
[0168] The parameter configuration unit 603 is further configured to: determine the target action position for executing the action to be executed; and configure the target configuration variable according to the target action position.
[0169] Optionally, if the configuration variable further includes a precondition judgment function for executing the corresponding action, the parameter configuration unit 603 is further configured to: determine the target precondition judgment function for executing the action to be executed; and configure the target configuration variable according to the target precondition judgment function.
[0170] Optionally, if the precondition judgment function includes a spatial state judgment function and / or a component state judgment function, wherein the spatial state judgment function is used to determine whether the robot has reached the execution position of the corresponding action in the action position and the component state judgment function is used to determine whether the component in the robot performing the corresponding action is in a state where the corresponding action can be performed, the parameter configuration unit 603 is specifically used to: determine the spatial state judgment function based on the execution position of the action to be performed in the target action position; and / or determine the component state judgment function based on the target identifier corresponding to the component performing the action to be performed.
[0171] Optionally, the second determining unit 602 is further configured to: determine the order of the actions to be performed;
[0172] The parameter configuration unit 603 is specifically used for: determining whether the first action in the pending actions is in a completed state as the target precondition judgment function corresponding to the second action in the other actions, except for the first action to be executed; wherein the second action is triggered after the first action is completed; and determining the target precondition corresponding to the first action to be executed based on the execution position of the first action to be executed.
[0173] Optionally, the robot control device 600 further includes an acquisition unit, which is used to: in response to a drag command on the front-end page for the component corresponding to the instantiation command, acquire the order of the actions to be executed indicated by the drag command.
[0174] Optionally, when the instruction template is a DSL type instruction template and the instantiation instruction is a DSL type instantiation instruction, the instruction execution unit 604 is specifically used to: sequentially arrange the instantiation instructions according to the order of the actions to be executed to obtain a continuous action instruction set; parse the continuous action instruction set to obtain computer language code, and execute the computer language code.
[0175] Optionally, if the configuration variables also include a prompt message triggered when the robot completes the corresponding action, the parameter configuration unit 603 is further specifically used to: determine the information containing the target action position and the completion of the action to be executed as the target prompt message; and configure the target configuration variables according to the target prompt message.
[0176] Optionally, when the robot includes multiple accessories and the configuration variable includes the identifier of the robot accessory used to perform the corresponding action, the parameter configuration unit 603 is specifically used to: determine the target accessory among the multiple accessories used to perform the action to be performed; and configure the target configuration variable according to the accessory identifier of the target accessory.
[0177] Optionally, the parameter configuration unit 603 is further configured to: determine the configuration parameters of the target configuration variable based on the scenario information during the execution of the task to be executed; and fill the target configuration variable of the target instruction template with the configuration parameters.
[0178] Corresponding to the robot control method provided in the first embodiment of this application, the third embodiment of this application also provides an electronic device for implementing the robot control method. For example... Figure 7 As shown, the electronic device 700 includes: a processor 701; and a memory 702 for storing a program for controlling the robot. After the device is powered on and the program for controlling the robot is run by the processor, the following steps are performed:
[0179] Identify the actions required to complete the task at hand;
[0180] A target instruction template matching the action to be executed is determined from a pre-set instruction template, wherein the instruction template includes configuration variables on which the corresponding action depends;
[0181] In response to a parameter configuration instruction for a target configuration variable in the target instruction template, the target configuration variable is configured to obtain an instantiated instruction for controlling the robot to perform the action to be performed;
[0182] The instantiation instructions are executed in the order of the actions to be performed, so as to control the robot to perform the tasks to be performed.
[0183] Corresponding to the robot control method provided in the first embodiment of this application, the fourth embodiment of this application provides a computer-readable storage medium storing a program for a robot control method, which is executed by a processor to perform the following steps:
[0184] Identify the actions required to complete the task at hand;
[0185] A target instruction template matching the action to be executed is determined from a pre-set instruction template, wherein the instruction template includes configuration variables on which the corresponding action depends;
[0186] In response to a parameter configuration instruction for a target configuration variable in the target instruction template, the target configuration variable is configured to obtain an instantiated instruction for controlling the robot to perform the action to be performed;
[0187] The instantiation instructions are executed in the order of the actions to be performed, so as to control the robot to perform the tasks to be performed.
[0188] It should be noted that for a detailed description of the apparatus, electronic device and computer-readable storage medium provided in the second, third and fourth embodiments of this application, please refer to the relevant description of the first embodiment of this application, which will not be repeated here.
[0189] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.
[0190] In a typical configuration, a node device in a blockchain includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0191] Memory may include non-persistent storage 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.
[0192] 1. Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by 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, magnetic magnetic disk storage or other magnetic storage media, 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 non-transitory computer-readable media, such as modulated data signals and carrier waves.
[0193] 2. 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.
[0194] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.
Claims
1. A method for controlling a robot, characterized in that, The method includes: Identify the actions required to complete the task at hand; A target instruction template matching the action to be executed is determined from a pre-set instruction template, wherein the instruction template includes configuration variables on which the corresponding action depends; In response to a parameter configuration instruction for a target configuration variable in the target instruction template, the target configuration variable is configured to obtain an instantiated instruction for controlling the robot to perform the action to be performed; The instantiation instructions are executed in the order of the actions to be performed, so as to control the robot to perform the tasks to be performed; The configuration variable includes the action position for performing the corresponding action; configuring the parameters of the target configuration variable includes: Determine the target action position for performing the action to be performed; Configure the target configuration variables according to the target action position; The configuration variable also includes a precondition judgment function for executing the corresponding action. The precondition judgment function includes a spatial state judgment function and / or a component state judgment function. The spatial state judgment function is used to determine whether the robot has reached the execution position of the corresponding action and started to execute the corresponding action. The component state judgment function is used to determine whether the component of the robot executing the corresponding action is in a state where the corresponding action can be executed. The parameter configuration of the target configuration variable also includes: Determine the target precondition function for executing the action to be performed; The target configuration variables are configured according to the target precondition judgment function; The step of configuring the target configuration variable according to the target action position further includes: A spatial state judgment function is determined based on the execution position where the action to be executed begins from the target action position; and / or, The accessory status judgment function is determined based on the target identifier corresponding to the accessory performing the action to be performed. The target configuration variable is configured according to the target precondition judgment function.
2. The method according to claim 1, characterized in that, Before determining the actions to be performed to complete the task, the method further includes: Determine a single action of the robot in the scene; The single action is modeled based on the action position of the single action to obtain the instruction template corresponding to the single action.
3. The method according to claim 1, characterized in that, Before determining the target precondition function for executing the action to be executed, the method further includes: Determine the order in which the actions to be performed are arranged; The function for determining the target precondition for executing the action to be executed includes: For the actions to be executed other than the first action to be executed, whether the first action is in a completed state is determined as the target precondition judgment function corresponding to the second action among the other actions; wherein, the second action is triggered after the first action is completed; For the first action to be executed, the target preconditions corresponding to the first action to be executed are determined according to the execution position where the first action to be executed is started.
4. The method according to claim 1, characterized in that, Before executing the instantiation instructions according to the order of the actions to be executed, the method further includes: In response to a drag command on the front-end page for the component corresponding to the instantiation command, the order of the actions to be executed indicated by the drag command is obtained.
5. The method according to claim 1, characterized in that, The instruction template is a DSL type instruction template, the instantiation instruction is a DSL type instantiation instruction, and the execution of the instantiation instructions according to the order of the actions to be executed includes: The instantiated instructions are sequentially arranged according to the order of the actions to be executed to obtain a continuous action instruction set; The continuous action instruction set is parsed to obtain computer language code, and the computer language code is executed.
6. The method according to claim 1, characterized in that, The instruction template includes prompts describing the robot's completion of the corresponding action, which are triggered when the robot completes the corresponding action.
7. The method according to claim 6, characterized in that, The configuration variable also includes the prompt information, and the parameter configuration of the target configuration variable further includes: The information containing the target action location and the information for completing the action to be performed is determined as the target prompt information; Configure the parameters of the target configuration variables according to the target prompt information.
8. The method according to claim 1, characterized in that, The robot includes multiple accessories; the configuration variables include identifiers corresponding to the accessories of the robot used to perform the corresponding actions; The parameter configuration of the target configuration variable includes: Identify the target accessory among the plurality of accessories used to perform the action to be performed; Configure the parameters of the target configuration variable according to the accessory identifier of the target accessory.
9. The method according to claim 1, characterized in that, The parameter configuration of the target configuration variables of the target instruction template includes: The configuration parameters of the target configuration variable are determined based on the scenario information during the execution of the task to be executed; The target configuration variables of the target instruction template are populated using the configuration parameters.
10. A control device for a robot, characterized in that, The device includes: The first determining unit is used to determine the actions to be performed required to complete the task to be performed; The second determining unit is used to determine a target instruction template that matches the action to be executed from a pre-set instruction template, wherein the instruction template includes configuration variables on which the corresponding action depends; The parameter configuration unit is used to configure the target configuration variable in response to the parameter configuration instruction for the target configuration variable in the target instruction template, so as to obtain the instantiated instruction for controlling the robot to perform the action to be performed; The instruction execution unit is used to execute the instantiated instructions according to the order of the actions to be executed, so as to control the robot to perform the task to be executed; The configuration variable includes the action position for performing the corresponding action; configuring the target configuration variable includes: Determine the target action location for performing the action to be performed; Configure the target configuration variables according to the target action position; The configuration variable also includes a precondition judgment function for executing the corresponding action. The precondition judgment function includes a spatial state judgment function and / or a component state judgment function. The spatial state judgment function is used to determine whether the robot has reached the execution position of the corresponding action and started to execute the corresponding action. The component state judgment function is used to determine whether the component of the robot executing the corresponding action is in a state where the corresponding action can be executed. The parameter configuration of the target configuration variable also includes: Determine the target precondition function for executing the action to be performed; The target configuration variables are configured according to the target precondition judgment function; The step of configuring the target configuration variable according to the target action position further includes: A spatial state judgment function is determined based on the execution position where the action to be executed begins from the target action position; and / or, The accessory status judgment function is determined based on the target identifier corresponding to the accessory performing the action to be performed. The target configuration variable is configured according to the target precondition judgment function.
11. An electronic device, characterized in that, include: processor; as well as A memory for storing a data processing program, which, when the electronic device is powered on and runs through the processor, executes the method as described in any one of claims 1-9.
12. A computer-readable storage medium, characterized in that, The system contains a data processing program that is executed by a processor to perform the method as described in any one of claims 1-9.