Robot task execution method and apparatus, readable storage medium, and electronic device
Patent Information
- Application Number
- CN202611130999.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-28
- Publication Date
- 2026-09-18
AI Technical Summary
[0004]有鉴于此,本申请实施例提供了一种机器人任务执行方法、装置、计算机可读存储介质及电子设备,以解决现有技术采用脚本或代码编程的方式对机器人任务进行配置与管理的方式存在的效率较低的问题
[0022] The beneficial effects of this application embodiment compared with the prior art are as follows: In response to a workflow template selection instruction for a robot task, this application embodiment calls a target workflow template from a preset workflow template library; wherein, the workflow template library includes various workflow templates, and the target workflow template is the workflow template corresponding to the workflow template selection instruction; in response to a global task parameter configuration instruction for the target workflow template, global task parameter configuration information corresponding to the global task parameter configuration instruction is obtained; based on the global task parameter configuration information, a target robot for executing the robot task is scheduled; based on the global task parameter configuration information, the target robot is controlled to execute the robot task according to the target workflow template. Through this application embodiment, a workflow template library including various workflow templates can be preset. In practical applications, only the required workflow template needs to be selected from it, and its global task parameters configured, to execute the corresponding robot task. No professional personnel are required to rewrite the underlying control code, facilitating deployment and debugging, enabling rapid response to business changes, and effectively improving overall efficiency.
Smart Images

Figure CN122769987A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of robotics technology, and in particular relates to a robot task execution method, apparatus, computer-readable storage medium, and electronic device. Background Technology
[0002] With the continuous improvement of industrial automation, robots are being used more and more widely in logistics warehousing, intelligent manufacturing and other fields. For example, robots can efficiently perform tasks such as depalletizing and palletizing, thereby effectively reducing labor costs and improving work efficiency.
[0003] However, in existing technologies, robot tasks are generally configured and managed using scripts or code programming. This requires professionals to write low-level control code, resulting in long deployment cycles, difficult debugging, inability to quickly respond to business changes, and low overall efficiency. Summary of the Invention
[0004] In view of this, embodiments of this application provide a robot task execution method, apparatus, computer-readable storage medium, and electronic device to solve the problem of low efficiency in the prior art of configuring and managing robot tasks by means of script or code programming.
[0005] A first aspect of this application provides a robot task execution method, which may include: In response to a workflow template selection instruction for a robot task, a target workflow template is retrieved from a preset workflow template library; wherein, the workflow template library includes various workflow templates, and the target workflow template is the workflow template corresponding to the workflow template selection instruction; In response to a global task parameter configuration instruction for the target workflow template, global task parameter configuration information corresponding to the global task parameter configuration instruction is obtained; Based on the global task parameter configuration information, a target robot is scheduled to perform the robot task. Based on the global task parameter configuration information, the target robot is controlled to execute the robot task according to the target workflow template.
[0006] In one specific implementation of the first aspect, the target workflow template includes sequentially connected modular task nodes, each task node being used to encapsulate the corresponding robot capabilities. Accordingly, controlling the target robot to execute the robot task according to the target workflow template may include: The target robot is controlled to execute each task node in the target workflow template sequentially. The output of the predecessor task node is passed to the successor task node and serves as the input of the successor task node.
[0007] In one specific implementation of the first aspect, before calling the target workflow template from a preset workflow template library in response to a workflow template selection instruction for a robot task, the following may also be included: In response to workflow template configuration commands, a visual graphical interface for configuring workflow templates is displayed; In response to a drag-and-drop connection operation of a task node in the visual graphical interface, a workflow template corresponding to the drag-and-drop connection operation is generated.
[0008] In one specific implementation of the first aspect, after calling the target workflow template from the preset workflow template library, the method further includes: In response to a workflow template adjustment command for the target workflow template, the visual graphical interface is displayed, and the task node connection method in the target workflow template is presented in the visual graphical interface; In response to the task node adjustment operation in the visual graphical interface, the adjusted target workflow template is generated.
[0009] In one specific implementation of the first aspect, scheduling the target robot for performing the robot task based on the global task parameter configuration information may include: Based on the global task parameter configuration information, the number of first robots used to execute the robot task is determined; Count the number of second robots that are either in an idle state or an assigned state; When the number of the first robots is less than or equal to the number of the second robots, the target robot is scheduled to perform the robot task.
[0010] In one specific implementation of the first aspect, after scheduling the target robot for performing the robot task based on the global task parameter configuration information, the method may further include: In response to the start task command, the robot state of the target robot is changed from the assigned state to the task-in-progress state; Accordingly, after controlling the target robot to execute the robot task according to the target workflow template based on the global task parameter configuration information, the method further includes: Change the target robot's robot state from "in task" to "idle".
[0011] In one specific implementation of the first aspect, the robot task execution method may further include: For each task node in the target workflow template, if the execution time of the task node exceeds a preset time threshold or the number of retries exceeds a preset number threshold, jump to the preset exception information reporting node. The abnormal information reporting node is used to record the context information of the abnormal situation and to transfer to the task end or task pause process.
[0012] A second aspect of this application provides a robot task execution device, which may include: The workflow template invocation module is used to respond to a workflow template selection instruction for a robot task and invoke a target workflow template from a preset workflow template library; wherein, the workflow template library includes various workflow templates, and the target workflow template is the workflow template corresponding to the workflow template selection instruction; The task parameter configuration module is used to respond to the global task parameter configuration instruction for the target workflow template and obtain global task parameter configuration information corresponding to the global task parameter configuration instruction. The robot scheduling module is used to schedule a target robot to perform the robot task based on the global task parameter configuration information. The robot task execution module is used to control the target robot to execute the robot task according to the target workflow template based on the global task parameter configuration information.
[0013] In one specific implementation of the second aspect, the target workflow template includes sequentially connected modular task nodes, each task node being used to encapsulate the corresponding robot capabilities. Accordingly, the robot task execution module can be specifically used to: control the target robot to execute each task node in the target workflow template in sequence; wherein the output of the predecessor task node is passed to the successor task node and serves as the input of the successor task node.
[0014] In one specific implementation of the second aspect, the robot task execution device may further include: The workflow template generation module is used to display a visual graphical interface for configuring workflow templates in response to workflow template configuration instructions; and to generate a workflow template corresponding to the drag-and-drop connection operation in response to the task node drag-and-drop connection operation in the visual graphical interface.
[0015] In one specific implementation of the second aspect, the robot task execution device may further include: The workflow template adjustment module is used to display the visual graphical interface in response to a workflow template adjustment command for the target workflow template, and to present the task node connection method in the target workflow template in the visual graphical interface; and to generate the adjusted target workflow template in response to the task node adjustment operation in the visual graphical interface.
[0016] In one specific implementation of the second aspect, the robot scheduling module may be specifically used to: determine the number of first robots for executing the robot task based on the global task parameter configuration information; count the number of second robots whose robot state is idle or assigned; and schedule the target robot for executing the robot task when the number of first robots is less than or equal to the number of second robots.
[0017] In one specific implementation of the second aspect, the robot task execution device may further include: The robot state control module is used to, after scheduling the target robot for executing the robot task based on the global task parameter configuration information, change the robot state of the target robot from the assigned state to the task-in-process state in response to the start task command. The robot state control module is further configured to change the robot state of the target robot from the task state to the idle state after controlling the target robot to execute the robot task according to the target workflow template based on the global task parameter configuration information.
[0018] In one specific implementation of the second aspect, the robot task execution device may further include: The exception handling module is used to, for each task node in the target workflow template, jump to a preset exception information reporting node if the execution time of the task node exceeds a preset time threshold or the number of retries exceeds a preset number threshold; wherein, the exception information reporting node is used to record the context information of the exception situation and transfer to the task end or task pause process.
[0019] A third aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the robot task execution methods described above.
[0020] A fourth aspect of this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any of the robot task execution methods described above.
[0021] The fifth aspect of this application provides a computer program product that, when run on an electronic device, causes the electronic device to execute the steps of any of the robot task execution methods described above.
[0022] The beneficial effects of this application embodiment compared with the prior art are as follows: In response to a workflow template selection instruction for a robot task, this application embodiment calls a target workflow template from a preset workflow template library; wherein, the workflow template library includes various workflow templates, and the target workflow template is the workflow template corresponding to the workflow template selection instruction; in response to a global task parameter configuration instruction for the target workflow template, global task parameter configuration information corresponding to the global task parameter configuration instruction is obtained; based on the global task parameter configuration information, a target robot for executing the robot task is scheduled; based on the global task parameter configuration information, the target robot is controlled to execute the robot task according to the target workflow template. Through this application embodiment, a workflow template library including various workflow templates can be preset. In practical applications, only the required workflow template needs to be selected from it, and its global task parameters configured, to execute the corresponding robot task. No professional personnel are required to rewrite the underlying control code, facilitating deployment and debugging, enabling rapid response to business changes, and effectively improving overall efficiency. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart of one embodiment of a robot task execution method according to the present application. Figure 2 This is a structural diagram of one embodiment of a robot task execution device according to the present application. Figure 3 This is a schematic block diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0025] To make the inventive objectives, features, and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0026] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0027] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0028] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0029] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [the described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [the described condition or event] is detected," or "in response to detection of [the described condition or event]."
[0030] Furthermore, in the description of this application, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0031] With the continuous improvement of industrial automation, robots are being used more and more widely in logistics warehousing, intelligent manufacturing and other fields. For example, robots can efficiently perform tasks such as depalletizing and palletizing, thereby effectively reducing labor costs and improving work efficiency.
[0032] However, in existing technologies, robot tasks are generally configured and managed using scripts or code programming. This requires professionals to write low-level control code, resulting in long deployment cycles, difficult debugging, inability to quickly respond to business changes, and low overall efficiency.
[0033] In view of this, embodiments of this application provide a robot task execution method, apparatus, computer-readable storage medium, and electronic device to solve the problem of low efficiency in existing technologies that use scripts or code programming to configure and manage robot tasks. In embodiments of this application, a workflow template library including various workflow templates can be pre-set. In practical applications, only the required workflow template needs to be selected from it, and its global task parameters need to be configured to execute the corresponding robot task. No professional personnel are required to rewrite the underlying control code, which facilitates deployment and debugging, allows for rapid response to business changes, and effectively improves overall efficiency.
[0034] The execution subject of this application embodiment can be an electronic device, including but not limited to mobile phones, tablet computers, desktop computers, laptops, handheld computers, robot vacuum cleaners, robots, and servers.
[0035] Please see Figure 1 One embodiment of a robot task execution method in this application may include: Step S101: In response to the workflow template selection instruction for the robot task, the target workflow template is called from the preset workflow template library.
[0036] The workflow template library can include various workflow templates, and the specific number of workflow templates can be flexibly set according to actual needs. This application embodiment does not impose a specific limitation on this. As an example, the workflow template library may include, but is not limited to, depalletizing workflow templates, palletizing workflow templates, and point-to-point handling workflow templates. Depalletizing workflow templates can be applied to robot tasks that unpack boxes from pallets and transfer them to shelves, palletizing workflow templates can be applied to robot tasks that pick up boxes from a conveyor line and place them onto pallets, and point-to-point handling workflow templates can be applied to robot tasks that move goods from one point to another (such as from point A to point B).
[0037] The workflow template includes sequentially connected modular task nodes, each encapsulating a corresponding robot capability. Task nodes may include, but are not limited to, query nodes and execution nodes. Query nodes are used to obtain robot or environmental status without side effects, meaning they do not perform any substantive operations on the robot. Execution nodes are used to control the robot to perform actions.
[0038] As an example, query nodes may include, but are not limited to, current location coordinate query nodes (outputting coordinate objects), battery power status query nodes (outputting battery percentage and charging status), and vehicle and stack type identification query nodes (outputting vehicle type, stack type, and size). Execution nodes may include, but are not limited to, navigation movement execution nodes (inputting start and end coordinates and executing movement), lifting bin execution nodes (inputting bin parameters and target location and executing grabbing), and placing bin execution nodes (inputting bin parameters and target location and executing placement).
[0039] In its initial state, the workflow template library can be empty, meaning there are no workflow templates. Users can configure various workflow templates they need in the workflow template library according to their actual application scenarios.
[0040] In one specific implementation of this application, when workflow template configuration is required, the user can issue a workflow template configuration command to the electronic device through a preset user interface (UI). In response to the workflow template configuration command, the electronic device can display a visual graphical interface for configuring the workflow template, which may include a task node component panel and a workflow template editing area. The task node component panel can display icons for various task nodes, each task node icon representing a modular task node.
[0041] Users can drag and drop task nodes in the visual graphical interface. For example, a user can drag task node A and task node B from the task node component panel to the workflow template editing area and connect them with a line from task node A to task node B. This indicates that task node A is the predecessor task node of task node B, and task node B is the successor task node of task node A. The output of the predecessor task node is passed to the successor task node and used as its input. Next, the user can drag task node C from the task node component panel to the workflow template editing area and connect it with a line from task node B to task node C. This indicates that task node B is the predecessor task node of task node C, and task node C is the successor task node of task node B, and so on, until the user completes the workflow template configuration. In response to the drag-and-drop connection operation of task nodes in the visual graphical interface, the electronic device can generate a workflow template corresponding to the drag-and-drop connection operation and store it in the workflow template library.
[0042] In one specific implementation of this application, the user can also modify and edit the workflow templates stored in the workflow template library. For example, the user can add new task nodes and connections, delete existing task nodes and connections, and so on.
[0043] In one specific implementation of this application, the user can also delete workflow templates stored in the workflow template library, and can copy workflow templates stored in the library, modifying and editing the copied copies to obtain new workflow templates. This approach facilitates the accumulation and reuse of optimal workflow templates, enabling rapid adaptation to new robot models or business scenarios.
[0044] When a robot task needs to be performed, the user can issue a workflow template selection command for the robot task to the electronic device through the human-computer interaction interface. In response to the workflow template selection command, the electronic device can call the workflow template corresponding to the workflow template selection command from the workflow template library, which is referred to here as the target workflow template.
[0045] In one specific implementation of this application, after the electronic device retrieves the target workflow template from the workflow template library, the user can also issue a workflow template adjustment command to the electronic device through a human-computer interaction interface. In response to the workflow template adjustment command, the electronic device can display a visual graphical interface, presenting the task node connection methods in the target workflow template. The user can perform task node adjustment operations on the target workflow template, such as adding new task nodes and connections, deleting existing task nodes and connections, etc. In response to the task node adjustment operations in the visual graphical interface, the electronic device can generate the adjusted target workflow template.
[0046] For ease of explanation, if the user has adjusted the task nodes of the target workflow template, the target workflow template appearing in subsequent processes refers to the adjusted target workflow template. If the user has not adjusted the task nodes of the target workflow template, the target workflow template appearing in subsequent processes refers to the original target workflow template.
[0047] Step S102: In response to the global task parameter configuration instruction for the target workflow template, obtain the global task parameter configuration information corresponding to the global task parameter configuration instruction.
[0048] Users can send global task parameter configuration commands for a target workflow template to electronic devices through a human-computer interaction interface. These commands carry the global task parameter configuration information required to execute the robot task. In response to the global task parameter configuration command for the target workflow template, the electronic device can obtain the global task parameter configuration information corresponding to the command.
[0049] The specific content of the global task parameter configuration information can be flexibly set according to the actual situation, and this application embodiment does not impose specific limitations on it. As an example, when the target workflow template is a depalletizing workflow template, the global task parameter configuration information may include, but is not limited to, depalletizing point, target bin location, bin size, priority, etc.; when the target workflow template is a palletizing workflow template, the global task parameter configuration information may include, but is not limited to, palletizing point, target pallet type, conveyor line picking point, etc.; when the target workflow template is a point-to-point handling workflow template, the global task parameter configuration information may include, but is not limited to, starting point (point A), ending point (point B), target box stack, etc.
[0050] Step S103: Based on the global task parameter configuration information, schedule the target robot to perform the robot task.
[0051] In one specific implementation of this application, a state-driven dynamic task scheduling logic for robots can be used to achieve multi-robot collaborative scheduling. The robot state can include an idle state, an assigned state, and a task-in-progress state. In the idle state, the robot is available and can be assigned to a new task; in the assigned state, the robot has been reserved for a task but has not yet started execution and can be canceled; in the task-in-progress state, the robot is performing a task and can be forcibly stopped.
[0052] Based on the global task parameter configuration information, the number of robots used to execute robot tasks can be determined. For ease of distinction, this number is denoted as the first robot number. The number of robots in either an idle or assigned state can also be counted; for ease of distinction, this number is denoted as the second robot number. The second robot number is the sum of the number of idle robots and the number of assigned robots.
[0053] If the number of first robots is greater than the number of second robots, robot scheduling cannot be achieved. In this case, we can continue to wait until the number of first robots is less than or equal to the number of second robots. If the number of first robots is less than or equal to the number of second robots, a robot to perform the robot task can be scheduled; this robot is referred to as the target robot. If the target robot's robot state is idle, it can be changed from idle to assigned; if the target robot's robot state is assigned, it can remain in the assigned state.
[0054] Step S104: Based on the global task parameter configuration information, control the target robot to execute robot tasks according to the target workflow template.
[0055] After the target robot is determined through scheduling, the user can issue a start task command to the electronic device through the human-machine interface. For example, the user can click the preset "Start Task" button. In response to the start task command, the electronic device can control the target robot to execute the robot task according to the target workflow template and change the robot status from assigned to tasking. Accordingly, after completing the robot task, the robot status can be changed from tasking to idle.
[0056] During the execution of a robot task, the user can forcibly stop one or more target robots. At this time, the robot state of the forcibly stopped target robot changes from "in task" to "idle". The robot task will pause when all target robots have been forcibly stopped. In one specific implementation of this application, a secondary confirmation mechanism can be adopted for high-risk operations such as forced stopping. That is, a secondary confirmation pop-up can be used to determine whether the user confirms the intention to perform such a high-risk operation, thereby preventing accidental operation. The human-computer interaction interface can also provide a status filter button. Clicking this button dynamically refreshes the list of robot statuses, and the status labels (such as "idle: 3 units") are synchronized with the list data in real time to ensure consistency.
[0057] During the execution of robot tasks, the target robot can be controlled to execute each task node in the target workflow template sequentially. For each task node in the target workflow template, if the execution duration of the task node exceeds a preset duration threshold or the number of retries exceeds a preset number threshold, the system can jump to a preset exception information reporting node. The exception information reporting node can be used to record the context information of the exception and then transition to the task end, task pause, or task skip process. The specific values of the duration threshold and the number threshold can be flexibly set according to the actual situation, and this application embodiment does not impose specific limitations on them. As an example, the duration threshold can be set to 60 seconds or other values, and the number threshold can be set to 3 times or other values.
[0058] Taking the execution of a robot task according to the depalletizing workflow template as an example, the process can begin by checking the battery status. If the battery is low, it can automatically charge, and then check the battery status again after charging is complete. If charging fails, the system can proceed to the exception reporting node. If the battery is fully charged, the system can check its current location coordinates (i.e., positioning). If positioning fails, the system can proceed to the exception reporting node. If positioning is successful, the system can navigate from its current location to the depalletizing observation point. If navigation fails, the system can proceed to the exception reporting node. If navigation is successful, the system can identify the carrier and stack type, recognizing the stacking of boxes on the pallet. If recognition fails, the system can proceed to the exception reporting node. If recognition is successful, the system can plan the depalletizing task based on the carrier and stack type recognition results. If depalletizing task planning fails, the system can proceed to the exception reporting node. If the depalletizing task planning is successful, the loop can be entered. This involves sequentially executing the single-cart depalletizing process for each cart based on the planning results. The planning results may include, but are not limited to, the depalletizing task sequence (e.g., the order of picking each cart, the coordinates of the picking point, and the corresponding cart code) and the total number of depalletizing tasks. Taking a single-cart depalletizing process as an example, the process can begin with cart identification and cart code reading. If reading fails, the process jumps to the exception information reporting node. If reading is successful, cart code verification can be performed. If verification fails, the process jumps to the exception information reporting node. If verification passes, the cart can be picked up. If picking fails, the process jumps to the exception information reporting node. If picking is successful, navigation to the target storage location can be initiated. If navigation fails, the process jumps to the exception information reporting node. If navigation is successful, it can be determined whether the target storage location is already occupied. If the target storage location is occupied, the process jumps to the exception information reporting node. If the target storage location is idle, the storage location code can be read and verified. If the verification fails, the process can proceed to the exception reporting node. If the verification passes, the bin can be placed. If placement fails, the process can proceed to the exception reporting node. If placement is successful, the bin placement can be verified. If the verification fails, the process can proceed to the exception reporting node. If the verification passes, the current bin depalletizing process can be terminated, and the process can continue with the next bin depalletizing process until all bins in the depalletizing task planning result have been traversed. The loop then ends, and the task completion status is reported.
[0059] Taking the execution of robot tasks according to the palletizing workflow template as an example, the process can begin by checking the battery status. If the battery is low, it can automatically charge, and then check the battery status again after charging is complete. If charging fails, the process jumps to the exception information reporting node. If the battery is sufficient, the robot can check its current location coordinates (i.e., localization). If localization fails, the process jumps to the exception information reporting node. If localization is successful, the robot can navigate from its current location to the palletizing observation point. If navigation fails, the process jumps to the exception information reporting node. If navigation is successful, the robot can identify the carrier and pallet type, including empty pallets. If identification fails, the process jumps to the exception information reporting node. If identification is successful, the robot can plan the palletizing task. If palletizing task planning fails, the process jumps to the exception information reporting node. If palletizing task planning is successful, the robot can enter a loop, where each bin is palletized sequentially based on the planned task. Taking a single-box palletizing process as an example, the process can begin with box identification and code reading. If reading fails, the process jumps to the exception reporting node. If reading succeeds, the box can be picked up; if picking fails, the process jumps to the exception reporting node. If picking succeeds, navigation to the target placement point can be initiated; if navigation fails, the process jumps to the exception reporting node. If navigation succeeds, the box can be placed; if placing fails, the process jumps to the exception reporting node. If placing is successful, box placement verification can be performed; if verification fails, the process jumps to the exception reporting node. If verification passes, the current single-box palletizing process ends, and the process continues with the next single-box palletizing process, until all boxes in the palletizing task planning result have been traversed. The loop then ends, and the task completion status is reported.
[0060] Taking the execution of a robot task according to a point-to-point material handling workflow template as an example, the process can begin with querying the current location coordinates (i.e., positioning). If positioning fails, the system can proceed to the exception reporting node. If positioning is successful, the robot can navigate from the current location to the starting point (point A). If navigation fails, the system can proceed to the exception reporting node. If navigation is successful, the system can identify and read the bin's code. If reading fails, the system can proceed to the exception reporting node. If reading is successful, the system can pick up the bin. If picking fails, the system can proceed to the exception reporting node. If picking is successful, the robot can navigate to the destination (point B). If navigation fails, the system can proceed to the exception reporting node. If navigation is successful, the system can check if the storage space is occupied. If the storage space is occupied, the system can proceed to the exception reporting node. If the storage space is available, the system can place the bin. If placement fails, the system can proceed to the exception reporting node. If placement is successful, the system can verify the bin's placement. If the verification fails, the system can proceed to the exception reporting node. If the verification passes, the task completion status can be reported. When multiple sets of point-to-point transport are required, multiple sets of start points (point A) and end points (point B) can be configured in batches, and the process described above can be repeated until all sets of point-to-point transport have been traversed, at which point the loop ends and the task completion status is reported.
[0061] In summary, in this embodiment of the application, a workflow template library including various workflow templates can be pre-set. In practical applications, only the required workflow template needs to be selected from it and its global task parameters need to be configured to execute the corresponding robot task. There is no need for professionals to rewrite the underlying control code, which facilitates deployment and debugging, can quickly respond to business changes, and effectively improves overall efficiency.
[0062] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0063] Corresponding to the robot task execution method described in the above embodiments, Figure 2 This illustration shows a structural diagram of one embodiment of a robot task execution device provided in this application.
[0064] In this embodiment, a robot task execution device may include: The workflow template invocation module 201 is used to invoke a target workflow template from a preset workflow template library in response to a workflow template selection instruction for a robot task; wherein, the workflow template library includes various workflow templates, and the target workflow template is the workflow template corresponding to the workflow template selection instruction; The task parameter configuration module 202 is used to obtain global task parameter configuration information corresponding to the global task parameter configuration instruction in response to the global task parameter configuration instruction for the target workflow template. Robot scheduling module 203 is used to schedule a target robot to perform the robot task based on the global task parameter configuration information; The robot task execution module 204 is used to control the target robot to execute the robot task according to the target workflow template based on the global task parameter configuration information.
[0065] In one specific implementation of this application embodiment, the target workflow template includes sequentially connected modular task nodes, each task node being used to encapsulate the corresponding robot capabilities; Accordingly, the robot task execution module can be specifically used to: control the target robot to execute each task node in the target workflow template in sequence; wherein the output of the predecessor task node is passed to the successor task node and serves as the input of the successor task node.
[0066] In one specific implementation of this application embodiment, the robot task execution device may further include: The workflow template generation module is used to display a visual graphical interface for configuring workflow templates in response to workflow template configuration instructions; and to generate a workflow template corresponding to the drag-and-drop connection operation in response to the task node drag-and-drop connection operation in the visual graphical interface.
[0067] In one specific implementation of this application embodiment, the robot task execution device may further include: The workflow template adjustment module is used to display the visual graphical interface in response to a workflow template adjustment command for the target workflow template, and to present the task node connection method in the target workflow template in the visual graphical interface; and to generate the adjusted target workflow template in response to the task node adjustment operation in the visual graphical interface.
[0068] In one specific implementation of this application, the robot scheduling module can be specifically used to: determine the number of first robots to perform the robot task based on the global task parameter configuration information; count the number of second robots whose robot state is idle or assigned; and schedule the target robot to perform the robot task when the number of first robots is less than or equal to the number of second robots.
[0069] In one specific implementation of this application embodiment, the robot task execution device may further include: The robot state control module is used to, after scheduling the target robot for executing the robot task based on the global task parameter configuration information, change the robot state of the target robot from the assigned state to the task-in-process state in response to the start task command. The robot state control module is further configured to change the robot state of the target robot from the task state to the idle state after controlling the target robot to execute the robot task according to the target workflow template based on the global task parameter configuration information.
[0070] In one specific implementation of this application embodiment, the robot task execution device may further include: The exception handling module is used to, for each task node in the target workflow template, jump to a preset exception information reporting node if the execution time of the task node exceeds a preset time threshold or the number of retries exceeds a preset number threshold; wherein, the exception information reporting node is used to record the context information of the exception situation and transfer to the task end or task pause process.
[0071] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0072] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0073] Figure 3 A schematic block diagram of an electronic device provided in an embodiment of this application is shown. For ease of explanation, only the parts related to the embodiment of this application are shown.
[0074] like Figure 3As shown, the electronic device 3 in this embodiment includes: a processor 30, a memory 31, and a computer program 32 stored in the memory 31 and executable on the processor 30. When the processor 30 executes the computer program 32, it implements the steps in the various robot task execution method embodiments described above, for example... Figure 1 Steps S101 to S104 are shown. Alternatively, when the processor 30 executes the computer program 32, it implements the functions of each module / unit in the above-described device embodiments, for example... Figure 2 The functions of modules 201 to 204 are shown.
[0075] For example, the computer program 32 may be divided into one or more modules / units, which are stored in the memory 31 and executed by the processor 30 to complete this application. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program 32 in the electronic device 3.
[0076] The electronic device 3 may include, but is not limited to, computing devices such as mobile phones, tablets, desktop computers, laptops, handheld computers, robots, and servers. Those skilled in the art will understand that... Figure 3 This is merely an example of electronic device 3 and does not constitute a limitation on electronic device 3. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device 3 may also include input / output devices, network access devices, buses, etc.
[0077] The processor 30 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0078] The memory 31 can be an internal storage unit of the electronic device 3, such as a hard disk or memory. The memory 31 can also be an external storage device of the electronic device 3, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 3. Furthermore, the memory 31 can include both internal and external storage units of the electronic device 3. The memory 31 is used to store the computer program and other programs and data required by the electronic device 3. The memory 31 can also be used to temporarily store data that has been output or will be output.
[0079] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0080] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0081] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0082] In the embodiments provided in this application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings or direct couplings or communication connections may be through some interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0083] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0084] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0085] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable storage medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc. It should be noted that the content included in the computer-readable storage medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable storage medium does not include electrical carrier signals and telecommunication signals.
[0086] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A robot task execution method, characterized in that, include: In response to a workflow template selection instruction for a robot task, a target workflow template is retrieved from a preset workflow template library; wherein, the workflow template library includes various workflow templates, and the target workflow template is the workflow template corresponding to the workflow template selection instruction; In response to a global task parameter configuration instruction for the target workflow template, global task parameter configuration information corresponding to the global task parameter configuration instruction is obtained; Based on the global task parameter configuration information, a target robot is scheduled to perform the robot task. Based on the global task parameter configuration information, the target robot is controlled to execute the robot task according to the target workflow template.
2. The robot task execution method according to claim 1, characterized in that, The target workflow template includes sequentially connected modular task nodes, each task node being used to encapsulate the corresponding robot capabilities. Accordingly, controlling the target robot to execute the robot task according to the target workflow template includes: The target robot is controlled to execute each task node in the target workflow template sequentially. The output of the predecessor task node is passed to the successor task node and serves as the input of the successor task node.
3. The robot task execution method according to claim 2, characterized in that, Before calling the target workflow template from the preset workflow template library in response to the workflow template selection instruction for the robot task, the following steps are also included: In response to workflow template configuration commands, a visual graphical interface for configuring workflow templates is displayed; In response to a drag-and-drop connection operation of a task node in the visual graphical interface, a workflow template corresponding to the drag-and-drop connection operation is generated.
4. The robot task execution method according to claim 3, characterized in that, After calling the target workflow template from the preset workflow template library, it also includes: In response to a workflow template adjustment command for the target workflow template, the visual graphical interface is displayed, and the task node connection method in the target workflow template is presented in the visual graphical interface; In response to the task node adjustment operation in the visual graphical interface, the adjusted target workflow template is generated.
5. The robot task execution method according to claim 1, characterized in that, The step of scheduling the target robot to perform the robot task based on the global task parameter configuration information includes: Based on the global task parameter configuration information, the number of first robots used to execute the robot task is determined; Count the number of second robots that are either in an idle state or an assigned state; When the number of the first robots is less than or equal to the number of the second robots, the target robot is scheduled to perform the robot task.
6. The robot task execution method according to claim 5, characterized in that, After scheduling the target robot to perform the robot task based on the global task parameter configuration information, the process further includes: In response to the start task command, the robot state of the target robot is changed from the assigned state to the task-in-progress state; Accordingly, after controlling the target robot to execute the robot task according to the target workflow template based on the global task parameter configuration information, the method further includes: Change the target robot's robot state from "in task" to "idle".
7. The robot task execution method according to any one of claims 2 to 6, characterized in that, Also includes: For each task node in the target workflow template, if the execution time of the task node exceeds a preset time threshold or the number of retries exceeds a preset number threshold, jump to the preset exception information reporting node. The abnormal information reporting node is used to record the context information of the abnormal situation and to transfer to the task end or task pause process.
8. A robot task execution device, characterized in that, include: The workflow template invocation module is used to respond to a workflow template selection instruction for a robot task and invoke a target workflow template from a preset workflow template library; wherein, the workflow template library includes various workflow templates, and the target workflow template is the workflow template corresponding to the workflow template selection instruction; The task parameter configuration module is used to respond to the global task parameter configuration instruction for the target workflow template and obtain global task parameter configuration information corresponding to the global task parameter configuration instruction. The robot scheduling module is used to schedule a target robot to perform the robot task based on the global task parameter configuration information. The robot task execution module is used to control the target robot to execute the robot task according to the target workflow template based on the global task parameter configuration information.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the robot task execution method as described in any one of claims 1 to 7.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the robot task execution method as described in any one of claims 1 to 7.