Robot control system, resource management system, robot control method, and robot control program

The robot control system addresses resource starvation and deadlocks by using a behavior tree to manage shared resources, ensuring tasks are executed efficiently and flexibly in parallel.

WO2026047855A1PCT designated stage Publication Date: 2026-03-05YASKAWA DENKI KK
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2024/030501
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2026-03-05

AI Technical Summary

Technical Problem

Existing technologies face challenges in efficiently executing multiple tasks in parallel while avoiding resource starvation and deadlocks, particularly in robot control systems where shared resources are used.

Method used

A robot control system utilizing a behavior tree structure that manages shared resources by sequentially calling tasks and allocating resources in a decentralized manner, ensuring that once a task completes using a shared resource, it is not immediately reallocated to the same task, thereby reducing resource starvation and deadlocks.

Benefits of technology

The system effectively executes multiple tasks in parallel while minimizing resource starvation and deadlocks, enabling efficient and flexible operation in dynamic environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2024030501_05032026_PF_FP_ABST
    Figure JP2024030501_05032026_PF_FP_ABST
Patent Text Reader

Abstract

This robot control system comprises: a storage unit that stores a behavior tree including a plurality of tasks that are parallel to each other with respect to a parallel node, are located in a lower layer than the parallel node, and use a common resource including a robot; a tree management unit that, in each cycle, calls the plurality of tasks from the parallel node sequentially in the order in which the plurality of tasks are arranged, on the basis of the behavior tree; a resource management unit that allocates the common resource to a called task if the task can use the common resource; and a task control unit that causes the robot to execute the task to which the common resource is allocated. In the cycle following the completion of execution of a task using the common resource, the resource management unit allocates the common resource to another task without allocating the common resource to the original task even if the original task can use the common resource.
Need to check novelty before this filing date? Find Prior Art

Description

Robot control system, resource management system, robot control method, and robot control program

[0001] One aspect of the present disclosure relates to a robot control system, a resource management system, a robot control method, and a robot control program.

[0002] There is known a technique for managing resources required for executing tasks. Non-Patent Document 1 listed below describes resource allocation that defines resources required for executing nodes in a behavior tree and prevents multiple tasks being executed in parallel from using the same resources.

[0003] M. Colledanchise and L. Natale, "Improving the Parallel Execution of Behavior Trees," 2018 IEEE / RSJ International Conference on Intelligent Robots and Systems (IROS), 2018, pp. 7103-7110, doi: 10.1109 / IROS.2018.8593504.

[0004] It is desirable to execute individual tasks while more reliably avoiding resource starvation.

[0005] A robot control system according to one aspect of the present disclosure includes a memory unit that stores a behavior tree including a parallel node and a plurality of tasks that are parallel to the parallel node but located at a lower layer than the parallel node and that use a common resource including a robot; a tree management unit that, in each cycle, sequentially calls the plurality of tasks from the parallel node based on the behavior tree in accordance with the order in which the plurality of tasks are arranged; a resource management unit that allocates the common resource to a called task so that the called task can be executed if the called task can use the common resource; and a task control unit that causes the robot to execute the task to which the common resource has been allocated, wherein in a cycle after one of the plurality of tasks has completed execution using the common resource, the resource management unit allocates the common resource to another task of the plurality of tasks without allocating the common resource to the one task, even if the one task can use the common resource.

[0006] According to one aspect of the present disclosure, individual tasks can be executed while more reliably avoiding resource starvation.

[0007] 1 is a diagram illustrating an example of an application of a robot control system; FIG. 2 is a diagram illustrating an example of the hardware configuration of a computer used for a robot control system; FIG. 3 is a diagram illustrating an example of a behavior tree; FIG. 4 is a diagram illustrating an example of a data structure of resource usage information; FIG. 5 is a flowchart illustrating an example of processing executed by a robot control system; FIG. 6 is a flowchart illustrating an example of processing related to a parallel node; FIG. 7 is a diagram illustrating an example of state transition of a tree structure related to a parallel node; FIG. 8 is a diagram illustrating an example of state transition of resource usage information; FIG. 9 is a diagram illustrating an example of state transition of resource usage information.

[0008] Various examples of the present disclosure will be described in detail below with reference to the accompanying drawings. In the description of the drawings, the same or equivalent elements are designated by the same reference numerals, and redundant description will be omitted.

[0009] [System Overview] The robot control system according to the present disclosure is a computer system that manages shared resources used to execute multiple tasks in a real workspace and causes agents to execute the multiple tasks using the shared resources. A task refers to a process performed to achieve a certain purpose. A shared resource refers to a resource that may be used by multiple tasks. An agent refers to an entity that executes a task and may be managed as a shared resource. In the robot control system, a robot may be managed as at least one of an agent and a shared resource. An agent may be a robot or another type of device or machine.

[0010] If the common resource is a hardware resource, the hardware resource exists in the real workspace. In one example, the common resource is a machine or device used to process a workpiece, which is a tangible object existing in the real workspace. The common resource may be an agent such as a robot, an automated guided vehicle (AGV), or a drone; an end effector such as a gripper, a paint gun, or a cooking utensil; a processing device such as a machine tool, a washer, or a charging station; or a transport device such as a conveyor. Alternatively, the common resource may be an input device such as a camera, a microphone, a scanner, an operation panel, or a disk drive; an output device such as a monitor, a speaker, a printer, a light, or a disk drive; or a communication device such as a communication cable, a Bluetooth® adapter, or a telephone. Alternatively, the common resource may be a fixture or container such as a cart, a container, a box, a plate, or a rack. In one example, the common resource includes a robot.

[0011] Executing multiple tasks using a common resource corresponds to concurrent processing, parallel processing, or a combination thereof. A task's use of a common resource means that the common resource is occupied by that task. A common resource is repeatedly used in common by multiple tasks, but cannot be used by multiple tasks simultaneously. Concurrent processing, parallel processing, or a combination thereof takes into account phenomena such as deadlock and resource starvation. Deadlock refers to a phenomenon in which two or more processes (tasks in this disclosure) mutually request a resource reserved by another process, preventing any process from proceeding. Resource starvation refers to a phenomenon in which a process (task) is permanently unable to acquire a resource and is unable to execute. Generally, it is not easy to design a system for executing multiple tasks in parallel or in parallel while avoiding these problems.

[0012] A robot control system uses a behavior tree to manage multiple tasks and shared resources in order to process multiple tasks in parallel or in parallel while avoiding or reducing deadlocks and resource starvation. As a result, it is expected that multiple tasks can be executed efficiently. Furthermore, by introducing a behavior tree, it is possible to easily design and manage a mechanism for flexibly operating agents in response to changes in the environment of the real workspace. In addition, the robot control system includes a mechanism for multiple tasks to share shared resources in an autonomous and decentralized manner, so that resource starvation can be more reliably avoided or reduced even when parallel or concurrent processing is defined in a layered manner in the behavior tree.

[0013] [System Configuration] The configuration of a robot control system 1 according to an example will be described. FIG. 1 is a diagram illustrating an example application of the robot control system 1. In this example, the robot control system 1 manages at least one of one or more resources required to execute multiple tasks in a real workspace 8. The workspace 8 includes various resources, such as a mobile robot 81, a stationary robot 82, a conveyor 83, a camera 84, and a rack 85, and these resources work together to process a workpiece 90. Hereinafter, various robots, such as the mobile robot 81 and the stationary robot 82, will be collectively referred to as robots 80. Examples of tasks in this processing include picking, storing, transporting, moving, processing, packaging, and unpacking the workpiece 90. In the workspace 8, these tasks can be executed in parallel or in parallel.

[0014] In the following, for simplicity of explanation, it is assumed that the robot control system 1 processes one common resource.

[0015] The robot control system 1 is connected to each of the various devices in the workspace 8 via a communication network. The communication network may be a wired network or a wireless network. The communication network may include at least one of the Internet and an intranet. Alternatively, the communication network may be realized simply by a single communication cable.

[0016] The robot control system 1 can cause the robot 80, which is a common resource, to perform multiple tasks. The robot control system 1 executes a given calculation to generate a command signal for controlling the robot 80. In one example, the command signal includes data for controlling the robot 80, such as a path indicating the trajectory of the robot 80. The trajectory of the robot 80 refers to the path of movement of the robot 80 or its components. For example, the trajectory of the robot 80 can be the trajectory of the tip of the robot 80. The robot control system 1 transmits the generated command signal to a robot controller.

[0017] The robot controller is a device that operates the robot 80 in accordance with a command signal from the robot control system 1. In one example, the robot controller calculates joint angle target values ​​for matching the position and posture of the tip of the robot 80 with the target values ​​indicated by the command signal, and controls the robot 80 in accordance with the joint angle target values. The joint angle target values ​​are the angle target values ​​of each joint of the robot 80.

[0018] The robot 80 is a device that operates based on control by the robot control system 1 to perform tasks. At least one task is set to process some kind of workpiece. In one example, the robot 80 is a multi-axis, serial-link, vertical, articulated robot. The robot 80 includes a manipulator and an end effector, which is a tool attached to the tip of the manipulator. The robot 80 can perform various processes using the end effector. The robot 80 can freely change the position and orientation of the end effector within a given range. The robot 80 may be a six-axis vertical, articulated robot, or a seven-axis vertical, articulated robot with six axes plus one redundant axis.

[0019] In one example, the robot 80 performs a task using motion. Performing a task using motion refers to changing at least one of the position and posture of the robot to perform the task. A robot that performs a task using motion may be a robot that moves from one place to another to perform the task, such as a robot supported by an AGV. Alternatively, a robot that performs a task using motion may be a robot that changes the angle of at least some of one or more joints of a manipulator to perform the task, such as a vertical articulated robot.

[0020] 1 also shows an example of the functional configuration of the robot control system 1. In one example, the robot control system 1 includes a storage unit 11, a tree manager 12, a resource manager 13, and one or more task controllers 14 as functional components.

[0021] The memory unit 11 is a functional module that stores a behavior tree that represents the execution of a task and resource usage information that indicates the usage status of shared resources by the task. The tree management unit 12 is a functional module that sequentially calls multiple tasks based on the behavior tree. The resource management unit 13 is a functional module that allocates shared resources to tasks based on the resource usage information. The task control unit 14 is a functional module that causes the robot to execute tasks to which shared resources have been allocated. The task control unit 14 is the entity that controls the execution of tasks and can also be called an "execution engine."

[0022] The robot control system 1 can be realized by any type of computer. The computer may be a general-purpose computer such as a personal computer or a business server, or may be incorporated into a dedicated device that executes a specific process.

[0023] 2 is a diagram showing an example of the hardware configuration of a computer 100 used for the robot control system 1. In this example, the computer 100 includes a main body 110, a monitor 120, and an input device .

[0024] The main body 110 is a device having a circuit 160. The circuit 160 has a processor 161, a memory 162, a storage 163, an input / output port 164, and a communication port 165. The number of each hardware component may be one or more. The storage 163 records programs for configuring each functional module of the main body 110. The storage 163 is a computer-readable recording medium such as a hard disk, a non-volatile semiconductor memory, a magnetic disk, or an optical disk. The memory 162 temporarily stores programs loaded from the storage 163, calculation results of the processor 161, and the like. The processor 161 configures each functional module by executing programs in cooperation with the memory 162. The input / output port 164 inputs and outputs electrical signals to and from the monitor 120 or the input device 130 in response to instructions from the processor 161. The input / output port 164 may also input and output electrical signals to and from other devices. The communication port 165 performs data communication with other devices via a communication network N in response to instructions from the processor 161.

[0025] The monitor 120 is a device for displaying information output from the main body 110. For example, the monitor 120 is a device capable of displaying graphics, such as a liquid crystal panel.

[0026] The input device 130 is a device for inputting information to the main body 110. Examples of the input device 130 include operation interfaces such as a keypad, a mouse, and an operation controller.

[0027] The monitor 120 and the input device 130 may be integrated as a touch panel. For example, the main body 110, the monitor 120, and the input device 130 may be integrated as a tablet computer.

[0028] Each functional module of the robot control system 1 is realized by loading a robot control program onto the processor 161 or memory 162 and having the processor 161 execute the program. The robot control program includes code for realizing each functional module of the robot control system 1. The processor 161 operates the input / output port 164 and the communication port 165 in accordance with the robot control program, and reads and writes data from and to the memory 162 or the storage 163.

[0029] The robot control program may be provided in the form of a non-transitory recording medium such as a CD-ROM, a DVD-ROM, or a semiconductor memory. Alternatively, the robot control program may be provided via a communications network as a data signal superimposed on a carrier wave.

[0030] [Behavior Tree] A behavior tree is a method of representing the behavior of an agent using a tree structure. A behavior tree includes a root node, a control node, and an execution node. A node is connected to another node by a directed edge. The node at the start of a directed edge is called a "parent node," and the node at the end of a directed edge is called a "child node." Each node has at most one parent node and zero or more child nodes. The root node is the node at the top of the behavior tree. The root node has no parent node and typically has one child node. A control node has one parent node and one or more child nodes. A control node sequentially invokes one or more child nodes in response to being invoked. An execution node has one parent node and no child nodes. An execution node is also called a "leaf" of the behavior tree. In one example, each of multiple tasks is associated with an execution node.

[0031] In this disclosure, when focusing on a certain node, a set of one child node of the node and zero or more nodes located below the child node is also referred to as a "subtree." In one example, each subtree corresponds to a task. Because subtrees can be defined at each layer of the behavior tree, the relationship between the subtrees can be said to be a nested structure. Corresponding to this structure, a certain task can be realized by a set of multiple subtasks.

[0032] The root node calls its child nodes at a predetermined cycle interval. This call is also called a "tick." Generally, the cycle interval is a very short time and can be set, for example, based on the frame rate of the video captured by a camera. In response to the call by the root node, each node in the subtree connected to the root node is called in a predetermined order based on the tree structure, with priority given to the left. The call (tick) propagates from the root node to each execution node, thereby executing the entire behavior tree. Each node returns one of the following execution results: True, indicating successful execution; False, indicating unsuccessful execution; or Running, indicating that the node is currently running.

[0033] The calling of each node in the behavior tree is controlled by the tree management unit 12. In each cycle, the tree management unit 12 calls each node in order starting from the root node based on the behavior tree. When focusing on the root node or a certain control node, the tree management unit 12 calls each of the one or more subtrees connected to that node in order. When focusing on individual tasks associated with an execution node, the tree management unit 12 calls the multiple tasks sequentially according to the order in which the tasks are arranged.

[0034] The relationship between the task controller 14 and the components of the behavior tree may vary. For example, one task controller 14 may correspond to one subtree, or may correspond to two or more subtrees connected to one control node (e.g., a parallel node). In one example, the task controller 14 controls the execution of a task corresponding to a subtree in response to the invocation of the corresponding subtree.

[0035] 3 is a diagram showing an example of a behavior tree. The behavior tree 200 shown in Fig. 3 shows the following types of control nodes: a fallback node 21, a sequence node 22, a parallel node 23, a fallback node with memory 24, and a sequence node with memory 25.

[0036] The fallback node 21 is used when it is sufficient for one of multiple child nodes to succeed. The fallback node 21 calls two or more child nodes in order from left to right. In response to any child node returning True or Running, the fallback node 21 returns the return value to the parent node as the execution result of the fallback node 21, and does not call the remaining child nodes. In response to all child nodes returning False, the fallback node 21 returns False to the parent node as the execution result of the fallback node 21.

[0037] The sequence node 22 is used when the success of all child nodes is required. The sequence node 22 calls two or more child nodes in order from left to right. In response to any child node returning False or Running, the sequence node 22 returns the return value to the parent node as the execution result of the sequence node 22, and does not call the remaining child nodes. In response to all child nodes returning True, the sequence node 22 returns True to the parent node as the execution result of the sequence node 22.

[0038] The parallel node 23 is used to execute all child nodes, essentially executing those child nodes in parallel or in parallel. The parallel node 23 calls two or more child nodes in order from left to right. The parallel node 23 returns True to the parent node in response to all child nodes returning True, returns False to the parent node in response to at least one child node returning False, and returns Running to the parent node in other cases.

[0039] The fallback node with memory 24 is an extension of the fallback node 21. The fallback node with memory 24 differs from the fallback node 21 in that, if the execution result in the previous cycle is Running, the fallback node with memory 24 calls the child nodes in order starting from the last child node called in that cycle.

[0040] The sequence node with memory 25 is an extension of the sequence node 22. The sequence node with memory 25 differs from the sequence node 22 in that, if the execution result in the previous cycle was Running, the sequence node with memory 25 calls the child nodes in order starting from the last child node called in that cycle.

[0041] FIG. 3 shows condition nodes 26 and action nodes 27 as types of execution nodes.

[0042] A condition node 26 is used to check whether a specific condition is met. The condition node 26 executes a function corresponding to the condition. The condition node 26 returns either True, indicating that the condition is met, or False, indicating that the condition is not met, to the parent node.

[0043] An action node 27 is used to execute a task. The action node 27 executes a function corresponding to the task. One action node 27 corresponds to one task. The action node 27 returns to its parent node one of the following: True, which indicates that the task was successful; False, which indicates that the task failed; or Running, which indicates that the task is in another state (e.g., running). When an action node 27 is called, the task control unit 14 corresponding to the action node 27 executes the task associated with the action node 27.

[0044] The robot control system 1 manages parallel processing and concurrent processing by using at least a parallel node. The following description will focus on the parallel node.

[0045] In behavior tree 200, root node 201 has a single child node, parallel node 202. Parallel node 202 has three child nodes, memory-attached sequence nodes 211, 231, and 251. Parallel node 202 is connected to subtree 210 having memory-attached sequence node 211 as its apex, subtree 230 having memory-attached sequence node 231 as its apex, and subtree 250 having memory-attached sequence node 251 as its apex.

[0046] Subtree 210 includes parallel node 212 located two levels below memory-equipped sequence node 211. Parallel node 212 connects to a subtree whose apex is sequence node 213 and a subtree whose apex is fallback node 214. Parallel node 215, located one level below fallback node 214, connects to a subtree whose apex is sequence node 216 and a subtree whose apex is sequence node 217.

[0047] Subtree 230 includes a parallel node 232 located two levels below memory-equipped sequence node 231. Parallel node 232 connects to a subtree having sequence node 233 as its apex and a subtree having sequence node 234 as its apex.

[0048] The behavior tree 200 includes four parallel nodes 202, 212, 215, and 232. Focusing on the hierarchical relationships between the parallel nodes, the behavior tree 200 includes an upper parallel node, a lower parallel node located at a lower level than the upper parallel node, and two or more subtrees connected to the lower parallel node and corresponding to two or more tasks. The lower parallel node is located within a subtree connected to the upper parallel node. The lower parallel node may be directly connected to the upper parallel node or indirectly connected to the upper parallel node via another node. The parallel node 202 is the highest-level parallel node of all parallel nodes. If the parallel node 202 is an upper parallel node, then the parallel nodes 212, 215, and 232 are lower parallel nodes. If the parallel node 212 is an upper parallel node, then the parallel node 215 is a lower parallel node. Depending on the hierarchical relationships with two or more other parallel nodes, a given parallel node may be either an upper parallel node or a lower parallel node. As shown in behavior tree 200, parallel nodes can be layered, i.e., a behavior tree can define parallel or concurrent processing in a layered manner.

[0049] A behavior tree includes parallel nodes and multiple tasks that are located in a layer below the parallel node in a parallel state relative to the parallel node and use common resources. "Multiple tasks located in a parallel state relative to the parallel node" refers to multiple tasks that connect to different subtrees of the parallel node, i.e., multiple tasks that connect directly or indirectly to the parallel node via different directed edges. For example, if a first subtree and a second subtree are connected to a parallel node, "multiple tasks located in a parallel state relative to the parallel node" refers to the relationship between the tasks in the first subtree and the tasks in the second subtree. Note that multiple tasks in a subtree are not multiple tasks located in a parallel state relative to the parallel node to which the subtrees are connected.

[0050] 3, a description will be given of "multiple tasks located in a parallel state with respect to a parallel node." The multiple tasks located in a parallel state with respect to a parallel node 202 are the tasks in subtree 210, the tasks in subtree 230, and the tasks in subtree 250. The tasks in subtree 210 are not multiple tasks located in a parallel state with respect to the parallel node 202. The tasks in subtree 230 are not multiple tasks located in a parallel state with respect to the parallel node 202. The tasks in subtree 250 are not multiple tasks located in a parallel state with respect to the parallel node 202.

[0051] The tasks located in parallel with each other with respect to the parallel node 212 are a group of tasks in a subtree with the sequence node 213 as its apex and a group of tasks in a subtree with the fallback node 214 as its apex.

[0052] The tasks located in parallel with each other relative to the parallel node 215 are a group of tasks in a subtree with the sequence node 216 as its apex and a group of tasks in a subtree with the sequence node 217 as its apex.

[0053] The tasks located in parallel with each other relative to the parallel node 232 are a group of tasks in a subtree with the sequence node 233 at its apex and a group of tasks in a subtree with the sequence node 234 at its apex.

[0054] [Resource Usage Information] Fig. 4 is a diagram showing an example of the data structure of resource usage information 300. Resource usage information 300 shown in Fig. 4 includes resource management information 301 indicating tasks to which shared resources are assigned, and task management information 302 indicating the status of each of multiple tasks that use the shared resources.

[0055] A data record of the resource management information 301 includes, as data items, a resource ID, which is an identifier that uniquely identifies each shared resource, and a task ID, which is an identifier that uniquely identifies each task. The example in Figure 4 shows that a robot Ra, which is a shared resource, is assigned to task Tb, i.e., task Tb occupies robot Ra. In the example in Figure 4, if a certain shared resource is not assigned to any task, a null value is set in the task ID column. The initial value of the task ID in the resource management information is a null value.

[0056] Each data record in the task management information 302 includes, as data items, a task ID, a completion flag indicating whether the task has completed execution, and a wait flag indicating whether the shared resource will be handed over to another task. In the example of FIG. 4 , the completion flag is set to 1 if the task has completed execution and to 0 if the task has not completed execution. The wait flag is set to 1 if the task will handed over the shared resource to another task and to 0 if the task will not handed over the shared resource to another task. The initial values ​​of the completion flag and wait flag in each data record are both 0. A task handing over a shared resource to another task means that, even if the task is able to use the shared resource, the task does not use the shared resource but instead provides the other task with an opportunity to use the shared resource. In the example of FIG. 4 , task Ta has completed execution and is ready to hand over the shared resource. Task Tb has completed execution but is not ready to hand over the shared resource. Task Tc has not yet completed execution and is not ready to hand over the shared resource.

[0057] As shown in FIG. 4, the resource usage information 300 is information indicating, for each of a plurality of tasks, the usage status of a common resource by that task.

[0058] Referring again to Fig. 3, Fig. 3 also shows an example of the relationship between the parallel nodes 23 and resource usage information 300. In the example of Fig. 3, the storage unit 11 stores the resource usage information 300 in association with the parallel node 23. In one example, the storage unit 11 stores resource management information 301 in association with the top parallel node (parallel node 202), and stores task management information 302 in association with each parallel node (parallel nodes 202, 212, 215, 232).

[0059] [Robot Control Method] As an example of a robot control method according to the present disclosure, processing executed by the robot control system 1 will be described with reference to Fig. 5. Fig. 5 is a flowchart showing an example of the processing as processing flow S1. That is, the robot control system 1 executes processing flow S1. Below, processing flow S1 will be described assuming that the agent is a robot 80.

[0060] First, an overview of the processing flow S1 will be described. As described above, the tree management unit 12 calls each node of the behavior tree in turn in each cycle. FIG. 5 represents the cycle using a variable i. In step S11, the tree management unit 12 initializes the variable i to 1. In step S12, the tree management unit 12, the resource management unit 13, and one or more task control units 14 cooperate to call each node and control task execution based on the behavior tree. In step S13, the tree management unit 12 determines whether or not to terminate the entire processing managed by the behavior tree. If the processing is not to be terminated (NO in step S13), the processing proceeds to step S14. In step S14, the tree management unit 12 increments the variable i, which indicates the cycle, by 1. In step S15, the tree management unit 12 and the resource management unit 13 cooperate to execute processing for the next cycle.

[0061] After step S15, the process returns to step S12. In the repeated step S12, as the process for the next cycle, the tree management unit 12, the resource management unit 13, and one or more task control units 14 cooperate to again call each node based on the behavior tree and again control the execution of the task. Then, in step S13, the tree management unit 12 again determines whether to terminate the entire process. For example, the tree management unit 12 may terminate the process in response to the completion of multiple tasks to be executed or in response to the arrival of the operation end time of the robot 80 as an agent (YES in step S13).

[0062] Next, step S12 will be described in detail. Based on the behavior tree stored in the storage unit 11, the tree management unit 12 calls each node in order, starting from the root node. If the called node is an action node, the resource management unit 13 and task control unit 14 cooperate to control the allocation of shared resources and the execution of tasks. With reference to FIG. 6 , this control will be described in detail, focusing on the processing related to parallel nodes. FIG. 6 is a flowchart showing an example of this processing. FIG. 6 shows processing related to a certain parallel node as processing flow S120. In the following description, this parallel node will be referred to as the "target parallel node" for convenience. Processing flow S120 is part of step S12 and is executed for each of one or more parallel nodes in the behavior tree. The target parallel node connects to multiple subtrees, and each subtree includes at least one task (action node). Based on the behavior tree, the tree management unit 12 sequentially calls multiple tasks (action nodes) from the target parallel node in accordance with the arrangement order of the multiple tasks (action nodes). FIG. 6 uses the variable k to distinguish between individual subtrees.

[0063] In steps S1201 and S1202, the tree management unit 12 calls the first subtree connected to the target parallel node. The first subtree is the subtree located at the leftmost position one level below the target parallel node.

[0064] Steps S1203 to S1207 show the processing for one subtree of the target parallel node. The tree management unit 12 calls each node in this subtree in order. Below, we will explain in detail the case where an action node is called, i.e., a task is called (YES in step S1203), and will omit the explanation for the case where a node other than an action node is called (NO in step S1203). Below, for convenience, the called task will also be referred to as the "target task."

[0065] In step S1204, the resource manager 13 refers to resource usage information related to the target task. The resource manager 13 refers to resource usage information associated with the target parallel node. The resource manager 13 refers to resource management information associated with the top-level parallel node and task management information associated with the target parallel node. The resource manager 13 extracts a data record Dr indicating resource management information of the shared resource corresponding to the target task and a data record Dt indicating task management information of the target task.

[0066] In step S1205, the resource management unit 13 controls the allocation of shared resources to the target task based on the extracted resource usage information. The resource management unit 13 determines whether or not it is possible to allocate shared resources to the target task based on the resource usage information. The resource management unit 13 determines the current status of the shared resources by referring to the extracted resource management information (data record Dr), and determines the current status of the target task by referring to the extracted task management information (data record Dt).

[0067] In step S1206, the task control unit 14 corresponding to the target task controls the execution of the target task based on the control of the allocation of the shared resource. If necessary, the resource management unit 13 updates the resource usage information in the storage unit 11 in response to the task control.

[0068] Various examples of the processes in steps S1205 and S1206 will be described.

[0069] (When a shared resource can be used) If the shared resource is not assigned to any task and the target task has not completed execution, the target task can use the shared resource. In this case, the resource management unit 13 assigns the common resource to the target task so that the target task can be executed. In one example, the resource management unit 13 records the task ID of the target task in the task ID column of the data record Dr in the storage unit 11. That is, the resource management unit 13 records an occupancy status indicating that the target task occupies the common resource in the storage unit 11 as resource usage information for the target task. Then, the resource management unit 13 assigns the common resource to the target task.

[0070] The task control unit 14 corresponding to the target task physically causes the robot 80 in the workspace 8 to execute the target task to which the shared resource has been allocated. "Causing the robot to physically execute the task" means having an actual robot existing in the real world actually execute the task, rather than having the robot virtually execute the task within the circuitry of a computer system. For example, the task control unit 14 generates a path for executing the target task by path planning, and outputs a command signal indicating the path to the robot controller. The robot controller controls the robot 80 according to the command signal. The robot 80 moves along the path to execute the task.

[0071] When the target task has completed its execution, the task control unit 14 releases the shared resource from the target task. The resource management unit 13 updates the completion flag of the data record Dt in the storage unit 11 to 1. That is, the resource management unit 13 records in the storage unit 11, as resource usage information for the target task, that the target task has completed its execution.

[0072] (When the shared resource cannot be used) If the shared resource is assigned to a task other than the target task, the task control unit 14 does not generate or output a command signal to the robot 80, and does not cause the robot 80 to execute the target task.

[0073] (Yielding a Shared Resource) If a shared resource is not assigned to any task and the target task has completed execution, the target task can use the shared resource again, but the resource management unit 13 does not assign the shared resource to the target task. The resource management unit 13 updates the wait flag of the data record Dt in the memory unit 11 from 0 to 1. That is, if the target task can use the common resource again in a cycle after the target task has completed execution using the common resource, the resource management unit 13 records a wait state in the memory unit 11 as the resource usage information of the target task, indicating that the common resource will be handed over to another task. Similarly, if the wait flag of the data record Dt in the memory unit 11 is already 1, i.e., if the resource usage information of the target task indicates a wait state, the resource management unit 13 does not assign the shared resource to the target task. Since the resource management unit 13 does not assign the shared resource to the target task, the task control unit 14 does not cause the robot 80 to execute the target task.

[0074] In step S1207, the tree management unit 12 determines whether the invocation of the kth subtree has been completed. Completion of the invocation of the subtree means that all nodes in the subtree that should be invoked have been invoked according to the rules of the control node. If there are nodes that should be invoked but have not yet been invoked (NO in step S1207), the process returns to step S1203. If another action node has been invoked (YES in step S1203), the processes of steps S1204 to S1206 are executed for that action node. If the invocation of the kth subtree has been completed (YES in step S1207), the process proceeds to step S1208.

[0075] In step S1208, the tree management unit 12 determines whether all subtrees connected to the target parallel node have been called. If all subtrees have been called (YES in step S1208), the tree management unit 12 ends the processing for the target parallel node and executes processing for the next node based on the behavior tree. If there is a subtree that has not been called (NO in step S1208), the processing proceeds to step S1209, where the tree management unit 12 selects the (k+1)th subtree, i.e., the next subtree. Then, the processing returns to S1202, where the tree management unit 12 calls that subtree. Thereafter, the tree management unit 12, resource management unit 13, and task control unit 14 cooperate to execute the processing from step S1203 onwards for that subtree.

[0076] Next, step S15 will be described in detail. In one example, in step S15, the tree manager 12 changes the order in which subtrees are called for each parallel node as needed. After a task completes execution, the tree manager 12 may position the task after other tasks to which shared resources are allocated, while maintaining the parallel state with respect to the parallel node. After all tasks in a subtree located first with respect to a parallel node complete execution, the tree manager 12 may move the subtree to a second or later position (e.g., the last position) with respect to the parallel node.

[0077] In step S15, the resource management unit 13 sets the task ID in the resource management information to an initial value (null value). If the resource usage information (task management information) for each of the multiple tasks using the shared resource is in a standby state, the resource management unit 13 initializes the resource usage information for each of the multiple tasks. In the example of FIG. 4, if the completion flag and standby flag in the task management information 302 for each of the multiple tasks using the shared resource are both 1, the resource management unit 13 updates each of the completion flag and standby flag for each of the multiple tasks to 0 as an initialization process. Initialization of resource usage information refers to a process of canceling the completion state and standby state for each of the multiple tasks using the shared resource, allowing each of the multiple tasks to use the shared resource again.

[0078] As described with reference to FIGS. 5 and 6 , the robot control system 1 performs the following processing for each parallel node (target parallel node). Specifically, in each cycle, the tree management unit 12 sequentially calls multiple tasks from the parallel node based on the behavior tree in the order in which the multiple tasks are arranged. For each of the multiple tasks, the resource management unit 13 references resource usage information associated with the parallel node when the task is called. If the called task can use the shared resource, the resource management unit 13 allocates the shared resource to the called task so that the task can be executed. In a cycle after one of the multiple tasks has completed execution using the shared resource, the resource management unit 13 allocates the shared resource to another task among the multiple tasks without allocating the shared resource to the one task, even if the task can use the shared resource. The task control unit 14 physically causes the robot 80 to execute the task to which the shared resource is allocated.

[0079] A task may continue to use and execute a shared resource for two or more consecutive cycles. In this case, if the task can use the shared resource in the (i-1)th cycle, the resource management unit 13 records an occupancy status indicating that the task occupies the common resource in the storage unit 11 as the resource usage information of the task, and allocates the common resource to the task. If the execution of the task is not completed in the (i-1)th cycle, the resource management unit 13 again records the occupancy status as the resource usage information of the task in the i-th cycle, and allocates the common resource to the task again.

[0080] If a certain parallel node is a target parallel node, the behavior tree may include a lower parallel node located in a layer lower than the target parallel node (upper parallel node). The multiple tasks may include multiple first tasks located in a layer lower than the lower parallel node, and multiple second tasks located in a layer lower than the target parallel node (upper parallel node) and in parallel with the lower parallel node and the multiple first tasks relative to the target parallel node (upper parallel node). The resource management unit 13 sequentially allocates shared resources to the multiple tasks according to the order in which the multiple tasks are arranged, so that the multiple tasks are executed in order.

[0081] 3 , the behavior tree 200 includes, as lower parallel nodes, parallel nodes 212, 215, and 232 located in a layer lower than the parallel node (upper parallel node) 202. In this case, the multiple tasks include multiple first tasks located in a layer lower than the parallel node 212, and multiple second tasks located in a layer lower than the parallel node (upper parallel node) 202, in parallel with the lower parallel node 212 and the multiple first tasks relative to the parallel node (upper parallel node) 202. In this case, the multiple second tasks are one or more tasks located in the subtree 230 and one or more tasks located in the subtree 250. The resource management unit 13 sequentially allocates shared resources to the multiple tasks according to the order in which the multiple tasks are arranged, so that the multiple tasks are executed in order.

[0082] When focusing on the parallel node 212 in the behavior tree 200, the behavior tree 200 includes, as a lower parallel node, a parallel node 215 located in a layer lower than the parallel node (upper parallel node) 212. In this case, the multiple tasks include multiple first tasks located in a layer lower than the parallel node 215, and multiple second tasks located in a layer lower than the parallel node (upper parallel node) 212, in parallel with the lower parallel node 215 and the multiple first tasks relative to the parallel node (upper parallel node) 212. In this case, the multiple second tasks are one or more tasks located in a subtree with the sequence node 213 as its apex. The resource management unit 13 sequentially allocates shared resources to the multiple tasks in accordance with the order in which the multiple tasks are arranged, so that the multiple tasks are executed in order.

[0083] Next, an example of the process flow S1 including the process flow S120 will be described with reference to Figures 7 to 9. Figure 7 is a diagram showing an example of the state transition of a tree structure related to one parallel node. Figures 8 and 9 are diagrams showing an example of the state transition of resource usage information, and correspond to Figure 7. In this example, the shared resource is assumed to be a robot Ra.

[0084] 7 is a part of a behavior tree and is composed of an upper parallel node 401 and a first subtree 410 and a second subtree 420 connected to the upper parallel node 401. The first subtree 410 is composed of a first lower parallel node 411 located one level below the upper parallel node 401 and connected to the upper parallel node 401, and two tasks T11 and T12 located one level below the first lower parallel node 411 and connected to the first lower parallel node 411. The second subtree 420 is composed of a second lower parallel node 421 located one level below the upper parallel node 401 and connected to the upper parallel node 401, and two tasks T21 and T22 located one level below the second lower parallel node 421 and connected to the second lower parallel node 421. Tasks T11, T12, T21, and T22 use common resources. A task group consisting of tasks T11 and T12 and a task group consisting of tasks T21 and T22 are parallel to each other with respect to the upper parallel node 401 and are located in a layer lower than the upper parallel node 401. Tasks T11 and T12 are parallel to each other with respect to the first lower parallel node 411 and are located in a layer lower than the first lower parallel node 411. Tasks T21 and T22 are parallel to each other with respect to the second lower parallel node 421 and are located in a layer lower than the second lower parallel node 421.

[0085] The initial state of the tree structure is represented as state ST11. In state ST11, a first subtree 410 and a second subtree 420 are arranged in this order with respect to an upper parallel node 401. In the first subtree 410, tasks T11 and T12 are arranged in this order with respect to a first lower parallel node 411. In the second subtree 420, tasks T21 and T22 are arranged in this order with respect to a second lower parallel node 421.

[0086] State ST21 indicates the initial state of the resource usage information 300. In state ST21, the task ID column of the resource management information 301 is blank, and each flag of each task in the task management information 302 is 0.

[0087] Thereafter, in one or more consecutive cycles, the resource manager 13 allocates the shared resource to task T11, and the task controller 14 corresponding to task T11 causes the robot Ra to execute task T11. In each cycle during this period, the resource manager 13 registers task T11 in the task ID column of the resource management information 301, and as a result, the resource usage information 300 enters state ST22. During this period, the shared resource is occupied by task T11.

[0088] When task T11 has completed execution, the resource manager 13 sets the completion flag for task T11 in the task management information 302 to 1. The task control unit 14 corresponding to task T11 releases the shared resources from task T11. In addition, in response to the end of the cycle, the resource manager 13 initializes the task ID column of the resource management information 301. As a result, the resource usage information 300 enters state ST23.

[0089] In the next cycle, the resource management unit 13 sets the standby flag of task T11 in the task management information 302 to 1. That is, the resource management unit 13 stores in the storage unit 11, as resource usage information for task T11, a standby state indicating that the shared resource is to be handed over to another task. The resource management unit 13 allocates the shared resource to task T12, and the task control unit 14 corresponding to task T12 causes robot Ra to execute task T12. The resource management unit 13 registers task T12 in the task ID column of the resource management information 301. As a result, the resource usage information 300 becomes state ST24. The tree management unit 12 positions task T11 after task T12 in the first subtree 410, and as a result, the tree structure becomes state ST12. In one or more consecutive cycles including that cycle, the resource management unit 13 allocates the shared resource to task T12, and the task control unit 14 corresponding to task T12 causes robot Ra to execute task T12. During this time, the common resource is occupied by task T12.

[0090] When task T12 completes its execution, the resource manager 13 sets the completion flag for task T12 in the task management information 302 to 1. The task control unit 14 corresponding to task T12 releases the shared resources from task T12. In addition, in response to the end of the cycle, the resource manager 13 initializes the task ID column of the resource management information 301. As a result, the resource usage information 300 enters state ST25.

[0091] In the next cycle, the resource management unit 13 sets the standby flag of task T12 in the task management information 302 to 1. That is, the resource management unit 13 stores in the storage unit 11, as resource usage information for task T12, a standby state indicating that the shared resource is to be handed over to another task. The resource management unit 13 allocates the shared resource to task T21, and the task control unit 14 corresponding to task T21 causes robot Ra to execute task T21. The resource management unit 13 registers task T21 in the task ID column of the resource management information 301. As a result, the resource usage information 300 enters state ST26. The tree management unit 12 positions task T12 after task T11 in the first subtree 410, and moves the first subtree 410 behind the second subtree 420. As a result, the tree structure enters state ST13. In one or more consecutive cycles including the current cycle, the resource manager 13 allocates the shared resource to the task T21, and the task controller 14 corresponding to the task T21 causes the robot Ra to execute the task T21. During this time, the shared resource is occupied by the task T21.

[0092] When task T21 has completed execution, the resource manager 13 sets the completion flag of task T21 to 1 in the task management information 302. The task control unit 14 corresponding to task T21 releases the shared resources from task T21. In addition, in response to the end of the cycle, the resource manager 13 initializes the task ID column of the resource management information 301. As a result, the resource usage information 300 enters state ST27.

[0093] In the next cycle, the resource management unit 13 sets the standby flag of task T21 in the task management information 302 to 1. That is, the resource management unit 13 stores in the storage unit 11, as resource usage information for task T21, a standby state indicating that the shared resource is to be handed over to another task. The resource management unit 13 allocates the shared resource to task T22, and the task control unit 14 corresponding to task T22 causes robot Ra to execute task T22. The resource management unit 13 registers task T22 in the task ID column of the resource management information 301. As a result, the resource usage information 300 enters state ST28. The tree management unit 12 positions task T21 after task T22 in the second subtree 420, and as a result, the tree structure enters state ST14. In one or more consecutive cycles including that cycle, the resource management unit 13 allocates the shared resource to task T22, and the task control unit 14 corresponding to task T22 causes robot Ra to execute task T22. During this time, the common resource is occupied by task T22.

[0094] When task T22 has completed execution, the resource manager 13 sets the completion flag of task T22 in the task management information 302 to 1. The task control unit 14 corresponding to task T22 releases the shared resources from task T22. In addition, in response to the end of the cycle, the resource manager 13 initializes the task ID column of the resource management information 301. As a result, the resource usage information 300 enters state ST29.

[0095] In the next cycle, the resource management unit 13 sets the wait flag of task T22 in the task management information 302 to 1. That is, the resource management unit 13 stores a wait state indicating that the shared resource will be handed over to another task as the resource usage information of task T22 in the storage unit 11. As a result, the tree structure becomes state ST15, and the resource usage information 300 becomes state ST30.

[0096] Because the wait flags of the four tasks T11, T12, T21, and T22 are all set to 1, that is, because the resource usage information (task management information) for each of these four tasks is in the wait state, the resource management unit 13 initializes the resource usage information (task management information) for each of these four tasks. As a result, the resource usage information 300 returns to state ST21. The tree management unit 12 positions task T22 after task T21 in the second subtree 420, and moves the second subtree 420 behind the first subtree 410. As a result, the tree structure is initialized and returns to state ST11.

[0097] Thereafter, the robot control system 1 may execute the tasks T11, T12, T21, and T22 again, in which case the tree structure and the resource usage information 300 will again undergo transitions as shown in FIGS.

[0098] As described with reference to Figures 7 to 9, the robot control system 1 executes the sharing of shared resources among multiple tasks in an autonomous and decentralized manner at each parallel node. By managing tasks and shared resources in an autonomous and decentralized manner rather than in a centralized manner, it is possible to appropriately execute all tasks and allocate resources even in situations where the environment of the workspace 8 changes or the type and number of tasks change dynamically. As a result, even in complex situations where multiple tasks are executed or the work environment changes, it is possible to quickly respond to various changes and reduce the time required to complete all tasks.

[0099] [Modifications] Various examples of the present disclosure have been described above in detail. However, the technical matters of the present disclosure are not limited to the above examples. Various modifications are possible to the technical matters of the present disclosure without departing from the gist thereof.

[0100] The resource manager does not need to share the shared resource among the multiple tasks. The robot control system according to this modification includes a memory unit, a tree manager, a resource manager, and a task controller. The memory unit stores a behavior tree including an upper parallel node, multiple tasks that are parallel to the parallel node and located in a lower layer than the parallel node, using the shared resource including the robot, and a lower parallel node located in a lower layer than the parallel node. The multiple tasks include multiple first tasks located in a lower layer than the lower parallel node, and multiple second tasks that are parallel to the lower parallel node and the multiple first tasks and located in a lower layer than the upper parallel node. In each cycle, the tree manager sequentially calls the multiple tasks from the upper parallel node based on the behavior tree in accordance with the order in which the multiple tasks are arranged. If the called task can use the shared resource, the resource manager allocates the shared resource to the called task so that the task can be executed. The task controller causes the robot to execute the task to which the shared resource is allocated.

[0101] A computer system having functions corresponding to the memory unit 11, the tree manager 12, and the resource manager 13 but not the task control unit 14 may be provided as a resource management system according to the present disclosure. That is, the resource management system includes a memory unit, a tree manager, and a resource manager. The memory unit stores a behavior tree including a parallel node and a plurality of tasks that are parallel to the parallel node, are located at a lower layer than the parallel node, and use a shared resource including a robot. In each cycle, the tree manager sequentially calls the plurality of tasks from the parallel node based on the behavior tree in accordance with the order in which the plurality of tasks are arranged. If the called task can use the shared resource, the resource manager allocates the shared resource to the called task so that the task can be executed. In a cycle after one of the plurality of tasks has completed execution using the shared resource, the resource manager allocates the shared resource to another task among the plurality of tasks without allocating the shared resource to the one task, even if the one task can use the shared resource.

[0102] The tasks using the shared resource may include a priority task, which is a task that can be executed using the common resource without yielding the common resource to other tasks if the common resource is available for use. In this variation, the resource manager allocates the common resource to the priority task if the priority task can use the common resource again in a cycle after the priority task has completed execution using the common resource.

[0103] In the above example, after one task has completed execution, the tree management unit 12 positions the one task behind the other tasks while maintaining the parallel state for the parallel nodes. The robot control system may execute control to allow one task to yield a shared resource to another task without executing such task movement.

[0104] The robot control system 1 may execute control for a task to yield a shared resource to another task without using resource usage information.

[0105] The resource usage information may be stored in the storage unit without being associated with a parallel node. The data structure of the resource usage information is not limited to the above example and may be designed in various ways. For example, the data structure of the resource usage information may be designed in a format in which resource management information and task management information are integrated into a single data table.

[0106] In the above example, the robot control system 1 processes one shared resource. However, the robot control system may also realize sharing of one or more shared resources among multiple tasks corresponding to the shared resources.

[0107] The hardware configuration of the system is not limited to a configuration in which each functional module is realized by executing a program. For example, at least some of the functional modules may be configured by logic circuits specialized for the functions, or may be configured by an ASIC (Application Specific Integrated Circuit) that integrates the logic circuits.

[0108] The processing steps of the method executed by at least one processor are not limited to the above examples. For example, some of the steps or processes described above may be omitted, or the steps may be executed in a different order. Furthermore, any two or more of the steps described above may be combined, or some of the steps may be modified or deleted. Alternatively, other steps may be executed in addition to the steps described above.

[0109] When comparing the magnitude of two numbers within a computer system or computer, either of the two criteria "greater than or equal to" and "greater than" can be used, or either of the two criteria "less than or equal to" and "under".

[0110] [Additional Notes] As can be seen from the various examples above, the present disclosure includes the following aspects.

[0111] (Supplementary Note 1) A robot control system comprising: a storage unit that stores a behavior tree including a parallel node and a plurality of tasks that are located in a lower layer than the parallel node in a state parallel to each other with respect to the parallel node and that use a shared resource including a robot; a tree management unit that, in each cycle, sequentially calls the plurality of tasks from the parallel node based on the behavior tree in accordance with the order in which the plurality of tasks are arranged; a resource management unit that allocates the common resource to the called task so that the called task can execute the called task if the called task can use the common resource; and a task control unit that causes the robot to execute the task to which the common resource is allocated, wherein in a cycle after one of the plurality of tasks has completed execution using the common resource, the resource management unit does not allocate the common resource to the one task but allocates the common resource to another task of the plurality of tasks, even if the one task can use the common resource. According to Supplementary Note 1, after one task has been allocated the common resource and completed execution of the one task, the common resource is allocated to another task and the other task is executed. This mechanism avoids situations where only certain tasks have the opportunity to use a common resource, and provides that opportunity to other tasks, thereby enabling individual tasks to be executed while more reliably avoiding resource starvation.

[0112] (Supplementary Note 2) The robot control system according to Supplementary Note 1, wherein the storage unit further stores, for each of the plurality of tasks, resource usage information indicating a usage status of the shared resource by the task, and the resource management unit determines whether or not it is possible to allocate the shared resource to the one task based on the resource usage information of the one task. According to Supplementary Note 2, since the usage status of the shared resource for each target task is recorded and referenced, it is possible to appropriately manage the timing of providing other tasks with an opportunity to use the shared resource.

[0113] (Supplementary Note 3) The robot control system according to Supplementary Note 2, wherein the resource management unit records a standby state in the storage unit as resource usage information for at least one of the plurality of tasks, indicating that the common resource will be handed over to another task, when the at least one task can use the common resource again in the cycle after the at least one task among the plurality of tasks has completed execution using the shared resource, and does not allocate the common resource to the at least one task whose resource usage information indicates the standby state. According to Supplementary Note 3, a standby state is recorded as resource usage information for a task that has completed execution, and the shared resource is not allocated to the task. By explicitly recording the standby state as resource usage information in this way, it is possible to clearly manage which task will handed over the shared resource to another task. Furthermore, it is possible to simplify the process of determining whether to handed over the shared resource to another task.

[0114] (Supplementary Note 4) The robot control system according to Supplementary Note 3, wherein the resource management unit initializes the resource usage information for each of the plurality of tasks that use the shared resource when the resource usage information for each of the plurality of tasks is in the standby state. According to Supplementary Note 4, when the resource usage information for each of the plurality of tasks located in a layer lower than the parallel node is in the standby state, that is, when all of the plurality of tasks have completed execution, the resource usage information is initialized. Since it is sufficient to refer to the standby state of the task that requires the shared resource, and there is no need to refer to all tasks in the behavior tree, the resource usage information can be initialized more efficiently. Furthermore, the use and execution of the common resource can be resumed for each individual task.

[0115] (Supplementary Note 5) The robot control system according to any one of Supplements 2 to 4, wherein the individual cycles include an (i-1)th cycle and an i-th cycle, and the resource management unit: in the (i-1)th cycle, if the one task can use the shared resource, records an occupancy status indicating that the one task occupies the common resource in the storage unit as resource usage information for the one task, and allocates the common resource to the one task; and if execution of the one task is not completed in the (i-1)th cycle, records the occupancy status again as resource usage information for the one task in the i-th cycle, and re-allocates the common resource to the one task. According to Supplementary Note 5, the shared resource continues to be allocated to the task until execution of the task to which the shared resource is allocated is completed, thereby more reliably completing the task. As a result, multiple tasks using the shared resource can be completed one by one in order.

[0116] (Supplementary Note 6) The robot control system according to any one of Supplementary Notes 1 to 5, wherein the behavior tree includes a lower parallel node located in a lower layer than the parallel node, and the plurality of tasks include: a plurality of first tasks located in a lower layer than the lower parallel node; and a plurality of second tasks located in a lower layer than the parallel node, in parallel with the lower parallel node and the plurality of first tasks relative to the parallel node; and the resource management unit sequentially allocates the shared resources to the plurality of tasks according to the order in which the plurality of tasks are arranged so that the plurality of tasks are executed in order. According to Supplementary Note 6, a behavior tree including a plurality of hierarchical parallel nodes can increase the degree of freedom in designing a group of tasks (a series of operations) executed using a shared resource. In addition, even when such a complex behavior tree is used, a situation in which an opportunity to use a shared resource is given only to a specific task is avoided, and the opportunity is provided to other tasks as well. Therefore, even when performing complex operations, individual tasks can be executed while more reliably avoiding resource starvation.

[0117] (Supplementary Note 7) The robot control system according to any one of Supplementary Notes 1 to 6, wherein the plurality of tasks include a priority task, and the resource management unit allocates the common resource to the priority task if the priority task can use the common resource again in the cycle after the priority task has completed execution using the shared resource. According to Supplementary Note 7, even in a case where a task (normal task) that yields the common resource to another task after completing execution and a task (priority task) that can use the common resource again after completing execution coexist, each task can be executed while more reliably avoiding resource starvation. For example, if the priority task does not use the common resource again, i.e., if there is no need to execute the priority task, each normal task can be executed while more reliably avoiding resource starvation.

[0118] (Supplementary Note 8) The robot control system according to any one of Supplements 1 to 7, wherein the tree management unit, after the one task has completed execution, positions the one task after the other tasks while maintaining the parallel state of the tasks relative to the parallel node. According to Supplementary Note 8, a task that has completed execution and is no longer allocated a shared resource is moved behind other tasks that will soon be allocated the shared resource. This mechanism allows tasks that use the shared resource to be called relatively quickly, thereby enabling various tasks managed by a behavior tree to be completed in a short time overall. In addition, calling a task that uses the shared resource relatively quickly prevents the shared resource from being usurped, allowing multiple tasks that use the shared resource to be completed more reliably. When a task that has completed execution (a preceding task) needs to be executed again due to a change in the environment in the real workspace, if a task (a subsequent task) that is positioned after the preceding task in the order of execution is already occupying the shared resource, the preceding task may usurp the shared resource from the subsequent task. If a shared resource is seized in this way, the subsequent task may be unintentionally interrupted, potentially causing the robot executing the subsequent task to behave unexpectedly. By moving a completed task to the back as described above, tasks that use the shared resource are called first, thereby reducing the possibility of the shared resource being seized. Therefore, tasks that have started using the shared resource can be completed more reliably. Furthermore, because tasks that have completed execution and are no longer assigned a shared resource are moved in the behavior tree as described above, the behavior tree more clearly represents which tasks are assigned the shared resource. By viewing the behavior tree, a user can easily or intuitively understand the situation in which the shared resource is allocated (i.e., the relationship between the shared resource and the task). Therefore, the user can appropriately perform the necessary operations related to task execution based on the easy-to-understand behavior tree. This further ensures error-free operation.

[0119] (Supplementary Note 9) The robot control system according to any one of Supplementary Notes 2 to 5, wherein the storage unit stores the resource usage information in association with the parallel node, and the resource management unit, for each of the plurality of tasks, references the resource usage information associated with the parallel node when the task is called. According to Supplementary Note 9, resource usage information for each task located in a layer lower than a parallel node is managed in association with the parallel node. With this mechanism, when referencing resource usage information for a certain task, it is sufficient to trace the behavior tree to the lowest-level parallel node to which the task belongs. Since the search for referencing resource usage information is limited to a local path, the efficiency of the process of referencing resource usage information can be improved. Ultimately, it becomes possible to complete various tasks managed by a behavior tree in a short time overall.

[0120] (Supplementary Note 10) A robot control system comprising: a storage unit that stores a behavior tree including an upper parallel node, a plurality of tasks that are parallel to the upper parallel node and located in a lower layer than the upper parallel node, and use a common resource including a robot, and a lower parallel node that is located in a lower layer than the upper parallel node, wherein the plurality of tasks include a plurality of first tasks that are located in a lower layer than the lower parallel node, and a plurality of second tasks that are parallel to the lower parallel node and the plurality of first tasks and are located in a lower layer than the upper parallel node with respect to the upper parallel node; a tree management unit that calls the plurality of tasks from the upper parallel node based on the behavior tree in each cycle in order of arrangement of the plurality of tasks; a resource management unit that allocates the common resource to the called task when the called task can use the common resource so that the task can be executed; and a task control unit that causes the robot to execute the task to which the common resource is allocated. According to Supplementary Note 10, a behavior tree including a plurality of hierarchical parallel nodes can increase the degree of freedom in designing a group of tasks (a series of operations) executed using a common resource.

[0121] (Supplementary Note 11) A resource management system comprising: a storage unit that stores a behavior tree including a parallel node and a plurality of tasks that are located in a lower layer than the parallel node in a state parallel to each other with respect to the parallel node and that use a shared resource including a robot; a tree management unit that, in each cycle, sequentially calls the plurality of tasks from the parallel node based on the behavior tree in accordance with the order in which the plurality of tasks are arranged; and a resource management unit that allocates the common resource to the called task so that the called task can be executed if the called task can use the common resource, wherein in the cycle after one of the plurality of tasks has completed execution using the common resource, the resource management unit does not allocate the common resource to the one task but allocates the common resource to another task of the plurality of tasks even if the one task can use the common resource. According to Supplementary Note 11, after a common resource is allocated to one task and the one task completes execution, the common resource is allocated to the other task. This mechanism avoids situations where only certain tasks have the opportunity to use a common resource, and provides that opportunity to other tasks, thereby enabling individual tasks to be executed while more reliably avoiding resource starvation.

[0122] (Supplementary Note 12) A robot control method executed by a robot control system having at least one processor, comprising: a step of storing in a storage unit a behavior tree including a parallel node and a plurality of tasks that are parallel to the parallel node and located at a lower layer than the parallel node, and that use a common resource including a robot; a step of sequentially calling the plurality of tasks from the parallel node based on the behavior tree in each cycle in accordance with the order in which the plurality of tasks are arranged, when the called task can use the common resource, a step of allocating the common resource to the called task so that the called task can be executed; and a step of having the robot execute the task to which the common resource has been allocated, wherein in the step of allocating the common resource, in a cycle after one of the plurality of tasks has completed execution using the common resource, the common resource is not allocated to the one task, and the common resource is allocated to another task of the plurality of tasks, even if the one task can use the common resource. According to Supplementary Note 12, after a shared resource is allocated to one task and the execution of that task is completed, the shared resource is allocated to another task and the other task is executed. This mechanism avoids a situation where only a specific task is given the opportunity to use the shared resource, and provides that opportunity to other tasks as well. Therefore, individual tasks can be executed while more reliably avoiding resource starvation.

[0123] (Supplementary Note 13) A robot control program that causes a computer to execute the following steps: storing in a storage unit a behavior tree that includes a parallel node and a plurality of tasks that are located in a lower layer than the parallel node in a state parallel to the parallel node and that use a shared resource including a robot; in each cycle, sequentially calling the plurality of tasks from the parallel node based on the behavior tree in accordance with the order in which the plurality of tasks are arranged; allocating the common resource to the called task so that the called task can execute the task if it can use the common resource; and having the robot execute the task to which the common resource has been allocated; wherein in the allocating of the common resource, in a cycle after one of the plurality of tasks has completed execution using the common resource, the common resource is not allocated to the one task, but the common resource is allocated to another task among the plurality of tasks, even if the one task can use the common resource. According to Supplementary Note 13, after a common resource is allocated to one task and the one task has completed execution, the common resource is allocated to another task and the other task is executed. This mechanism avoids situations where only certain tasks have the opportunity to use a common resource, and provides that opportunity to other tasks, thereby enabling individual tasks to be executed while more reliably avoiding resource starvation.

[0124] 1... robot control system, 11... storage unit, 12... tree management unit, 13... resource management unit, 14... task control unit, 80... robot, 90... work, 200... behavior tree, 202, 212, 215, 232... parallel nodes, 300... resource usage information.

Claims

1. A robot control system comprising: a memory unit that stores a behavior tree including parallel nodes and multiple tasks that are parallel to the parallel nodes and located at a lower layer than the parallel nodes, and that use common resources including a robot; a tree management unit that, in each cycle, sequentially calls the multiple tasks from the parallel nodes based on the behavior tree in the order in which the multiple tasks are arranged; a resource management unit that allocates the common resource to the called task so that the called task can execute the called task if the called task can use the common resource; and a task control unit that causes the robot to execute the task to which the common resource has been allocated, wherein in a cycle after one of the multiple tasks has completed execution using the common resource, the resource management unit does not allocate the common resource to the one task, but allocates the common resource to another task of the multiple tasks, even if the one task can use the common resource.

2. The robot control system of claim 1, wherein the memory unit further stores, for each of the plurality of tasks, resource usage information indicating the usage status of the common resource by the task, and the resource management unit determines whether or not it is possible to allocate the common resource to the one task based on the resource usage information of the one task.

3. The robot control system of claim 2, wherein the resource management unit, in the cycle after at least one of the plurality of tasks has completed execution using the common resource, when the at least one task is able to use the common resource again, records in the memory unit a standby state indicating that the common resource will be handed over to another task as resource usage information for the at least one task, and does not allocate the common resource to the at least one task whose resource usage information indicates the standby state.

4. The robot control system according to claim 3, wherein the resource management unit initializes the resource usage information of each of the plurality of tasks that use the common resource when the resource usage information of each of the plurality of tasks is in the standby state.

5. A robot control system according to any one of claims 2 to 4, wherein the individual cycles include an (i-1)th cycle and an i-th cycle, and wherein the resource management unit, in the (i-1)th cycle, if the one task is able to use the common resource, records an occupancy status indicating that the one task occupies the common resource in the memory unit as resource usage information of the one task, and allocates the common resource to the one task, and if execution of the one task is not completed in the (i-1)th cycle, again records the occupancy status as resource usage information of the one task in the i-th cycle, and reallocates the common resource to the one task.

6. A robot control system according to any one of claims 1 to 4, wherein the behavior tree includes a lower parallel node located in a layer lower than the parallel node, and the plurality of tasks include a plurality of first tasks located in a layer lower than the lower parallel node, and a plurality of second tasks located in a layer lower than the parallel node and in parallel with the lower parallel node and the plurality of first tasks with respect to the parallel node, and the resource management unit sequentially allocates the common resources to the plurality of tasks in accordance with the order in which the plurality of tasks are arranged so that the plurality of tasks are executed in sequence.

7. A robot control system according to any one of claims 1 to 4, wherein the plurality of tasks includes a priority task, and the resource management unit allocates the common resource to the priority task if the priority task can use the common resource again in the cycle after the priority task has completed execution using the common resource.

8. A robot control system according to any one of claims 1 to 4, wherein the tree management unit, after completing execution of the one task, positions the one task after the other tasks while maintaining a mutually parallel state with respect to the parallel nodes.

9. A robot control system according to any one of claims 2 to 4, wherein the storage unit stores the resource usage information in association with the parallel node, and the resource management unit, for each of the plurality of tasks, refers to the resource usage information associated with the parallel node when the task is called.

10. A robot control system comprising: a memory unit that stores a behavior tree including an upper parallel node, a plurality of tasks that are parallel to the upper parallel node but located in a lower layer than the upper parallel node and use a common resource including a robot, and a lower parallel node that is located in a lower layer than the upper parallel node, wherein the plurality of tasks include a plurality of first tasks that are located in a lower layer than the lower parallel node and a plurality of second tasks that are parallel to the lower parallel node and the plurality of first tasks but located in a lower layer than the upper parallel node with respect to the upper parallel node; a tree management unit that calls the plurality of tasks from the upper parallel node based on the behavior tree in each cycle in order of arrangement of the plurality of tasks; a resource management unit that allocates the common resource to the called task so that the task can be executed if the called task can use the common resource; and a task control unit that causes the robot to execute the task to which the common resource is allocated.

11. A resource management system comprising: a memory unit that stores a behavior tree including parallel nodes and multiple tasks that are parallel to the parallel nodes and located at a lower layer than the parallel nodes, and that use common resources including robots; a tree management unit that, in each cycle, sequentially calls the multiple tasks from the parallel nodes based on the behavior tree in accordance with the order in which the multiple tasks are arranged; and a resource management unit that allocates the common resource to the called task so that the task can be executed if the called task can use the common resource, wherein in a cycle after one of the multiple tasks has completed execution using the common resource, the resource management unit does not allocate the common resource to the one task, but allocates the common resource to another task of the multiple tasks, even if the one task can use the common resource.

12. A robot control method executed by a robot control system having at least one processor, comprising: a step of storing in a storage unit a behavior tree including a parallel node and a plurality of tasks that are parallel to the parallel node and located at a lower layer than the parallel node, and that use a common resource including a robot; a step of sequentially calling the plurality of tasks from the parallel node based on the behavior tree in each cycle in accordance with the order in which the plurality of tasks are arranged; a step of allocating the common resource to the called task so that the called task can execute the called task if the called task can use the common resource; and a step of having the robot execute the task to which the common resource has been allocated, wherein in the step of allocating the common resource, in a cycle after one of the plurality of tasks has completed execution using the common resource, the common resource is not allocated to the one task, and the common resource is allocated to another task of the plurality of tasks, even if the one task can use the common resource.

13. A robot control program that causes a computer to execute the steps of: storing in a storage unit a behavior tree that includes parallel nodes and multiple tasks that are parallel to the parallel nodes and located at a lower layer than the parallel nodes, and that use a common resource including a robot; in each cycle, sequentially calling the multiple tasks from the parallel nodes based on the behavior tree in accordance with the order in which the multiple tasks are arranged; allocating the common resource to the called task so that the called task can execute the task if it can use the common resource; and having the robot execute the task to which the common resource has been allocated, wherein in the step of allocating the common resource, in a cycle after one of the multiple tasks has completed execution using the common resource, even if the one task can use the common resource, the common resource is not allocated to the one task, and the common resource is allocated to another task of the multiple tasks.

Citation Information

Patent Citations

  • Two-stage adaptive behavior planning method and system for autonomous robot

    CN113189986A

  • Scheduling device and scheduling method

    JP1996212264A

  • Data conversion device, data conversion method, and data conversion program

    JP2015095089A

  • Causing a robot to execute a mission using a behavior tree and a leaf node library

    US20220035339A1

  • Robot control system, robot control method, and robot control program

    WO2024180685A1