Map processing method and device, cleaning equipment, storage medium and electronic device
By comparing and stitching together the point cloud maps of the cleaning equipment, obstacles are detected and filled in, solving the problem of missed cleaning by the cleaning equipment under multiple incomplete maps, and achieving comprehensive cleaning and efficient cleaning.
Patent Information
- Application Number
- CN202210284364.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-22
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2042-03-22
AI Technical Summary
When cleaning equipment is working, it may be unable to know the specific obstacle status of the area when cleaning based on multiple incomplete maps, resulting in missed cleaning.
The first and second point cloud maps are compared to identify common point cloud areas and stitched together. Based on the detection results, obstacles are filled into the target point cloud map, including line segment detection and obstacle clustering, to determine the static or dynamic nature of the obstacles.
It enables accurate identification of the status of obstacles within the area, improves the comprehensiveness and efficiency of cleaning, and solves the problem of missed areas.
Smart Images

Figure CN116863165B_ABST
Abstract
Description
[0001] The present application relates to the field of communication, in particular to a map processing method and device, a cleaning device, a storage medium and an electronic device.
[0002] With the rapid development of artificial intelligence, more and more intelligent robots enter people's lives, making people's lives more and more convenient.
[0003] With the popularity of robots, people encounter more and more problems in using robots. For example, when the cleaning device is working, it will clean based on the map obtained by pre-scanning. However, multiple maps may be obtained by pre-scanning, and each map may not be a complete area map. Therefore, when cleaning based on multiple incomplete maps, it may not be possible to obtain the specific obstacle state of the area, resulting in the problem of missed cleaning.
[0004] For the above problems in the related art, there is currently no effective solution.
[0005] The embodiments of the present application provide a map processing method and device, a cleaning device, a storage medium and an electronic device to at least solve the problem of area missed cleaning in the related art.
[0006] According to one aspect of the present application, a map processing method is provided, comprising: comparing a first point cloud map and a second point cloud map obtained to determine a common point cloud area between the first point cloud map and the second point cloud map, wherein the first point cloud map and the second point cloud map are different point cloud maps generated after scanning a target space; splicing the first point cloud map and the second point cloud map based on the common area to obtain a target point cloud map; detecting obstacles in the common area, and filling the detected obstacles in the target point cloud map based on the detection result.
[0007] In one exemplary embodiment, detecting obstacles in the common area and filling the detected obstacles in the target point cloud map based on the detection result comprises: performing line segment detection on a target line segment in the common area, the target line segment being used to indicate a static obstacle; in the case where the target line segment is detected, determining a first relationship between a first line segment in the first point cloud map and a second line segment in the second point cloud map, wherein the first line segment includes the target line segment and the second line segment includes the target line segment; filling the target line segment in the target point cloud map based on the first relationship.
[0008] In an example embodiment, the determining the first relationship between the first line segment in the first point cloud map and the second line segment in the second point cloud map comprises: determining a first similarity between the first line segment and the second line segment, and determining the first relationship as a relationship between the first similarity and a first similarity threshold; and the filling the target line segment for indicating the static obstacle in the target point cloud map based on the first relationship comprises: in a case where the first relationship indicates that the first similarity is greater than or equal to the first similarity threshold, determining a union of the first line segment and the second line segment as the target line segment, and filling the target line segment into the target point cloud map; and in a case where the first relationship indicates that the first similarity is less than the first similarity threshold, determining an intersection of the first line segment and the second line segment as the target line segment, and filling the target line segment into the target point cloud map.
[0009] In an example embodiment, the determining the first similarity between the first line segment and the second line segment comprises: determining a first length corresponding to the first line segment and first coordinates of a plurality of points included in the first line segment, and determining a second length corresponding to the second line segment and second coordinates of a plurality of points included in the second line segment; comparing the first length and the second length to obtain a first comparison result, and comparing the first coordinates and the second coordinates to obtain a second comparison result; and determining the first similarity based on the first comparison result and the second comparison result.
[0010] In an example embodiment, after the line segment detection for indicating the static obstacle in the common area, the method further comprises: in a case where it is determined that the target line segment does not exist in the common area, performing obstacle clustering in the common area included in the first point cloud map to obtain a first clustering result, and performing obstacle clustering in the common area included in the second point cloud map to obtain a second clustering result; determining a second relationship between the first clustering result and the second clustering result; and filling target information in the target point cloud map based on the second relationship.
[0011] In an example embodiment, the determining the second relationship between the first clustering result and the second clustering result comprises: determining a second similarity of a first target clustering result included in the first clustering result and a second target clustering result included in the second clustering result, and determining a relationship between the second similarity and a second similarity threshold as the second relationship, wherein a center position of the first clustering result and a center position of the second clustering result differ by less than a predetermined threshold; and the filling target information in the target point cloud map based on the second relationship comprises: in a case where the second relationship indicates that the second similarity is greater than or equal to the second similarity threshold, filling a region including a target clustering result in the target point cloud map as a known obstacle region; and in a case where the second relationship indicates that the second similarity is less than the second similarity threshold, filling the region including the target clustering result in the target point cloud map as an unknown obstacle region; wherein the target clustering result is an intersection of the first target clustering result and the second target clustering result.
[0012] In an example embodiment, the determining the second similarity of the first target clustering result included in the first clustering result and the second target clustering result included in the second clustering result comprises: determining an area of a first region corresponding to the first target clustering result and third coordinates of a plurality of points included in the first target clustering result, and determining an area of a second region corresponding to the second target clustering result and fourth coordinates of a plurality of points included in the second target clustering result; comparing the area of the first region and the area of the second region to obtain a third comparison result, and comparing the third coordinates and the fourth coordinates to obtain a fourth comparison result; and determining the second similarity based on the third comparison result and the fourth comparison result.
[0013] According to another aspect of the present application, there is also provided a map processing apparatus, comprising: a first determining module configured to compare a first point cloud map and a second point cloud map to determine a common point cloud region between the first point cloud map and the second point cloud map, wherein the first point cloud map and the second point cloud map are different point cloud maps generated after scanning a target space; a first splicing module configured to splice the first point cloud map and the second point cloud map based on the common region to obtain a target point cloud map; and a first filling module configured to detect obstacles in the common region and fill the detected obstacles in the target point cloud map based on a detection result.
[0014] According to another embodiment of the present application, a computer readable storage medium is also provided, which comprises a stored program, wherein the program performs the method described in any of the above embodiments when executed.
[0015] According to another embodiment of the present application, an electronic device is also provided, which comprises a memory and a processor, wherein the memory stores a computer program, and the processor is configured to perform the method described in any of the above embodiments by using the computer program.
[0016] According to another aspect of the present application, a cleaning device is also provided, which comprises the map processing device described in the above device embodiments.
[0017] By the present application, the first point cloud map and the second point cloud map obtained can be compared, and then the common point cloud region between the first point cloud map and the second point cloud map can be determined based on the comparison result, so that the first point cloud map and the second point cloud map can be spliced based on the common point cloud region to obtain a target point cloud map, and then after obstacle detection in the common region, the detected obstacles can be filled in the target point cloud map based on the detection result. By using the method of the present application, the common point cloud region of at least two point cloud maps can be detected for obstacles, and then the detected obstacles can be filled in the target point cloud map, so as to accurately confirm the state of the obstacles in the region, and the cleaning is performed based on the state of the obstacles, thereby realizing the comprehensiveness of the cleaning, effectively solving the problem of region missing cleaning in the related art, and achieving the effect of improving the cleaning efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0018] The accompanying drawings, which are included to provide a further understanding of the present application and constitute a part of this application, illustrate embodiments of the present application and together with the description serve to explain the present application. In the drawings:
[0019] Figure 1 is a hardware structure block diagram of a map processing method according to an embodiment of the present application;
[0020] Figure 2 is a flowchart of a map processing method according to an embodiment of the present application;
[0021] Figure 3 is a structure block diagram of a map processing device according to an embodiment of the present application. DETAILED DESCRIPTION
[0022] The present application will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments. It should be noted that the embodiments and features in the embodiments in the present application can be combined with each other without conflict.
[0023] It should be noted that the terms "first", "second" and the like in the description and claims of the application and above drawings are used to distinguish between similar objects, and do not necessarily have to describe a specific order or sequence.
[0024] The method provided by the embodiment of the application can be executed in a mobile robot or the like operation device. Taking the case of running on a mobile robot, Figure 1 is a hardware structure block diagram of a map processing method of the embodiment of the application. As shown in Figure 1 , the mobile robot can include one or more (only one is shown in Figure 1 ) processor 102 (the processor 102 can include but not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. In an exemplary embodiment, the above-mentioned mobile robot can also include a transmission device 106 for communication function and an input and output device 108. Those skilled in the art can understand that Figure 1 The structure shown is only schematic, which does not limit the structure of the above-mentioned mobile robot. For example, the mobile robot can also include more or less components than Figure 1 , or have a different configuration with the same function as Figure 1 or more functions than Figure 1 .
[0025] The memory 104 can be used to store computer programs, such as software programs of application software and modules, such as the computer program corresponding to the map processing method of the embodiment of the application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above-mentioned method. The memory 104 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can further include a memory remotely arranged with respect to the processor 102, which can be connected to the mobile robot through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.
[0026] The transmission device 106 is configured to receive or send data via a network. The network can include a wireless network provided by a communication provider of the mobile robot. In one example, the transmission device 106 includes a network interface controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module configured to communicate with the Internet wirelessly.
[0027] The application will be described in detail below with reference to the embodiments.
[0028] In this embodiment, a map processing method is provided, as shown in the following figure, the method comprises the following steps: Figure 2
[0029] S202, comparing the obtained first point cloud map and second point cloud map to determine the common point cloud region between the first point cloud map and the second point cloud map, wherein the first point cloud map and the second point cloud map are different point cloud maps generated after scanning the target space;
[0030] S204, splicing the first point cloud map and the second point cloud map based on the common region to obtain a target point cloud map;
[0031] S206, detecting obstacles in the common region, and filling the detected obstacles in the target point cloud map based on the detection result.
[0032] The execution subject performing the above operations can be a controller, or a device with scanning and splicing capabilities (for example, a smart robot, etc.), or a processor arranged in a smart device, or other processing devices or processing units with similar processing capabilities, etc.
[0033] In the above embodiment, the target space can have multiple, and the size of different target spaces is not the same, and then, at least two different numbers of point cloud maps can be generated after scanning according to actual application for different sizes of target space, for example, when the target space is large, it can not be possible to scan the entire target space at a time, therefore, the target space needs to be scanned multiple times, for example, after scanning the target space, five point cloud maps, six point cloud maps, seven point cloud maps, etc. can be generated, and when the target space is small, after scanning the target space, two point cloud maps, three point cloud maps, four point cloud maps, etc. can be generated. It should be noted that the size of the above target space is only an exemplary embodiment, and the size of the target space can be adjusted according to actual application. In the case of generating multiple point cloud maps, the multiple point cloud maps can be sequentially spliced and the obstacles filled in the spliced map, and the specific splicing and obstacle filling method is as shown in Figure 2 In addition, the types of obstacles can be various, which can include static obstacles such as walls, cabinets, sofas, etc., and can also include dynamic obstacles such as tables, chairs, strollers, etc. Of course, it can also be allocated according to known obstacles and unknown obstacles, for example, static obstacles can be divided into known obstacles, and dynamic obstacles can be divided into unknown obstacles.
[0034] In the above embodiment, the first point cloud map and the second point cloud map obtained can be compared, and then the common point cloud region between the first point cloud map and the second point cloud map can be determined based on the comparison result, so that the first point cloud map and the second point cloud map can be spliced based on the common point cloud region to obtain a target point cloud map, and then after detecting obstacles in the common region, the detected obstacles can be filled in the target point cloud map based on the detection result. By using the method of the present application, the common point cloud region of at least two point cloud maps can be detected for obstacles, and then the detected obstacles can be filled in the target point cloud map, so as to accurately confirm the state of the obstacles in the region, and based on the state of the obstacles, the cleaning is carried out, which realizes the comprehensiveness of the cleaning, effectively solves the problem of region missing cleaning in the related art, and achieves the effect of improving the cleaning efficiency.
[0035] In one example embodiment, the obstacle detection in the common area and filling the detected obstacle in the target point cloud map based on the detection result comprises: performing line segment detection of a target line segment in the common area, the target line segment being used to indicate a static obstacle; in a case where the target line segment is detected, determining a first relationship between a first line segment in the first point cloud map and a second line segment in the second point cloud map, wherein the first line segment includes the target line segment and the second line segment includes the target line segment; and filling the target line segment used to indicate the static obstacle in the target point cloud map based on the first relationship. In this embodiment, the line segment detected in the point cloud map generally represents a static wall, cabinet, etc., and if the same line segment exists in multiple point cloud maps, it means that the line segment is part of the wall or cabinet, and thus the static obstacle map can be determined based on the line segment detection. In addition, in this embodiment, the target point cloud map with the filled target line segment can also be stored in a storage unit in the background, and thus when the target space needs to be cleaned next time, the target point cloud map in the storage unit can be directly called, and there is no need to perform the operation of determining the first relationship after scanning the target space and generating the first point cloud map and the second point cloud map again, further improving the cleaning efficiency.
[0036] In an example embodiment, the determining the first relationship between the first line segment in the first point cloud map and the second line segment in the second point cloud map comprises: determining a first similarity between the first line segment and the second line segment, and determining a relationship between the first similarity and a first similarity threshold as the first relationship; the filling the target line segment for indicating the static obstacle in the target point cloud map based on the first relationship comprises: in a case that the first relationship indicates that the first similarity is greater than or equal to the first similarity threshold, determining a union of the first line segment and the second line segment as the target line segment, and filling the target line segment into the target point cloud map; in a case that the first relationship indicates that the first similarity is less than the first similarity threshold, determining an intersection of the first line segment and the second line segment as the target line segment, and filling the target line segment into the target point cloud map. In this embodiment, the first similarity threshold is a value that can be set in advance, which can be set as 80%, 90%, 95%, etc. For example, in a case that the first similarity threshold is 90%, in a case that the first relationship indicates that the first similarity is greater than or equal to 90%, the union of the first line segment and the second line segment is determined as the target line segment, and in a case that the first relationship indicates that the first similarity is less than 90%, the intersection of the first line segment and the second line segment is determined as the target line segment. It should be noted that the setting of the above first similarity threshold is only an example embodiment, and the setting of the first similarity threshold can be adjusted according to actual application conditions.
[0037] In an example embodiment, determining the first similarity between the first line segment and the second line segment comprises: determining a first length corresponding to the first line segment and first coordinates of a plurality of points included in the first line segment, and determining a second length corresponding to the second line segment and second coordinates of a plurality of points included in the second line segment; comparing the first length and the second length to obtain a first comparison result, and comparing the first coordinates and the second coordinates to obtain a second comparison result; and determining the first similarity based on the first comparison result and the second comparison result. In this embodiment, it can be determined whether the first length and the second length are consistent based on the first comparison result, and whether the directions of the first coordinates and the second coordinates are consistent based on the second comparison result. In the case where the first length and the second length are consistent and the directions of the first coordinates and the second coordinates are consistent, the first line segment and the second line segment can be considered as static obstacles. In the case where the first length and the second length are inconsistent and the directions of the first coordinates and the second coordinates are inconsistent, the first line segment and the second line segment can be considered as dynamic obstacles. In this embodiment, the first length and the second length can be the lengths of the first line segment and the second line segment, or the lengths of obstacles in the actual scene corresponding to the first line segment and the second line segment.
[0038] In an example embodiment, after the line segment detection for indicating static obstacles in the public area, the method further comprises: in the case where it is determined that the target line segment does not exist in the public area, performing obstacle clustering in the public area included in the first point cloud map to obtain a first clustering result, and performing obstacle clustering in the public area included in the second point cloud map to obtain a second clustering result; determining a second relationship between the first clustering result and the second clustering result; and filling target information in the target point cloud map based on the second relationship. In this embodiment, for some types of obstacles, they will not be presented as line segments in the point cloud map, for example, irregular obstacles such as lazy sofas and rocking chairs are presented as a piece of point cloud in the point cloud map. Therefore, it is necessary to cluster the points belonging to the same obstacle together through clustering, and then determine whether the obstacle exists in the point cloud map based on the clustering result. In addition, in this embodiment, the target point cloud map with filled target information can be stored in the storage unit in the background, and then when the next cleaning of the target space is needed, the target point cloud map in the storage unit can be directly called without performing the operations of determining the second relationship after scanning the target space and generating the first point cloud map and the second point cloud map again, thereby further improving the cleaning efficiency.
[0039] In an example embodiment, the determining the second relationship between the first clustering result and the second clustering result comprises: determining a second similarity of a first target clustering result included in the first clustering result and a second target clustering result included in the second clustering result, and determining a relationship between the second similarity and a second similarity threshold value as the second relationship, wherein a center position of the first clustering result and a center position of the second clustering result differ by less than a predetermined threshold value; and the filling target information in the target point cloud map based on the second relationship comprises: in a case where the second relationship indicates that the second similarity is greater than or equal to the second similarity threshold value, filling a region including a target clustering result in the target point cloud map as a known obstacle region; in a case where the second relationship indicates that the second similarity is less than the second similarity threshold value, filling the region including the target clustering result in the target point cloud map as an unknown obstacle region; wherein the target clustering result is an intersection of the first target clustering result and the second target clustering result. In this embodiment, the second similarity threshold value is a value that can be set in advance and can be set to 80%, 90%, 95%, etc. For example, when the second similarity threshold value is 90%, in a case where the second relationship indicates that the second similarity is greater than or equal to 90%, the region including the target clustering result in the target point cloud map is filled as a known obstacle region, and in a case where the second relationship indicates that the second similarity is less than 90%, the region including the target clustering result in the target point cloud map is filled as an unknown obstacle region. It should be noted that the above setting of the second similarity threshold value is only an example embodiment, and the setting of the second similarity threshold value can be adjusted according to actual application conditions.
[0040] In the above embodiment, the predetermined threshold value is a value that can be set in advance, and the center position of the first clustering result and the center position of the second clustering result can both be actual coordinate positions and can be set to 5 cm, 10 cm, 15 cm, etc. In addition, the setting of the predetermined threshold value can also be adjusted according to actual application conditions.
[0041] In one example embodiment, determining the second similarity of a first target clustering result included in the first clustering result and a second target clustering result included in the second clustering result includes: determining an area of a first region corresponding to the first target clustering result and third coordinates of a plurality of points included in the first target clustering result, and determining an area of a second region corresponding to the second target clustering result and fourth coordinates of a plurality of points included in the second target clustering result; comparing the area of the first region and the area of the second region to obtain a third comparison result, and comparing the third coordinates and the fourth coordinates to obtain a fourth comparison result; and determining the second similarity based on the third comparison result and the fourth comparison result. In this embodiment, it can be determined based on the third comparison result whether the size of the area of the first region is consistent with the size of the area of the second region, and it can be determined based on the fourth comparison result whether the direction of the third coordinates is consistent with the direction of the fourth coordinates. In the case where the size of the area of the first region is consistent with the size of the area of the second region and the direction of the third coordinates is consistent with the direction of the fourth coordinates, it can be considered that the first target clustering result and the second target clustering result are the same obstacle (i.e., a static obstacle). In the case where the size of the area of the first region is not consistent with the size of the area of the second region and the direction of the third coordinates is not consistent with the direction of the fourth coordinates, it can be considered that the first target clustering result and the second target clustering result are dynamic obstacles.
[0042] In the above embodiment, the first clustering result can include a plurality of clustering results, and similarly, the second clustering result can include a plurality of clustering results. Therefore, the corresponding second similarity can be determined according to the priority of each clustering result. For example, when the priority of a first target clustering result included in the first clustering result is higher than that of other clustering results included in the first clustering result, the similarity between the first target clustering result and each clustering result included in the second clustering result can be determined preferentially, and then it can be determined whether there is a clustering result similar to the first target clustering result. In addition, when the similarity is compared, the clustering results included in the first clustering result and the clustering results included in the second clustering result can be compared in sequence according to the positions of the clustering results.
[0043] Obviously, the above-described embodiments are only part of the embodiments of the present application, and are not all the embodiments. The present application will be described in detail below in combination with embodiments.
[0044] Step one:
[0045] The plurality of maps to be spliced are imported, and then the common region between the two maps can be found by similarity between the maps, and the transformation relationship between the two maps is calculated.
[0046] Step two:
[0047] Based on a map (corresponding to the first point cloud map), another map (corresponding to the second point cloud map) is mapped onto the map, and the common area of the two maps (corresponding to the common point cloud area) is selected out;
[0048] Step three:
[0049] Based on a map, it is spliced with multiple maps through step one to obtain the spliced point cloud map;
[0050] Step four:
[0051] The common ROI area (corresponding to the common point cloud area) of the two maps is selected out, and the obstacles in the area are classified;
[0052] 1. Line segment detection is performed on the maps in the two common ROI areas respectively (corresponding to the obstacle detection), and the detected line segments represent static information such as walls. By comparing the line segment information detected from the two maps (corresponding to the first line segment and the second line segment), if the threshold (corresponding to the first similarity threshold, i.e., the length and direction of the first line segment are consistent with the length and direction of the second line segment) is met, it is considered that the obstacle on the two maps is a static wall (corresponding to the static obstacle), and the union of the two line segments is filled into the new fusion map (corresponding to the target point cloud map). If the threshold is not met, it is considered that the suspected wall obstacle belongs to a dynamic obstacle, and the intersection of the two line segments is filled into the new fusion map;
[0053] 2. For obstacles that cannot extract line segments (corresponding to the case where the target line segment does not exist), clustering is performed, and the obstacles are clustered into N classes by distance (corresponding to the predetermined distance). The clustering information in the common ROI area of the two maps is compared to determine whether to fuse:
[0054] If the center position of a clustering result N11 on map A (corresponding to the first point cloud map) can find the same clustering result N21 on map B (corresponding to the second point cloud map), the sizes of the two clustering results are compared. If the size meets the threshold (corresponding to the second similarity threshold), it is considered to be the same obstacle (i.e., a static obstacle), and the area in the fusion map C (corresponding to the target point cloud area) is filled as a known obstacle area. If the threshold is not met, it is considered to be a dynamic obstacle, and the area in the fusion map C is filled as an unknown area.
[0055] Step five:
[0056] The map traversal of the common area is completed, and the required map C is fused out.
[0057] Those skilled in the art can clearly understand that the method according to the above-mentioned embodiments can be realized by means of software and necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a plurality of instructions for making a terminal device (which can be a mobile phone, computer, server, or network device, etc.) execute the method described in various embodiments of the present application.
[0058] In the present embodiment, a map processing apparatus is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and will not be described again. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware is also possible and contemplated.
[0059] Figure 3 is a structural block diagram of a map processing apparatus according to an embodiment of the present application, as shown in Figure 3 The apparatus comprises:
[0060] A first determining module 32 is configured to compare the acquired first point cloud map and second point cloud map, and determine a common point cloud region between the first point cloud map and the second point cloud map, wherein the first point cloud map and the second point cloud map are different point cloud maps generated after scanning the target space;
[0061] A first splicing module 34 is configured to splice the first point cloud map and the second point cloud map based on the common region, to obtain a target point cloud map.
[0062] A first filling module 36 is configured to detect obstacles in the common region, and fill the detected obstacles in the target point cloud map based on the detection result.
[0063] In an optional embodiment, the first filling module 36 described above comprises:
[0064] The detection submodule is configured to perform line segment detection on a target line segment in the common area, the target line segment being used to indicate a static obstacle; the first determination submodule is configured to, in a case where the target line segment is detected, determine a first relationship between a first line segment in the first point cloud map and a second line segment in the second point cloud map, the first line segment including the target line segment and the second line segment including the target line segment; and the first filling submodule is configured to fill the target line segment used to indicate the static obstacle into the target point cloud map based on the first relationship.
[0065] In an optional embodiment, the first determination submodule includes a first determination unit configured to determine a first similarity between the first line segment and the second line segment, and determine the first relationship as a relationship between the first similarity and a first similarity threshold; and the first filling submodule includes a second determination unit configured to, in a case where the first relationship indicates that the first similarity is greater than or equal to the first similarity threshold, determine a union of the first line segment and the second line segment as the target line segment, and fill the target line segment into the target point cloud map; and a third determination unit configured to, in a case where the first relationship indicates that the first similarity is less than the first similarity threshold, determine an intersection of the first line segment and the second line segment as the target line segment, and fill the target line segment into the target point cloud map.
[0066] In an optional embodiment, the first determination unit includes a first determination subunit configured to determine a first length corresponding to the first line segment and first coordinates of a plurality of points included in the first line segment, and determine a second length corresponding to the second line segment and second coordinates of a plurality of points included in the second line segment; a comparison subunit configured to compare the first length and the second length to obtain a first comparison result, and compare the first coordinates and the second coordinates to obtain a second comparison result; and a second determination subunit configured to determine the first similarity based on the first comparison result and the second comparison result.
[0067] In an optional embodiment, the device further includes a first clustering module configured to, after the line segment detection used to indicate the static obstacle in the common area, in a case where it is determined that the target line segment does not exist in the common area, perform obstacle clustering in the common area included in the first point cloud map to obtain a first clustering result, and perform obstacle clustering in the common area included in the second point cloud map to obtain a second clustering result; a second determination module configured to determine a second relationship between the first clustering result and the second clustering result; and a second filling module configured to fill target information into the target point cloud map based on the second relationship.
[0068] In an optional embodiment, the second determining module includes: a second determining submodule, configured to determine a second similarity between a first target cluster result included in the first clustering result and a second target cluster result included in the second clustering result, and determine a second relationship between the second similarity and a second similarity threshold value as the second relationship, wherein a center position of the first clustering result and a center position of the second clustering result differ by less than a predetermined threshold value; the second filling module includes: a second filling submodule, configured to, in a case where the second relationship indicates that the second similarity is greater than or equal to the second similarity threshold value, fill a region including a target cluster result in the target point cloud map as a known obstacle region; and a third filling submodule, configured to, in a case where the second relationship indicates that the second similarity is less than the second similarity threshold value, fill the region including the target cluster result in the target point cloud map as an unknown obstacle region; wherein the target cluster result is an intersection of the first target cluster result and the second target cluster result.
[0069] In an optional embodiment, the second determining submodule includes: a fourth determining unit, configured to determine an area of a first region corresponding to the first target cluster result and third coordinates of a plurality of points included in the first target cluster result, and determine an area of a second region corresponding to the second target cluster result and fourth coordinates of a plurality of points included in the second target cluster result; a comparison unit, configured to compare the area of the first region with the area of the second region to obtain a third comparison result, and compare the third coordinates with the fourth coordinates to obtain a fourth comparison result; and a fifth determining unit, configured to determine the second similarity based on the third comparison result and the fourth comparison result.
[0070] It should be noted that each of the above modules can be implemented by software or hardware, and for the latter, the following implementation manners can be used, but are not limited thereto: all of the above modules are located in the same processor; or each of the above modules is located in a different processor in any combination.
[0071] Embodiments of the present application also provide a computer readable storage medium having a computer program stored therein, wherein the computer program is configured to execute the steps in any of the method embodiments when running.
[0072] In the present embodiment, the computer readable storage medium can be configured to store a computer program for executing the following steps:
[0073] S1, comparing the obtained first point cloud map and second point cloud map to determine a common point cloud region between the first point cloud map and the second point cloud map, wherein the first point cloud map and the second point cloud map are different point cloud maps generated after scanning a target space;
[0074] S2, splicing the first point cloud map and the second point cloud map based on the common region to obtain a target point cloud map;
[0075] S3, detecting obstacles in the common region, and filling the detected obstacles in the target point cloud map based on the detection result.
[0076] In an example embodiment, the computer readable storage medium described above can include, but is not limited to, a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.
[0077] Embodiments of the present application also provide an electronic device including a memory and a processor, the memory storing a computer program, and the processor being configured to execute the computer program to perform the steps in any of the method embodiments described above.
[0078] In an example embodiment, the electronic device described above can further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0079] In an example embodiment, the processor described above can be configured to perform the following steps through the computer program:
[0080] S1, comparing the obtained first point cloud map and second point cloud map to determine a common point cloud region between the first point cloud map and the second point cloud map, wherein the first point cloud map and the second point cloud map are different point cloud maps generated after scanning a target space;
[0081] S2, splicing the first point cloud map and the second point cloud map based on the common region to obtain a target point cloud map;
[0082] S3, detecting obstacles in the common region, and filling the detected obstacles in the target point cloud map based on the detection result.
[0083] In the present embodiment, a cleaning device is also provided, which can include the map processing device described in any of the above embodiments.
[0084] It should be apparent to those skilled in the art that the modules or steps of the application described above can be implemented with general computing devices, which can be centralized on a single computing device or distributed on a network of multiple computing devices, which can be implemented with program codes executable by the computing devices, so that they can be stored in storage devices and executed by the computing devices, and in some cases, the steps shown or described can be executed in different orders than shown, or made into individual integrated circuit modules, or made into a single integrated circuit module. Thus, the application is not limited to any particular combination of hardware and software.
[0085] The preferred embodiments of the application described above are intended to be merely exemplary and those skilled in the art will readily suggest modifications and variations to the specific embodiments disclosed without departing from the principles of the application. Any modifications, changes, improvements, and equivalents that fall within the principles of the application are intended to be included in the scope of the application.
Claims
1. A map processing method, characterized in that, include: The first point cloud map and the second point cloud map are compared to determine the common point cloud area between the first point cloud map and the second point cloud map. The first point cloud map and the second point cloud map are different point cloud maps generated after scanning the target space. The first point cloud map and the second point cloud map are stitched together based on the common point cloud region to obtain the target point cloud map; Obstacle detection is performed in the public point cloud area, and the detected obstacles are filled into the target point cloud map based on the detection results; The process of detecting obstacles in the public point cloud region and filling the target point cloud map with the detected obstacles based on the detection results includes: Line segment detection is performed on target line segments in the public point cloud area, where the target line segments are used to indicate static obstacles; If the target line segment is detected, a first relationship is determined between a first line segment in the first point cloud map and a second line segment in the second point cloud map, wherein the first line segment includes the target line segment and the second line segment includes the target line segment. Based on the first relationship, the target line segment is filled into the target point cloud map; After performing line segment detection for indicating static obstacles in the public point cloud region, the method further includes: If it is determined that the target line segment does not exist in the public point cloud region, obstacle clustering is performed in the public point cloud region included in the first point cloud map to obtain a first clustering result, and obstacle clustering is performed in the public point cloud region included in the second point cloud map to obtain a second clustering result. Determine a second relationship between the first clustering result and the second clustering result; Based on the second relationship, target information is filled into the target point cloud map, and the target information includes known obstacle areas and unknown obstacle areas.
2. The map processing method according to claim 1, characterized in that, Determining the first relationship between the first line segment in the first point cloud map and the second line segment in the second point cloud map includes: Determine the first similarity between the first line segment and the second line segment, and define the relationship between the first similarity and the first similarity threshold as the first relationship; The step of filling the target point cloud map with target line segments to indicate the static obstacle based on the first relationship includes: When the first relationship indicates that the first similarity is greater than or equal to the first similarity threshold, the union of the first line segment and the second line segment is determined as the target line segment, and the target line segment is filled into the target point cloud map; when the first relationship indicates that the first similarity is less than the first similarity threshold, the intersection of the first line segment and the second line segment is determined as the target line segment, and the target line segment is filled into the target point cloud map.
3. The map processing method according to claim 2, characterized in that, Determining the first similarity between the first line segment and the second line segment includes: Determine the first length corresponding to the first line segment and the first coordinates of the plurality of points included in the first line segment, and determine the second length corresponding to the second line segment and the second coordinates of the plurality of points included in the second line segment; The first length and the second length are compared to obtain a first comparison result, and the first coordinate and the second coordinate are compared to obtain a second comparison result; The first similarity is determined based on the first comparison result and the second comparison result.
4. The map processing method according to claim 1, characterized in that, Determining the second relationship between the first clustering result and the second clustering result includes: The second similarity between the first target clustering result included in the first clustering result and the second target clustering result included in the second clustering result is determined, and the relationship between the second similarity and the second similarity threshold is determined as the second relationship, wherein the difference between the center position of the first clustering result and the center position of the second clustering result is less than a predetermined threshold; The step of filling the target information in the target point cloud map based on the second relationship includes: When the second relationship indicates that the second similarity is greater than or equal to the second similarity threshold, the region in the target point cloud map that includes the target clustering result is filled with a known obstacle region; when the second relationship indicates that the second similarity is less than the second similarity threshold, the region in the target point cloud map that includes the target clustering result is filled with an unknown obstacle region. The target clustering result is the intersection of the first target clustering result and the second target clustering result.
5. The map processing method according to claim 4, characterized in that, Determining the second similarity between the first target clustering result included in the first clustering result and the second target clustering result included in the second clustering result includes: Determine the area of the first region corresponding to the first target clustering result and the third coordinates of the multiple points included in the first target clustering result; and determine the area of the second region corresponding to the second target clustering result and the fourth coordinates of the multiple points included in the second target clustering result. The areas of the first region and the second region are compared to obtain a third comparison result; and the third coordinate and the fourth coordinate are compared to obtain a fourth comparison result. The second similarity is determined based on the third comparison result and the fourth comparison result.
6. A map processing apparatus, characterized in that, include: The first determining module is used to compare the acquired first point cloud map and second point cloud map to determine the common point cloud area between the first point cloud map and the second point cloud map, wherein the first point cloud map and the second point cloud map are different point cloud maps generated after scanning the target space. The first stitching module is used to stitch the first point cloud map and the second point cloud map based on the common point cloud region to obtain the target point cloud map; A first filling module is configured to detect obstacles in the common point cloud region and fill the detected obstacles into the target point cloud map based on the detection results; wherein, detecting obstacles in the common point cloud region and filling the detected obstacles into the target point cloud map based on the detection results includes: detecting target line segments in the common point cloud region, the target line segments being used to indicate static obstacles; when the target line segment is detected, determining a first relationship between a first line segment in the first point cloud map and a second line segment in the second point cloud map, wherein the first line segment includes the target line segment and the second line segment includes the target line segment; based on the... The first relationship is used to fill the target line segment in the target point cloud map; after performing line segment detection for indicating static obstacles in the common point cloud area, the method further includes: if it is determined that the target line segment does not exist in the common point cloud area, performing obstacle clustering in the common point cloud area included in the first point cloud map to obtain a first clustering result, and performing obstacle clustering in the common point cloud area included in the second point cloud map to obtain a second clustering result; determining a second relationship between the first clustering result and the second clustering result; and filling the target information in the target point cloud map based on the second relationship, wherein the target information includes known obstacle areas and unknown obstacle areas.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method described in any one of claims 1 to 5.
8. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 5 through the computer program.
9. A cleaning device, characterized in that, The map processing apparatus includes the one described in claim 6.
Citation Information
Patent Citations
Indoor laser scanning-type map generation and updating apparatus and method
CN107764270A
Map building method and device
CN108827249A
Obstacle angle detection method, apparatus and device, and medium
CN110705385A
Obstacle recognition method, device and system and storage medium
CN112348000A
Mapping method and device and computer storage medium
CN113192174A