A map updating method
By distinguishing between static and dynamic obstacles and updating static obstacles using historical map information, the problem of inaccurate map updates in existing technologies is solved, thus improving the accuracy of robot path planning in home scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHARKNINJA CHINA TECH CO LTD
- Filing Date
- 2024-12-05
- Publication Date
- 2026-06-05
AI Technical Summary
Existing map update strategies have low accuracy in home scenarios. Static strategies cannot adapt to environmental changes, while fixed-condition strategies rely on manually set conditions that cause map jumps, affecting the accuracy of robot path planning.
By distinguishing between static and dynamic obstacles, static obstacles are updated using obstacle information from historical maps, avoiding accumulated errors during map iteration. Multiple historical maps are used to comprehensively judge the degree of change in obstacle information, reducing the impact of occasional events.
It improves the accuracy of map updates, reduces errors caused by static obstacle drift, and provides a reliable positioning basis for cleaning robots.
Smart Images

Figure CN122149506A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, and in particular to a map updating method. Background Technology
[0002] In the process of using mobile robots, in order to perceive the current environment and pose, the robot needs to build a map of the current environment and design a map update strategy so that it can maintain a real-time and accurate map as the environment changes.
[0003] Currently, there are two main approaches to map update strategies in the industry. One is a static strategy for fixed scenarios, such as shopping malls or warehouses, where a map is created once and used for life unless the layout of the mall or warehouse undergoes significant changes. The other is a fixed-condition strategy for volatile scenarios, such as home scenarios, where each time a complete task is completed, the changes in the current map relative to the historical map are detected. If preset conditions are met, such as when the added area is greater than a certain number of square meters, the current map directly replaces the historical map, achieving the goal of map update. For example, patent document CN117804421A discloses a raster map update method, which specifically discloses the construction of a real-time map based on current sensor data, determining whether the difference between the real-time map and the historical map at the current location is greater than a preset threshold. If it is greater than the preset threshold, a local raster map of the current location is generated based on the real-time sensor data to update the historical map.
[0004] However, static strategies have very high requirements for the scenario and cannot be applied to home environments. Fixed-condition strategies rely heavily on manually set conditions, which can lead to significant map jumps when conditions reach critical points, resulting in low map accuracy. Ultimately, this causes the robot to plan unreasonable paths based on the map, creating more redundant paths and collisions, severely impacting the user experience. Summary of the Invention
[0005] To address the aforementioned technical problems, this disclosure provides a map updating method to improve the accuracy of map updates.
[0006] This disclosure provides a map updating method, including:
[0007] Obtain at least one historical map and a current map to be updated, wherein the current map includes multiple obstacles;
[0008] Based on the historical map and the current map, the types of obstacles are determined, including static obstacles;
[0009] For the static obstacle, the current map is updated based on the historical obstacle information of the static obstacle in the historical map to obtain the updated current map.
[0010] In some embodiments, obtaining the current map to be updated includes:
[0011] During the cleaning robot's cleaning task, it acquires current obstacle information of multiple obstacles in the cleaning environment;
[0012] The current map is generated based on the current obstacle information.
[0013] In some embodiments, the types of obstacles further include dynamic obstacles, and determining the types of obstacles based on the historical map and the current map includes:
[0014] For each obstacle, obtain the historical obstacle information of the obstacle in the historical map, and the current obstacle information of the obstacle in the current map;
[0015] Calculate the similarity between the historical obstacle information and the current obstacle information;
[0016] If the similarity is less than a preset similarity threshold, then the obstacle is determined to be a dynamic obstacle; or,
[0017] If the similarity is greater than or equal to a preset similarity threshold, then the obstacle is determined to be a static obstacle.
[0018] In some embodiments, obtaining historical obstacle information of the obstacle in the historical map and current obstacle information of the obstacle in the current map includes:
[0019] If the obstacle information includes the obstacle's slope, then obtain the obstacle's historical position, historical slope, and historical length in each of the historical maps, as well as the obstacle's current position, current slope, and current length in the current map; or,
[0020] If the obstacle information does not include the obstacle's slope, then obtain the obstacle's historical position in each of the historical maps, and the obstacle's current position in the current map.
[0021] In some embodiments, when the obstacle information includes the slope of the obstacle, calculating the similarity between the historical obstacle information and the current obstacle information includes:
[0022] For any historical obstacle information corresponding to a historical map, if the difference between the historical location and the current location is less than the mapping accuracy error, and the difference between the historical slope and the current slope, and the difference between the historical length and the current length are all less than a preset difference threshold, then the historical map is determined to be a valid map.
[0023] The proportion of the number of effective maps to the total number of historical maps is calculated to obtain the similarity between the historical obstacle information and the current obstacle information.
[0024] In some embodiments, when the obstacle information does not include the slope of the obstacle, the method further includes, before calculating the similarity between the historical obstacle information and the current obstacle information:
[0025] If any historical location differs from the current location by more than the mapping accuracy error, then the obstacle is determined to be a dynamic obstacle.
[0026] In some embodiments, when the obstacle information does not include the slope of the obstacle, calculating the similarity between the historical obstacle information and the current obstacle information includes:
[0027] For any historical obstacle information corresponding to a historical map, if the difference between the historical location and the current location is less than the mapping accuracy error, then the historical map is determined to be a valid map.
[0028] The proportion of the number of effective maps to the total number of historical maps is calculated to obtain the similarity between the historical obstacle information and the current obstacle information.
[0029] In some embodiments, the historical map corresponds to a map acquisition time point, and updating the current map for each static obstacle based on the obstacle information of the static obstacle in the historical map includes:
[0030] For each static obstacle, the current map is updated based on the obstacle information of the static obstacle in the earliest historical map at the map acquisition time.
[0031] In some embodiments, updating the current map based on obstacle information of the static obstacle in the earliest historical map at the map acquisition time point includes:
[0032] Obtain the historical obstacle information of the static obstacle in the earliest historical map at the map acquisition time point;
[0033] Replace the current obstacle information of the static obstacle in the current map to be updated with the historical obstacle information.
[0034] In some embodiments, the types of obstacles further include dynamic obstacles. After determining the types of obstacles based on the historical map and the current map, the method further includes:
[0035] For each dynamic obstacle, retain the current obstacle information of the dynamic obstacle in the current map to be updated.
[0036] This disclosure provides a map updating method that adopts corresponding map updating strategies based on different obstacle categories. For static obstacles, it uses obstacle information from historical maps to update the current map, avoiding the drift of static obstacle information caused by the cumulative error of multiple map building during map iteration, thus improving the accuracy of map updates and providing a reliable data foundation for the accurate positioning of cleaning robots.
[0037] In some embodiments, this disclosure determines whether an obstacle is a straight obstacle such as a wall by whether the obstacle information includes the slope of the obstacle. Furthermore, it compares each historical map with the current map. In the event that the wall drifts due to accumulated errors, it can be corrected using historical maps, thereby further improving the accuracy of the map.
[0038] In some embodiments, by using multiple historical maps to comprehensively judge the degree of change in obstacle information, the impact of occasional events on the determination of obstacle type can be reduced, effectively improving the reliability of obstacle type identification.
[0039] In some embodiments, for static obstacles, obstacle information in the current map is replaced by obstacle information from the earliest historical map, so that the updated current map can inherit the most original static obstacle information and reduce map errors caused by static obstacle drift. Attached Figure Description
[0040] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0041] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 A flowchart of a map update method provided in this embodiment of the disclosure;
[0043] Figure 2 A flowchart of a map updating method provided in another embodiment of this disclosure;
[0044] Figure 3 This is a schematic diagram of a map update provided in an embodiment of the present disclosure;
[0045] Figure 4 This is a schematic diagram of the structure of the map updating device provided in the embodiments of this disclosure;
[0046] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0047] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0048] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.
[0049] This disclosure provides a map updating method, which will be described below with reference to specific embodiments.
[0050] Figure 1 This is a flowchart illustrating a map update method provided in an embodiment of this disclosure. This method can be applied to terminals such as cleaning robots, smartphones, PDAs, tablets, wearable devices with displays, desktop computers, laptops, all-in-one computers, and smart home devices. It is understood that the map update method provided in this disclosure can also be applied to other scenarios.
[0051] The following is about Figure 1 The map update method shown below will be introduced. The specific steps of this method are as follows:
[0052] S101. Obtain at least one historical map and a current map to be updated, wherein the current map includes multiple obstacles.
[0053] During each cleaning task, the cleaning robot uses real-time collected environmental information for repositioning to ensure successful completion. After the cleaning task is completed, a historical map is generated based on the environmental information collected during the task.
[0054] When the working environment of the cleaning robot changes, the cleaning robot needs to update the stored map according to the latest environmental information. The map to be updated becomes the current map to be updated.
[0055] Optionally, the current map to be updated is the most recently generated map. Obtaining the current map to be updated includes: acquiring current obstacle information of multiple obstacles in the cleaning environment during the cleaning robot's cleaning task; and generating the current map based on the current obstacle information.
[0056] The cleaning robot collects real-time environmental information during its previous cleaning task, including current obstacle information for multiple obstacles. Understandably, this current obstacle information may differ from its historical map representation.
[0057] The current map generated based on the current obstacle information can reflect the latest situation of the cleaning robot's working environment, thus serving as a benchmark for map iteration.
[0058] S102. Based on the historical map and the current map, determine the type of obstacle, including static obstacles.
[0059] Static obstacles are those that are relatively fixed in position in the real environment, such as walls, thresholds, base stations of cleaning robots, and large furniture. The degree of positional change of obstacles is evaluated by comparing historical and current maps, and obstacles with minimal positional change are identified as static obstacles.
[0060] Optionally, the types of obstacles also include dynamic obstacles. Dynamic obstacles are obstacles that frequently move in the real environment, such as chairs, flower pots, and carts. If the position of an obstacle changes significantly between the historical map and the current map, then the obstacle is identified as a dynamic obstacle.
[0061] S103. For the static obstacle, update the current map according to the historical obstacle information of the static obstacle in the historical map to obtain the updated current map.
[0062] During the multiple iterations and updates of the map, the positions of static obstacles may drift due to the cumulative errors of sensors such as LiDAR used to collect environmental information. This can lead to inaccurate positioning of cleaning robots, resulting in more collisions, entering restricted areas, and failing to find base stations.
[0063] For static obstacles, since the difference between their obstacle information in the historical map and the current map is small, this slight difference is most likely due to the accumulation of errors from multiple map iterations. Therefore, map iteration is no longer based on the current obstacle information of static obstacles; instead, the current map is updated based on the obstacle information in the historical map. In other words, the obstacle information of static obstacles in the historical map is retained.
[0064] Accordingly, for dynamic obstacles, for each dynamic obstacle, the current obstacle information of the dynamic obstacle in the current map to be updated is retained.
[0065] Because dynamic obstacles are relatively flexible in location and often change position after being moved by users, the reliability of obstacle information in historical maps is low, and it is still necessary to retain obstacle information in the current map.
[0066] This disclosure adopts corresponding map update strategies based on different obstacle categories. For static obstacles, obstacle information from historical maps is used to update the current map, avoiding the drift of static obstacle information caused by the cumulative error of multiple map building during map iteration, thus improving the accuracy of map updates and providing a reliable data foundation for the accurate positioning of cleaning robots.
[0067] Figure 2 A flowchart of a map update method provided in another embodiment of this disclosure is shown below. Figure 2 As shown, the method includes the following steps:
[0068] S201. Obtain at least one historical map and a current map to be updated, wherein the current map includes multiple obstacles.
[0069] S202. For each obstacle, obtain the historical obstacle information of the obstacle in the historical map, and the current obstacle information of the obstacle in the current map.
[0070] The cleaning robot first retrieves all historical maps related to the current environment from its internal database. For each obstacle, the cleaning robot analyzes the historical map and extracts the characteristics of each obstacle, including but not limited to location coordinates, shape, size, and frequency of occurrence, to obtain historical obstacle information.
[0071] Accordingly, the cleaning robot analyzes the current map and extracts the features of each obstacle, including but not limited to location coordinates, shape, size and frequency of occurrence, to obtain the current obstacle information.
[0072] Specifically, if the obstacle information includes the obstacle's slope, then the historical position, historical slope, and historical length of the obstacle in each of the historical maps are obtained, as well as the current position, current slope, and current length of the obstacle in the current map; or, if the obstacle information does not include the obstacle's slope, then the historical position of the obstacle in each of the historical maps is obtained, as well as the current position of the obstacle in the current map.
[0073] Obstacles whose obstacle information includes a slope are classified as straight-line obstacles; for example, walls will be represented as a line segment on the map. For these straight-line obstacles, their historical position, historical slope, and historical length in each historical map are obtained.
[0074] Correspondingly, for obstacles other than straight obstacles, such as round tables and chairs, since this type of obstacle does not have a slope attribute, we obtain its historical position in the historical map and its current position in the current map.
[0075] Optionally, the aforementioned historical location refers to the coordinate position of the obstacle in the historical map, and the current location refers to the coordinate position of the obstacle in the current location. Other methods can also be used to determine its location, and this disclosure does not limit this method.
[0076] Optionally, when the obstacle information does not include the obstacle's slope, if the difference between any historical position and the current position is not less than the mapping accuracy error, then the obstacle is determined to be a dynamic obstacle.
[0077] Mapping accuracy error refers to the difference between map information (such as the location, shape, and size of obstacles) and the actual environment caused by factors such as sensor measurement errors, imperfections in data processing algorithms, and dynamic changes in the environment during the map construction process.
[0078] Due to mapping accuracy errors, there may be some differences between the current position and the historical position of an obstacle. However, this does not necessarily mean that there is a non-negligible movement between the time point corresponding to the historical position and the time point corresponding to the current position. Only when the difference between the historical position and the current position is not less than the mapping accuracy error can the influence of the mapping accuracy error be eliminated, and it can be determined that there is a non-negligible movement between the time point corresponding to the historical position and the time point corresponding to the current position, thus classifying it as a dynamic obstacle.
[0079] S203. Calculate the similarity between the historical obstacle information and the current obstacle information.
[0080] Specifically, when the obstacle information includes the slope of the obstacle, for any historical obstacle information corresponding to a historical map, if the difference between the historical position and the current position is less than the mapping accuracy error, and the difference between the historical slope and the current slope, and the difference between the historical length and the current length are both less than a preset difference threshold, then the historical map is determined to be a valid map; the proportion of the number of valid maps to the total number of historical maps is calculated to obtain the similarity between the historical obstacle information and the current obstacle information.
[0081] For obstacle information including straight obstacles with slope, the differences between the obstacle in the historical map and the current map are judged by combining the obstacle's slope, length and position.
[0082] Specifically, for any obstacle in a historical map, if the difference between the historical slope of the obstacle in the historical map and the current slope in the current map is large, and the difference between the historical position in the historical map and the current position in the current map is also large, and both are greater than or equal to the preset difference threshold, then it means that the obstacle has moved a large amount of time between the corresponding time point in the historical map and the corresponding time point in the current map.
[0083] In this case, the obstacle information in the historical map has a low reference contribution to the current real-time state of the obstacle, and the historical map cannot be used as a valid map.
[0084] Correspondingly, for any obstacle in a historical map, if the difference between the historical slope of the obstacle in the historical map and the current slope in the current map is small, and the difference between the historical position in the historical map and the current position in the current map is also small, both being less than the preset difference threshold, it means that the obstacle has moved a small amount of time between the corresponding time point in the historical map and the corresponding time point in the current map. This slight difference may be caused by mapping accuracy errors and drift during multiple map iterations.
[0085] In this case, the obstacle information in the historical map has a high reference contribution to the current real-time state of the obstacle, and the historical map can serve as an effective map.
[0086] Furthermore, for any obstacle, the higher the proportion of effective maps to the total number of historical maps, the more likely the changes of the obstacle during the iteration of each historical map are due to mapping accuracy errors and map drift, and the higher the similarity between historical obstacle information and current obstacle information; the lower the proportion of effective maps to the total number of historical maps, the more likely the obstacle has changed significantly during the mapping and iteration of each historical map, and the lower the similarity between historical obstacle information and current obstacle information.
[0087] Alternatively, when the obstacle information does not include the slope of the obstacle, for any historical obstacle information corresponding to a historical map, if the difference between the historical position and the current position is less than the mapping accuracy error, then the historical map is determined to be an effective map; the proportion of the number of effective maps to the total number of historical maps is calculated to obtain the similarity between the historical obstacle information and the current obstacle information.
[0088] For non-linear obstacles whose obstacle information does not include slope, the difference between the obstacle in the historical map and the current map is determined based on the obstacle's position.
[0089] For any obstacle in a historical map, if the difference rate between its historical position in the historical map and its current position in the current map is large, greater than or equal to a preset difference threshold, it means that the obstacle has moved a large amount of time between the corresponding time point in the historical map and the corresponding time point in the current map.
[0090] In this case, the obstacle information in the historical map has a low reference contribution to the current real-time state of the obstacle, and the historical map cannot be used as a valid map.
[0091] Correspondingly, for any obstacle in a historical map, if the difference rate between its historical position and its current position in the current map is small and less than the preset difference threshold, it means that the obstacle has moved a small amount of time between the corresponding time point in the historical map and the corresponding time point in the current map. This slight difference may be caused by mapping accuracy errors and drift during multiple map iterations.
[0092] In this case, the obstacle information in the historical map has a high reference contribution to the current real-time state of the obstacle, and the historical map can serve as an effective map.
[0093] Furthermore, for any obstacle, the higher the proportion of effective maps to the total number of historical maps, the more likely the changes of the obstacle during the iteration of each historical map are due to mapping accuracy errors and map drift, and the higher the similarity between historical obstacle information and current obstacle information; the lower the proportion of effective maps to the total number of historical maps, the more likely the obstacle has changed significantly during the mapping and iteration of each historical map, and the lower the similarity between historical obstacle information and current obstacle information.
[0094] S204. Determine whether the similarity is less than a preset similarity threshold. If yes, proceed to S205; if no, proceed to S207.
[0095] S205. Determine that the obstacle is a dynamic obstacle.
[0096] S206. Retain the current obstacle information of the dynamic obstacle in the current map to be updated.
[0097] If the similarity is less than a preset similarity threshold, the obstacle is determined to be a dynamic obstacle. In other words, dynamic obstacles undergo significant changes during the mapping and iteration processes of historical maps. Historical obstacle information in historical maps cannot accurately reflect the current obstacle situation. Current obstacle information in the current map is closest to the actual obstacle situation. Therefore, when updating the current map, the current obstacle information of dynamic obstacles in the current map to be updated is retained.
[0098] S207. Determine that the obstacle is a static obstacle.
[0099] S208. Update the current map based on the historical obstacle information of the static obstacle in the historical map.
[0100] If the similarity is greater than or equal to a preset similarity threshold, then the obstacle is determined to be a static obstacle.
[0101] Changes in static obstacles during historical map creation and iteration are considered to be due to mapping accuracy errors and map drift. Historical obstacle information in historical maps is closer to the actual situation of current obstacles than current obstacle information. Therefore, when updating the current map, historical obstacle information from historical maps is used to replace the current obstacle information in the current map to be updated.
[0102] S209. Obtain the updated current map.
[0103] Figure 3 This is a schematic diagram illustrating a map update provided in an embodiment of this disclosure. Figure 3 As shown, there are three historical maps: historical map a, historical map b, and historical map c. The bolded lines represent wall drift caused by accumulated map errors, and the circles and squares represent different obstacles. Historical map c is the latest map and is used as the current map to be updated.
[0104] In historical maps a, b, and c, the wall represented by the straight line segments has historical obstacle information that is basically consistent with the current obstacle information, with only slight drift. All three maps can be used as valid maps of the wall. The similarity between the corresponding historical obstacle information and the current obstacle information is 1, which is greater than the preset similarity threshold. Therefore, the wall is determined to be a static obstacle, and the wall information in the current map is replaced with the wall information in the historical map to prevent the wall from continuing to drift.
[0105] For square and / or circular obstacles, only the historical obstacle information in historical map c is similar to the current obstacle information in the current map. The effective number of maps is 1, and the similarity between the historical obstacle information and the current obstacle information is 1 / 3, which is less than the preset similarity threshold. Therefore, the square and / or circular obstacles are determined to be dynamic obstacles. The obstacle information in the latest historical map c is retained, and the updated current map is finally obtained. This means that the walls without cumulative error drift are retained, and the latest dynamic obstacle information is also reflected.
[0106] This embodiment of the disclosure determines whether an obstacle is a straight obstacle such as a wall by checking whether the obstacle information includes the slope of the obstacle. Furthermore, it compares each historical map with the current map. In the event of wall drift caused by accumulated errors, it can use historical maps to correct it, thereby further improving the accuracy of the map.
[0107] Meanwhile, this embodiment of the invention uses multiple historical maps to comprehensively judge the degree of change in obstacle information, reducing the impact of occasional situations on the judgment of obstacle types and effectively improving the reliability of obstacle type identification.
[0108] Based on the above embodiments, the historical map corresponds to a map acquisition time point. The step of updating the current map according to the obstacle information of the static obstacle in the historical map for each static obstacle includes: updating the current map according to the obstacle information of the static obstacle in the historical map with the earliest map acquisition time point for each static obstacle.
[0109] Specifically, the historical obstacle information of the static obstacle in the earliest historical map at the map acquisition time point is obtained; the current obstacle information of the static obstacle in the current map to be updated is replaced with the historical obstacle information.
[0110] When each historical map is stored, the corresponding time point when the historical map was collected is also stored. Based on these collection time points, the collection order of these historical maps can be determined.
[0111] For dynamic obstacles, in order to avoid mapping errors and drift between multiple maps, the most original obstacle data is used, that is, the historical obstacle data in the earliest historical map collected at the earliest time point to update the current map. In other words, the current obstacle information in the current map is replaced by the historical obstacle data in the earliest historical map collected at the earliest time point.
[0112] In this embodiment of the disclosure, for static obstacles, obstacle information in the current map is replaced by obstacle information from the earliest historical map, so that the updated current map can inherit the most original static obstacle information, reducing map errors caused by static obstacle drift.
[0113] Figure 4 This is a schematic diagram of the structure of a map updating device provided in an embodiment of this disclosure. The map updating device can be a cleaning robot as described in the above embodiment, or it can be a component or assembly within the cleaning robot. The map updating device provided in this embodiment can execute the processing flow provided in the map updating method embodiment, such as... Figure 4 As shown, the map update device 40 includes: an acquisition module 41, a determination module 42, and an update module 43; wherein, the acquisition module 41 is used to acquire at least one historical map and a current map to be updated, the current map including multiple obstacles; the determination module 42 is used to determine the type of obstacle based on the historical map and the current map, the type of obstacle including static obstacles; the update module 43 is used to update the current map for the static obstacles based on the historical obstacle information of the static obstacles in the historical map, to obtain the updated current map.
[0114] Optionally, the acquisition module 41 includes a first acquisition unit 411 and a generation unit 412; the first acquisition unit 411 is used to acquire current obstacle information of multiple obstacles in the cleaning environment during the cleaning robot's cleaning task; the generation unit 412 is used to generate the current map based on the current obstacle information.
[0115] Optionally, the types of obstacles also include dynamic obstacles. The determination module 42 includes a second acquisition unit 421, a calculation unit 422, and a determination unit 423. The second acquisition unit 421 is used to acquire, for each obstacle, historical obstacle information of the obstacle in the historical map and current obstacle information of the obstacle in the current map. The calculation unit 422 is used to calculate the similarity between the historical obstacle information and the current obstacle information. The determination unit 423 is used to determine the obstacle as a dynamic obstacle if the similarity is less than a preset similarity threshold, or to determine the obstacle as a static obstacle if the similarity is greater than or equal to the preset similarity threshold.
[0116] Optionally, the second acquisition unit 421 is configured to acquire, if the information of the obstacle includes the slope of the obstacle, the historical position, historical slope and historical length of the obstacle in each of the historical maps, and the current position, current slope and current length of the obstacle in the current map; or, if the information of the obstacle does not include the slope of the obstacle, the historical position of the obstacle in each of the historical maps, and the current position of the obstacle in the current map.
[0117] Optionally, the calculation unit 422 is used to determine that the historical map is a valid map if, for any historical obstacle information corresponding to a historical map, the difference between the historical position and the current position is less than the mapping accuracy error, and the difference between the historical slope and the current slope, and the difference between the historical length and the current length are all less than a preset difference threshold; and calculate the proportion of the number of valid maps to the total number of historical maps to obtain the similarity between the historical obstacle information and the current obstacle information.
[0118] Optionally, when the obstacle information does not include the slope of the obstacle, the determining unit 423 is further configured to determine the obstacle as a dynamic obstacle if, before calculating the similarity between the historical obstacle information and the current obstacle information, there exists any historical position whose difference from the current position is not less than the mapping accuracy error.
[0119] Optionally, when the obstacle information does not include the slope of the obstacle, the determining unit 423 is further configured to determine the historical map as an effective map if the difference between the historical location and the current location is less than the mapping accuracy error for any historical obstacle information corresponding to a historical map; calculate the proportion of the number of effective maps to the total number of historical maps to obtain the similarity between the historical obstacle information and the current obstacle information.
[0120] Optionally, the historical map corresponds to a map acquisition time point, and the update module 43 is used to update the current map for each static obstacle based on the obstacle information of the static obstacle in the historical map at the earliest map acquisition time point.
[0121] Optionally, the update module 43 is specifically used to obtain the historical obstacle information of the static obstacle in the historical map at the earliest map acquisition time point; and replace the current obstacle information of the static obstacle in the current map to be updated with the historical obstacle information.
[0122] Optionally, the types of obstacles also include dynamic obstacles, and the update module 43 is further configured to retain the current obstacle information of the dynamic obstacle in the current map to be updated for each dynamic obstacle.
[0123] Figure 4 The map update device shown in the embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and will not be described again here.
[0124] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. The electronic device can be the device to be upgraded as described in the above embodiments. The electronic device provided in this embodiment of the disclosure can execute the processing flow provided in the map update method embodiments, such as... Figure 5 As shown, the electronic device 50 includes: a memory 51, a processor 52, a computer program, and a communication interface 53; wherein the computer program is stored in the memory 51 and configured to be executed by the processor 52 as described above in the map update method.
[0125] In addition, this disclosure also provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the map update method described in the above embodiments.
[0126] Furthermore, this disclosure also provides a computer program product, which includes a computer program or instructions that, when executed by a processor, implement the map update method as described above.
[0127] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0128] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A map updating method, characterized in that, The method includes: Obtain at least one historical map and a current map to be updated, wherein the current map includes multiple obstacles; Based on the historical map and the current map, the types of obstacles are determined, including static obstacles; For the static obstacle, the current map is updated based on the historical obstacle information of the static obstacle in the historical map to obtain the updated current map.
2. The method according to claim 1, characterized in that, Obtaining the current map to be updated includes: During the cleaning robot's cleaning task, it acquires current obstacle information of multiple obstacles in the cleaning environment; The current map is generated based on the current obstacle information.
3. The method according to claim 1, characterized in that, The types of obstacles also include dynamic obstacles. Determining the types of obstacles based on the historical map and the current map includes: For each obstacle, obtain the historical obstacle information of the obstacle in the historical map, and the current obstacle information of the obstacle in the current map; Calculate the similarity between the historical obstacle information and the current obstacle information; If the similarity is less than a preset similarity threshold, then the obstacle is determined to be a dynamic obstacle; or, If the similarity is greater than or equal to a preset similarity threshold, then the obstacle is determined to be a static obstacle.
4. The method according to claim 3, characterized in that, The step of obtaining historical obstacle information of the obstacle in the historical map and current obstacle information of the obstacle in the current map includes: If the obstacle information includes the obstacle's slope, then obtain the obstacle's historical position, historical slope, and historical length in each of the historical maps, as well as the obstacle's current position, current slope, and current length in the current map; or, If the obstacle information does not include the obstacle's slope, then obtain the obstacle's historical position in each of the historical maps, and the obstacle's current position in the current map.
5. The method according to claim 3, characterized in that, When the obstacle information includes the slope of the obstacle, calculating the similarity between the historical obstacle information and the current obstacle information includes: For any historical obstacle information corresponding to a historical map, if the difference between the historical location and the current location is less than the mapping accuracy error, and the difference between the historical slope and the current slope, and the difference between the historical length and the current length are all less than a preset difference threshold, then the historical map is determined to be a valid map. The proportion of the number of effective maps to the total number of historical maps is calculated to obtain the similarity between the historical obstacle information and the current obstacle information.
6. The method according to claim 4, characterized in that, When the obstacle information does not include the obstacle's slope, before calculating the similarity between the historical obstacle information and the current obstacle information, the method further includes: If any historical location differs from the current location by more than the mapping accuracy error, then the obstacle is determined to be a dynamic obstacle.
7. The method according to claim 4, characterized in that, When the obstacle information does not include the obstacle's slope, calculating the similarity between the historical obstacle information and the current obstacle information includes: For any historical obstacle information corresponding to a historical map, if the difference between the historical location and the current location is less than the mapping accuracy error, then the historical map is determined to be a valid map. The proportion of the number of effective maps to the total number of historical maps is calculated to obtain the similarity between the historical obstacle information and the current obstacle information.
8. The method according to claim 1, characterized in that, The historical map corresponds to a map acquisition time point. For each static obstacle, updating the current map based on the obstacle information of that static obstacle in the historical map includes: For each static obstacle, the current map is updated based on the obstacle information of the static obstacle in the earliest historical map at the map acquisition time.
9. The method according to claim 8, characterized in that, The step of updating the current map based on obstacle information of the static obstacles in the earliest historical map at the map acquisition time point includes: Obtain the historical obstacle information of the static obstacle in the earliest historical map at the map acquisition time point; Replace the current obstacle information of the static obstacle in the current map to be updated with the historical obstacle information.
10. The method according to claim 1, characterized in that, The types of obstacles also include dynamic obstacles. After determining the types of obstacles based on the historical map and the current map, the method further includes: For each dynamic obstacle, retain the current obstacle information of the dynamic obstacle in the current map to be updated.