A map region merging method, chip, terminal and robot system
By expanding the boundaries of the regions to be merged and performing intersection judgment, the problem of insufficient flexibility in map region merging in the existing technology is solved, and a more efficient and reasonable solution is achieved for the robot's path planning and merging operations in the real environment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- AMICRO SEMICONDUCTOR CO LTD
- Filing Date
- 2022-04-26
- Publication Date
- 2026-07-10
AI Technical Summary
Existing map region merging methods have poor flexibility and adaptability, and cannot effectively handle areas where there are no overlapping lines, which may cause robots to get stuck in real-world environments.
By extending the boundary of the region to be merged outward by a first preset distance, it is determined whether the expanded region meets the merging conditions, and multiple regions are merged in response to user operation. The regions are connected by a linear expansion and erosion method with closed operation to ensure that the merged region does not change its position and shape.
It improves the flexibility and accuracy of map area merging, prevents robots from getting stuck, optimizes path planning, and enhances user experience and path planning efficiency.
Smart Images

Figure CN116991150B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of map region merging, and specifically to a map region merging method, chip, terminal, and robot system. Background Technology
[0002] With the rapid development of technology, robots are widely used in various fields. Robots construct electronic ground systems. Figure 1 Typically, electronic maps are generated by robots traversing space. However, these maps may have discrepancies between their regional divisions and the actual environment. In such cases, users need to manually select and merge certain areas on their devices. Current methods for merging areas on a map usually involve mathematically calculating the lines of overlap between the areas to be merged. This process is complex, cannot merge areas without overlapping lines, lacks flexibility, and is poorly adaptable to real-world environments. Summary of the Invention
[0003] To address the aforementioned problems, this invention provides a map region merging method, chip, terminal, and robot system, significantly improving the flexibility, rationality, and accuracy of map region merging, and avoiding robot jamming caused by unreasonable map region merging. The specific technical solution of this invention is as follows:
[0004] This invention discloses a map region merging method, which includes: extending the boundaries of two regions to be merged outward by a first preset distance; determining whether the two regions to be merged meet the merging conditions based on the two regions after the first preset distance has been extended outward; if so, merging the two regions into one region; otherwise, determining that the merging of the two regions has failed.
[0005] Compared with existing technologies, this technical solution first expands the two regions to be merged by a first preset distance, and then judges whether the two regions to be merged meet the conditions for merging based on the two regions after the first preset distance is expanded. The expansion of the regions before the judgment improves the flexibility of region merging and enhances the adaptability of the map region merging method in practical environments.
[0006] Furthermore, the map region merging method further includes: in response to the user's region selection operation and region merging operation, determining one or more regions to be merged; and selecting two regions to be merged from one or more regions to be merged. This technical solution determines the regions to be merged in response to the user's region selection operation, and then selects two regions to be merged from the user-selected regions to perform merging condition judgment, thereby achieving the merging of multiple regions to be merged.
[0007] Furthermore, the map region merging method further includes: if the determination of whether two selected regions to be merged meet the merging conditions is completed, recording the merging determination results of the two regions to be merged; then, from the determined one or more regions to be merged, reselecting two regions to be merged to determine whether they meet the merging conditions, and so on, until the merging determination results of all pairs of regions to be merged in the one or more regions to be merged are obtained; wherein, the merging determination results include whether the two selected regions to be merged meet the merging conditions, or whether the two selected regions to be merged do not meet the merging conditions. This technical solution can realize the merging of two or more regions, requiring only one selection operation from the user, thus achieving the merging of multiple regions, improving user experience, and increasing the flexibility of region merging.
[0008] Furthermore, the step of extending the boundaries of the two regions to be merged outward by a first preset distance specifically includes: converting the two regions to be merged into two polygons to be merged; obtaining all boundary line segments of the two polygons to be merged respectively; performing a translation operation of the first preset distance on all boundary line segments of the two polygons to be merged, thereby obtaining two regions to be merged that have been extended outward by the first preset distance. This technical solution expands the regions to be merged outward by converting them into polygons to obtain their boundary line segments, and determines whether there is a possibility of connectivity between the two regions by expanding the regions to be merged.
[0009] Furthermore, the step of converting the two regions to be merged into two polygons specifically includes: obtaining the region outlines of the two regions to be merged; and converting the two regions to be merged into two polygons with the region outlines of the two regions as their boundaries. This technical solution uses the region outlines as the boundaries of the polygons to accurately convert the regions to be merged into polygons.
[0010] Further, the step of performing a translation operation of a first preset distance on all boundary segments of the two polygons to be merged to obtain two merged regions expanded outward by the first preset distance specifically includes: translating each boundary segment of each polygon to be merged along the perpendicular bisector of the boundary segment in a direction from the inside of the polygon to the outside by the first preset distance; extending both ends of each boundary segment after translation by the first preset distance so that both ends of each boundary segment after translation by the first preset distance can intersect and connect with the two boundary segments connected to the boundary segment before translation, after the translation operation of the first preset distance on all boundary segments; and taking the area enclosed by the intersecting boundary segments of the same polygon to be merged after translation by the first preset distance as a merged region expanded outward by the first preset distance, thus obtaining two merged regions expanded outward by the first preset distance. This technical solution, by extending both ends of the boundary segments, enables the boundary segments after translation by the first preset distance to intersect and connect according to the connection method of the original boundary segments of the polygons to be merged, thereby expanding the polygons to be merged.
[0011] Furthermore, the step of determining whether two regions to be merged meet the merging conditions based on two regions extended outward by a first preset distance specifically includes: determining whether the two regions to be merged by an outward extension of a first preset distance have an intersection; if the two regions to be merged by an outward extension of a first preset distance have an intersection, then determining whether the intersection has the conditions to accommodate a robot passing through; if the intersection has the conditions to accommodate a robot passing through, then it is determined that the two regions to be merged meet the merging conditions, and the two regions to be merged are merged into one region; if the two regions to be merged by an outward extension of a first preset distance do not have an intersection, then it is determined that the two regions to be merged do not meet the merging conditions, and the merging of the two regions fails. This technical solution preliminarily determines whether two regions to be merged meet the merging conditions based on whether two regions to be merged by an outward extension of a first preset distance have an intersection. For cases where there is an intersection, a determination is made as to whether the conditions to accommodate a robot passing through are met. This multiple determination improves the accuracy of the merging determination results for the regions to be merged.
[0012] Furthermore, determining whether the intersection area meets the conditions for accommodating a robot specifically includes: determining whether the intersection area can accommodate a robot; if the intersection area can accommodate a robot, then determining whether there are obstacles within the intersection area; if there are obstacles within the intersection area, then determining whether the area not occupied by obstacles within the intersection area can accommodate a robot; if the intersection area can accommodate a robot and there are no obstacles within the intersection area, or the area not occupied by obstacles within the intersection area can accommodate a robot, then the intersection area is determined to meet the conditions for accommodating a robot; if the intersection area cannot accommodate a robot, or there are obstacles within the intersection area and the area not occupied by obstacles within the intersection area cannot accommodate a robot, then the intersection area is determined to not meet the conditions for accommodating a robot. This technical solution, from the perspective of merging rationality, determines whether the intersection area of two areas to be merged after being extended by a first preset distance can accommodate a robot, and whether there are obstacles within the intersection area, thus avoiding a situation where, after two areas to be merged are merged into one area, the robot cannot move from one area to the other.
[0013] Furthermore, the map region merging method also includes: if the sum of the areas of the two regions to be merged is greater than a preset area threshold, then the two regions to be merged are determined to not meet the merging conditions, and the merging of the two regions fails. This technical solution, by limiting the sum of the areas of the two regions to be merged, avoids the problem of the merged region being too large, increasing the difficulty of the robot's path planning, and thus causing the robot's walking route to become strange.
[0014] Further, merging the two regions to be merged into one region specifically includes: converting the two regions to be merged into two raster regions to be merged in a raster image; performing a dilation operation on the two raster regions to be merged to obtain two raster regions with overlapping areas; performing an erosion operation on the two raster regions with overlapping areas to obtain a merged raster region that connects the two raster regions to be merged through the overlapping areas; obtaining the region outline of the merged raster region; converting the merged raster region into a merged polygon with the region outline as its boundary; and identifying the region enclosed by the merged polygon as a merged region, thus completing the merging of the two regions to be merged. This technical solution uses a linear dilation followed by erosion method with a closing operation to connect the raster regions to be merged, achieving the bridging of small gaps between the two regions without changing their position and shape, thus flexibly merging the two regions to be merged.
[0015] Furthermore, if there are three or more regions to be merged among the identified regions to be merged, then after merging two of the regions, the identified regions to be merged are updated, replacing two of them with the merged region. This technical solution updates the merged region with the new region to be merged, thereby achieving the merging of multiple regions.
[0016] The present invention also discloses a chip that internally stores a computer program, which, when executed, runs the map region merging method as described above.
[0017] The present invention also discloses a map merging terminal, which includes a processor, a touch screen, and a main control chip; the touch screen is used to display map areas and receive user area selection and merging operations; the main control chip is the chip described above, so as to enable the map merging terminal to run the map area merging method described above.
[0018] This invention also discloses a map merging terminal control method, which includes the following steps: Step 1: In response to a user's region selection operation, the map merging terminal determines one or more regions selected by the user as regions to be merged; Step 2: The map merging terminal merges regions that meet the merging conditions between each pair of regions to be merged; Step 3: In response to a user's region merging operation, the map displayed on the map merging terminal is updated to the map after the region merging. This technical solution, based on the map merging terminal obtaining the user's region selection and region merging operation, allows for flexible merging of map regions according to the user's actual needs, improving user experience while ensuring the rationality of region merging.
[0019] Furthermore, the regions in step 2 that have the conditions to be merged between each other in one or more regions to be merged specifically refer to the regions in one or more regions to be merged that, after two regions to be merged are extended outward by a first preset distance, have an intersection region between them, and the intersection region has the conditions to accommodate the passage of a robot. In this case, the two regions to be merged have the conditions to be merged.
[0020] This invention also discloses a robot system, comprising a map merging terminal and a robot body. The map merging terminal receives user region selection and merging operations, determines whether the selected regions meet merging conditions, performs a merging operation on regions meeting the conditions, obtains a merged map, and transmits it to the robot body. The robot body receives the map transmitted by the map merging terminal, performs path planning based on the map, and moves according to the planned path. This robot system enables flexible merging of divided regions, optimizes robot path planning, and avoids problems such as disordered robot paths caused by excessively large or numerous regions. Attached Figure Description
[0021] Figure 1 This is a flowchart illustrating a map region merging method according to an embodiment of the present invention.
[0022] Figure 2 This is a grid diagram illustrating two grid regions to be merged according to an embodiment of the present invention.
[0023] Figure 3 This is a schematic diagram of the expanded grid after two grid regions to be merged are described in one embodiment of the present invention.
[0024] Figure 4 This is a schematic diagram of the grid after corrosion of two grid regions to be merged, according to one embodiment of the present invention. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described below are merely illustrative of the invention and are not intended to limit the invention. Furthermore, it should be understood that for those skilled in the art, modifications to the design, manufacturing, or production processes disclosed in this invention are merely conventional technical means and should not be construed as insufficient disclosure of the invention.
[0026] Unless otherwise defined, the technical or scientific terms used in this invention should be understood in their ordinary sense by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” etc., used in this application do not indicate quantity limitation and may represent singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof, used in this application, are intended to cover non-exclusive inclusion, such as: a process, method, system product, or device that includes a series of steps or modules is not limited to the listed steps or units, but may also include steps or modules not listed, or may also include other steps or units inherent to these processes, methods, products, or devices. The terms “first,” “second,” “third,” etc., used in this application are merely used to distinguish similar correspondences and do not represent a specific ordering of objects.
[0027] One embodiment of the present invention provides a map region merging method, which is used to merge map regions, enabling the map regions to flexibly, accurately, and reasonably adjust their boundary divisions according to user needs, such as... Figure 1 As shown, the map region merging method specifically includes:
[0028] Step 101: In response to the user's region selection operation, determine one or more regions to be merged;
[0029] Step 102: Select two regions to be merged from the more than one regions to be merged; specifically, the more than one regions to be merged may include, but are not limited to, one, two, three or more regions to be merged. This step only extracts two regions to be merged for merging condition judgment.
[0030] Step 103: Determine whether the sum of the areas of the two regions to be merged is greater than a preset area threshold. If not, proceed to step 201; if yes, proceed to step 501. Specifically, the preset area threshold is an area threshold set by the inventor after considering various factors such as different robot models, robot mapping capabilities, and navigation planning capabilities. It is used to limit the sum of the areas of the two regions to be merged in order to avoid the merged area being too large, which would cause the robot's path planning to become disordered and affect the robot's working efficiency.
[0031] Step 201: Extend the boundaries of the two regions to be merged outward by a first preset distance, and then proceed to step 301; In this step, the boundaries of the two regions to be merged are extended outward by a first preset distance so that the overall area of the two regions to be merged is extended outward. The first preset distance is determined by the inventor through repeated testing based on a comprehensive consideration of various factors such as the size of the map and the size of the area division.
[0032] Specifically, the method for extending the boundary of the two regions to be merged outward by a first preset distance is as follows:
[0033] Step 201-1: Convert the two regions to be merged into two polygons to be merged; wherein, the conversion method for converting the regions to be merged into polygons to be merged may be, but is not limited to, obtaining the region outline of the regions to be merged and converting the regions to be merged into polygons with the region outline of the regions to be merged as the boundary.
[0034] Step 201-2: Obtain all boundary line segments of the two polygons to be merged respectively;
[0035] Step 201-3: Perform a translation operation of the first preset distance on all boundary line segments of the two polygons to be merged, and obtain two regions to be merged that are expanded outward by the first preset distance.
[0036] Specifically, step 201-3, which involves performing a translation operation of a first preset distance on all boundary segments of the two polygons to be merged to obtain two regions to be merged that are extended outward by a first preset distance, includes: translating each boundary segment of each polygon to be merged along the perpendicular bisector of the boundary segment in a direction pointing outward from the inside of the polygon to be merged by a first preset distance; extending both ends of each boundary segment after translation by a first preset distance so that both ends of each boundary segment after translation by a first preset distance can intersect and connect with the two boundary segments connected before the translation of the boundary segment after the translation operation of all boundary segments is performed by a first preset distance; and taking the region enclosed by the boundary segments of the same polygon to be merged that are intersected and connected after translation by a first preset distance as a region to be merged that is extended outward by a first preset distance, thereby obtaining two regions to be merged that are extended outward by a first preset distance.
[0037] Step 301: Determine whether there is an intersection between the two regions to be merged after the two boundaries are extended outward by a first preset distance. If yes, proceed to step 302; otherwise, proceed to step 501. Specifically, if there is an intersection between the two regions to be merged after the two boundaries are extended outward by a first preset distance, it means that there is a possibility of merging the two regions through the intersection. If there is no intersection between the two regions to be merged after the two boundaries are extended outward by a first preset distance, it means that there are walls and / or obstacles between the two regions to be merged, which affect the merging of the two regions and make the two regions to be merged not meet the conditions for merging.
[0038] Step 302: Determine whether the intersection area between the two regions to be merged after the two boundaries are extended outward by a first preset distance can accommodate the robot to pass through. If yes, proceed to step 303; otherwise, proceed to step 501. This step determines whether the robot can move freely within the two regions after the two regions to be merged are connected by the intersection area, by determining whether the intersection area can accommodate the robot to pass through.
[0039] Step 303: Determine whether there are obstacles in the intersection area between the two regions to be merged after the two boundaries have been extended outward by a first preset distance. If yes, proceed to step 304; otherwise, proceed to step 401. This step determines whether there are obstacles in the intersection area to avoid the problem that obstacles block the robot's movement path in the intersection area, preventing the robot from moving freely between the two regions to be merged.
[0040] Step 304: Determine whether the unoccupied area of the intersection region between the two regions to be merged after the two boundaries are extended outward by a first preset distance can accommodate the robot to pass through. If yes, proceed to step 401; otherwise, proceed to step 501. In the case where there are obstacles in the intersection region, determine whether the unoccupied area of the obstacles in the intersection region can accommodate the robot to pass through, so as to ensure that even if there are obstacles in the intersection region, the robot can still move freely between the two regions to be merged through the intersection region.
[0041] Step 401: Determine that the two regions to be merged meet the conditions for merging, and proceed to step 402;
[0042] Step 402: Merge the two regions to be merged using a closing operation to obtain a merged region;
[0043] Step 501: It is determined that the two regions to be merged do not meet the conditions for merging, and the merger of the two regions to be merged fails.
[0044] Specifically, step 402, which involves merging the two regions to be merged using a closing operation to obtain a merged region, includes: converting the two regions to be merged into two raster regions to be merged in a raster image; performing a dilation operation on the two regions to be merged to obtain two raster regions with overlapping areas; performing an erosion operation on the two raster regions with overlapping areas to obtain a merged raster region that connects the two regions to be merged through the overlapping areas; obtaining the region outline of the merged raster region; converting the merged raster region into a merged polygon with the region outline as its boundary; and identifying the region enclosed by the merged polygon as a merged region, thus completing the merging of the two regions to be merged. The closing operation, defined in mathematical morphology as dilation followed by erosion, is used to connect adjacent images, connect broken contour lines, and smooth their boundaries without changing the area of the region. In this embodiment, the closing operation is used to connect and merge the two regions to be merged.
[0045] Preferably, after obtaining the merging judgment results of the two selected regions to be merged, the merging judgment results of the two regions to be merged are recorded. If there are more than two regions to be merged as determined, then two regions to be merged are reselected from the determined regions to determine whether they meet the merging conditions. This process is repeated until the merging judgment results of all pairs of regions to be merged in the determined regions are obtained. The merging judgment results include whether the two selected regions to be merged meet the merging conditions or whether the two selected regions to be merged do not meet the merging conditions. For two regions to be merged that meet the merging conditions, the two regions to be merged are merged into one region.
[0046] Preferably, if there are more than two of the determined regions to be merged, after merging two of the regions to be merged, the determined regions to be merged are updated, and two of the regions to be merged are replaced with a merged region.
[0047] Another embodiment of the present invention provides a map using the map region merging method described in the above embodiments. In this embodiment, the sum of the areas of the two regions to be merged is less than a preset area threshold, and the two regions to be merged have an intersection area after being expanded outward by a first preset distance. The intersection area has the conditions to accommodate a robot to pass through, and there are no obstacles in the intersection area. Figure 2 This is a raster image converted from regions A and B to be merged in this embodiment after they are determined to meet the merging conditions, such as... Figure 2 As shown, there is no intersection between the unexpanded raster region A and the unexpanded raster region B to be merged. Based on the closing operation, raster regions A and B are expanded to... Figure 3 The diagram shows two intersecting raster regions, A and B, to be merged. Then, the closing operation is used to erode these two intersecting raster regions into... Figure 4 This shows a merged raster region. Specifically, as shown... Figure 2 and Figure 3 As shown, the expansion operation of the closing operation refers to expanding the boundaries of each grid cell in the grid region to be merged, incorporating the adjacent grid cells into that grid region. Figure 3 and Figure 4 As shown, the erosion operation of the closing operation refers to eroding the expanded portion of the grids of the expanded grid regions A and B to be merged, retaining only the grids connecting the portions of grid regions A and B to be merged. It can be understood that it is possible to obtain a single grid region after merging the two grid regions connected by the intersection region.
[0048] One embodiment of the present invention provides a chip, which internally stores a computer program. When the computer program is executed, it implements the map region merging method as described in the foregoing embodiments. Those skilled in the art will understand that all or part of the steps in the methods described above can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a microcontroller, chip, or processor to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0049] In one embodiment of the present invention, a map region merging terminal is provided, comprising: a processor, a touch screen, and a main control chip; the touch screen is used to display a map and receive user region selection and merging operations; the main control chip is the same as the chip described in the foregoing embodiments, and is used to store a computer program, which, when executed, implements the map region merging method as described in the foregoing embodiments.
[0050] Specifically, the terminal control method for merging map areas includes:
[0051] Step 1: The map merging terminal responds to the user's region selection operation and determines one or more regions selected by the user in the map as regions to be merged; specifically, the user selects one or more regions on the touch screen of the map merging terminal, and after receiving the user's region selection operation, the map merging terminal determines one or more regions selected by the user as regions to be merged.
[0052] Step 2: The map merging terminal merges the regions that meet the merging conditions between each pair of the more than one regions to be merged; specifically, after obtaining more than one regions to be merged, the map merging terminal performs the map region merging method described in the foregoing embodiment on the more than one regions to be merged, merges the regions that meet the merging conditions between each pair of the more than one regions to be merged, and obtains the merged map.
[0053] Step 3: The map merging terminal responds to the user's region merging operation by updating the map displayed on the map merging terminal to the map after region merging. Specifically, the user taps the region merging operation touch key on the touch screen of the map merging terminal to merge the regions selected in Step 1. After receiving the user's region merging operation, the map merging terminal updates the map displayed on the map merging terminal to the map after region merging obtained in Step 2.
[0054] In this embodiment of the invention, the map merging terminal responds to the user's region selection operation, determines the regions to be merged, and performs pre-merging based on the judgment result of whether the regions to be merged meet the merging conditions. This allows the map merging terminal to quickly update the map to the merged map after the user performs the region merging operation, thereby improving the user experience.
[0055] Specifically, in step 2, the regions in one or more regions to be merged that have the conditions for merging are defined as follows: after two regions to be merged are extended outward by a first preset distance, there is an intersection between the two regions that have been extended outward by the first preset distance, and the intersection has the conditions to accommodate the robot to pass through. In this case, the two regions to be merged have the conditions for merging.
[0056] One embodiment of the present invention provides a robot system, which includes: a map region merging terminal and a robot body; the map region merging terminal is the map region merging terminal described in the foregoing embodiment, used to receive a user's region selection operation and region merging operation, determine whether the user-selected region meets the merging conditions, perform a merging operation on the region that meets the merging conditions, obtain a map of the merged regions and transmit it to the robot body; the robot body is used to receive the map transmitted by the map merging terminal, perform path planning based on the map and move based on the planned path.
[0057] Obviously, the above embodiments are only some embodiments of the present invention, not all embodiments, and the technical solutions of various embodiments can be combined with each other. Furthermore, if terms such as "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer" appear in the embodiments, they indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention. If terms such as "first," "second," and "third" appear in the embodiments, they are for the convenience of distinguishing related features, and should not be construed as indicating or implying their relative importance, order, or number of technical features.
[0058] Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the invention. The scope of the invention is defined by the appended claims and their equivalents. The above descriptions are merely preferred embodiments of the invention and are not intended to limit the invention. Various modifications and variations can be made to the invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the scope of protection of the invention.
Claims
1. A method for merging map regions, characterized in that, The map region merging method includes: Extend the boundaries of the two regions to be merged outward by a first preset distance; Based on the two regions to be merged after being extended outward by a first preset distance, it is determined whether the two regions to be merged meet the merging conditions. If so, the two regions to be merged are merged into one region. If not, it is determined that the merging of the two regions to be merged has failed. Specifically, the step of determining whether two regions to be merged meet the conditions for merging based on two regions extended outward by a first preset distance includes: Determine whether there is an intersection between two regions to be merged after being expanded outward by a first preset distance; If two regions to be merged after being extended outward by a first preset distance have an intersection, then determine whether the intersection region has the conditions to accommodate the robot's passage. If the intersection area has the conditions to accommodate the robot to pass through, then the two areas to be merged are determined to have the conditions to be merged, and the two areas to be merged are merged into one area; If two regions to be merged, after being extended outward by a first preset distance, do not intersect, or if the intersecting region does not meet the conditions for accommodating the robot to pass through, then it is determined that the two regions to be merged do not meet the conditions for merging, and the merging of the two regions to be merged fails.
2. The map region merging method according to claim 1, characterized in that, The map region merging method further includes: in response to the user's region selection operation and region merging operation, determining one or more regions to be merged; and selecting two regions to be merged from one or more regions to be merged.
3. The map region merging method according to claim 2, characterized in that, The map region merging method further includes: if the determination of whether two selected regions to be merged meet the merging conditions is completed, the merging determination result of the two regions to be merged is recorded, and two regions to be merged are reselected from the determined one or more regions to be merged for the determination of whether they meet the merging conditions, and so on, until the merging determination results of all regions to be merged in the one or more regions to be merged are obtained; wherein, the merging determination result includes whether the two selected regions to be merged meet the merging conditions, or whether the two selected regions to be merged do not meet the merging conditions.
4. The map region merging method according to claim 1, characterized in that, The step of extending the boundary between the two regions to be merged outward by a first preset distance specifically includes: Convert the two regions to be merged into two polygons to be merged; Obtain all boundary line segments of the two polygons to be merged; Perform a translation operation of a first preset distance on all boundary line segments of the two polygons to be merged to obtain two regions to be merged that are expanded outward by the first preset distance.
5. The map region merging method according to claim 4, characterized in that, The process of converting the two regions to be merged into two polygons specifically includes: Obtain the region outlines of the two regions to be merged; Convert the two regions to be merged into two polygons with the region outlines of the two regions as their boundaries.
6. The map region merging method according to claim 4, characterized in that, The step of performing a translation operation on all boundary segments of the two polygons to be merged by a first preset distance to obtain two regions to be merged that are extended outward by the first preset distance specifically includes: Each boundary segment of each polygon to be merged is translated a first preset distance along the perpendicular bisector of that boundary segment from the inside of the polygon to the outside. Extend both ends of each boundary line segment after translation by a first preset distance, so that the two ends of each boundary line segment after translation by a first preset distance can intersect and connect with the two boundary line segments connected to that boundary line segment before translation, after all boundary line segments have been translated by the first preset distance. The region enclosed by the boundary line segments that intersect and connect after translating the same polygon to be merged by a first preset distance is taken as a merged region to be expanded outward by a first preset distance, and two merged regions to be expanded outward by a first preset distance are obtained.
7. The map region merging method according to claim 1, characterized in that, The determination of whether the intersection region meets the conditions for accommodating the robot to pass through specifically includes: Determine whether the intersection area is large enough for the robot to pass through; If the intersection area is large enough for the robot to pass through, then it is determined whether there are any obstacles in the intersection area. If there are obstacles in the intersection area, it is determined whether the area in the intersection area not occupied by obstacles can accommodate the robot to pass through; If the intersection area can accommodate the robot to pass through and there are no obstacles in the intersection area, or if the area in the intersection area that is not occupied by obstacles can accommodate the robot to pass through, then the intersection area is determined to have the conditions to accommodate the robot to pass through. If the intersection area cannot accommodate a robot to pass through, or if there are obstacles in the intersection area and the area in the intersection area not occupied by the obstacles cannot accommodate a robot to pass through, then the intersection area is determined to be unsuitable for accommodating a robot to pass through.
8. The map region merging method according to claim 1, characterized in that, The map region merging method further includes: if the sum of the areas of two regions to be merged is greater than a preset area threshold, then it is determined that the two regions to be merged do not meet the merging conditions, and the merging of the two regions to be merged fails.
9. The map region merging method according to claim 1, characterized in that, The process of merging the two regions to be merged into one region specifically includes: Convert the two regions to be merged into two raster regions to be merged in a single raster image; Perform an expansion operation on two raster regions to be merged to obtain two raster regions that have an intersection. Perform an erosion operation on two grid regions that have an intersection to merge, and obtain a single grid region that is merged by connecting the two grid regions through the intersection. Obtain the region outline of a merged raster region; The merged raster region is converted into a merged polygon with the region outline as its boundary. The area enclosed by the merged polygon is then identified as a merged region, thus completing the merging of the two regions to be merged.
10. The map region merging method according to claim 2, characterized in that, If there are three or more regions to be merged within one or more identified regions, then after merging two of the regions, the identified regions to be merged will be updated, replacing two of the regions with the merged region.
11. A chip internally storing a computer program, characterized in that, When the computer program is executed, it performs the map region merging method as described in any one of claims 1 to 10.
12. A map merging terminal, characterized in that, The map merging terminal includes a processor, a touch screen, and a main control chip; the touch screen is used to display map areas and receive user area selection and merging operations; the main control chip is the chip described in claim 11, so as to enable the map merging terminal to run the map area merging method described in any one of claims 1 to 10.
13. A control method for a map merging terminal, characterized in that, The map merging terminal is the map merging terminal as described in claim 12, and the control method of the map merging terminal includes the following steps: Step 1: The map merging terminal responds to the user's region selection operation and determines one or more regions on the map selected by the user as regions to be merged; Step 2: The map merging terminal merges the regions that meet the merging conditions between the one or more regions to be merged, and obtains the merged map. Step 3: The map merging terminal responds to the user's region merging operation by updating the map displayed on the map merging terminal to the map after region merging.
14. The control method for the map merging terminal according to claim 13, characterized in that, In step 2, the regions in one or more regions to be merged that have the conditions for merging are specifically those regions that, after two regions to be merged are extended outward by a first preset distance, have an intersection region between them, and the intersection region has the conditions to accommodate the passage of a robot.
15. A robot system, characterized in that, The robot system includes: a map merging terminal and a robot body; the map merging terminal is the map merging terminal as described in claim 12, used to receive the user's region selection operation and region merging operation, determine whether the region selected by the user meets the merging conditions, perform the merging operation on the region that meets the merging conditions, obtain the merged map and transmit it to the robot body; the robot body is used to receive the merged map transmitted by the map merging terminal, perform path planning based on the merged map and move based on the planned path.