This application is based on and claims the benefit of priority of the prior Japanese Patent Application No. 2022-127476, filed on Aug. 9, 2022, the entire contents of which are incorporated herein by reference.
The present disclosure relates to a collision condition application device, a collision condition application method, a collision condition application program, and a path generation device.
A problem of searching for paths in which a plurality of agents having a size move from respective start points to respective target points without colliding with each other in one environment is referred to as multi-agent path finding (MAPF). In a general MAPF problem, the movement of each agent is determined under discrete time on a grid graph or road map representing a path along which the agent can move within the environment.
As a technology related to the MAPF problem, for example, an operation management control device that plans an operation and a path for efficiently moving a plurality of unmanned vehicles to a destination node in consideration of conflict of traveling paths and adjacent nodes is proposed (Japanese Patent Application Laid-Open (JP-A) No. H10-312217). In this device, the movement path and the node reservation sequence of each unmanned vehicle, the position and the conveyance destination of the conveyance object, the current position and the movement direction of each unmanned vehicle, the coordinates of each node on the traveling path, the connection relationship and the cost, and the Petri net model data are stored in a memory. This device determines an optimal travel path and an operation order of the unmanned vehicle by using the information stored in the memory.
For example, a flight plan system that makes an operation plan for a plurality of moving bodies traveling in a traveling path network including a plurality of traveling paths is proposed (Japanese Patent Application Laid-Open (JP-A) No. 2020-149370). This system generates a plurality of travel timing plans in which timings at which the plurality of moving bodies travel on a traveling path are designated such that a conflict between the moving bodies does not occur on the traveling path based on position information of the plurality of moving bodies, traveling path structure information representing a structure of the traveling path network, and a plurality of path plans in which an order of one or more designated areas through which the plurality of moving bodies pass is designated for the plurality of designated areas in the traveling path network.
For a single agent, a method referred to as safe interval path planning (SIPP) in which a path search in a case in which there is a moving obstacle is performed under continuous time is proposed (Mike Phillips and Maxim Likhachev, “SIPP: Safe Interval PathPlanning for Dynamic Environments”, Computer Science 2011 IEEE International Conference on Robotics and Automation, 9 May 2011).
However, in a case in which the movement of each agent is determined under discrete time, the time is divided into turns common to all the agents, and the action of the agent is determined for each turn. As a result, there is a problem that there is a case in which the limitation for avoiding a collision between the agents increases, and the path search becomes difficult.
It is also conceivable to extend the MAPF problem in the case of continuous time by combining the MAPF problem in discrete time with a method of dealing with continuous time such as SIPP. However, in a case in which the SIPP is applied to a road map that is a non-grid graph, determining the collision between the agents becomes a bottleneck in calculation. This is because, in order to apply the SIPP, it is necessary to grasp in advance when and where a collision with all moving obstacles on the road map may occur. Therefore, in the case of the multi-agent, the paths of the agents are determined one by one in some priority order. In this case, when the number of agents increases, enormous calculation is required, and thus it becomes difficult to generate a path of each agent, which is a solution to the MAPF problem, in a realistic time.
The disclosure has been made in view of the above points, and an object thereof is to enable path generation in continuous time of a multi-agent on a road map in a short period of time.
In order to achieve the object, a collision condition application device according to the disclosure includes: an extraction unit that, in a case in which a plurality of agents move on a road map including a plurality of vertices and a plurality of edges connecting the plurality of vertices, extracts a first pair of vertices and edges for which there is a possibility of agents being present at the vertices or agents moving on the edges colliding with each other and a second pair of one edge and another edge for which there is a possibility of the agents colliding with each other; a calculation unit that calculates, with respect to a difference between a time at which one agent is present at a vertex of each of respective first pairs of vertices and a time at which another agent starts to move from an end point of an edge and a difference between a time at which one agent starts to move from an end point of the one edge of each of respective second pairs and a time at which another agent starts to move from an end point of the other edge, a time interval in which a collision between the one agent and the other agent occurs; and an application unit that applies, to the road map, information obtained by associating identification information of the vertex and the edge included in the first pair with the time interval and information obtained by associating identification information of each of the two edges included in the second pair with the time interval, as a condition in which a collision between the agents occurs.
The extraction unit may extract the first pair and the second pair from the plurality of vertices and the plurality of edges included in the road map by using an algorithm that lists pairs of points of which inter-point distances are a certain distance or shorter in a given set of points, an algorithm that lists points present in a given area in a given set of points, and an algorithm that lists pairs of line segments intersecting with each other in a given set of line segments.
In a case in which an agent is assumed to be a circle having a diameter of a predetermined value, the extraction unit may extract, as the first pair, a pair of a vertex and an edge that satisfies at least one of a case in which a distance between at least one of end points of the edge and the vertex is less than the predetermined value or a case in which a length of a perpendicular line drawn from the vertex to the edge is less than the predetermined value, from the plurality of vertices and the plurality of edges included in the road map; and extract, as the second pair, a pair of edges that satisfies at least one of a case in which a distance between at least one of end points of one edge and another edge is less than the predetermined value or a case in which the edges intersect with each other, from the plurality of vertices and the plurality of edges included in the road map.
In order to achieve the object, a path generation device according to the disclosure includes: above-the collision condition application device; and a generation unit that generates a path of each of a plurality of agents moving on the road map to which a condition in which the plurality of agents collide with each other is applied by the collision condition application device, in which a time at which an agent is present at a vertex included in the path and a time at which the agent starts to move from an end point of an edge are not included in a time interval of the condition.
In a case in which paths of the plurality of agents are sequentially generated one by one, the generation unit may generate a path of a first agent and then generate a path so that, in a case in which a path of a second agent is generated, at time at which a difference between a time at which the agent is present at a vertex included in the path generated for the first agent and time at which the agent starts to move from an end point of the edge is not included in the time interval, the second agent is present at the vertex or starts to move from the end point of the edge.
In order to achieve the object, a collision condition application method according to the disclosure includes: in a case in which a plurality of agents move on a road map including a plurality of vertices and a plurality of edges connecting the plurality of vertices, extracting a first pair of vertices and edges for which there is a possibility of agents being present at the vertices or agents moving on the edges colliding with each other and a second pair of one edge and another edge for which the there is a possibility of agents are colliding with each other, by an extraction unit; calculating, with respect to a difference between a time at which one agent is present at a vertex of each of respective first pairs of vertices and a time at which another agent starts to move from an end point of an edge and a difference between a time at which one agent starts to move from an end point of the one edge of each of respective second pairs and a time at which another agent starts to move from an end point of the other edge, a time interval in which a collision between the one agent and the other agent occurs, by a calculation unit; and applying, to the road map, information obtained by associating identification information of the vertices and the edges included in the first pair with the time interval and information obtained by associating identification information of each of two edges included in the second pair with the time interval, as a condition in which a collision between agents occurs, by an application unit.
In order to achieve the object, a collision condition application program according to the disclosure causes a computer to function as: an extraction unit that, in a case in which a plurality of agents move on a road map including a plurality of vertices and a plurality of edges connecting the plurality of vertices, extracts a first pair of vertices and edges for which there is a possibility of agents being present at the vertices or agents moving on the edges colliding with each other and a second pair of one edge and another edge for which there is a possibility of the agents colliding with each other; a calculation unit that calculates, with respect to a difference between a time at which one agent is present at a vertex of each of respective first pairs of vertices and a time at which another agent starts to move from an end point of an edge and a difference between a time at which one agent starts to move from an end point of the one edge of each of respective second pairs and a time at which another agent starts to move from an end point of the other edge, a time interval in which a collision between the one agent and the other agent occurs; and an application unit that applies, to the road map, information obtained by associating identification information of the vertices and the edges included in the first pair with the time interval, and information obtained by associating identification information of each of two edges included in the second pair with the time interval, as a condition in which a collision between agents occurs.
According to the collision condition application device, the method, the program, and the path generation device according to the disclosure, it is possible to generate a path in continuous time of a multi-agent on a road map in a short period of time.
Hereinafter, an example of an embodiment of the disclosure is described with reference to the drawings. In each drawing, the same or equivalent components and portions are denoted by the same reference numerals. Dimensions and ratios of the drawings are exaggerated for convenience of description and may be different from actual ratios.
The storage device 16 stores a path generation program for performing a collision condition application process and a path generation process described below. The CPU 12 is a central processing unit, and executes various programs and controls the respective components. That is, the CPU 12 reads the program from the storage device 16 and executes the program using the memory 14 as a work area. The CPU 12 performs control of the respective components and various types of arithmetic processing according to the program stored in the storage device 16.
The memory 14 includes a random access memory (RAM) and temporarily stores the program and data as a work area. The storage device 16 includes a read only memory (ROM), a hard disk drive (HDD), a solid state drive (SSD), and the like and stores various programs including an operating system and various kinds of data.
The input device 18 is a device for performing various inputs, such as a keyboard and a mouse. The output device 20 is a device for outputting various kinds of information, such as a display and a printer. A touch panel display may be employed as the output device 20 to function as the input device 18. The storage medium reading device 22, for example, reads data stored in various storage media such as a compact disc (CD)-ROM, a digital versatile disc (DVD)-ROM, a Blu-ray disc, and a universal serial bus (USB) memory, and writes data to the storage medium. The communication I/F 24 is an interface for communicating with other devices and, for example, standards such as Ethernet (registered trademark), FDDI, and Wi-Fi (registered trademark) are used.
Next, functional components of the path generation device 10 according to the present embodiment are described.
The collision condition application unit 30 acquires a road map 40.
The collision condition application unit 30 applies a collision condition (details are described below) to the acquired road map 40 and stores the road map 40 as a road map with collision condition 50. Hereinafter, the extraction unit 32, the calculation unit 34, and the application unit 36, which are the functional components of the collision condition application unit 30 that applies the collision condition to the road map 40, each are described.
In a case in which a plurality of agents moves on the road map 40, the extraction unit 32 extracts a portion where it is likely that agents existing at the vertices or agents moving on the edges collide with each other. The extraction unit 32 extracts a pair of the vertex and the edge and a pair of the edges as illustrated in
In the vertex-edge pair of
Specifically, the extraction unit 32 extracts the vertex-edge pair and the edge-edge pair from among the plurality of vertices and the plurality of edges included in the road map 40 by using the following algorithm.
For the above (1), Fixed-Radius Near Neighbors Algorithm or the like is known. This algorithm divides the points into buckets on a grid and calculates distances for pairs of points that are adjacent or in the same bucket. A time calculation amount of this algorithm is 0 (V+M). Here, V is the total number of points, and M is the number of pairs found.
For the above (2), Partition tree or the like is known. This algorithm facilitates area search by successfully recursively dividing a set of points in advance. As the algorithm of the above (2), there are various algorithms such as an algorithm in which pre-calculation is heavy but one query is light.
For the above (3), Bentley-Ottmann Algorithm or the like is known. This algorithm manages a line segment intersecting with a scanning line while performing planar scanning, and detects intersection. A time calculation amount of this algorithm is 0 ((E+M) log E). Here, E is the total number of line segments, and M is the number of pairs found.
More specifically, under the assumption that the road map 40 is on a two-dimensional plane, all the edges are line segments, and all the agents have circular shapes having the same radius r, the extraction unit 32 extracts the vertex-edge pair and the edge-edge pair by the following method. In the road map 40, a curve can be approximated by a line segment if many vertices are taken. A shape of the agent may be approximated by a larger circle to make the collision condition strict. Therefore, it is considered that the above assumption is not a practical problem.
The extraction unit 32 extracts, as the vertex-edge pair, a pair of a vertex and an edge that satisfies at least one of (i) a case in which a distance between at least one of end points of the edge and the vertex is less than 2r and (ii) a case in which a length of a perpendicular line drawn from the vertex to the edge is less than 2r. The pairs satisfying (i) and (ii) can be efficiently extracted by applying the algorithms of (1) and (2), respectively.
The extraction unit 32 extracts, as the edge-edge pair, a pair of edges that satisfies at least one of (i) a case in which a distance between at least one of end points of one edge and the other edge is less than 2r and (ii) a case in which the edges intersect with each other. The pairs satisfying (i) and (ii) can be efficiently extracted by applying the algorithms of (2) and (3), respectively.
The calculation unit 34 calculates a temporal condition under which a collision occurs between the agents existing at the vertex or agents moving on the edges, for each of the vertex-edge pair and the edge-edge pair extracted by the extraction unit 32.
Specifically, the calculation unit 34 calculates a time interval in which a collision between one agent and another agent occurs with respect to a difference between time at which one agent is present at the vertex of the vertex-edge pair and time at which another agent starts moving from an end point of the edge. The calculation unit 34 calculates a time interval in which a collision between one agent and another agent occurs with respect to a difference between time at which one agent starts moving from an end point of one edge of the edge-edge pair and time at which another agent starts moving from an end point of the other edge.
For example, as illustrated in
In consideration of such a situation, the calculation unit 34 calculates a time interval from a to b in a case in which both agents collide with each other when the time difference between time t1 and time t2 (t1−t2) is within the range of the time interval from a to b. The calculation unit 34 calculates the time interval from a to b by applying, for example, the method of Collision Detection for Agents in Multi-Agent Pathfinding (Reference Literature 1).
The application unit 36 generates, as the collision condition information, a tuple including the vertex ID of the vertex and the edge ID of the edge included in the vertex-edge pair, and the time interval calculated by the calculation unit 34 for the vertex-edge pair. Similarly, the application unit 36 generates, as the collision condition information, a tuple including the respective edge IDs of the two edges included in the edge-edge pair and the time interval calculated by the calculation unit 34 for the edge-edge pair. Then, the application unit 36 applies the generated set of tuples to the road map 40 and stores the set of tuples in a predetermined storage area of the path generation device 10 as the road map with collision condition 50.
The generation unit 38 generates respective paths of the plurality of agents moving on the road map with collision condition 50. Specifically, the generation unit 38 generates a path in which time at which the agent is present at the vertex included in the path and time at which the agent starts to move from an end point of the edge are not included in the time interval of the collision condition. For example, as illustrated in
More specifically, in the case of sequentially generating paths of agents one by one, the generation unit 38 generates the path of the first agent and then generates the path of the second agent. The generation unit 38 generates a path of each agent, for example, by using the A* algorithm. In this case, the generation unit 38 searches for the shortest path in the case of reaching the target point from the start point through a certain vertex and selects a vertex V of which shortest arrival time is already determined and an edge coming from the vertex V. The generation unit 38 acquires the collision condition including the selected vertex V and the edge coming from the vertex V from the collision condition applied to the road map with collision condition 50. In a case in which the corresponding collision condition is present, the generation unit 38 acquires the departure time from the end point of the selected edge among the previously generated paths of other agents. The generation unit 38 adjusts the departure time from the vertex V with the time interval included in the acquired collision condition as a constraint and obtains a candidate for the arrival time to a vertex at the end of tracing the edge. The generation unit 38 continues this processing until the shortest arrival time to the target point is determined and generates a path by backwards tracing the optimum edge from the target point based on the search history.
For example, as illustrated in
The generation unit 38 may employ an algorithm for generating a path by sequentially selecting the next edge from the start point as an algorithm for generating a path of each agent. Also in this case, when the edge is selected, the departure time may be adjusted based on the collision condition.
Here, with reference to
As in the invention described in JP-A No. H10-312217, a path plan or the like using a Petri net model does not indicate a temporal condition at a collision portion, and a portion where even a slight collision occurs is prohibited from being used at the same time. In such a case, it is estimated that a collision is more likely to occur than in practice, and an increase in calculation cost of path generation or a deadlock as illustrated in
Meanwhile, in the present embodiment, by including the time interval in the collision condition, a part prohibited from being used at the same time in the portion where a collision is likely to occur can be set to the minimum necessary range as illustrated in
Next, an operation of the path generation device 10 according to the present embodiment is described.
First, the collision condition application process illustrated in
In step S10, the extraction unit 32 acquires the road map 40. Next, in step S12, in a case in which the plurality of agents moves on the road map 40, the extraction unit 32 extracts the vertex-edge pair and the edge-edge pair as portions where it is likely that agents existing at the vertices or agents moving on the edges collide with each other.
Next, in step S14, the calculation unit 34 calculates a time interval in which a collision between both agents occurs with respect to a difference between time at which one agent is present at the vertex of the vertex-edge pair and time at which another agent starts moving from an end point of the edge. The calculation unit 34 calculates a time interval in which a collision between both agents occurs with respect to a difference between time at which one agent starts moving from an end point of one edge of the edge-edge pair and time at which another agent starts moving from an end point of the other edge.
Next, in step S16, the application unit 36 generates, as the collision condition information, a tuple including the vertex ID of the vertex and the edge ID of the edge of the vertex-edge pair, and each of the two edge IDs of the edge-edge pair, and the calculated time interval. Then, the application unit 36 applies the generated set of tuples to the road map 40 and stores the set of tuples in a predetermined storage area of the path generation device 10 as the road map with collision condition 50, and the collision condition application process ends.
Next, the path generation process illustrated in
In step S30, the generation unit 38 sets 1 to the variable i for specifying the agent ID. Next, in a loop process of step S32, the shortest path in the case of reaching the target point from the start point of the agent Ai through a certain vertex is searched for by using the road map with collision condition 50. Specifically, in step S34, the generation unit 38 selects the vertex V of which the shortest arrival time is already determined and the edge coming from the vertex V.
Next, in step S36, the generation unit 38 acquires the collision condition including the selected vertex V and the edge coming from the vertex V from the collision condition applied to the road map with collision condition 50. The generation unit 38 acquires departure time t1 from the end point of the edge included in the acquired collision condition among the previously generated paths of other agents.
Next, in step S38, the generation unit 38 adjusts departure time t2 at which the agent Ai departs from the vertex V so that the difference from the acquired departure time t1 of another agent is out of the time interval included in the acquired collision condition, and obtains a candidate for the arrival time to the vertex at the end of tracing the edge. In a case in which adjustable time does not exist, the process returns to step S34, and the generation unit 38 reselects the vertex V and the edge coming from the vertex V. The generation unit 38 repeats the processes of steps S34 to S38 until the shortest arrival time to the target point is determined. In a case in which the shortest arrival time to the target point is determined, the loop process of step S32 ends, and the process proceeds to step S40. In step S40, the generation unit 38 generates a path by backwards tracing the optimum edge from the target point based on the search history.
Next, in step S42, the generation unit 38 determines whether i becomes N, which is the number of agents. In a case in which i=N, the process proceeds to step S46, and in a case in which i≠N, the process proceeds to step S44. In step S44, the generation unit 38 increments i by 1, and the process returns to step S32. In step S46, the generation unit 38 outputs the path of each agent generated in step S40, and the path generation process ends.
As described above, in the path generation device according to present the embodiment, in a case in which the plurality of agents moves on the road map, the collision condition application unit extracts the vertex-edge pair and the edge-edge pair in which agents are likely to collide with each other. The collision condition application unit calculates a time interval in which a collision between both agents occurs with respect to a difference between time at which one agent is present at the vertex of the vertex-edge pair and time at which another agent starts moving from an end point of the edge. The collision condition application unit calculates a time interval in which a collision between both agents occurs with respect to a difference between time at which one agent starts moving from an end point of one edge of the edge-edge pair and time at which another agent starts moving from an end point of the other edge. Then, the collision condition application unit applies a collision condition in which IDs of the vertices and the edges included in each pair are associated with the calculated time interval to the road map. As described above, a road map in which a collision condition including a time interval is applied to a portion where a collision is likely to occur is prepared in advance, so that a path in continuous time of a multi-agent on the road map can be generated in a short period of time.
It is possible to estimate a portion where a collision occurs to the minimum by including the time interval in the collision condition. Therefore, since a space of the solution (path) to be searched for increases, and the opportunity to find the solution increases, the success rate of path generation increases, and also the calculation cost for path generation can be reduced.
In the current situation, a method of generating a path by an algorithm that requires only collision determination such as continuous conflict based search (CCBS) by dividing an environment into grids, using a planning algorithm specialized for the grid, and using a road map made by a human hand or a road map obtained by some methods is considered. The former method is difficult to apply in a case in which the shape of the environment is difficult to express with a grid. Since an algorithm generally known as the latter method does not have a realistic guarantee of a time calculation amount, there is a case in which it takes time to generate a path.
By applying a collision condition including a time interval to the road map as in the present embodiment, a path can be obtained by using an algorithm having a small time cost such as prioritized safe interval path planning (PSIPP) for various road maps.
In the present embodiment, when the collision condition application unit extracts a portion where a collision is likely to occur, the vertex-edge pair and the edge-edge pair, which are the corresponding portions, can be efficiently extracted by using an existing algorithm.
Here, experimental results obtained by comparing a method of the present embodiment (hereinafter, referred to as “present method”) with a comparative method are described. In this experiment, the MAPF problem on a road map constructed by the well-known method probabilistic road map (PRM) on the environment having an obstacle was solved. CCBS, which is an existing method, and PSIPP using a road map to which a collision condition including a time interval is not applied were set as comparative methods.
The disclosure can be applied to calculation of safe paths of a large number of robots in a short period of time in a situation where the robots move for work such as transportation, watching, and cleaning of articles in a predetermined place such as a factory and a warehouse.
Although the configuration in which the path generation device includes the collision condition application unit is described in the above embodiment, the collision condition application device including the functional component of the collision condition application unit and the path generation device including the generation unit may be implemented by different devices. In this case, a road map with collision condition output from the collision condition application device may be used in a path generation device to which a method other than PSIPP is applied or may be used for purposes other than path generation.
In the above embodiment, the description has been given on the assumption that the sizes of all the agents are the same, but the sizes of the agents may be different from each other. In this case, the radius of the circumscribed circle of the agent having the largest size may be used as the radius r of the agent used at the time of extracting the vertex-edge pair and the edge-edge pair.
The speed of the agent may not be constant, and acceleration/deceleration may be performed under a certain determined speed limit and acceleration limit for each agent and each edge. In this case, comparison with the time interval included in the collision condition may be performed in consideration of the acceleration/deceleration of the agent.
The collision condition application process and the path generation process performed by the CPU reading software (program) in the above embodiment may be performed by various processors other than the CPU. Examples of the processor in this case include a programmable logic device (PLD) in which a circuit configuration can be changed after manufacturing a field-programmable gate array (FPGA) or the like, and a dedicated electric circuit that is a processor having a circuit configuration exclusively designed for performing specific processes such as an application specific integrated circuit (ASIC). The collision condition application process and the path generation process may be performed by one of these various processors or may be performed by a combination of two or more processors of the same type or different types (for example, a plurality of FPGAs and a combination of a CPU and an FPGA). More specifically, the hardware structure of these various processors is an electric circuit in which circuit elements such as semiconductor elements are combined.
In the above embodiment, the aspect in which the path generation program is stored (installed) in the storage device in advance is described, but the disclosure is not limited thereto. The program may be provided in a form of being stored in a storage medium such as a CD-ROM, a DVD-ROM, a Blu-ray disc, or a USB memory. The program may have a form of being downloaded from an external device via a network.
| Number | Date | Country | Kind |
|---|---|---|---|
| 2022-127476 | Aug 2022 | JP | national |