A method, apparatus, device and storage medium for path and area intersection detection
By dichotomous segmentation and rectangular division of the robot path, combined with intersection detection, the problem of low intersect detection efficiency between the robot path and the area is solved, and more efficient detection is achieved.
Patent Information
- Application Number
- CN202311524954.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-15
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2043-11-15
AI Technical Summary
In the prior art, the detection method for intersecting robot paths and regions is inefficient, and it is necessary to traverse each path point for comparison, resulting in slow detection speed.
The robot path is divided by dichotomy to obtain the sub-path, and the sub-path is divided rectangularly. The rectangular area and the sub-region to be tested are intersected and detected by the rectangular area, the number of path points in the intersecting sub-region is determined, and the intersecting sub-region is determined when the number is less than two, and the division is continued until the conditions are met.
The efficiency of path-to-region detection is improved, the number of traversals of path points is reduced, and the detection speed is improved.
Smart Images

Figure CN117506905B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of path detection, and in particular, to a method, device, equipment and storage medium for detecting the intersection of a path and a region. Background Art
[0002] With the development of technology, robots are widely used in various industries. Especially in some commercial scenarios, there may be multiple robots operating. When multiple robots are operating, there may be overlapping activity areas, and reasonable passage times need to be arranged for these areas so that each robot can pass through these areas in an orderly manner. Therefore, how to correctly detect which regions the paths of the robots intersect with is an important link to ensure the unobstructed movement of multiple robots.
[0003] The existing methods for detecting the intersection of a robot path and a region usually list all path points of the robot path using an exhaustive method and compare the coordinates of each path point with the region to be detected, and finally obtain the intersection regions and non-intersection regions. In this way, a large amount of resources need to be invested to exhaustively list the robot path, and each path point needs to be detected once, and the detection speed is relatively slow, resulting in a low overall detection efficiency. Summary of the Invention
[0004] The embodiments of the present application provide a method, device, equipment and storage medium for detecting the intersection of a path and a region, which can solve the problem of low detection efficiency of path-region intersection detection, improve the detection speed, and enhance the detection efficiency of path-region intersection detection.
[0005] In a first aspect, the embodiments of the present application provide a method for detecting the intersection of a path and a region, including:
[0006] Obtain a robot path and a region to be detected, and divide the region to be detected into multiple sub-regions to be detected;
[0007] Divide the robot path by the dichotomy method to obtain sub-paths;
[0008] Perform rectangular division on the sub-paths to obtain a rectangular region corresponding to each sub-path, and all path points of the corresponding sub-path are included in the rectangular region;
[0009] Perform intersection detection on each rectangular region and each sub-region to be detected to obtain intersection sub-regions and non-intersection sub-regions;
[0010] When the number of path points in the rectangular region corresponding to the intersection sub-region is less than two, determine the intersection sub-region as the sub-region to be detected that intersects with the robot path;
[0011] When the number of path points within the rectangular area corresponding to the intersecting sub-region is greater than two, continue to divide the sub-path by the dichotomy method until the number of path points within the rectangular area corresponding to the intersecting sub-region is less than two, and then determine the corresponding intersecting sub-region as the sub-region to be measured that intersects the robot path.
[0012] Further, the process of dividing the robot path by the dichotomy method to obtain sub-paths includes:
[0013] Perform rectangular partitioning on the robot path to obtain a first rectangular area, which contains all the path points of the robot path;
[0014] Perform intersection detection on the first rectangular area and each sub-region to be measured to obtain a first intersecting sub-region and a first non-intersecting sub-region;
[0015] When the number of path points within the first rectangular area corresponding to the first intersecting sub-region is greater than two, divide the robot path by the dichotomy method to obtain a first sub-path and a second sub-path.
[0016] Further, the process of performing rectangular partitioning on the sub-path to obtain a rectangular area corresponding to each sub-path, which contains all the path points of the corresponding sub-path, includes:
[0017] Perform rectangular partitioning on the first sub-path and the second sub-path respectively to obtain a second rectangular area and a third rectangular area. The second rectangular area contains all the path points of the first sub-path, and the third rectangular area contains all the path points of the second sub-path;
[0018] The process of performing intersection detection on each rectangular area and each sub-region to be measured to obtain an intersecting sub-region and a non-intersecting sub-region includes:
[0019] Perform intersection detection on the second rectangular area and each of the first intersecting sub-regions to obtain a second intersecting sub-region and a second non-intersecting sub-region;
[0020] Perform intersection detection on the third rectangular area and each of the first intersecting sub-regions to obtain a third intersecting sub-region and a third non-intersecting sub-region.
[0021] Further, after performing intersection detection on the second rectangular area and each of the first intersecting sub-regions to obtain a second intersecting sub-region and a second non-intersecting sub-region, it includes:
[0022] Judge whether the number of path points within the second rectangular area corresponding to the second intersecting sub-region is less than two;
[0023] When the number of path points in the second rectangular area corresponding to the second intersecting sub-area is less than two, determine the second intersecting sub-area as the sub-area to be measured that intersects the robot path;
[0024] When the number of path points in the second rectangular area corresponding to the second intersecting sub-area is greater than two, divide the first sub-path by the dichotomy method until the number of path points in the rectangular area corresponding to the corresponding intersecting sub-area is less than two, and determine the corresponding intersecting sub-area as the sub-area to be measured that intersects the robot path.
[0025] Further, the intersecting the third rectangular area with each of the first intersecting sub-areas to obtain a third intersecting sub-area and a third non-intersecting sub-area includes:
[0026] Judge whether the number of path points in the third rectangular area corresponding to the third intersecting sub-area is less than two;
[0027] When the number of path points in the third rectangular area corresponding to the third intersecting sub-area is less than two, determine the third intersecting sub-area as the sub-area to be measured that intersects the robot path;
[0028] When the number of path points in the third rectangular area corresponding to the third intersecting sub-area is greater than two, divide the second sub-path by the dichotomy method until the number of path points in the rectangular area corresponding to the corresponding intersecting sub-area is less than two, and determine the corresponding intersecting sub-area as the sub-area to be measured that intersects the robot path.
[0029] Further, the method further includes:
[0030] Integrate the sub-areas to be measured that intersect the robot path to obtain a set of intersecting sub-areas corresponding to each robot path;
[0031] Compare the sets of intersecting sub-areas corresponding to each robot path to determine the intersection sub-areas of the sets of intersecting sub-areas corresponding to each robot path and the sets of intersecting sub-areas of other robot paths.
[0032] Further, after comparing the sets of intersecting sub-areas corresponding to each robot path to determine the intersection sub-areas of the sets of intersecting sub-areas corresponding to each robot path and the sets of intersecting sub-areas of other robot paths, it includes:
[0033] Calculate and process the robot activity time according to the intersection sub-region, and obtain the activity time period of each robot in the corresponding sub-region to be measured with an intersection, so that the number of robots active in any time in each sub-region to be measured is less than one.
[0034] In a second aspect, an embodiment of the present application provides a path and region intersection detection device, including:
[0035] A path and region acquisition module, configured to acquire a robot path and a region to be measured, and divide the region to be measured into a plurality of sub-regions to be measured;
[0036] A first path splitting module, configured to split the robot path by dichotomy to obtain sub-paths;
[0037] A rectangular region dividing module, configured to perform rectangular division processing on the sub-path to obtain a rectangular region corresponding to each sub-path, and all path points of the corresponding sub-path are included in the rectangular region;
[0038] An intersection detection module, configured to perform intersection detection processing on each rectangular region and each sub-region to be measured respectively to obtain an intersection sub-region and a non-intersection sub-region;
[0039] An intersection determination module, configured to determine the intersection sub-region as the sub-region to be measured intersecting with the robot path when the number of path points in the rectangular region corresponding to the intersection sub-region is less than two;
[0040] A second path splitting module, configured to continue to split the sub-path by dichotomy when the number of path points in the rectangular region corresponding to the intersection sub-region is greater than two, until the number of path points in the rectangular region corresponding to the intersection sub-region is less than two, and determine the corresponding intersection sub-region as the sub-region to be measured intersecting with the robot path.
[0041] Further, the first path splitting module includes a first rectangular division unit, a first intersection detection unit, and a first splitting unit;
[0042] The first rectangular division unit is configured to perform rectangular division processing according to the robot path to obtain a first rectangular region, and all path points of the robot path are included in the first rectangular region;
[0043] The first intersection detection unit is configured to perform intersection detection processing on the first rectangular region and each sub-region to be measured to obtain a first intersection sub-region and a first non-intersection sub-region;
[0044] The first splitting unit is configured to perform splitting processing on the robot path by using the dichotomy when the number of path points in the first rectangular area corresponding to the first intersecting sub-area is greater than two, so as to obtain a first sub-path and a second sub-path.
[0045] Further, the rectangular area dividing module includes a second rectangular dividing unit, a second intersection detecting unit, and a third intersection detecting unit;
[0046] The second rectangular dividing unit is configured to perform rectangular dividing processing on the first sub-path and the second sub-path respectively, and correspondingly obtain a second rectangular area and a third rectangular area. All path points of the first sub-path are included in the second rectangular area, and all path points of the second sub-path are included in the third rectangular area;
[0047] The second intersection detecting unit is configured to perform intersection detecting processing on the second rectangular area and each of the first intersecting sub-areas to obtain a second intersecting sub-area and a second non-intersecting sub-area;
[0048] The third intersection detecting unit is configured to perform intersection detecting processing on the third rectangular area and each of the first intersecting sub-areas to obtain a third intersecting sub-area and a third non-intersecting sub-area.
[0049] Further, the intersection detecting module further includes a path point number detecting unit, a first intersection confirmation unit, and a second splitting unit;
[0050] The path point number detecting unit is configured to determine whether the number of path points in the second rectangular area corresponding to the second intersecting sub-area is less than two;
[0051] The first intersection confirmation unit is configured to determine the second intersecting sub-area as a to-be-detected sub-area intersecting with the robot path when the number of path points in the second rectangular area corresponding to the second intersecting sub-area is less than two;
[0052] The second splitting unit is configured to perform splitting processing on the first sub-path by using the dichotomy when the number of path points in the second rectangular area corresponding to the second intersecting sub-area is greater than two, until the number of path points in the rectangular area corresponding to the corresponding intersecting sub-area is less than two, and then determine the corresponding intersecting sub-area as a to-be-detected sub-area intersecting with the robot path.
[0053] Further, the intersection detecting module further includes a second intersection confirmation unit and a third splitting unit;
[0054] The path point number detecting unit is further configured to determine whether the number of path points in the third rectangular area corresponding to the third intersecting sub-area is less than two;
[0055] The second intersection confirmation unit is configured to determine that the third intersection sub-region is a sub-region to be measured that intersects the robot path when the number of path points within the third rectangular region corresponding to the third intersection sub-region is less than two.
[0056] The third segmentation unit is configured to, when the number of path points within the third rectangular region corresponding to the third intersection sub-region is greater than two, segment the second sub-path by the dichotomy method until the number of path points within the rectangular region corresponding to the corresponding intersection sub-region is less than two, and then determine that the corresponding intersection sub-region is a sub-region to be measured that intersects the robot path.
[0057] Further, the path and region intersection detection device further includes an integration module and an intersection detection module;
[0058] The integration module is configured to integrate the sub-regions to be measured that intersect the robot path to obtain a set of intersection sub-regions corresponding to each robot path;
[0059] The intersection detection module is configured to compare the sets of intersection sub-regions corresponding to each robot path to determine the intersection sub-regions of the set of intersection sub-regions corresponding to each robot path and the sets of intersection sub-regions of other robot paths.
[0060] Further, the path and region intersection detection device further includes an activity time determination module;
[0061] The activity time determination module is configured to calculate the robot activity time according to the intersection sub-regions to obtain the activity time period of each robot in the corresponding sub-region to be measured with an intersection, so that the number of robots active in any time within each sub-region to be measured is less than one.
[0062] In a third aspect, an embodiment of the present application provides a path and region intersection detection device, including:
[0063] A memory and one or more processors;
[0064] The memory is configured to store one or more programs;
[0065] When the one or more programs are executed by the one or more processors, the one or more processors implement the path and region intersection detection method as described in the first aspect.
[0066] In a fourth aspect, an embodiment of the present application provides a storage medium storing computer-executable instructions, and the computer-executable instructions are used to execute the path and region intersection detection method as described in the first aspect when executed by a computer processor.
[0067] In the embodiment of the present application, by obtaining a robot path and an area to be detected, the area to be detected is divided into multiple sub-areas to be detected, the robot path is segmented by the dichotomy method to obtain sub-paths, the sub-paths are subjected to rectangular division processing to obtain a rectangular area corresponding to each sub-path, and each rectangular area is respectively subjected to an intersection detection process with each sub-area to be detected to obtain an intersecting sub-area and a non-intersecting sub-area. When the number of path points in the rectangular area corresponding to the intersecting sub-area is less than two, it is determined that the intersecting sub-area is the sub-area to be detected that intersects the robot path; when the number of path points in the rectangular area corresponding to the intersecting sub-area is greater than two, the sub-path is continuously segmented by the dichotomy method until the number of path points in the rectangular area corresponding to the intersecting sub-area is less than two, and it is determined that the corresponding intersecting sub-area is the sub-area to be detected that intersects the robot path. By adopting the above technical means, when the number of path points in the rectangular area corresponding to the intersecting sub-area is less than two, it is determined that the intersecting sub-area is the sub-area that intersects the robot path, avoiding the need to traverse each path point once, thereby avoiding the problem of low work efficiency of path and area intersection detection and improving the detection speed, thus enhancing the work efficiency of path and area intersection detection. In addition, when the number of path points in the rectangular area corresponding to the intersecting sub-area is greater than two, the sub-path is continuously segmented by the dichotomy method until the number of path points in the rectangular area corresponding to the intersecting sub-area is less than two, and it is determined that the corresponding intersecting sub-area is the sub-area to be detected that intersects the robot path. By continuously segmenting and performing intersection detection on the sub-path until the number of path points in the rectangular area corresponding to the intersecting sub-area is less than two and then jumping out of the loop, all sub-areas to be detected that intersect the robot path are obtained, avoiding the need to traverse each path point once, thereby improving the detection speed and thus enhancing the work efficiency of path and area intersection detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 is a flowchart of a method for detecting the intersection of a path and an area provided by an embodiment of the present application;
[0069] Figure 2 is a first distribution diagram of a robot path and a sub-area to be detected provided by an embodiment of the present application;
[0070] Figure 3 is a second distribution diagram of a robot path and a sub-area to be detected provided by an embodiment of the present application;
[0071] Figure 4 is a diagram showing the intersection of multiple robot paths and sub-areas to be detected provided by an embodiment of the present application;
[0072] Figure 5It is a schematic structural diagram of a path and area intersection detection device provided by an embodiment of the present application;
[0073] Figure 6 It is a schematic structural diagram of a path and area intersection detection device provided by an embodiment of the present application. Detailed implementation manners
[0074] In order to make the objectives, technical solutions and advantages of the present application clearer, the following further describes the specific embodiments of the present application in detail with reference to the accompanying drawings. It can be understood that the specific embodiments described herein are only used to explain the present application, rather than limiting the present application. Additionally, it should be noted that for ease of description, only parts related to the present application are shown in the drawings, rather than all the content. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the operations (or steps) as sequential processes, many of the operations can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. When the operations are completed, the process can be terminated, but there may also be additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0075] In the existing methods for detecting the intersection of a robot path and an area, usually all path points of the robot path are listed using an exhaustive method, and the coordinates of each path point are compared with the area to be detected, and finally the intersection area and the non-intersection area are obtained. In this way, a large amount of resources need to be invested to exhaustively list the robot path, and each path point needs to be detected once, and the detection speed is relatively slow, resulting in a low overall detection work efficiency. Based on this, the path and area intersection detection method provided by the embodiment of the present application aims to, during detection, perform rectangular partitioning on the sub-paths obtained by dividing the robot path by the dichotomy method to obtain rectangular areas containing all the path points corresponding to the sub-paths, perform intersection detection processing on each rectangular area and each sub-area to be detected to obtain intersection sub-areas, and when the number of path points in the rectangular area corresponding to the intersection sub-area is less than two, determine the intersection sub-area as the sub-area intersecting with the robot path, avoiding the need to traverse each path point once. When the number of path points in the rectangular area corresponding to the intersection sub-area is less than two, the number of path points to be traversed is greatly reduced, thereby solving the problem of low work efficiency in the existing path and area intersection detection, improving the detection speed, and enhancing the work efficiency of path and area intersection detection.
[0076] Figure 1The flowchart of a path and area intersection detection method provided by an embodiment of the present application is given. The path and area intersection detection method provided in this embodiment can be executed by a path and area intersection detection device, which can be implemented in software and / or hardware. The path and area intersection detection device can be composed of two or more physical entities or one physical entity. Generally speaking, the path and area intersection detection device can be a terminal device, such as a computer device.
[0077] The following takes a computer device as the main body for executing the path and area intersection detection method as an example for description. Refer to Figure 1 , the path and area intersection detection method specifically includes:
[0078] S101. Obtain the robot path and the area to be measured, and divide the area to be measured into multiple sub-areas to be measured.
[0079] The area to be measured can be understood as the entire complete area, and the area to be measured includes multiple sub-areas to be measured. The sub-areas to be measured are divided according to the actual situation, and can be regular sub-areas or irregular sub-areas. For example, taking a large shopping mall as the area to be measured and each store as a sub-area to be measured. Obtain the area to be measured and divide the area to be measured into multiple sub-areas to be measured. Obtain the robot path, where the robot path is obtained according to a preset path planning strategy. It should be noted that in the complete area to be measured, there are multiple robot paths corresponding to multiple robots. Subsequently, path and area intersection detection is performed on each robot path respectively to obtain the sub-areas to be measured corresponding to each robot path that intersect.
[0080] As described above, by obtaining the robot path and the sub-areas to be measured, it is convenient to subsequently detect which sub-areas to be measured the robot path intersects with, providing a data basis for path and area intersection detection and improving the reliability of path and area intersection detection.
[0081] S102. Divide the robot path by the dichotomy method to obtain sub-paths.
[0082] Based on the complete robot path, it is necessary to traverse the path points to determine whether they intersect with the sub-areas to be measured. The existing method of traversing path points by exhaustive enumeration has relatively low working efficiency. Therefore, in this embodiment, the robot path is divided by the dichotomy method to obtain sub-paths, and subsequent corresponding intersection detection can be performed according to the sub-paths, which can avoid the problem of slow detection speed caused by the exhaustive traversal method, improve the detection speed, and thus improve the working efficiency of intersection detection.
[0083] Before performing robot path segmentation, a complete intersection detection of the robot path is first carried out. By performing rectangular division on the robot path, a first rectangular region is obtained, and all path points of the robot path are included in the first rectangular region. The first rectangular region is subjected to intersection detection processing with each sub-region to be measured, resulting in a first intersecting sub-region and a first non-intersecting sub-region. It should be noted that at this time, the first intersecting sub-region is only an area intersection and may not be the sub-region to be measured that actually intersects the robot. It is necessary to determine by judging the number of path points in the first rectangular region. When the number of path points in the first rectangular region corresponding to the first intersecting sub-region is less than two, the first intersecting sub-region is determined as the sub-region to be measured that intersects the robot path. When the number of path points in the first rectangular region corresponding to the first intersecting sub-region is greater than two, the robot path is divided by the dichotomy method to obtain a first sub-path and a second sub-path. When the number of path points in the first rectangular region is greater than two, it means that there are still sub-regions to be measured that do not intersect the robot in the first rectangular region, such as sub-region B9, sub-region B10, sub-region B22, and sub-region B23 to be measured; therefore, it is necessary to divide the robot path by the dichotomy method to obtain sub-paths, such as a first sub-path and a second sub-path, and perform subsequent intersection detection on the divided sub-paths to further determine which sub-regions to be measured actually intersect the robot path. As described above, by performing intersection detection on the first rectangular region corresponding to the completed robot path, a part of the non-intersecting sub-regions (i.e., the first non-intersecting sub-region) can be detected and filtered out. Subsequently, only the first intersecting sub-region needs to be further subjected to intersection detection, which greatly reduces the data processing volume of subsequent detection, thereby improving the speed of subsequent path and region intersection detection, and further improving the overall detection work efficiency of path and region intersection.
[0084] Figure 2 is a first distribution schematic diagram of a robot path and a sub-region to be measured provided by an embodiment of the present application. Refer to Figure 2 , refer to Figure 2, obtain the robot path L and the area A to be measured, divide the area to be measured into multiple sub-areas B1 to B24 to be measured, perform rectangular division processing on the robot path L to obtain the first rectangular area C1, and all path points of the robot path L are included in the first rectangular area C1. It should be noted that the first rectangular area C1 is theoretically the circumscribed rectangle of the robot path L. In fact, when dividing, it will be slightly larger than the circumscribed rectangle of the robot path L to include all path points of the robot path L. Perform intersection detection processing on the first rectangular area C1 and the sub-areas B1 to B24 to be measured, and the first intersecting sub-areas are the sub-areas B10 to B12, B15 to B18, and B20 to B23 to be measured, and the first non-intersecting sub-areas are the sub-areas B1 to B9, B13 to B14, B19, and B24 to be measured. It should be noted that each sub-area to be measured in the sub-areas B10 to B12, B15 to B18, and B20 to B23 to be measured is a first intersecting sub-area. Detect the number of path points in the first rectangular area C1 corresponding to the first intersecting sub-area. When the number of path points in the first rectangular area C1 corresponding to the first intersecting sub-area is greater than two, perform segmentation processing on the robot path by the binary method to obtain the first sub-path and the second sub-path, as Figure 3 shown by the first sub-path L1 and the second sub-path L2. By the above method, the first non-intersecting sub-areas (i.e., the sub-areas B10 to B12, B15 to B18, and B20 to B23 to be measured) can be screened out and filtered, and only the first intersecting sub-areas (i.e., the sub-areas B10 to B12, B15 to B18, and B20 to B23 to be measured) need to be further detected for intersection, which greatly reduces the data processing volume of subsequent detection, thereby improving the speed of subsequent intersection detection between the path and the area, and further improving the overall detection work efficiency of intersection between the path and the area.
[0085] S103. Perform rectangular division processing on the sub-path to obtain the rectangular area corresponding to each sub-path, and all path points of the corresponding sub-path are included in the rectangular area.
[0086] Based on the fact that the robot path is generally a relatively long path, that is, the number of path points in the aforementioned first rectangular area is greater than two. Therefore, it is necessary to perform segmentation processing on the robot path by the binary method to obtain sub-paths. Perform rectangular division processing on the obtained sub-paths to obtain the rectangular area corresponding to each sub-path. All path points of the corresponding sub-path are included in the rectangular area corresponding to each sub-path, so that subsequent intersection detection can be performed according to the rectangular area corresponding to each sub-path, and the result of line intersection can be obtained by judging the number of path points in the rectangular area on the basis of area intersection. Compared with the existing method of point-plane-plane intersection, the number of traversals of line-plane-plane intersection is smaller, so the detection speed can be improved.
[0087] As can be seen from the above, when the number of path points in the first rectangular area corresponding to the first intersecting sub-area is greater than two, the robot path is segmented by binary division to obtain the first sub-path and the second sub-path. After the first sub-path and the second sub-path are segmented, the first sub-path and the second sub-path are respectively subjected to rectangular division processing to obtain the second rectangular area corresponding to the first sub-path and the third rectangular area corresponding to the second sub-path. Among them, the second rectangular area contains all the path points of the first sub-path, and the third rectangular area contains all the path points of the second sub-path. As described above, by performing rectangular division processing on the sub-paths, the rectangular area corresponding to each sub-path can be obtained, and then each rectangular area is subjected to intersection detection processing, which can filter out some sub-areas to be tested without face-to-face intersection through face-to-face intersection detection of the rectangular areas, and then only further intersection detection is performed on the intersecting sub-areas of the rectangular areas where the rectangular areas intersect face-to-face, which greatly reduces the amount of data processing for subsequent intersection detection, thereby improving the overall work efficiency of intersection detection.
[0088] Figure 3 This is a second distribution diagram of a robot path and a sub-area to be measured provided by an embodiment of the present application. As can be seen from the above, when the number of path points in the first rectangular area corresponding to the first intersecting sub-area is greater than two, the robot path is segmented by binary division to obtain a first sub-path L1 and a second sub-path L2. The first sub-path L1 is divided into rectangles to obtain a second rectangular area C2 corresponding to the first sub-path L1, wherein the second rectangular area C2 contains all the path points of the first sub-path L1. The second sub-path L2 is divided into rectangles to obtain a third rectangular area C3 corresponding to the second sub-path L2, wherein the third rectangular area C3 contains all the path points of the second sub-path L2. As mentioned above, by performing rectangular division processing on the sub-paths, the rectangular area corresponding to each sub-path can be obtained, and then each rectangular area is subjected to intersection detection processing. Through the face-to-face intersection detection of the rectangular areas, some sub-areas to be tested without face-to-face intersection can be filtered out. Subsequently, only the intersecting sub-areas with face-to-face intersection of the rectangular areas are further subjected to intersection detection, which greatly reduces the data processing amount of the subsequent intersection detection, thereby improving the overall work efficiency of the intersection detection.
[0089] S104 , performing intersection detection processing on each rectangular area and each sub-area to be detected, to obtain intersecting sub-areas and non-intersecting sub-areas.
[0090] Since all the path points corresponding to the sub-paths are included in each rectangular region, the rectangular region can be intersected with each sub-region to be measured to obtain the intersecting sub-region that intersects with the rectangular region in terms of surface and the non-intersecting sub-region that has no surface intersection. For the sub-regions that intersect with the rectangular region in terms of surface, subsequent line-surface intersection or point-surface intersection detection can be carried out. For the non-intersecting sub-regions that have no surface intersection with the rectangular region, they are directly judged as the sub-regions to be measured that have no intersection with the robot path, so that the amount of data for subsequent line-surface intersection or point-surface intersection detection is greatly reduced, thereby improving the speed of subsequent detection and enhancing the overall efficiency of the intersection detection work.
[0091] In one embodiment, after the first sub-path and the second sub-path are segmented, rectangular division processing is respectively performed on the first sub-path and the second sub-path to obtain a second rectangular region corresponding to the first sub-path and a third rectangular region corresponding to the second sub-path. Among them, all the path points of the first sub-path are included in the second rectangular region, and all the path points of the second sub-path are included in the third rectangular region. The second rectangular region is subjected to intersection detection processing with each first intersecting sub-region to obtain a second intersecting sub-region and a second non-intersecting sub-region. The third rectangular region is subjected to intersection detection processing with each first intersecting sub-region to obtain a third intersecting sub-region and a third non-intersecting sub-region. It should be noted that both the second intersecting sub-region and the third intersecting sub-region are sub-regions to be measured that intersect with the first intersecting sub-region in terms of surface. Subsequently, the number of path points in the second rectangular region corresponding to the second intersecting sub-region and the third rectangular region corresponding to the third intersecting sub-region needs to be detected to truly determine which sub-regions to be measured in the second intersecting sub-region and the third intersecting sub-region intersect with the robot path. As described above, by performing rectangular division processing on the sub-paths, a rectangular region corresponding to each sub-path can be obtained. Subsequently, by performing intersection detection processing on each rectangular region, non-intersecting sub-regions (i.e., the common sub-regions to be measured of the second non-intersecting sub-region and the third non-intersecting sub-region) can be further filtered out. Subsequently, only the intersecting sub-regions (i.e., the second intersecting sub-region and the third intersecting sub-region) are subjected to further intersection detection, and the amount of data processing is greatly reduced, thereby improving the detection speed and further enhancing the overall efficiency of path and region detection.
[0092] Figure 3This is a second distribution schematic diagram of the robot path and the sub-region to be measured provided by the embodiment of the present application. When the number of path points in the first rectangular region C1 corresponding to the first intersecting sub-region is greater than two, the robot path is divided by the dichotomy method to obtain the first sub-path L1 and the second sub-path L2. The first sub-path L1 is subjected to rectangular division processing to obtain a second rectangular region C2 corresponding to the first sub-path L1, where all path points of the first sub-path L1 are included in the second rectangular region C2. It should be noted that the second rectangular region C2 is theoretically the circumscribed rectangle of the first sub-path L1. In fact, when dividing, it will be slightly larger than the circumscribed rectangle of the first sub-path L1 to include all path points of the first sub-path L1. The second sub-path L2 is subjected to rectangular division processing to obtain a third rectangular region C3 corresponding to the second sub-path L2, where all path points of the second sub-path L2 are included in the third rectangular region C3. It should be noted that the third rectangular region C3 is theoretically the circumscribed rectangle of the second sub-path L2. In fact, when dividing, it will be slightly larger than the circumscribed rectangle of the second sub-path L2 to include all path points of the second sub-path L2. The second rectangular region C2 is subjected to intersection detection processing with each first intersecting sub-region (i.e., the sub-regions to be measured B10 - B12, B15 - B18, and B20 - B23) to obtain a second intersecting sub-region and a second non-intersecting sub-region, where the second intersecting sub-region is the sub-regions to be measured B15 - B16 and B20 - B22, and the second non-intersecting sub-region is the sub-regions to be measured B10 - B12, B17 - B18, and B23 - B24. The third rectangular region C3 is subjected to intersection detection processing with each first intersecting sub-region (i.e., the sub-regions to be measured B10 - B12, B15 - B18, and B20 - B23) to obtain a third intersecting sub-region and a third non-intersecting sub-region, where the third intersecting sub-region is the sub-regions to be measured B11 - B12, B16 - B17, and B22 - B23, and the third non-intersecting sub-region is the sub-regions to be measured B10, B15, B20 - B21, and B24. According to the intersection of the second non-intersecting sub-region and the third non-intersecting sub-region, the sub-region that has no intersection with the robot path corresponding to this detection can be obtained as the sub-regions to be measured B10, B18, and B24. Therefore, the non-intersecting sub-regions (i.e., the sub-regions to be measured B10, B18, and B24) can be further filtered out, and subsequently, only the second intersecting sub-region (i.e., the sub-regions to be measured B15 - B16 and B20 - B22) and the third intersecting sub-region (i.e., the sub-regions to be measured B11 - B12, B16 - B17, and B22 - B23) are subjected to further intersection detection processing. The data processing volume is greatly reduced, thereby improving the detection speed and further improving the overall working efficiency of path and region detection.
[0093] It should be noted that each of the sub-regions to be measured B15 - B16 and B20 - B22 is a second intersecting sub-region, and each of the sub-regions to be measured B11 - B12, B16 - B17 and B22 - B23 is a third intersecting sub-region.
[0094] S105. When the number of path points within the rectangular region corresponding to the intersecting sub-region is less than two, determine the intersecting sub-region as the sub-region to be measured that intersects the robot path.
[0095] As described above, by performing an intersection detection between the rectangular region and each sub-region to be measured, the obtained intersecting sub-regions are the sub-regions to be measured that intersect the rectangular region face to face, and the obtained non-intersecting sub-regions are the sub-regions to be measured that do not intersect the rectangular region face to face. For the sub-regions to be measured that intersect the rectangular region face to face (i.e., the intersecting sub-regions), it can be further determined whether it is a line-plane intersection or a point-plane intersection by judging the number of path points within the corresponding rectangular region. When the number of path points within the rectangular region corresponding to the intersecting sub-region is less than two, it indicates that each intersecting sub-region intersects the robot path in a line-plane or point-plane manner, and thus the intersecting sub-region can be confirmed as the sub-region to be measured that intersects the robot path.
[0096] In one embodiment, after obtaining the second intersecting sub-region and the third intersecting sub-region as described above, by judging the number of path points within the second rectangular region corresponding to the second intersecting sub-region and judging the number of path points within the third rectangular region corresponding to the third intersecting sub-region, it can be determined whether the second intersecting sub-region and the third intersecting sub-region intersect the robot path in a line-plane or point-plane manner. When the number of path points within the second rectangular region corresponding to the second intersecting sub-region is less than two, it indicates that the second intersecting sub-region intersects the robot path in a line-plane or point-plane manner, and thus the second intersecting sub-region is determined as the sub-region to be measured that intersects the robot path. When the number of path points within the third rectangular region corresponding to the third intersecting sub-region is less than two, it indicates that the third intersecting sub-region intersects the robot path in a line-plane or point-plane manner, and thus the third intersecting sub-region is determined as the sub-region to be measured that intersects the robot path.
[0097] As described above, when the number of path points within the rectangular region corresponding to the intersecting sub-region is less than two, it can be confirmed whether the intersecting sub-region intersects the robot path in a line-plane or point-plane manner, and thus the intersecting sub-region can be determined as the sub-region to be measured that intersects the robot path. On the basis of reducing the traversal amount, it can accurately detect the sub-regions to be measured that intersect the robot path, improve the overall detection speed of path and region detection, and further improve the overall working efficiency of path and region detection.
[0098] S106. When the number of path points in the rectangular area corresponding to the intersecting sub-region is greater than two, continue to divide the sub-path by the dichotomy method until the number of path points in the rectangular area corresponding to the intersecting sub-region is less than two, and determine the corresponding intersecting sub-region as the sub-region to be measured that intersects the robot path.
[0099] As described above, by performing an intersection detection between the rectangular area and each sub-region to be measured, the obtained intersecting sub-region is the sub-region to be measured that intersects the rectangular area face to face, and the obtained non-intersecting sub-region is the sub-region to be measured that does not intersect the rectangular area face to face. For the sub-region to be measured that intersects the rectangular area face to face (i.e., the intersecting sub-region), it can be further determined whether it is a line-plane intersection or a point-plane intersection by judging the number of path points in the corresponding rectangular area. When the number of paths in the rectangular area corresponding to the intersecting sub-region is greater than two, it indicates that the obtained intersecting sub-region does not have a line-plane intersection or a point-plane intersection with the robot path. Therefore, continue to divide the sub-path by the dichotomy method until the number of path points in the rectangular area corresponding to the intersecting sub-region is less than two, indicating that the obtained intersecting sub-region at this time has a line-plane intersection or a point-plane intersection with the robot path. Therefore, it can be confirmed that the obtained intersecting sub-region at this time is the sub-region to be measured that intersects the robot path.
[0100] In one embodiment, after obtaining the second intersecting sub-region as described above, by judging the number of path points in the second rectangular area corresponding to the second intersecting sub-region, it can be determined whether the second intersecting sub-region has a line-plane intersection or a point-plane intersection with the robot path. When the number of path points in the second rectangular area corresponding to the second intersecting sub-region is greater than two, it indicates that there may be a sub-region to be measured in the second intersecting sub-region that does not intersect the robot path, such as Figure 3 the sub-region to be measured B22 in. Therefore, the first sub-path L1 can be divided by the dichotomy method, and the corresponding sub-path is re-executed in S103 - S106 until the number of path points in the rectangular area corresponding to the intersecting sub-region is less than two, indicating that the obtained intersecting sub-region at this time has a line-plane intersection or a point-plane intersection with the robot path. Therefore, it can be confirmed that the obtained intersecting sub-region at this time is the sub-region to be measured that intersects the robot path.
[0101] In one embodiment, after obtaining the third intersecting sub-region as described above, by judging the number of path points in the third rectangular area corresponding to the third intersecting sub-region, it can be determined whether the third intersecting sub-region has a line-plane intersection or a point-plane intersection with the robot path. When the number of path points in the third rectangular area corresponding to the third intersecting sub-region is greater than two, it indicates that there may be a sub-region to be measured in the third intersecting sub-region that does not intersect the robot path, such as Figure 3The sub-region B23 to be measured therein. Therefore, the second sub-path L2 can be divided by the dichotomy method. For the corresponding sub-paths, steps S103 to S106 are re-executed until the number of path points in the rectangular region corresponding to the intersecting sub-region is less than two, indicating that the intersecting sub-region obtained at this time is a sub-region that intersects the robot path in a line-plane or point-plane manner. Therefore, it can be confirmed that the intersecting sub-region obtained at this time is a sub-region to be measured that intersects the robot path.
[0102] As described above, it is further determined whether it is a line-plane intersection or a point-plane intersection by judging the number of path points in the corresponding rectangular region. When the number of paths in the rectangular region corresponding to the intersecting sub-region is greater than two, it indicates that the obtained intersecting sub-region does not intersect the robot path in a line-plane or point-plane manner. Then, the sub-path is continuously divided by the dichotomy method until the number of path points in the rectangular region corresponding to the intersecting sub-region is less than two, indicating that the intersecting sub-region obtained at this time is a sub-region that intersects the robot path in a line-plane or point-plane manner. Therefore, it can be confirmed that the intersecting sub-region obtained at this time is a sub-region to be measured that intersects the robot path, so that the number of path points to be traversed is less than two. Compared with the existing method that requires traversing each path point, the amount of data to be traversed is greatly reduced, thereby improving the detection speed and further improving the overall detection work efficiency.
[0103] In one embodiment, the intersecting sub-regions to be measured corresponding to each robot path can be obtained through the foregoing S101 to S106. The intersecting sub-regions to be measured that intersect the robot path are integrated to obtain an intersecting sub-region set corresponding to each robot path. Based on the actual region to be measured, it is preset that multiple robots perform corresponding activities. When the robot paths corresponding to two or more robots all intersect a certain sub-region to be measured, it is necessary to reasonably arrange the passing time of the corresponding robots in the sub-region to be measured to ensure that the number of robots active in each sub-region to be measured at any time is less than one. It can be determined by comparing the foregoing obtained intersecting sub-region sets corresponding to each robot to determine the intersection sub-region of the intersecting sub-region set of each robot path and the intersecting region sets of other robot paths. This intersection sub-region can be understood as a set of sub-regions to be measured that intersect the robot paths corresponding to two or more robots. According to the obtained intersection sub-region, the calculation process of the robot activity time is performed to obtain the activity time period of each robot in the corresponding sub-region to be measured with an intersection, so that the number of robots active in each sub-region to be measured at any time is less than one, thereby saving the robot activity cost and avoiding resource waste.
[0104] Figure 4 is a schematic diagram of the intersection of multiple robot paths and the sub-regions to be measured provided by the embodiment of the present application. Refer to Figure 4, assume that there are two robots, namely Robot 1 and Robot 2. Robot 1 corresponds to robot path L, and Robot 2 corresponds to robot path N. Through the aforementioned S101 - S106, the sub - regions to be measured that intersect with robot path L are sub - regions to be measured B11, B12, B15 - B17, and B20 - B21. That is, the set D of intersecting sub - regions corresponding to robot path L is sub - regions to be measured B11, B12, B15 - B17, and B20 - B21. Through the aforementioned S101 - S106, the sub - regions to be measured that intersect with robot path N are sub - regions to be measured B2, B8 - B9, B15, and B21 - B24. That is, the set F of intersecting sub - regions corresponding to robot path N is sub - regions to be measured B2, B8 - B9, B15, and B21 - B24. The set D of intersecting sub - regions and the set F of intersecting sub - regions are compared to obtain the intersection sub - regions of the robot paths corresponding to Robot 1 and Robot 2. That is, the intersection sub - regions are sub - region to be measured B15 and sub - region to be measured B21. According to the obtained intersection sub - regions, the calculation process of the robot activity time is carried out to obtain the activity time period of each robot in the corresponding sub - regions to be measured with intersections. For example, the activity time of Robot 1 in sub - region to be measured B15 is 10:00 - 11:00, and the activity time of Robot 2 in sub - region to be measured B15 is 11:00 - 12:00, so that the number of robots active in each sub - region to be measured at any time is less than one. For example, there is no robot activity or only Robot 1 activity or only Robot 2 activity in sub - region to be measured B15 at any time period; this avoids resource waste caused by multiple robots being active in the same sub - region to be measured, thereby saving the robot activity cost.
[0105] As described above, when there are intersections in the sub - regions to be measured where multiple robots walk, the relevant time complexity can be reduced, the detection efficiency of the robot paths can be improved, and it provides a guarantee for the smooth walking of subsequent robots.
[0106] As described above, by obtaining the robot path and the area to be detected, the area to be detected is divided into multiple sub-areas to be detected. The robot path is segmented by the binary method to obtain sub-paths. The sub-paths are divided into rectangles to obtain the rectangular area corresponding to each sub-path. Each rectangular area is respectively subjected to an intersection detection process with each sub-area to be detected to obtain an intersection sub-area and a non-intersection sub-area. When the number of path points in the rectangular area corresponding to the intersection sub-area is less than two, it is determined that the intersection sub-area is the sub-area to be detected that intersects the robot path. When the number of path points in the rectangular area corresponding to the intersection sub-area is greater than two, the sub-path is continuously segmented by the binary method until the number of path points in the rectangular area corresponding to the intersection sub-area is less than two, and the corresponding intersection sub-area is determined to be the sub-area to be detected that intersects the robot path. By adopting the above technical means, when the number of path points in the rectangular area corresponding to the intersection sub-area is less than two, it is determined that the intersection sub-area is the sub-area that intersects the robot path, avoiding the need to traverse each path point once, thereby avoiding the problem of low work efficiency in path and area intersection detection, improving the detection speed, and thus enhancing the work efficiency of path and area intersection detection. In addition, when the number of path points in the rectangular area corresponding to the intersection sub-area is greater than two, the sub-path is continuously segmented by the binary method until the number of path points in the rectangular area corresponding to the intersection sub-area is less than two, and the corresponding intersection sub-area is determined to be the sub-area to be detected that intersects the robot path. By continuously segmenting and performing intersection detection on the sub-path until the number of path points in the rectangular area corresponding to the intersection sub-area is less than two and then jumping out of the loop, all sub-areas to be detected that intersect the robot path are obtained, avoiding the need to traverse each path point once, thereby improving the detection speed and thus enhancing the work efficiency of path and area intersection detection.
[0107] Based on the above embodiments, Figure 5 This is a schematic structural diagram of a path and area intersection detection device provided by an embodiment of the present application. Refer to Figure 5 This embodiment provides a path and area intersection detection device, which specifically includes: a path and area acquisition module 21, a first path segmentation module 22, a rectangular area division module 23, an intersection detection module 24, an intersection determination module 25, and a second path segmentation module 26.
[0108] Among them, the path and area acquisition module 21 is used to obtain the robot path and the area to be detected, and divide the area to be detected into multiple sub-areas to be detected;
[0109] The first path segmentation module 22 is used to segment the robot path by the binary method to obtain sub-paths;
[0110] The rectangular region division module 23 is used to perform rectangular division processing on sub-paths to obtain a rectangular region corresponding to each sub-path, and all path points of the corresponding sub-path are included in the rectangular region;
[0111] The intersection detection module 24 is used to perform intersection detection processing on each rectangular region and each sub-region to be measured respectively, to obtain an intersecting sub-region and a non-intersecting sub-region;
[0112] The intersection determination module 25 is used to determine that the intersecting sub-region is the sub-region to be measured that intersects the robot path when the number of path points in the rectangular region corresponding to the intersecting sub-region is less than two;
[0113] The second path segmentation module 26 is used to continue to perform segmentation processing on the sub-path by the dichotomy method when the number of path points in the rectangular region corresponding to the intersecting sub-region is greater than two, until the number of path points in the rectangular region corresponding to the intersecting sub-region is less than two, and determine that the corresponding intersecting sub-region is the sub-region to be measured that intersects the robot path.
[0114] In one embodiment, the first path segmentation module 22 includes a first rectangular division unit, a first intersection detection unit, and a first segmentation unit;
[0115] The first rectangular division unit is used to perform rectangular division processing according to the robot path to obtain a first rectangular region, and all path points of the robot path are included in the first rectangular region;
[0116] The first intersection detection unit is used to perform intersection detection processing on the first rectangular region and each sub-region to be measured, to obtain a first intersecting sub-region and a first non-intersecting sub-region;
[0117] The first segmentation unit is used to perform segmentation processing on the robot path by the dichotomy method when the number of path points in the first rectangular region corresponding to the first intersecting sub-region is greater than two, to obtain a first sub-path and a second sub-path.
[0118] In one embodiment, the rectangular region division module 23 includes a second rectangular division unit, a second intersection detection unit, and a third intersection detection unit;
[0119] The second rectangular division unit is used to perform rectangular division processing on the first sub-path and the second sub-path respectively, and correspondingly obtain a second rectangular region and a third rectangular region. All path points of the first sub-path are included in the second rectangular region, and all path points of the second sub-path are included in the third rectangular region;
[0120] The second intersection detection unit is used to perform intersection detection processing on the second rectangular region and each first intersecting sub-region, to obtain a second intersecting sub-region and a second non-intersecting sub-region;
[0121] A third intersection detection unit, configured to perform intersection detection processing on the third rectangular region and each first intersection sub-region, to obtain a third intersection sub-region and a third non-intersection sub-region.
[0122] In one embodiment, the intersection detection module 24 further includes a path point number detection unit, a first intersection confirmation unit, and a second segmentation unit;
[0123] The path point number detection unit is configured to determine whether the number of path points within the second rectangular region corresponding to the second intersection sub-region is less than two;
[0124] The first intersection confirmation unit is configured to, when the number of path points within the second rectangular region corresponding to the second intersection sub-region is less than two, determine the second intersection sub-region as a to-be-detected sub-region that intersects the robot path;
[0125] The second segmentation unit is configured to, when the number of path points within the second rectangular region corresponding to the second intersection sub-region is greater than two, perform segmentation processing on the first sub-path by the dichotomy method until the number of path points within the rectangular region corresponding to the corresponding intersection sub-region is less than two, and then determine the corresponding intersection sub-region as a to-be-detected sub-region that intersects the robot path.
[0126] In one embodiment, the intersection detection module 24 further includes a second intersection confirmation unit and a third segmentation unit;
[0127] The path point number detection unit is further configured to determine whether the number of path points within the third rectangular region corresponding to the third intersection sub-region is less than two;
[0128] The second intersection confirmation unit is configured to, when the number of path points within the third rectangular region corresponding to the third intersection sub-region is less than two, determine the third intersection sub-region as a to-be-detected sub-region that intersects the robot path;
[0129] The third segmentation unit is configured to, when the number of path points within the third rectangular region corresponding to the third intersection sub-region is greater than two, perform segmentation processing on the second sub-path by the dichotomy method until the number of path points within the rectangular region corresponding to the corresponding intersection sub-region is less than two, and then determine the corresponding intersection sub-region as a to-be-detected sub-region that intersects the robot path.
[0130] In one embodiment, the path and region intersection detection device further includes an integration module and an intersection set detection module;
[0131] The integration module is configured to perform integration processing on the to-be-detected sub-regions that intersect the robot path, to obtain an intersection sub-region set corresponding to each robot path;
[0132] The intersection detection module is used to compare the intersection sub-region set corresponding to each robot path to determine the intersection sub-region of each robot path's intersection sub-region set and the intersection sub-region set of other robot paths.
[0133] In one embodiment, the path and region intersection detection device further includes an activity time determination module;
[0134] The activity time determination module is used to calculate and process the robot activity time according to the intersection sub-area, and obtain the activity time period of each robot in the corresponding sub-area to be tested with intersection, so that the number of robots active at any time in each sub-area to be tested is less than one.
[0135] As described above, by acquiring the robot path and the area to be detected, the area to be detected is divided into multiple sub-areas to be detected, the robot path is segmented by binary division to obtain sub-paths, the sub-paths are divided into rectangles to obtain the rectangular areas corresponding to each sub-path, each rectangular area is respectively subjected to intersection detection processing with each sub-area to be detected to obtain intersecting sub-areas and non-intersecting sub-areas, when the number of path points in the rectangular area corresponding to the intersecting sub-area is less than two, the intersecting sub-area is determined to be the sub-area to be detected that intersects with the robot path; when the number of path points in the rectangular area corresponding to the intersecting sub-area is greater than two, the sub-path is continued to be segmented by binary division until the number of path points in the rectangular area corresponding to the intersecting sub-area is less than two, and the corresponding intersecting sub-area is determined to be the sub-area to be detected that intersects with the robot path. By adopting the above technical means, when the number of path points in the rectangular area corresponding to the intersecting sub-area is less than two, the intersecting sub-area is determined to be a sub-area intersecting with the robot path, avoiding the need to traverse each path point once, thereby avoiding the problem of low efficiency of path and region intersection detection, improving the detection speed, and thus improving the efficiency of path and region intersection detection. In addition, when the number of path points in the rectangular area corresponding to the intersecting sub-area is greater than two, the sub-path is continued to be segmented by binary division until the number of path points in the rectangular area corresponding to the intersecting sub-area is less than two, and the corresponding intersecting sub-area is determined to be a sub-area to be tested that intersects with the robot path, and the sub-path is continuously segmented and intersected until the number of path points in the rectangular area corresponding to the intersecting sub-area is less than two, and the loop is jumped out, and all sub-areas to be tested that intersect with the robot path are obtained, avoiding the need to traverse each path point once, thereby improving the detection speed, and thus improving the efficiency of path and region intersection detection.
[0136] The path and region intersection detection device provided in the embodiment of the present application can be used to execute the path and region intersection detection method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0137] An embodiment of the present application provides a path and area intersection detection device. Refer to Figure 6 , the path and area intersection detection device includes: a processor 31, a memory 32, a communication module 33, an input device 34 and an output device 35. The number of processors in the path and area intersection detection device may be one or more, and the number of memories in the path and area intersection detection device may be one or more. The processor, memory, communication module, input device and output device of the path and area intersection detection device may be connected through a bus or other means.
[0138] The memory 32, as a computer-readable storage medium, can be used to store software programs, computer-executable programs and modules, such as program instructions / modules corresponding to the path and area intersection detection method described in any embodiment of the present application (for example, the path and area acquisition module, the first path segmentation module, the rectangular area division module, the intersection detection module, the intersection determination module and the second path segmentation module in the path and area intersection detection device). The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the device, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device or other non-volatile solid-state storage devices. In some instances, the memory may further include a memory remotely set relative to the processor, and these remote memories can be connected to the device through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network and their combinations.
[0139] The communication module 33 is used for data transmission.
[0140] The processor 31 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory, that is, implements the above path and area intersection detection method.
[0141] The input device 34 can be used to receive input digital or character information, and generate key signal inputs related to the user settings and function control of the device. The output device 35 may include a display device such as a display screen.
[0142] The above-provided path and area intersection detection device can be used to execute the path and area intersection detection method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0143] The embodiment of the present application also provides a storage medium storing computer-executable instructions, and the computer-executable instructions are used to execute a path and area intersection detection method when executed by a computer processor. The path and area intersection detection method includes: obtaining a robot path and an area to be measured, and dividing the area to be measured into multiple sub-areas to be measured; dividing the robot path by the dichotomy method to obtain sub-paths; performing rectangular division processing on the sub-paths to obtain a rectangular area corresponding to each sub-path, and all path points of the corresponding sub-path are included in the rectangular area; performing intersection detection processing on each rectangular area and each sub-area to be measured to obtain an intersecting sub-area and a non-intersecting sub-area; when the number of path points in the rectangular area corresponding to the intersecting sub-area is less than two, determining the intersecting sub-area as the sub-area to be measured that intersects the robot path; when the number of path points in the rectangular area corresponding to the intersecting sub-area is greater than two, continue to divide the sub-path by the dichotomy method until the number of path points in the rectangular area corresponding to the intersecting sub-area is less than two, and determining the corresponding intersecting sub-area as the sub-area to be measured that intersects the robot path.
[0144] Storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media such as CD-ROM, floppy disk or magnetic tape devices; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. Additionally, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system that is connected to the first computer system through a network (such as the Internet). The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media residing in different locations (such as in different computer systems connected through a network). The storage medium may store program instructions (such as specifically implemented as a computer program) executable by one or more processors.
[0145] Of course, for a storage medium storing computer-executable instructions provided by the embodiment of the present application, the computer-executable instructions are not limited to the path and area intersection detection method as described above, and may also execute related operations in the path and area intersection detection method provided by any embodiment of the present application.
[0146] The path and region intersection detection device, storage medium, and path and region intersection detection equipment provided in the above embodiments can execute the path and region intersection detection method provided in any embodiment of the present application. For technical details not described in detail in the above embodiments, reference can be made to the path and region intersection detection method provided in any embodiment of the present application.
[0147] The above is only the preferred embodiment of the present application and the technical principles applied. The present application is not limited to the specific embodiments described herein. Various obvious changes, re-adjustments, and substitutions that can be made by those skilled in the art will not depart from the protection scope of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments. Without departing from the concept of the present application, more other equivalent embodiments can be included, and the scope of the present application is determined by the scope of the claims.
Claims
1. A method for detecting the intersection of a path and a region, characterized in that Including: Obtain the robot path and the area to be measured, and divide the area to be measured into multiple sub-areas to be measured; Perform a splitting process on the robot path by the dichotomy method to obtain sub-paths; Perform a rectangular division process on the sub-paths to obtain a rectangular area corresponding to each sub-path, and all path points of the corresponding sub-path are included in the rectangular area; Perform an intersection detection process on each rectangular area and each sub-area to be measured to obtain an intersection sub-area and a non-intersection sub-area; When the number of path points in the rectangular area corresponding to the intersection sub-area is less than two, determine the intersection sub-area as the sub-area to be measured that intersects the robot path; When the number of path points in the rectangular area corresponding to the intersection sub-area is greater than two, continue to perform a splitting process on the sub-path by the dichotomy method until the number of path points in the rectangular area corresponding to the intersection sub-area is less than two, and then determine the corresponding intersection sub-area as the sub-area to be measured that intersects the robot path.
2. The method according to claim 1, wherein The step of performing a splitting process on the robot path by the dichotomy method to obtain sub-paths includes: Perform a rectangular division process according to the robot path to obtain a first rectangular area, and all path points of the robot path are included in the first rectangular area; Perform an intersection detection process on the first rectangular area and each sub-area to be measured to obtain a first intersection sub-area and a first non-intersection sub-area; When the number of path points in the first rectangular area corresponding to the first intersection sub-area is greater than two, perform a splitting process on the robot path by the dichotomy method to obtain a first sub-path and a second sub-path.
3. The method according to claim 2, wherein The step of performing a rectangular division process on the sub-paths to obtain a rectangular area corresponding to each sub-path, and all path points of the corresponding sub-path are included in the rectangular area includes: Perform a rectangular division process on the first sub-path and the second sub-path respectively to correspondingly obtain a second rectangular area and a third rectangular area. All path points of the first sub-path are included in the second rectangular area, and all path points of the second sub-path are included in the third rectangular area; The step of performing an intersection detection process on each rectangular area and each sub-area to be measured to obtain an intersection sub-area and a non-intersection sub-area includes: Perform an intersection detection process on the second rectangular area and each of the first intersection sub-areas to obtain a second intersection sub-area and a second non-intersection sub-area; Perform an intersection detection process on the third rectangular area and each of the first intersection sub-areas to obtain a third intersection sub-area and a third non-intersection sub-area.
4. The method according to claim 3, wherein After performing the intersection detection on the second rectangular area and each of the first intersection sub-areas to obtain a second intersection sub-area and a second non-intersection sub-area, it includes: Judge whether the number of path points in the second rectangular area corresponding to the second intersection sub-area is less than two; When the number of path points in the second rectangular area corresponding to the second intersection sub-area is less than two, determine the second intersection sub-area as the sub-area to be measured that intersects the robot path; When the number of path points within the second rectangular region corresponding to the second intersecting sub-region is greater than two, the first sub-path is divided by the binary method until the number of path points within the rectangular region corresponding to the corresponding intersecting sub-region is less than two, and the corresponding intersecting sub-region is determined as the sub-region to be measured intersecting with the robot path.
5. The method according to claim 3, characterized in that The intersecting detection of the third rectangular region with each of the first intersecting sub-regions to obtain a third intersecting sub-region and a third non-intersecting sub-region includes: Determining whether the number of path points within the third rectangular region corresponding to the third intersecting sub-region is less than two; When the number of path points within the third rectangular region corresponding to the third intersecting sub-region is less than two, determining the third intersecting sub-region as the sub-region to be measured intersecting with the robot path; When the number of path points within the third rectangular region corresponding to the third intersecting sub-region is greater than two, the second sub-path is divided by the binary method until the number of path points within the rectangular region corresponding to the corresponding intersecting sub-region is less than two, and the corresponding intersecting sub-region is determined as the sub-region to be measured intersecting with the robot path.
6. The method according to any one of claims 1-5, characterized in that The method further includes: Integrating the sub-regions to be measured intersecting with the robot path to obtain a set of intersecting sub-regions corresponding to each robot path; Comparing the sets of intersecting sub-regions corresponding to each robot path to determine the intersection sub-regions between the set of intersecting sub-regions of each robot path and the sets of intersecting sub-regions of other robot paths.
7. The method according to claim 6, characterized in that, After comparing the sets of intersecting sub-regions corresponding to each robot path to determine the intersection sub-regions between the set of intersecting sub-regions of each robot path and the sets of intersecting sub-regions of other robot paths, it includes: Calculating the robot activity time based on the intersection sub-regions to obtain the activity time period of each robot within the corresponding sub-region to be measured with an intersection, so that the number of robots active within any time within each sub-region to be measured is less than one.
8. A path and area intersection detection device, characterized in that, It includes: A path and region acquisition module, configured to acquire a robot path and a region to be measured, and divide the region to be measured into multiple sub-regions to be measured; A first path division module, configured to divide the robot path by the binary method to obtain sub-paths; A rectangular region division module, configured to perform rectangular division processing on the sub-paths to obtain a rectangular region corresponding to each sub-path, and all path points of the corresponding sub-path are included within the rectangular region; An intersecting detection module, configured to perform intersecting detection processing on each rectangular region with each sub-region to be measured to obtain an intersecting sub-region and a non-intersecting sub-region; An intersection determination module, configured to determine the intersecting sub-region as the sub-region to be measured intersecting with the robot path when the number of path points within the rectangular region corresponding to the intersecting sub-region is less than two; The second path splitting module is configured to, when the number of path points in the rectangular area corresponding to the intersecting sub-region is greater than two, continue to split the sub-path by the dichotomy method until the number of path points in the rectangular area corresponding to the intersecting sub-region is less than two, and determine the corresponding intersecting sub-region as the sub-region to be measured intersecting the robot path.
9. A path and region intersection detection device, characterized in that, Comprising: a memory and one or more processors; The memory is configured to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1-7.
10. A storage medium storing computer-executable instructions, characterized in that, The computer-executable instructions are used to execute the method according to any one of claims 1-7 when executed by a processor.
Citation Information
Patent Citations
Path planning method and device
CN112461256A
Collision prediction and avoidance for vehicles
US20200086855A1