WO2023005379A1 - 语义地图的保存方法和装置、存储介质、电子装置 - Google Patents
语义地图的保存方法和装置、存储介质、电子装置 Download PDFInfo
- Publication number
- WO2023005379A1 WO2023005379A1 PCT/CN2022/094640 CN2022094640W WO2023005379A1 WO 2023005379 A1 WO2023005379 A1 WO 2023005379A1 CN 2022094640 W CN2022094640 W CN 2022094640W WO 2023005379 A1 WO2023005379 A1 WO 2023005379A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- semantic map
- semantic
- map
- mobile robot
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C21/00—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
- G01C21/38—Electronic maps specially adapted for navigation; Updating thereof
- G01C21/3804—Creation or updating of map data
- G01C21/3859—Differential updating map data
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/29—Geographical information databases
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- the present disclosure relates to the communication field, and in particular, to a method and device for storing a semantic map, a storage medium, and an electronic device.
- the existing laser displacement sensor (Laser Distance Sensor, referred to as LDS) type mobile robot uses LDS radar information for positioning and mapping. Robots are prone to positioning errors, or positioning errors may occur after the mobile robot is lifted and then put down. This positioning error will cause the mobile robot to build a wrong map and then save a wrong map. When the follow-up mobile robot cleans according to the wrong map, confusion occurs. For example, the mobile robot needs to go to room A to clean, but due to positioning and map errors, it goes to room B. When an error occurs in the map, the user must manually delete it. The error message will always exist,
- Embodiments of the present disclosure provide a method and device for saving a semantic map, a storage medium, and an electronic device, so as to at least solve the problem that the semantic map saved by a mobile robot may be a wrong map.
- a method for saving a semantic map which includes: obtaining the first semantic map constructed by the mobile robot after executing the current target event; if there is a second semantic map, calculating the A similarity score between the second semantic map and the first semantic map, wherein the second semantic map is a historical semantic map saved by the mobile robot; when the similarity score is greater than a first preset threshold , updating the second semantic map stored in the mobile robot to the first semantic map.
- the method further includes: executing During the process of the last target event, construct the second semantic map, wherein the second semantic map includes: object type information, object coordinate information, and object semantic weight information; After a target event, obtaining the second semantic map constructed by the mobile robot, and/or obtaining the first semantic map constructed by the mobile robot after executing the current target event, includes: when the mobile robot executes the current During the target event, the first semantic map is constructed, wherein the first semantic map includes: object type information, object coordinate information, and object semantic weight information; after the current target event is executed, Obtain the first semantic map constructed by the mobile robot.
- calculating the similarity score between the second semantic map and the first semantic map includes: traversing the second semantic map and the first semantic map A semantic map, to obtain multiple target similarity scores corresponding to multiple identical coordinate information in the second semantic map and the first semantic map; obtain the second target similarity scores through the multiple target similarity scores A similarity score between the semantic map and the first semantic map.
- the target similarity score includes: for any coordinate information in the plurality of identical coordinate information, obtaining the first category information corresponding to the any coordinate information in the second semantic map, and the any The second category information corresponding to the coordinate information in the first semantic map; if the first category information is the same as the second category information, based on the first semantic weight corresponding to the first category information, Or the second semantic weight corresponding to the second type of information determines the target similarity score of any coordinate information.
- the method further includes: in a case where the first category information is different from the second category information, determining that the target similarity score of any coordinate information is smaller than a second preset threshold.
- the method further The method includes: when the similarity score is less than a first preset threshold, storing the second semantic map in the mobile robot, and prohibiting storing the first semantic map in the mobile robot.
- the method further includes: saving the first semantic map if the second semantic map does not exist.
- a storage device for a semantic map includes: an acquisition module, configured to acquire the first semantic map constructed by the mobile robot after executing the current target event; a calculation module, using In the case that there is a second semantic map, calculate the similarity score between the second semantic map and the first semantic map, wherein the second semantic map is a historical semantic map saved by the mobile robot; save A module configured to update the second semantic map stored in the mobile robot to the first semantic map when the similarity score is greater than a first preset threshold.
- a computer-readable storage medium where a computer program is stored in the computer-readable storage medium, wherein the computer program is configured to perform the above-mentioned saving of the semantic map when running method.
- an electronic device including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to perform any of the above Steps in the method examples.
- the first semantic map constructed by the mobile robot after executing the current target event is obtained; if there is a second semantic map, the similarity score between the second semantic map and the first semantic map is calculated,
- the second semantic map is a historical semantic map saved by the mobile robot; when the similarity score is greater than a first preset threshold, update the second semantic map saved in the mobile robot
- For the first semantic map that is, by comparing the second semantic map and the size relationship between the similarity score of the first semantic map constructed by the current target event and the first preset threshold, when the similarity score is greater than
- the first semantic map is the correct map, and then the first semantic map is saved.
- the present disclosure has the following beneficial effects: based on the semantic recognition function of the AI of the mobile robot, by mapping the semantic information together with the location information of the semantic onto the semantic map, by comparing the second semantic information constructed by the mobile robot after executing the last target event Map, and the first semantic map constructed by the mobile robot after executing the current target event, to confirm whether there is a problem with the first semantic map, and whether to save the first semantic map, to solve the problem that the map saved by the mobile robot may be a wrong map, Furthermore, in the case of map errors, abnormal behavior of the mobile robot and other problems, the robustness of the long-term operation of the mobile robot is improved, and the influence of the mobile robot's map construction and overlay is avoided.
- FIG. 1 is a block diagram of the hardware structure of a mobile robot according to a method for storing a semantic map according to an embodiment of the present disclosure
- FIG. 2 is a flow chart (1) of a method for saving a semantic map according to an embodiment of the present disclosure
- FIG. 3 is a flow chart (2) of a method for saving a semantic map according to an embodiment of the present disclosure
- Fig. 4 is a structural block diagram of an apparatus for saving a semantic map according to an embodiment of the present disclosure.
- FIG. 1 is a block diagram of a hardware structure of a mobile robot according to a method for saving a semantic map according to an embodiment of the present disclosure.
- 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 processing devices such as microprocessor MCU or programmable logic device FPGA, etc.) and a memory 104 for storing data.
- the above-mentioned mobile robot may also include a transmission device 106 and an input and output device 108 for communication functions.
- FIG. 1 is only for illustration, and it does not limit the structure of the above-mentioned mobile robot.
- the mobile robot may also include more or fewer components than those shown in FIG. 1 , or have a different configuration that is functionally equivalent to or more functionally than that shown in FIG. 1 .
- the memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for saving the semantic map of the mobile robot in the embodiment of the present disclosure, and the processor 102 runs the computer program stored in the memory 104. program, so as to execute various functional applications and data processing, that is, to realize the above-mentioned method.
- the memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
- the memory 104 may further include memory located remotely from the processor 102, and these remote memories may be connected to the mobile robot through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
- the transmission device 106 is used to receive or transmit data via a network.
- a specific example of the above-mentioned network may include a wireless network provided by a mobile robot's communication provider.
- the transmission device 106 includes a network interface controller (NIC for short), which can be connected to other network devices through a base station so as to communicate with the Internet.
- the transmission device 106 may be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet in a wireless manner.
- RF Radio Frequency
- FIG. 2 is a flow chart (1) of a method for saving a semantic map according to an embodiment of the present disclosure. The process includes the following steps:
- Step S202 Obtain the first semantic map constructed by the mobile robot after executing the current target event
- Step S204 If there is a second semantic map, calculate the similarity score between the second semantic map and the first semantic map, wherein the second semantic map is a historical semantic map saved by the mobile robot ;
- the target event can be understood as: cleaning work and returning to the target area
- the second semantic map is the semantic map constructed when the mobile robot completed the cleaning work last time and returned to the target area
- the first semantic map is the mobile robot The semantic map constructed when the cleaning work is completed and returned to the target area, wherein the semantic map is a map including the type information of the object, the coordinate information of the object, and the semantic weight information of the object.
- Step S206 When the similarity score is greater than a first preset threshold, update the second semantic map stored in the mobile robot to the first semantic map.
- the first semantic map constructed by the mobile robot after executing the current target event is obtained; if there is a second semantic map, the similarity between the second semantic map and the first semantic map is calculated score, wherein the second semantic map is the historical semantic map saved by the mobile robot; when the similarity score is greater than the first preset threshold, the second semantic map saved in the mobile robot
- the map is updated to the first semantic map, that is, by comparing the second semantic map and the size relationship between the similarity score of the first semantic map constructed by the current target event and the preset threshold, when the similarity score is greater than
- the first preset threshold it is determined that the first semantic map is the correct map, and then the first semantic map is saved.
- obtaining the second semantic map stored by the mobile robot includes: constructing the second semantic map during the execution of the last target event by the mobile robot, wherein the second The semantic map includes: the type information of the object, the coordinate information of the object, and the semantic weight information of the object; after the execution of the last target event, obtain the second semantic map constructed by the mobile robot, and/or obtain the mobile robot
- the robot executes the first semantic map constructed by the current target event it includes: constructing the first semantic map during the execution of the current target event by the mobile robot, wherein the first semantic map includes: The type information of the object, the coordinate information of the object, and the semantic weight information of the object; after the execution of the current target event, the first semantic map constructed by the mobile robot is obtained.
- the second semantic map is constructed during the execution of the last target event by the mobile robot
- the first semantic map is constructed during the execution of the current target event by the mobile robot
- Both the second semantic map and the first semantic map include: the type information of the object, the coordinate information of the object, and the semantic weight information of the object.
- the second semantic map and the first semantic map are obtained, wherein , the semantic weight information of the object is used to indicate the weight in the process of matching the second semantic map with the first semantic map.
- the semantic weight information of the object can be preset by the user or dynamically given by the mobile robot according to the actual situation. It should be noted that this disclosure is not limited in the embodiments of the present disclosure.
- the specific implementation of building the second semantic map is as follows: during the execution of the last target event, the mobile robot monitors the target objects within the visual range of the mobile robot in real time, and acquires the first target within the visual range
- the first target image of the object input the first target image of the first target object acquired by the mobile robot into the artificial intelligence detection model, and obtain the first image information corresponding to the first target image, wherein the first image
- the information includes: the first category information of the first target object, the first semantic weight information of the first target object; and according to the relative positional relationship between the mobile robot and the first target object and
- the coordinate information determines the first coordinate information of the first target object; saves the first type information, the first semantic weight information, and the first coordinate information to the second semantic map, and traverses the travel area of the mobile robot , to obtain the second semantic map corresponding to all traveling areas.
- the specific implementation of building the first semantic map is as follows: during the process of executing the current target event, the mobile robot monitors the target objects within the visible range of the mobile robot in real time, and acquires the information of the second target object within the visible range.
- the second target image inputting the second target image of the second target object acquired by the mobile robot into the artificial intelligence detection model to obtain the second image information corresponding to the second target image, wherein the second image information includes : the second category information of the second target object, the second semantic weight information of the second target object; and according to the relative positional relationship between the mobile robot and the second target object and the coordinate information of the mobile robot in the traveling area Determining the second coordinate information of the second target object; saving the second type information, the second semantic weight information, and the second coordinate information to the first semantic map, traversing the travel area of the mobile robot, and The first semantic map corresponding to all traveling areas is obtained.
- the second semantic map is matched with the first semantic map to obtain a similarity score between the second semantic map and the first semantic map
- the specific method is as follows: traversing The second semantic map and the first semantic map are used to obtain multiple target similarity scores corresponding to multiple identical coordinate information in the second semantic map and the first semantic map; through the multiple target similarity scores to obtain the similarity scores between the second semantic map and the first semantic map.
- the first category information corresponding to the any coordinate information in the second semantic map is acquired, and the any A coordinate information corresponding to the second category information in the first semantic map; if the first category information is the same as the second category information, based on the first semantic weight corresponding to the first category information , or the second semantic weight corresponding to the second category information determines the target similarity score of any coordinate information; if the first category information is different from the second category information, determine the The target similarity score of any coordinate information is less than a second preset threshold.
- the target similarity score may be zero, It can also be set as a negative value according to the actual situation, where there is corresponding first type information in the second semantic map, and if there is no corresponding second type information in the first semantic map, determine the first The category information is different from the second category information.
- the corresponding relationship between semantic weights and target similarity scores may also be preset, and if the first category information and the second category information are the same, the corresponding target similarity scores are determined according to the semantic weights.
- the correspondence between the semantic weight and the target similarity score is preset to be 1:10, and for any coordinate information in the plurality of identical coordinate information, obtain the coordinate information in the second semantic The first type of information corresponding to the map, and the second type of information corresponding to any coordinate information in the first semantic map; when the first type of information is the same as the second type of information, Determine that the semantic weight corresponding to the first type of information is 0.2, that is, the target similarity score of multiple identical coordinate information is 2; when the corresponding relationship between the semantic weight and the target similarity score is set to 1:1 in advance, determine the second The semantic weight corresponding to one type of information is 0.2, and the target similarity score corresponding to the same coordinate information is 0.2. It should be noted that the above values are only for better understanding of this embodiment, and are not limited in this embodiment of the present disclosure.
- the second semantic map after matching the second semantic map with the first semantic map to obtain a similarity score between the second semantic map and the first semantic map, after the similarity If the degree score is less than the first preset threshold, the second semantic map is saved in the mobile robot, and the first semantic map is prohibited from being saved in the mobile robot.
- the first semantic map is saved.
- the second semantic map Before matching the second semantic map with the first semantic map, determine whether the second semantic map is saved in the mobile robot, and the second semantic map is not saved in the mobile robot, that is, the second semantic map is not obtained. In the case of a semantic map, the first semantic map is directly saved.
- Fig. 3 is a flow chart (2) of a method for saving a semantic map according to an embodiment of the present disclosure, as shown in Fig. 3 , the specific steps are as follows:
- Step S301 start;
- Step S302 The mobile robot starts cleaning and AI detects objects
- AI recognizes the object to obtain the type information of the object, the coordinate information of the object, and the semantic weight information of the object;
- Step S303 Map the object to the first semantic map through coordinate transformation
- the camera is used to monitor objects within the visible range of the machine in real time, and when a target object is detected, the first position is determined according to the relative positional relationship between the mobile robot and the target object and the coordinate information of the mobile robot in the travel area.
- First coordinate information of a target object and map the coordinate information of the target object to the first semantic map, wherein the first semantic map includes: the type of the target object, the coordinate information of the target object and the semantic weight of the target object, this
- the semantic weight represents the weight of the comparison between the second semantic map and the first semantic map.
- the semantic weight can be set in advance, and different objects correspond to different weights.
- objects that are not easy to move such as beds, TV cabinets, and sofas have high weights;
- Objects that are not easy to move in a short period of time such as tables, chairs, and floor fans, are given lower weights, while dynamic objects such as people and shoes are not given weights.
- Step S304 detecting an instruction to save the first semantic map
- the mobile robot When the mobile robot finishes cleaning and returns to the charging pile, it receives an instruction to save the first semantic map, and executes the operation of saving the semantic map according to the instruction.
- Step S305 Determine whether the second semantic map is saved in the mobile robot, if the second semantic map is saved in the mobile robot, execute step S307, and if the second semantic map is not saved in the mobile robot, execute step S306;
- Step S306 saving the first semantic map and the corresponding environment map
- Step S307 Determine the size relationship between the similarity score between the second semantic map and the first semantic map and a preset threshold (equivalent to the first preset threshold in the above embodiment);
- Step S308 if the size relationship indicates that the similarity score is greater than a preset threshold, save the first semantic map and the corresponding environment map;
- Step S309 if the size relationship indicates that the similarity score is smaller than a preset threshold, save the second semantic map and the corresponding environment map.
- the semantic information within the visible range of the mobile robot is obtained, and different types of objects detected by AI are used to assign different weights to the semantic information on the semantic map, that is, different semantic information has different semantic weights; Compare the two semantic maps to get the similarity scores of the two semantic maps. When the similarity score is greater than the preset threshold, it is confirmed that the updated map does not overlap and can be saved normally.
- detect whether the second semantic map is saved in the mobile robot if the second semantic map is not saved, then save the first semantic map and its corresponding environment map; if save the second semantic map, then compare the second semantic map and The first semantic map, get the similarity score of the two semantic maps, if the similarity score is greater than the preset threshold, it is considered that there is no overlapping map, then save the first semantic map and the corresponding environment map, if the similarity score is less than the preset threshold, it is considered that the first semantic map constructed by the mobile robot has overlapped, the operation of saving the map is not performed, and the second semantic map is restored.
- the map saved by the mobile robot may be a wrong map, and then the mobile robot behaves abnormally when the map is wrong, which improves the robustness of the mobile robot for a long time, and avoids the problem of the mobile robot.
- the method according to the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation.
- the technical solution of the present disclosure can be embodied in the form of a software product in essence or the part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to enable a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present disclosure.
- a storage device for a semantic map is also provided, and the device is used to implement the above embodiments and preferred implementation modes, and what has been explained will not be repeated.
- the term "module” may be a combination of software and/or hardware that realizes a predetermined function.
- the devices described in the following embodiments are preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.
- Fig. 4 is a structural block diagram of a storage device for a semantic map according to an embodiment of the present disclosure, as shown in Fig. 4 , including:
- An acquisition module 42 configured to acquire the first semantic map constructed by the mobile robot after executing the current target event
- a calculation module 44 configured to calculate a similarity score between the second semantic map and the first semantic map if there is a second semantic map, wherein the second semantic map is saved by the mobile robot historical semantic map;
- a saving module 46 configured to update the second semantic map saved in the mobile robot to the first semantic map when the similarity score is greater than a first preset threshold.
- the first semantic map constructed by the mobile robot after executing the current target event is obtained; if there is a second semantic map, the similarity between the second semantic map and the first semantic map is calculated score, wherein the second semantic map is the historical semantic map saved by the mobile robot; when the similarity score is greater than the first preset threshold, the second semantic map saved in the mobile robot
- the map is updated to the first semantic map, that is, by comparing the second semantic map and the size relationship between the similarity score of the first semantic map constructed by the current target event and the preset threshold, when the similarity score is greater than
- the first preset threshold it is determined that the first semantic map is the correct map, and then the first semantic map is saved.
- the above apparatus further includes: a construction module, configured to construct the second semantic map during the execution of the last target event by the mobile robot, wherein the second semantic map Including: the type information of the object, the coordinate information of the object, and the semantic weight information of the object; after the execution of the last target event, obtain the second semantic map constructed by the mobile robot, and/or obtain the mobile robot at Executing the first semantic map constructed by the current target event includes: constructing the first semantic map during the execution of the current target event by the mobile robot, wherein the first semantic map includes: category information, object coordinate information, and object semantic weight information; after executing the current target event, obtain the first semantic map constructed by the mobile robot.
- a construction module configured to construct the second semantic map during the execution of the last target event by the mobile robot, wherein the second semantic map Including: the type information of the object, the coordinate information of the object, and the semantic weight information of the object; after the execution of the last target event, obtain the second semantic map constructed by the mobile robot, and/or obtain the mobile robot at Executing the first
- the second semantic map is constructed during the execution of the last target event by the mobile robot
- the first semantic map is constructed during the execution of the current target event by the mobile robot
- Both the second semantic map and the first semantic map include: the type information of the object, the coordinate information of the object, and the semantic weight information of the object.
- the second semantic map and the first semantic map are obtained, wherein , the semantic weight information of the object is used to indicate the weight in the process of matching the second semantic map with the first semantic map.
- the semantic weight information of the object can be preset by the user or dynamically given by the mobile robot according to the actual situation. It should be noted that this disclosure is not limited in the embodiments of the present disclosure.
- the specific implementation of building the second semantic map is as follows: during the execution of the last target event, the mobile robot monitors the target objects within the visual range of the mobile robot in real time, and acquires the first target within the visual range
- the first target image of the object input the first target image of the first target object acquired by the mobile robot into the artificial intelligence detection model, and obtain the first image information corresponding to the first target image, wherein the first image
- the information includes: the first category information of the first target object, the first semantic weight information of the first target object; and according to the relative positional relationship between the mobile robot and the first target object and
- the coordinate information determines the first coordinate information of the first target object; saves the first type information, the first semantic weight information, and the first coordinate information to the second semantic map, and traverses the travel area of the mobile robot , to obtain the second semantic map corresponding to all traveling areas.
- the specific implementation of building the first semantic map is as follows: during the process of executing the current target event, the mobile robot monitors the target objects within the visible range of the mobile robot in real time, and acquires the information of the second target object within the visible range.
- the second target image inputting the second target image of the second target object acquired by the mobile robot into the artificial intelligence detection model to obtain the second image information corresponding to the second target image, wherein the second image information includes : the second category information of the second target object, the second semantic weight information of the second target object; and according to the relative positional relationship between the mobile robot and the second target object and the coordinate information of the mobile robot in the traveling area Determining the second coordinate information of the second target object; saving the second type information, the second semantic weight information, and the second coordinate information to the first semantic map, traversing the travel area of the mobile robot, and The first semantic map corresponding to all traveling areas is obtained.
- the matching module is further configured to traverse the second semantic map and the first semantic map to obtain multiple identical coordinates in the second semantic map and the first semantic map A plurality of target similarity scores corresponding to the information; the similarity scores between the second semantic map and the first semantic map are obtained through the multiple target similarity scores.
- the matching module is further configured to, for any coordinate information in the plurality of identical coordinate information, obtain the first category corresponding to the any coordinate information in the second semantic map information, and the second category information corresponding to any coordinate information in the first semantic map; if the first category information and the second category information are the same, based on the first category information The corresponding first semantic weight, or the second semantic weight corresponding to the second category information determines the target similarity score of any coordinate information;
- the matching module is further configured to determine that the target similarity score of any coordinate information is smaller than the second preset if the first category information is different from the second category information. Set the threshold.
- the target similarity score may be zero, It can also be set as a negative value according to the actual situation, where there is corresponding first type information in the second semantic map, and if there is no corresponding second type information in the first semantic map, determine the first The category information is different from the second category information.
- the corresponding relationship between semantic weights and target similarity scores may also be preset, and if the first category information and the second category information are the same, the corresponding target similarity scores are determined according to the semantic weights.
- the correspondence between the semantic weight and the target similarity score is preset to be 1:10, and for any coordinate information in the plurality of identical coordinate information, obtain the coordinate information in the second semantic The first type of information corresponding to the map, and the second type of information corresponding to any coordinate information in the first semantic map; when the first type of information is the same as the second type of information, Determine that the semantic weight corresponding to the first type of information is 0.2, that is, the target similarity score of multiple identical coordinate information is 2; when the corresponding relationship between the semantic weight and the target similarity score is set to 1:1 in advance, determine the second The semantic weight corresponding to one type of information is 0.2, and the target similarity score corresponding to the same coordinate information is 0.2. It should be noted that the above values are only for better understanding of this embodiment, and are not limited in this embodiment of the present disclosure.
- the saving module is further configured to match the second semantic map with the first semantic map to obtain a similarity score between the second semantic map and the first semantic map Afterwards, if the similarity score is less than a first preset threshold, the second semantic map is saved in the mobile robot, and the first semantic map is prohibited from being saved in the mobile robot.
- the saving module is further configured to, before matching the second semantic map with the first semantic map, if the second semantic map is not obtained, directly The first semantic map is saved in the mobile robot.
- the second semantic map Before matching the second semantic map with the first semantic map, determine whether the second semantic map is saved in the mobile robot, and the second semantic map is not saved in the mobile robot, that is, the second semantic map is not obtained. In the case of a semantic map, the first semantic map is directly saved.
- An embodiment of the present disclosure also provides a storage medium, the storage medium includes a stored program, wherein the above-mentioned program executes any one of the above-mentioned methods when running.
- the above-mentioned storage medium may be configured to store program codes for performing the following steps:
- Embodiments of the present disclosure also provide an electronic device, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
- the above-mentioned electronic device may further include a transmission device and an input-output device, wherein the transmission device is connected to the above-mentioned processor, and the input-output device is connected to the above-mentioned processor.
- the above-mentioned processor may be configured to execute the following steps through a computer program:
- the above-mentioned storage medium may include but not limited to: U disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), Various media that can store program codes such as removable hard disks, magnetic disks, or optical disks.
- ROM read-only memory
- RAM random access memory
- Various media that can store program codes such as removable hard disks, magnetic disks, or optical disks.
- each module or each step of the above-mentioned disclosure can be realized by a general-purpose computing device, and they can be concentrated on a single computing device, or distributed in a network composed of multiple computing devices Alternatively, they may be implemented in program code executable by a computing device so that they may be stored in a storage device to be executed by a computing device, and in some cases in an order different from that shown here
- the steps shown or described are carried out, or they are separately fabricated into individual integrated circuit modules, or multiple modules or steps among them are fabricated into a single integrated circuit module for implementation.
- the present disclosure is not limited to any specific combination of hardware and software.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- Remote Sensing (AREA)
- General Physics & Mathematics (AREA)
- Radar, Positioning & Navigation (AREA)
- General Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Automation & Control Theory (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)
- Manipulator (AREA)
Abstract
本公开实施例提供了一种语义地图的保存方法和装置、存储介质、电子装置,上述语义地图的保存方法包括:获取移动机器人在执行完当前目标事件所构建的第一语义地图;在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分,其中,所述第二语义地图为所述移动机器人保存的历史语义地图;在所述相似度得分大于第一预设阈值的情况下,将所述移动机器人中保存的所述第二语义地图更新为所述第一语义地图,采用上述技术方案,解决了相关技术中,移动机器人保存的语义地图可能是错误的地图等问题。
Description
本公开要求如下专利申请的优先权:于2021年07月27日提交中国专利局、申请号为202110853400.7、发明名称为“语义地图的保存方法和装置、存储介质、电子装置”的中国专利申请;上述专利申请的全部内容通过引用结合在本公开中。
本公开涉及通信领域,具体而言,涉及一种语义地图的保存方法和装置、存储介质、电子装置。
随着科学技术的进步和人工智能的发展,智能机器人也应用到了各个领域,移动机器人的定位和地图构建是移动机器人领域的热点问题。
现有激光位移传感器(Laser Distance Sensor,简称LDS)类型的移动机器人通过LDS雷达信息进行定位建图,但是由于传感器在长时间失效,例如移动机器人一直倾斜,或者雷达传感器被遮住等情况,移动机器人容易发生定位错误的问题,或者在移动机器人被搬起后再放下,也有可能发生定位错误的问题,这种定位错误都会导致移动机器人构建一张错误的地图,进而保存一张错误的地图,使得后续移动机器人根据错误地图进行清扫工作时,发生错乱,比如需要移动机器人去A房间清扫,但是由于定位和地图错误,去到了B房间等,当地图出现错误时,必须用户手动去删除,不然错误信息会一直存在,
针对相关技术中,移动机器人保存的语义地图可能是错误的地图等问题,尚未提出有效的技术方案。
因此,有必要对相关技术予以改良以克服相关技术中的所述缺陷。
发明内容
本公开实施例提供了一种语义地图的保存方法和装置、存储介质、电子装置,以至少解决移动机器人保存的语义地图可能是错误的地图等问题。
根据本公开的一个实施例,提供了一种语义地图的保存方法,包括:获取移动机器人在执行完当前目标事件所构建的第一语义地图;在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分,其中,所述第二语义地图为所述移动机器人保存的历史语义地图;在所述相似度得分大于第一预设阈值的情况下,将所述移动机器人中保 存的所述第二语义地图更新为所述第一语义地图。
在一个示例性实施例中,在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分之前,所述方法还包括:在所述移动机器人执行所述上一次目标事件的过程中,构建所述第二语义地图,其中,所述第二语义地图包括:物体的种类信息、物体的坐标信息、物体的语义权重信息;在执行完所述上一次目标事件后,获取移动机器人所构建的第二语义地图,和/或,获取所述移动机器人在执行完当前目标事件所构建的第一语义地图,包括:在所述移动机器人执行所述当前目标事件的过程中,构建所述第一语义地图,其中,所述第一语义地图包括:物体的种类信息、物体的坐标信息、物体的语义权重信息;在执行完所述当前目标事件后,获取移动机器人所构建的第一语义地图。
在一个示例性实施例中,在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分,包括:遍历所述第二语义地图和所述第一语义地图,以获取所述第二语义地图和所述第一语义地图中多个相同的坐标信息所对应的多个目标相似度得分;通过所述多个目标相似度得分得到所述第二语义地图与所述第一语义地图的相似度得分。
在一个示例性实施例中,遍历所述第二语义地图和所述第一语义地图,以获取所述第二语义地图和所述第一语义地图中多个相同的坐标信息所对应的多个目标相似度得分,包括:对于所述多个相同的坐标信息中的任一坐标信息,获取所述任一坐标信息在所述第二语义地图中对应的第一种类信息,以及所述任一坐标信息在所述第一语义地图中对应的第二种类信息;在所述第一种类信息和所述第二种类信息相同的情况下,基于所述第一种类信息对应的第一语义权重,或所述第二种类信息对应的第二语义权重确定所述任一坐标信息的目标相似度得分。
在一个示例性实施例中,获取所述任一坐标信息在所述第二语义地图中对应的第一种类信息,以及所述任一坐标信息在所述第一语义地图中对应的第二种类信息之后,所述方法还包括:在所述第一种类信息和所述第二种类信息不相同的情况下,确定所述任一坐标信息的目标相似度得分小于第二预设阈值。
在一个示例性实施例中,将所述第二语义地图和所述第一语义地图进行匹配,以获取所述第二语义地图与所述第一语义地图的相似度得分之后,所述方法还包括:在所述相似度得分小于第一预设阈值的情况下,在所述移动机器人中保存所述第二语义地图,且禁止在所述移动机器人中保存所述第一语义地图。
在一个示例性实施例中,所述方法还包括:在不存在所述第二语义地图的情况下,保存所述第一语义地图。
根据本公开的另一个实施例,提供了一种语义地图的保存装置,所述装置包括:获取模 块,用于获取移动机器人在执行完当前目标事件所构建的第一语义地图;计算模块,用于在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分,其中,所述第二语义地图为所述移动机器人保存的历史语义地图;保存模块,用于在所述相似度得分大于第一预设阈值的情况下,将所述移动机器人中保存的所述第二语义地图更新为所述第一语义地图。
根据本公开的又一实施例,还提供了一种计算机可读的存储介质,该计算机可读的存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述语义地图的保存方法。
根据本公开的又一个实施例,还提供了一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行上述任一项方法实施例中的步骤。
通过本公开,获取移动机器人在执行完当前目标事件所构建的第一语义地图;在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分,其中,所述第二语义地图为所述移动机器人保存的历史语义地图;在所述相似度得分大于第一预设阈值的情况下,将所述移动机器人中保存的所述第二语义地图更新为所述第一语义地图,即通过比较第二语义地图,以及执行完当前目标事件所构建的第一语义地图的相似度得分与第一预设阈值之间的大小关系,在相似度得分大于第一预设阈值的情况下,确定第一语义地图为正确的地图,进而保存第一语义地图,通过上述技术方案,解决了相关技术中,移动机器人保存的语义地图可能是错误的地图等问题。
本公开具有如下有益效果:基于移动机器人的AI的语义识别功能,通过将语义信息连同该语义的位置信息映射到语义地图上,通过对比移动机器人在执行完上一次目标事件所构建的第二语义地图,以及移动机器人在执行完当前目标事件所构建的第一语义地图,来确认第一语义地图是否存在问题,以及是否保存第一语义地图,解决了移动机器人保存的地图可能是错误的地图,进而在地图出错的情况下,移动机器人行为异常等问题,提高了移动机器人长时间运行的鲁棒性,以及避免了移动机器人建图叠图带来的影响。
此处所说明的附图用来提供对本公开的进一步理解,构成本公开的一部分,本公开的示意性实施例及其说明用于解释本公开,并不构成对本公开的不当限定。在附图中:
图1是本公开实施例的一种语义地图的保存方法的移动机器人的硬件结构框图;
图2是根据本公开实施例的语义地图的保存方法的流程图(一);
图3是根据本公开实施例的语义地图的保存方法的流程图(二);
图4是根据本公开实施例的语义地图的保存装置的结构框图。
下文中将参考附图并结合实施例来详细说明本公开。需要说明的是,在不冲突的情况下,本公开中的实施例及实施例中的特征可以相互组合。
需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
本公开实施例所提供的方法实施例可以在移动机器人,或者类似的运算装置中执行。以运行在移动机器人上为例,图1是本公开实施例的一种语义地图的保存方法的移动机器人的硬件结构框图。如图1所示,移动机器人可以包括一个或多个(图1中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)和用于存储数据的存储器104,在一个示例性实施例中,上述移动机器人还可以包括用于通信功能的传输设备106以及输入输出设备108。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述移动机器人的结构造成限定。例如,移动机器人还可包括比图1中所示更多或者更少的组件,或者具有与图1所示等同功能或比图1所示功能更多的不同的配置。
存储器104可用于存储计算机程序,例如,应用软件的软件程序以及模块,如本公开实施例中的移动机器人的语义地图的保存方法对应的计算机程序,处理器102通过运行存储在存储器104内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至移动机器人。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
传输装置106用于经由一个网络接收或者发送数据。上述的网络具体实例可包括移动机器人的通信供应商提供的无线网络。在一个实例中,传输装置106包括一个网络适配器(Network Interface Controller,简称为NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输装置106可以为射频(Radio Frequency,简称为RF)模块,其用于通过无线方式与互联网进行通讯。
在本实施例中提供了一种语义地图的保存方法,应用于移动机器人中,图2是根据本公开实施例的语义地图的保存方法的流程图(一),该流程包括如下步骤:
步骤S202:获取移动机器人在执行完当前目标事件所构建的第一语义地图;
步骤S204:在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分,其中,所述第二语义地图为所述移动机器人保存的历史语义地图;
需要说明的是,目标事件可以理解为:清扫工作以及回到目标区域,第二语义地图时移动机器人上一次执行完清扫工作并回到目标区域时构建的语义地图;第一语义地图是移动机器人本次执行完清扫工作并回到目标区域时构建的语义地图,其中,语义地图是包括物体的种类信息、物体的坐标信息、物体的语义权重信息的地图。
步骤S206:在所述相似度得分大于第一预设阈值的情况下,将所述移动机器人中保存的所述第二语义地图更新为所述第一语义地图。
通过本公开实施例,获取移动机器人在执行完当前目标事件所构建的第一语义地图;在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分,其中,所述第二语义地图为所述移动机器人保存的历史语义地图;在所述相似度得分大于第一预设阈值的情况下,将所述移动机器人中保存的所述第二语义地图更新为所述第一语义地图,即通过比较第二语义地图,以及执行完当前目标事件所构建的第一语义地图的相似度得分与预设阈值之间的大小关系,在相似度得分大于第一预设阈值的情况下,确定第一语义地图为正确的地图,进而保存第一语义地图,通过上述技术方案,解决了相关技术中,移动机器人保存的语义地图可能是错误的地图等问题。
在一个示例性实施例中,获取移动机器人存储的第二语义地图,包括:在所述移动机器人执行所述上一次目标事件的过程中,构建所述第二语义地图,其中,所述第二语义地图包括:物体的种类信息、物体的坐标信息、物体的语义权重信息;在执行完所述上一次目标事件后,获取移动机器人所构建的第二语义地图,和/或,获取所述移动机器人在执行完当前目标事件所构建的第一语义地图,包括:在所述移动机器人执行所述当前目标事件的过程中,构建所述第一语义地图,其中,所述第一语义地图包括:物体的种类信息、物体的坐标信息、物体的语义权重信息;在执行完所述当前目标事件后,获取移动机器人所构建的第一语义地图。
也就是说,在移动机器人在执行所述上一次目标事件的过程中,构建所述第二语义地图,以及在移动机器人在执行当前目标事件的过程中,构建所述第一语义地图,其中,第二语义地图和第一语义地图中均包括:物体的种类信息、物体的坐标信息、物体的语义权重信息,在移动机器人执行完目标事件后,获取第二语义地图和第一语义地图,其中,物体的语义权重信息用于指示第二语义地图和第一语义地图匹配的过程中的权重,物体的语义权重信息可以是用户预先设置的,也可以是移动机器人根据实际情况动态给予的,需要说明的是,本公 开实施例对此不做限定。
进一步的,构建第二语义地图的具体实现方式如下:移动机器人在执行上一次的目标事件的过程中,实时监测移动机器人的可视范围内的目标物体,并获取可视范围内的第一目标物体的第一目标图像,将移动机器人获取的第一目标物体的第一目标图像输入到人工智能检测模型中,得到所述第一目标图像对应的第一图像信息,其中,所述第一图像信息包括:第一目标物体的第一种类信息、第一目标物体的第一语义权重信息;以及根据所述移动机器人与所述第一目标物体的相对位置关系和所述移动机器人在行进区域的坐标信息确定所述第一目标物体的第一坐标信息;将所述第一种类信息、第一语义权重信息、第一坐标信息保存至所述第二语义地图,遍历所述移动机器人的行进区域,以得到全部的行进区域对应的第二语义地图。
进一步的,构建第一语义地图的具体实现方式如下:移动机器人在执行当前目标事件的过程中,实时监测移动机器人的可视范围内的目标物体,并获取可视范围内的第二目标物体的第二目标图像,将移动机器人获取的第二目标物体的第二目标图像输入到人工智能检测模型中,得到所述第二目标图像对应的第二图像信息,其中,所述第二图像信息包括:第二目标物体的第二种类信息、第二目标物体的第二语义权重信息;以及根据所述移动机器人与所述第二目标物体的相对位置关系和所述移动机器人在行进区域的坐标信息确定所述第二目标物体的第二坐标信息;将所述第二种类信息、第二语义权重信息、第二坐标信息保存至所述第一语义地图,遍历所述移动机器人的行进区域,以得到全部的行进区域对应的第一语义地图。
在一个示例性实施例中,将所述第二语义地图和所述第一语义地图进行匹配,以获取所述第二语义地图与所述第一语义地图的相似度得分,具体方式如下:遍历所述第二语义地图和所述第一语义地图,以获取所述第二语义地图和所述第一语义地图中多个相同的坐标信息所对应的多个目标相似度得分;通过所述多个目标相似度得分得到所述第二语义地图与所述第一语义地图的相似度得分。
可以理解为,确定第二语义地图和所述第一语义地图的相同的坐标信息,并确定相同的坐标信息下目标物体的类型是否相同,并确定对应的目标相似度得分,将获得的多个目标相似度得分进行相加,确定相似度得分。
在一个示例性实施例中,对于所述多个相同的坐标信息中的任一坐标信息,获取所述任一坐标信息在所述第二语义地图中对应的第一种类信息,以及所述任一坐标信息在所述第一语义地图中对应的第二种类信息;在所述第一种类信息和所述第二种类信息相同的情况下,基于所述第一种类信息对应的第一语义权重,或所述第二种类信息对应的第二语义权重确定 所述任一坐标信息的目标相似度得分;在所述第一种类信息和所述第二种类信息不相同的情况下,确定所述任一坐标信息的目标相似度得分小于第二预设阈值。
换言之,比较相同坐标信息对应的第一种类信息和第二种类信息是否相同,在所述第一种类信息和所述第二种类信息相同的情况下,根据第一种类信息对应的第一语义权重或第二种类信息对应的第二语义权重作为相同坐标信息对应的目标相似度得分,在所述第一种类信息和所述第二种类信息不相同的情况下,目标相似度得分可以为零,也可以根据实际情况设置为负数的数值,其中,在第二语义地图中存在对应的第一种类信息,在第一语义地图中不存在对应的第二种类信息的情况下,确定所述第一种类信息和所述第二种类信息不相同。
进一步的,还可以预先设置语义权重与目标相似度得分的对应关系,在所述第一种类信息和所述第二种类信息相同的情况下,根据语义权重确定对应的目标相似度得分。
举例来讲,预先设置语义权重与目标相似度得分的对应关系为1:10,对于所述多个相同的坐标信息中的任一坐标信息,获取所述任一坐标信息在所述第二语义地图中对应的第一种类信息,以及所述任一坐标信息在所述第一语义地图中对应的第二种类信息;在所述第一种类信息和所述第二种类信息相同的情况下,确定第一种类信息对应的语义权重为0.2,即在多个相同的坐标信息的目标相似度得分为2;预先设置语义权重与目标相似度得分的对应关系为1:1的情况下,确定第一种类信息对应的语义权重为0.2,相同坐标信息对应的目标相似度得分0.2,需要说明的是,上述数值仅是为了更好的理解本实施例,本公开实施例对此不做限定。
在一个示例性实施例中,将所述第二语义地图和所述第一语义地图进行匹配,以获取所述第二语义地图与所述第一语义地图的相似度得分之后,在所述相似度得分小于第一预设阈值的情况下,在所述移动机器人中保存所述第二语义地图,且禁止在所述移动机器人中保存所述第一语义地图。
匹配第二语义地图和第一语义地图,得出两张语义地图的相似性得分,若相似性得分小于第一预设阈值,则认为第一语义地图发生了叠图,不执行保存第一语义地图的操作,并将第二语义地图恢复出来,继续保存第二语义地图,其中,发生叠图用于指示所述第一语义地图在构建的过程中出现了错误。
在一个示例性实施例中,在不存在所述第二语义地图的情况下,保存所述第一语义地图。
将所述第二语义地图和所述第一语义地图进行匹配之前,确定移动机器人中是否保存有第二语义地图,在移动机器人中没有保存有第二语义地图,即未获取到所述第二语义地图的情况下,直接保存第一语义地图。
为了更好理解上述语义地图的保存方法,以下结合可选实施例对上述技术方案进行解释 说明,但不用于限定本公开实施例的技术方案。
图3是根据本公开实施例的语义地图的保存方法的流程图(二),如图3所示,具体步骤如下:
步骤S301:开始;
步骤S302:移动机器人开始清扫并AI检测物体;
需要说明的是,AI识别物体得到物体的种类信息、物体的坐标信息、物体的语义权重信息;
步骤S303:将物体通过坐标变换映射到第一语义地图上;
具体的,通过相机实时监测机器可视范围内的物体,当检测到目标物体时,通过根据所述移动机器人与目标物体的相对位置关系和移动机器人在所述行进区域的坐标信息确定所述第一目标物体的第一坐标信息,并将目标物体的映射坐标信息到第一语义地图上,其中,第一语义地图包括:目标物体的种类,目标物体的坐标信息和目标物体的语义权重,这个语义权重代表了第二语义地图和第一语义地图对比时的权重,语义权重可以预先设定,不同的物体对应不同的权重,如床、电视机柜、沙发等不容易移动的物体权重很高;桌子、椅子、落地扇等短时间内不容易移动的物体权重较低,而对于人、鞋子等动态物体,则不给予权重。
步骤S304:检测到保存第一语义地图的指令;
当移动机器人完成清扫工作,并回到充电桩时收到保存第一语义地图的指令,根据指令执行保存语义地图的操作。
步骤S305:判断移动机器人中是否保存有第二语义地图,若移动机器人中保存有第二语义地图,执行步骤S307,若移动机器人中没有保存有第二语义地图,执行步骤S306;
步骤S306:保存第一语义地图以及对应的环境地图;
步骤S307:确定第二语义地图与第一语义地图的相似性得分与预设阈值(相当于上述实施例中的第一预设阈值)之间的大小关系;
步骤S308:在大小关系指示所述相似性得分大于预设阈值的情况下,保存第一语义地图以及对应的环境地图;
步骤S309:在大小关系指示所述相似性得分小于预设阈值的情况下,保存第二语义地图以及对应的环境地图。
上述实施例中,获取移动机器人可视范围内的语义信息,并通过AI检测到的不同物体的种类对语义地图上的语义信息分配不同的权重,即,不同语义信息拥有不同的语义权重;通过对两张语义地图进行对比,得到两张语义地图的相似度得分,当相似度得分大于预设阈值时,确认更新的地图不存在叠图,可以正常保存。具体的,检测移动机器人中是否保存有 第二语义地图,若没有保存第二语义地图,则保存第一语义地图和其对应的环境地图;若保存第二语义地图,则对比第二语义地图和第一语义地图,得出两张语义地图的相似性得分,若相似性得分大于预设阈值,则认为没有叠图,则保存第一语义地图以及对应的环境地图,若相似性得分小于预设阈值,则认为此次移动机器人构建的第一语义地图发生了叠图,不执行存图操作,并将第二语义地图恢复出来。通过本实施例,解决了移动机器人保存的地图可能是错误的地图,进而在地图出错的情况下,移动机器人行为异常等问题,提高了移动机器人长时间运行的鲁棒性,以及避免了移动机器人建图叠图带来的影响。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本公开各个实施例所述的方法。
在本实施例中还提供了语义地图的保存装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图4是根据本公开实施例的语义地图的保存装置的结构框图,如图4所示,包括:
获取模块42,用于获取移动机器人在执行完当前目标事件所构建的第一语义地图;
计算模块44,用于在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分,其中,所述第二语义地图为所述移动机器人保存的历史语义地图;
保存模块46,用于在所述相似度得分大于第一预设阈值的情况下,将所述移动机器人中保存的所述第二语义地图更新为所述第一语义地图。
通过本公开实施例,获取移动机器人在执行完当前目标事件所构建的第一语义地图;在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分,其中,所述第二语义地图为所述移动机器人保存的历史语义地图;在所述相似度得分大于第一预设阈值的情况下,将所述移动机器人中保存的所述第二语义地图更新为所述第一语义地图,即通过比较第二语义地图,以及执行完当前目标事件所构建的第一语义地图的相似度得分与预设阈值之间的大小关系,在相似度得分大于第一预设阈值的情况下,确定第一语义地图为正确的地图,进而保存第一语义地图,通过上述技术方案,解决了相关技术中,移动机器人保存的语义地图可能是错误的地图等问题。
在一个示例性实施例中,上述装置还包括:构建模块,用于在所述移动机器人执行所述上一次目标事件的过程中,构建所述第二语义地图,其中,所述第二语义地图包括:物体的种类信息、物体的坐标信息、物体的语义权重信息;在执行完所述上一次目标事件后,获取移动机器人所构建的第二语义地图,和/或,获取所述移动机器人在执行完当前目标事件所构建的第一语义地图,包括:在所述移动机器人执行所述当前目标事件的过程中,构建所述第一语义地图,其中,所述第一语义地图包括:物体的种类信息、物体的坐标信息、物体的语义权重信息;在执行完所述当前目标事件后,获取移动机器人所构建的第一语义地图。
也就是说,在移动机器人在执行所述上一次目标事件的过程中,构建所述第二语义地图,以及在移动机器人在执行当前目标事件的过程中,构建所述第一语义地图,其中,第二语义地图和第一语义地图中均包括:物体的种类信息、物体的坐标信息、物体的语义权重信息,在移动机器人执行完目标事件后,获取第二语义地图和第一语义地图,其中,物体的语义权重信息用于指示第二语义地图和第一语义地图匹配的过程中的权重,物体的语义权重信息可以是用户预先设置的,也可以是移动机器人根据实际情况动态给予的,需要说明的是,本公开实施例对此不做限定。
进一步的,构建第二语义地图的具体实现方式如下:移动机器人在执行上一次的目标事件的过程中,实时监测移动机器人的可视范围内的目标物体,并获取可视范围内的第一目标物体的第一目标图像,将移动机器人获取的第一目标物体的第一目标图像输入到人工智能检测模型中,得到所述第一目标图像对应的第一图像信息,其中,所述第一图像信息包括:第一目标物体的第一种类信息、第一目标物体的第一语义权重信息;以及根据所述移动机器人与所述第一目标物体的相对位置关系和所述移动机器人在行进区域的坐标信息确定所述第一目标物体的第一坐标信息;将所述第一种类信息、第一语义权重信息、第一坐标信息保存至所述第二语义地图,遍历所述移动机器人的行进区域,以得到全部的行进区域对应的第二语义地图。
进一步的,构建第一语义地图的具体实现方式如下:移动机器人在执行当前目标事件的过程中,实时监测移动机器人的可视范围内的目标物体,并获取可视范围内的第二目标物体的第二目标图像,将移动机器人获取的第二目标物体的第二目标图像输入到人工智能检测模型中,得到所述第二目标图像对应的第二图像信息,其中,所述第二图像信息包括:第二目标物体的第二种类信息、第二目标物体的第二语义权重信息;以及根据所述移动机器人与所述第二目标物体的相对位置关系和所述移动机器人在行进区域的坐标信息确定所述第二目标物体的第二坐标信息;将所述第二种类信息、第二语义权重信息、第二坐标信息保存至所述第一语义地图,遍历所述移动机器人的行进区域,以得到全部的行进区域对应的第一语义 地图。
在一个示例性实施例中,匹配模块,还用于遍历所述第二语义地图和所述第一语义地图,以获取所述第二语义地图和所述第一语义地图中多个相同的坐标信息所对应的多个目标相似度得分;通过所述多个目标相似度得分得到所述第二语义地图与所述第一语义地图的相似度得分。
可以理解为,确定第二语义地图和所述第一语义地图的相同的坐标信息,并确定相同的坐标信息下目标物体的类型是否相同,并确定对应的目标相似度得分,将获得的多个目标相似度得分进行相加,确定相似度得分。
在一个示例性实施例中,匹配模块,还用于对于所述多个相同的坐标信息中的任一坐标信息,获取所述任一坐标信息在所述第二语义地图中对应的第一种类信息,以及所述任一坐标信息在所述第一语义地图中对应的第二种类信息;在所述第一种类信息和所述第二种类信息相同的情况下,基于所述第一种类信息对应的第一语义权重,或所述第二种类信息对应的第二语义权重确定所述任一坐标信息的目标相似度得分;
在一个示例性实施例中,匹配模块,还用于在所述第一种类信息和所述第二种类信息不相同的情况下,确定所述任一坐标信息的目标相似度得分小于第二预设阈值。
换言之,比较相同坐标信息对应的第一种类信息和第二种类信息是否相同,在所述第一种类信息和所述第二种类信息相同的情况下,根据第一种类信息对应的第一语义权重或第二种类信息对应的第二语义权重作为相同坐标信息对应的目标相似度得分,在所述第一种类信息和所述第二种类信息不相同的情况下,目标相似度得分可以为零,也可以根据实际情况设置为负数的数值,其中,在第二语义地图中存在对应的第一种类信息,在第一语义地图中不存在对应的第二种类信息的情况下,确定所述第一种类信息和所述第二种类信息不相同。
进一步的,还可以预先设置语义权重与目标相似度得分的对应关系,在所述第一种类信息和所述第二种类信息相同的情况下,根据语义权重确定对应的目标相似度得分。
举例来讲,预先设置语义权重与目标相似度得分的对应关系为1:10,对于所述多个相同的坐标信息中的任一坐标信息,获取所述任一坐标信息在所述第二语义地图中对应的第一种类信息,以及所述任一坐标信息在所述第一语义地图中对应的第二种类信息;在所述第一种类信息和所述第二种类信息相同的情况下,确定第一种类信息对应的语义权重为0.2,即在多个相同的坐标信息的目标相似度得分为2;预先设置语义权重与目标相似度得分的对应关系为1:1的情况下,确定第一种类信息对应的语义权重为0.2,相同坐标信息对应的目标相似度得分0.2,需要说明的是,上述数值仅是为了更好的理解本实施例,本公开实施例对此不做限定。
在一个示例性实施例中,保存模块,还用于将所述第二语义地图和所述第一语义地图进行匹配,以获取所述第二语义地图与所述第一语义地图的相似度得分之后,在所述相似度得分小于第一预设阈值的情况下,在所述移动机器人中保存所述第二语义地图,且禁止在所述移动机器人中保存所述第一语义地图。
匹配第二语义地图和第一语义地图,得出两张语义地图的相似性得分,若相似性得分小于第一预设阈值,则认为第一语义地图发生了叠图,不执行保存第一语义地图的操作,并将第二语义地图恢复出来,继续保存第二语义地图,其中,发生叠图用于指示所述第一语义地图在构建的过程中出现了错误。
在一个示例性实施例中,保存模块,还用于将所述第二语义地图和所述第一语义地图进行匹配之前,在未获取到所述第二语义地图的情况下,直接在所述移动机器人中保存所述第一语义地图。
将所述第二语义地图和所述第一语义地图进行匹配之前,确定移动机器人中是否保存有第二语义地图,在移动机器人中没有保存有第二语义地图,即未获取到所述第二语义地图的情况下,直接保存第一语义地图。
本公开的实施例还提供了一种存储介质,该存储介质包括存储的程序,其中,上述程序运行时执行上述任一项的方法。
可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的程序代码:
S1,获取移动机器人在执行完当前目标事件所构建的第一语义地图;
S2,在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分,其中,所述第二语义地图为所述移动机器人保存的历史语义地图;
S3,在所述相似度得分大于第一预设阈值的情况下,将所述移动机器人中保存的所述第二语义地图更新为所述第一语义地图。
本公开的实施例还提供了一种电子装置,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。
可选地,上述电子装置还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。
可选地,在本实施例中,上述处理器可以被设置为通过计算机程序执行以下步骤:
S1,获取移动机器人在执行完当前目标事件所构建的第一语义地图;
S2,在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分,其中,所述第二语义地图为所述移动机器人保存的历史语义地图;
S3,在所述相似度得分大于第一预设阈值的情况下,将所述移动机器人中保存的所述第 二语义地图更新为所述第一语义地图。
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。
显然,本领域的技术人员应该明白,上述的本公开的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本公开不限制于任何特定的硬件和软件结合。
以上所述仅为本公开的优选实施例而已,并不用于限制本公开,对于本领域的技术人员来说,本公开可以有各种更改和变化。凡在本公开的原则之内,所作的任何修改、等同替换、改进等,均应包含在本公开的保护范围之内。
Claims (10)
- 一种语义地图的保存方法,其特征在于:包括:获取移动机器人在执行完当前目标事件所构建的第一语义地图;在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分,其中,所述第二语义地图为所述移动机器人保存的历史语义地图;在所述相似度得分大于第一预设阈值的情况下,将所述移动机器人中保存的所述第二语义地图更新为所述第一语义地图。
- 根据权利要求1所述的语义地图的保存方法,其特征在于:在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分之前,所述方法还包括:在所述移动机器人执行所述当前目标事件的上一次目标事件的过程中,构建所述第二语义地图,其中,所述第二语义地图包括:物体的种类信息、物体的坐标信息、物体的语义权重信息;在执行完所述上一次目标事件后,获取移动机器人所构建的第二语义地图,和/或获取所述移动机器人在执行完当前目标事件所构建的第一语义地图,包括:在所述移动机器人执行所述当前目标事件的过程中,构建所述第一语义地图,其中,所述第一语义地图包括:物体的种类信息、物体的坐标信息、物体的语义权重信息;在执行完所述当前目标事件后,获取移动机器人所构建的第一语义地图。
- 根据权利要求2所述的语义地图的保存方法,其特征在于:在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分,包括:遍历所述第二语义地图和所述第一语义地图,以获取所述第二语义地图和所述第一语义地图中多个相同的坐标信息所对应的多个目标相似度得分;通过所述多个目标相似度得分得到所述第二语义地图与所述第一语义地图的相似度得分。
- 根据权利要求3所述的语义地图的保存方法,其特征在于:遍历所述第二语义地图和所述第一语义地图,以获取所述第二语义地图和所述第一语义地图中多个相同的坐标信息所对应的多个目标相似度得分,包括:对于所述多个相同的坐标信息中的任一坐标信息,获取所述任一坐标信息在所述第二语义地图中对应的第一种类信息,以及所述任一坐标信息在所述第一语义地图中对应的第二种类信息;在所述第一种类信息和所述第二种类信息相同的情况下,基于所述第一种类信息对应的第一语义权重,或所述第二种类信息对应的第二语义权重确定所述任一坐标信息的目标相似度得分。
- 根据权利要求4所述的语义地图的保存方法,其特征在于:获取所述任一坐标信息在所述第二语义地图中对应的第一种类信息,以及所述任一坐标信息在所述第一语义地图中对应的第二种类信息之后,所述方法还包括:在所述第一种类信息和所述第二种类信息不相同的情况下,确定所述任一坐标信息的目标相似度得分小于第二预设阈值。
- 根据权利要求1所述的语义地图的保存方法,其特征在于:所述方法还包括:在所述相似度得分小于第一预设阈值的情况下,在所述移动机器人中保存所述第二语义地图,且禁止在所述移动机器人中保存所述第一语义地图。
- 根据权利要求1所述的语义地图的保存方法,其特征在于:所述方法还包括:在不存在所述第二语义地图的情况下,保存所述第一语义地图。
- 一种语义地图的保存装置,其特征在于:所述装置包括:获取模块,用于获取移动机器人在执行完当前目标事件所构建的第一语义地图;计算模块,用于在存在第二语义地图的情况下,计算所述第二语义地图与所述第一语义地图的相似度得分,其中,所述第二语义地图为所述移动机器人保存的历史语义地图;保存模块,用于在所述相似度得分大于第一预设阈值的情况下,将所述移动机器人中保存的所述第二语义地图更新为所述第一语义地图。
- 一种计算机可读的存储介质,其特征在于,所述计算机可读的存储介质包括存储的程序,其中,所述程序运行时执行上述权利要求1至7任一项中所述的方法。
- 一种电子装置,包括存储器和处理器,其特征在于,所述存储器中存储有计算机程序,所述处理器被设置为通过所述计算机程序执行所述权利要求1至7任一项中所述的方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110853400.7A CN113656418B (zh) | 2021-07-27 | 2021-07-27 | 语义地图的保存方法和装置、存储介质、电子装置 |
| CN202110853400.7 | 2021-07-27 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2023005379A1 true WO2023005379A1 (zh) | 2023-02-02 |
Family
ID=78490719
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2022/094640 Ceased WO2023005379A1 (zh) | 2021-07-27 | 2022-05-24 | 语义地图的保存方法和装置、存储介质、电子装置 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN113656418B (zh) |
| WO (1) | WO2023005379A1 (zh) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113656418B (zh) * | 2021-07-27 | 2023-08-22 | 追觅创新科技(苏州)有限公司 | 语义地图的保存方法和装置、存储介质、电子装置 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10318907B1 (en) * | 2015-05-22 | 2019-06-11 | Walgreen Co. | Autonomous vehicle for mapping store layout |
| CN112632211A (zh) * | 2020-12-30 | 2021-04-09 | 上海思岚科技有限公司 | 用于移动机器人的语义信息处理方法与设备 |
| CN112784873A (zh) * | 2020-12-25 | 2021-05-11 | 华为技术有限公司 | 一种语义地图的构建方法及设备 |
| CN113656418A (zh) * | 2021-07-27 | 2021-11-16 | 追觅创新科技(苏州)有限公司 | 语义地图的保存方法和装置、存储介质、电子装置 |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106767812B (zh) * | 2016-11-25 | 2017-12-08 | 郭得科 | 一种基于语义信息提取的室内语义地图更新方法与系统 |
| KR102314539B1 (ko) * | 2017-06-09 | 2021-10-18 | 엘지전자 주식회사 | 인공지능 이동 로봇의 제어 방법 |
| CN109507995B (zh) * | 2017-09-14 | 2022-01-04 | 深圳乐动机器人有限公司 | 机器人地图的管理系统及机器人 |
| CN109974722B (zh) * | 2019-04-12 | 2020-09-15 | 珠海市一微半导体有限公司 | 一种视觉机器人的地图更新控制方法及地图更新控制系统 |
| CN111815687B (zh) * | 2020-06-19 | 2024-09-03 | 浙江大华技术股份有限公司 | 点云匹配方法、定位方法、设备及存储介质 |
| CN112734845B (zh) * | 2021-01-08 | 2022-07-08 | 浙江大学 | 一种融合场景语义的室外单目同步建图与定位方法 |
| CN113124902B (zh) * | 2021-04-19 | 2024-05-14 | 追创科技(苏州)有限公司 | 移动机器人的定位修正方法和装置、存储介质、电子装置 |
-
2021
- 2021-07-27 CN CN202110853400.7A patent/CN113656418B/zh active Active
-
2022
- 2022-05-24 WO PCT/CN2022/094640 patent/WO2023005379A1/zh not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10318907B1 (en) * | 2015-05-22 | 2019-06-11 | Walgreen Co. | Autonomous vehicle for mapping store layout |
| CN112784873A (zh) * | 2020-12-25 | 2021-05-11 | 华为技术有限公司 | 一种语义地图的构建方法及设备 |
| CN112632211A (zh) * | 2020-12-30 | 2021-04-09 | 上海思岚科技有限公司 | 用于移动机器人的语义信息处理方法与设备 |
| CN113656418A (zh) * | 2021-07-27 | 2021-11-16 | 追觅创新科技(苏州)有限公司 | 语义地图的保存方法和装置、存储介质、电子装置 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113656418B (zh) | 2023-08-22 |
| CN113656418A (zh) | 2021-11-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11896175B2 (en) | Method and apparatus for updating working map of mobile robot, and storage medium | |
| WO2022222345A1 (zh) | 移动机器人的定位修正方法和装置、存储介质、电子装置 | |
| WO2022121018A1 (zh) | 机器人及其建图方法和装置 | |
| WO2023045644A1 (zh) | 移动机器人的定位方法及装置、存储介质及电子装置 | |
| CN112286185B (zh) | 扫地机器人及其三维建图方法、系统及计算机可读存储介质 | |
| WO2023231545A1 (zh) | 栅格地图更新装置、方法、计算机设备及存储介质 | |
| CN111603100B (zh) | 扫地机清扫地图的存储和复用方法、及存储和复用装置 | |
| CN115562287B (zh) | 自移动设备的航向校正方法、装置和自移动设备 | |
| CN116442245A (zh) | 服务机器人的控制方法、装置、系统及存储介质 | |
| CN113359705A (zh) | 一种路径规划方法、编队协同作业方法及其设备 | |
| CN113656418B (zh) | 语义地图的保存方法和装置、存储介质、电子装置 | |
| WO2024007807A1 (zh) | 一种误差校正方法、装置及移动设备 | |
| WO2026032234A1 (zh) | 对象位置检测方法、装置、机器人、可读存储介质和程序产品 | |
| WO2025139321A1 (zh) | 基于多传感器的重定位方法、装置、设备和存储介质 | |
| CN114005034B (zh) | 作业机器人重定位方法、装置、电子设备和存储介质 | |
| CN113947716B (zh) | 闭环检测方法、装置、机器人及存储介质 | |
| CN115969266A (zh) | 一种扫地机器人的控制方法、装置、设备及存储介质 | |
| WO2024235157A1 (zh) | 机器人回充方法、系统、设备和存储介质 | |
| CN118882645A (zh) | 回环检测方法、自移动设备、存储介质和计算机设备 | |
| CN116222537B (zh) | 错误关键帧的过滤方法、装置、终端设备以及存储介质 | |
| WO2023103713A1 (zh) | 充电座的搜索方法、系统、自移动机器人和存储介质 | |
| CN108834076A (zh) | 目标设备寻找方法、装置及设备 | |
| CN111481114A (zh) | 扫地机工作环境的检测方法、装置及扫地机 | |
| WO2023078112A1 (zh) | 机器人状态的确定方法和装置、存储介质、电子装置 | |
| CN119260797B (zh) | 机器人的故障处理方法、装置和系统 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22847991 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 22847991 Country of ref document: EP Kind code of ref document: A1 |