Mobile robot map synchronization method, device and mobile robot
By adopting the method of comparing partial map differences and uploading map information under preset conditions in the mobile robot, the problems of slow map synchronization speed and high processor occupancy rate in the existing technology are solved, and efficient map synchronization in a weak network environment is achieved. .
Patent Information
- Application Number
- CN202110979310.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-25
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-08-25
AI Technical Summary
Existing mobile robot map synchronization methods have slow transmission speeds in weak network environments or multi-user situations, causing network congestion, occupying large processor resources, and reducing efficiency.
Using the partial map difference comparison method, map information is only obtained and uploaded within the preset range, and uploaded when the difference meets the preset conditions, saving processor resources and improving synchronization efficiency.
It can effectively prevent network congestion in weak network environments, increase map synchronization rate, reduce processor occupancy, and improve the efficiency of mobile robot map synchronization.
Smart Images

Figure CN113783945B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of mobile robots, and in particular, relates to a map synchronization method and device for a mobile robot, a mobile robot and a computer-readable storage medium. Background Art
[0002] With the development of science and technology, mobile robots are being used in more and more fields, such as sweeping robots, snow removal robots, lawn mowing robots, express delivery robots, etc., providing various conveniences for people's lives. In order to facilitate users to understand the real-time moving route of the mobile robot, or control the mobile robot to operate according to the established route, the map is generally stored in the mobile robot and then synchronized to the APP end.
[0003] In the prior art, mobile robots generally synchronize maps to APP terminals by means of scheduled full uploads. If this method is used to synchronize maps, on the one hand, in the case of a weak network (poor network signal) or when there are many uploading users, the map transmission speed will be reduced, the transmission time will be increased, and network congestion will result. The user terminal will not be able to obtain the real-time operation status of the mobile robot in a timely manner; on the other hand, the full upload method will occupy a large portion of the mobile robot's processor, causing the mobile robot to run slowly and reducing the efficiency of map synchronization. Summary of the invention
[0004] The map synchronization method for a mobile robot provided in an embodiment of the present invention is intended to solve the problem that the map synchronization method in the prior art, on the one hand, in the case of a weak network (poor network signal) or when there are many uploading users, the map transmission speed will be reduced, the transmission time will be increased, and then network problems will occur, and the user end will be unable to obtain the real-time operation status of the mobile robot in time; on the other hand, the prior art adopts a full upload method, which will occupy a large processor of the mobile robot, causing the mobile robot to run slowly and reduce the efficiency of map synchronization.
[0005] The embodiment of the present invention is implemented as follows: a map synchronization method for a mobile robot, the method comprising the following steps:
[0006] When the mobile robot starts synchronizing the map, obtaining map information within a current preset range of the mobile robot;
[0007] Determining whether the difference between the map information and the pre-stored map information meets the preset map information uploading condition;
[0008] When the judgment result is yes, the map information is uploaded.
[0009] An embodiment of the present invention further provides a map synchronization device for a mobile robot, the device comprising:
[0010] A map information acquisition unit, used to acquire map information within a current preset range of the mobile robot when the mobile robot starts to synchronize the map;
[0011] A difference determination unit, used to determine whether the difference between the map information and the pre-stored map information meets the preset map information uploading condition;
[0012] The map information uploading unit is used to upload the map information when the judgment result is yes.
[0013] An embodiment of the present invention further provides a mobile robot, the mobile robot comprising:
[0014] Mobile robot body;
[0015] An image acquisition device disposed on the mobile robot body, used for scanning map information within a current preset range of the mobile robot; and
[0016] A processor is arranged in the mobile robot body, and the processor includes the above-mentioned map synchronization device of the mobile robot.
[0017] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the map synchronization method of the mobile robot as described above is implemented.
[0018] The map synchronization method for a mobile robot provided in an embodiment of the present invention obtains map information within a preset range of the mobile robot when the mobile robot starts to synchronize the map; and uploads the map information when it is determined that the difference between the map information and the pre-stored map information meets the preset map information upload conditions. The map synchronization method for a mobile robot provided in an embodiment of the present invention can synchronize the mobile robot map only by comparing the differences of some maps, without comparing the differences of the full maps, thus saving the processor occupancy of the mobile robot and improving the efficiency of the mobile robot map synchronization; in addition, in the case of a weak network, the synchronization rate of the map can also be effectively guaranteed, effectively preventing the problem of network congestion when multiple users synchronize maps in the case of a weak network. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 is a flowchart of a method for synchronizing a map of a mobile robot provided in the first embodiment of the present invention;
[0020] Figure 2 It is a flowchart of a method for synchronizing a map of a mobile robot provided in Embodiment 2 and Embodiment 3 of the present invention;
[0021] Figure 3is a flowchart of a method for synchronizing a map of a mobile robot provided in a fourth embodiment of the present invention;
[0022] Figure 4 is a structural schematic diagram of a map synchronization device for a mobile robot provided in Embodiment 5 of the present invention;
[0023] Figure 5 It is a structural schematic diagram of a map synchronization device for a mobile robot provided in Embodiment 6 and Embodiment 7 of the present invention;
[0024] Figure 6 is a structural schematic diagram of a map synchronization device for a mobile robot provided in Embodiment 8 of the present invention;
[0025] Figure 7 It is a structural schematic diagram of a mobile robot provided in Embodiment 9 of the present invention. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0027] The map synchronization method for a mobile robot provided in an embodiment of the present invention, when the mobile robot starts to synchronize the map, obtains the map information within the current preset range of the mobile robot; and when it is determined that the difference between the map information and the pre-stored map information meets the preset map information upload conditions, the map information is uploaded. The map synchronization method for a mobile robot provided in an embodiment of the present invention does not need to compare the difference of the full map, but only compares the difference of part of the map (that is, compares the map information within the preset range); and when the difference meets the preset map information upload conditions, the map is uploaded to achieve the synchronization of the mobile robot map, which saves the occupancy rate of the mobile robot processor, improves the efficiency of the mobile robot map synchronization, and effectively prevents the problem of network congestion when multiple users synchronize maps under weak network conditions.
[0028] Embodiment 1
[0029] Figure 1 The flowchart of the implementation of a map synchronization method of a mobile robot provided in the first embodiment of the present invention is shown. The mobile robot is provided with an image acquisition device 20 (see the seventh embodiment for details). The method comprises the following steps:
[0030] In step S101, when the mobile robot starts to synchronize the map, the map information within the current preset range of the mobile robot is obtained.
[0031] In the embodiment of the present invention, the mobile robot includes but is not limited to a sweeping robot, a snow sweeping robot, a lawn mowing robot, a delivery robot, etc. For ease of description, the sweeping robot is used as an example in the following embodiments.
[0032] As an embodiment of the present invention, the image acquisition device 20 includes but is not limited to a camera, a video recorder, a scanner, and the like.
[0033] In one embodiment of the present invention, the mobile robot starts synchronizing the map when the mobile robot is turned on and when the terminal user opens the mobile robot APP (Application); in another embodiment of the present invention, the mobile robot starts synchronizing the map when the terminal user uses the mobile robot APP for a preset time (i.e., timed synchronization, such as synchronizing every 5 minutes or 10 minutes).
[0034] In the embodiment of the present invention, the current preset range can be a region pre-set by the user or the manufacturer, with the mobile robot as the center and the preset range as the diameter. Generally, its maximum value is consistent with the maximum visual distance of the image acquisition device 20. For example, if the maximum visual distance of the image acquisition device 20 is 50 meters, the current preset range can be 0 meters, 1 meter, 2 meters, 3 meters, 5 meters, 10 meters, 15 meters, etc., which is specifically selected according to user needs or manufacturer settings. By setting the map information within the preset range, compared with the comparison with the map within the entire range of the prior art, the efficiency of map synchronization is effectively improved, and the occupancy rate of the mobile robot processor is saved.
[0035] In the embodiment of the present invention, the map information includes the map size and the pixel values of the pixels on the map.
[0036] In step S102, it is determined whether the difference between the map information and the pre-stored map information meets the preset map information uploading condition; when the determination result is yes, step S103 is executed; when the determination result is no, step S101 is executed.
[0037] In the embodiment of the present invention, the preset map information includes a pre-stored map size and a pixel value of a pixel point on the pre-stored map.
[0038] In step S103, map information is uploaded.
[0039] In the embodiment of the present invention, the preset map information uploading conditions include differences in map size (see Embodiment 2 for details) and the number of pixels with differences in pixel intervals reaching a preset pixel number threshold (see Embodiment 3 for details).
[0040] The map synchronization method for a mobile robot provided in an embodiment of the present invention, when the mobile robot starts to synchronize the map, obtains the map information within the current preset range of the mobile robot; and uploads the map information when it is determined that the difference between the map information and the pre-stored map information meets the preset map information upload conditions. The map synchronization method for a mobile robot provided in an embodiment of the present invention does not need to compare the difference of the full map, but only compares the difference of part of the map (that is, compares the map information within the preset range); and uploads the map when the difference meets the preset map information upload conditions, that is, the synchronization of the mobile robot map can be achieved, the occupancy rate of the mobile robot processor is saved, the efficiency of the mobile robot map synchronization is improved, and the problem of network congestion when multiple users synchronize maps in weak network conditions is effectively prevented.
[0041] Embodiment 2
[0042] See also Figure 2 Based on the first embodiment, when the map information includes the map size, and the pre-stored map information includes the pre-stored map size, the above step S102 specifically includes:
[0043] In step S201, it is determined whether the map size is different from the pre-stored map size; when the determination result is yes, step S103 is executed; when the determination result is no, step S202 is executed.
[0044] In an embodiment of the present invention, the map size can be 1 meter * 1 meter, 1.5 meters * 1.5 meters, 2 meters * 2 meters, 4 meters * 4 meters, 8 meters * 8 meters, 10 meters * 10 meters, etc. It can be understood that under normal circumstances, as the number of synchronizations of the mobile robot increases, the corresponding map size will also increase. The specific increase in size is determined according to the actual update situation of the mobile robot.
[0045] In the embodiment of the present invention, in order to facilitate real-time map updating and reduce the time of map uploading, generally, if the size difference between two maps is 0.1 meter*0.1 meter, it is considered that there is a difference between the two maps.
[0046] As an embodiment of the present invention, the pre-stored map size is less than or equal to the map size.
[0047] As a practical application of the present invention, the sweeping robot obtained a map with a size of 6 meters * 6 meters after cleaning area A last time, that is, the map size pre-stored in the sweeping robot is 6 meters * 6 meters. This time, the robot is asked to clean area A + area B. Then, when the sweeping robot is turned on, area A is cleaned first (the real-time map size obtained during the cleaning of area A will not change compared with the pre-stored map size); and when the cleaning of area B begins, the camera thereon will scan the environment within 3 meters of it. At this time, due to the expansion of the cleaning range, the real-time map size is expanded to 6.1 meters * 6.1 meters. At this time, it can be judged that the scanned 6.1 meters * 6.1 meters map is 0.1 meters * 0.1 meters different from the pre-stored map, and the scanned map size of 6.1 meters * 6.1 meters is uploaded.
[0048] As another practical application of the present invention, the sweeping robot obtained a map with a size of 16 meters * 16 meters after cleaning area C last time, that is, the map size pre-stored in the sweeping robot is 16 meters * 16 meters. This time, the sweeping robot continues to clean area C. After the user opens the sweeping robot APP, the real-time map size obtained by the sweeping robot during the cleaning of area C will not change compared with the pre-stored map size. The final map size is still 16 meters * 16 meters. At this time, it can be judged that the scanned 16 meters * 16 meters map is no different from the pre-stored map, and step S202 is executed (see Example 3 for details).
[0049] The map synchronization method for a mobile robot provided in an embodiment of the present invention uploads map information to the cloud when there is a difference between the map size and the pre-stored map size. Compared with the traditional method of periodic full upload, it effectively prevents the problem of long map synchronization time caused by the accumulated map size being too large, and improves the efficiency of map synchronization.
[0050] Embodiment 3
[0051] See also Figure 2 Based on the above-mentioned second embodiment, the map information includes a first pixel value of a pixel point on the map, and the pre-stored map information includes a second pixel value of the pixel point on the pre-stored map, and after step S201, the following is further included:
[0052] In step S202, when the judgment result is no, the pixel interval where the first pixel value and the second pixel value of each pixel point are located is determined.
[0053] In the embodiment of the present invention, the value range of the first pixel value and the second pixel value are both -128 to 128.
[0054] As an embodiment of the present invention, the pixel intervals include three intervals of -128 to -60, -61 to 60, and 61 to 128, and the division of the pixel areas of the map is the same as that of the pre-stored map.
[0055] It can be understood that in the embodiment of the present invention, the coordinate position of each pixel point on the map and the pre-stored map is the same, but the pixel values may be different (ie, the first pixel value and the second pixel value of each pixel point may be different).
[0056] In step S203, determine whether the number of pixel points that are different between the first pixel interval where the first pixel value is located and the second pixel interval where the second pixel value is located is greater than a preset pixel point number threshold; when the judgment result is yes, execute step S103, when the judgment result is no, execute step S101.
[0057] In the embodiment of the present invention, the preset pixel point quantity threshold is 3%-10%, preferably 5%.
[0058] For example, the preset pixel threshold is 5%. When the map size of the sweeping robot is consistent with the pre-stored map size, the first pixel value of each pixel on the map is determined first, and then the second pixel value of each pixel (i.e., the same pixel coordinate point) on the pre-stored map is determined. Then, based on the three pre-divided pixel areas, it is determined whether the first pixel value and the second pixel value of each pixel are in the same pixel area, and the number of pixels in different pixel areas is counted. For example, if the total number of pixels is 20,000, when the number of pixels in different pixel areas exceeds 1,000, the map information (i.e., map) can be uploaded.
[0059] For example, the preset pixel threshold is 6%. When the map size of the sweeping robot is consistent with the pre-stored map size, the first pixel value of each pixel on the map is first determined, and then the second pixel value of each pixel (i.e., the same pixel coordinate point) on the pre-stored map is determined. Then, based on the three pre-divided pixel areas, it is determined whether the first pixel value and the second pixel value of each pixel are in the same pixel area, and the number of pixels in different pixel areas is counted. For example, if the total number of pixels is 100,000, when the number of pixels in different pixel areas exceeds 6,000, the map information (i.e., map) can be uploaded.
[0060] The map synchronization method for a mobile robot provided by an embodiment of the present invention, when the number of different pixel points between a first pixel interval where a first pixel value is located and a second pixel interval where a second pixel value is located is greater than a preset pixel point number threshold, map information is uploaded without comparing differences in the full map. Only when the number of different pixel points between pixel intervals is greater than a preset pixel point number threshold, synchronization of the mobile robot map can be achieved, thereby saving the processor occupancy of the mobile robot, improving the efficiency of map synchronization of the mobile robot, and effectively preventing the problem of network congestion when multiple users synchronize maps under weak network conditions.
[0061] Embodiment 4
[0062] See also Figure 3 Based on the first, second or third embodiment, before step S103, the method further includes:
[0063] In step S301, map information is compressed.
[0064] In the embodiment of the present invention, compressing map information refers to compressing pixels of the map, and the way of compressing the map information includes but is not limited to gz, lz4 compression and the like.
[0065] The map synchronization method for a mobile robot provided by an embodiment of the present invention reduces the size of the uploaded map and improves the map synchronization rate by compressing the map information before uploading the map information.
[0066] Embodiment 5
[0067] Figure 4 The structure diagram of a map synchronization device 400 for a mobile robot provided in Embodiment 5 of the present invention is shown. For the sake of convenience, only the parts related to the embodiment of the present invention are shown. The device 400 includes:
[0068] The map information acquisition unit 410 is used to acquire the map information within the current preset range of the mobile robot when the mobile robot starts to synchronize the map.
[0069] In the embodiment of the present invention, the mobile robot includes but is not limited to a sweeping robot, a snow sweeping robot, a lawn mowing robot, a delivery robot, etc. For ease of description, the sweeping robot is used as an example in the following embodiments.
[0070] As an embodiment of the present invention, the image acquisition device 20 includes but is not limited to a camera, a video recorder, a scanner, and the like.
[0071] In one embodiment of the present invention, the mobile robot starts synchronizing the map when the mobile robot is turned on and when the terminal user opens the mobile robot APP (Application); in another embodiment of the present invention, the mobile robot starts synchronizing the map when the terminal user uses the mobile robot APP for a preset time (i.e., timed synchronization, such as synchronizing every 5 minutes or 10 minutes).
[0072] In the embodiment of the present invention, the current preset range may be a region pre-set by the user or the manufacturer, with the mobile robot as the center and the preset range as the diameter, and generally its maximum value is consistent with the maximum visual distance of the image acquisition device 20. For example, if the maximum visual distance of the image acquisition device 20 is 50 meters, the current preset range may be 0 meters, 1 meter, 2 meters, 3 meters, 5 meters, 10 meters, 15 meters, etc., which is specifically selected according to user needs or manufacturer settings.
[0073] In the embodiment of the present invention, the map information includes the map size and the pixel values of the pixels on the map.
[0074] The difference determination unit 420 is used to determine whether the difference between the map information and the pre-stored map information meets the preset map information uploading condition.
[0075] In the embodiment of the present invention, the preset map information includes a pre-stored map size and a pixel value of a pixel point on the pre-stored map.
[0076] The map information uploading unit is used to upload the map information when the judgment result is yes.
[0077] In the embodiment of the present invention, the preset map information uploading conditions include differences in map size (see Embodiment 5 for details) and the number of pixels with differences in pixel intervals reaching a preset pixel number threshold (see Embodiment 6 for details).
[0078] The map synchronization device for a mobile robot provided in an embodiment of the present invention obtains the map information within the current preset range of the mobile robot when the mobile robot starts to synchronize the map; and uploads the map information when it is determined that the difference between the map information and the pre-stored map information meets the preset map information upload conditions. The map synchronization device for a mobile robot provided in an embodiment of the present invention does not need to compare the difference of the full map, but only compares the difference of part of the map (that is, compares the map information within the preset range); and uploads the map when the difference meets the preset map information upload conditions, so that the synchronization of the mobile robot map can be achieved, saving the occupancy rate of the mobile robot processor, improving the efficiency of the mobile robot map synchronization, and effectively preventing the problem of network congestion when multiple users synchronize maps under weak network conditions.
[0079] Implementation Six
[0080] See also Figure 5 Based on the fifth embodiment, the map information includes the map size, the pre-stored map information includes the pre-stored map size, and the difference determination unit 420 specifically includes:
[0081] The map size difference determination module 421 is used to determine whether the map size is different from the pre-stored map size.
[0082] In an embodiment of the present invention, the map size can be 1 meter * 1 meter, 1.5 meters * 1.5 meters, 2 meters * 2 meters, 4 meters * 4 meters, 8 meters * 8 meters, 10 meters * 10 meters, etc. It can be understood that under normal circumstances, as the number of synchronizations of the mobile robot increases, the corresponding map size will also increase. The specific increase in size is determined according to the actual update situation of the mobile robot.
[0083] In the embodiment of the present invention, in order to facilitate real-time map updating and reduce the time of map uploading, generally, if the size difference between two maps is 0.1 meter*0.1 meter, it is considered that there is a difference between the two maps.
[0084] As an embodiment of the present invention, the pre-stored map size is less than or equal to the map size.
[0085] As a practical application of the present invention, the sweeping robot obtained a map with a size of 6 meters * 6 meters after cleaning area A last time, that is, the map size pre-stored in the sweeping robot is 6 meters * 6 meters. This time, the robot is asked to clean area A + area B. Then, when the sweeping robot is turned on, area A is cleaned first (the real-time map size obtained during the cleaning of area A will not change compared with the pre-stored map size); and when the cleaning of area B begins, the camera thereon will scan the environment within 3 meters of it. At this time, due to the expansion of the cleaning range, the real-time map size is 6.1 meters * 6.1 meters. At this time, it can be judged that the scanned 6.1 meters * 6.1 meters map is 0.1 meters * 0.1 meters different from the pre-stored map, and the scanned map size of 6.1 meters * 6.1 meters is uploaded.
[0086] As another practical application of the present invention, the sweeping robot obtained a map with a size of 16 meters * 16 meters after cleaning area C last time, that is, the map size pre-stored in the sweeping robot is 16 meters * 16 meters. This time, the sweeping robot continues to clean area C. After the user opens the sweeping robot APP, the real-time map size obtained by the sweeping robot during the cleaning of area C will not change compared with the pre-stored map size. The final map size is still 16 meters * 16 meters. At this time, it can be determined that the scanned 16 meters * 16 meters map is no different from the pre-stored map, and the functions of the pixel interval determination unit 510 and the pixel point quantity determination unit 520 are executed (see Example 7 for details).
[0087] The map synchronization device for a mobile robot provided in an embodiment of the present invention uploads map information to the cloud when there is a difference between the map size and the pre-stored map size. Compared with the traditional method of periodic full upload, it effectively prevents the problem of long map synchronization time caused by the accumulated map size being too large, thereby improving the efficiency of map synchronization.
[0088] Embodiment 7
[0089] See also Figure 5 Based on the sixth embodiment, the map information includes a first pixel value of a pixel point on the map, and the pre-stored map information includes a second pixel value of the pixel point on the pre-stored map. The device 500 further includes:
[0090] The pixel interval determining unit 510 is used to determine the pixel interval where the first pixel value and the second pixel value of each pixel point are located when the judgment result is no.
[0091] In the embodiment of the present invention, the value range of the first pixel value and the second pixel value are both -128 to 128.
[0092] As an embodiment of the present invention, the pixel intervals include three intervals of -128 to -60, -61 to 60, and 61 to 128, and the division of the pixel areas of the map is the same as that of the pre-stored map.
[0093] It can be understood that in the embodiment of the present invention, the coordinate position of each pixel point on the map and the pre-stored map is the same, but the pixel values may be different (ie, the first pixel value and the second pixel value of each pixel point may be different).
[0094] The pixel number determination unit 520 is used to determine whether the number of pixels in a first pixel interval where the first pixel value is located and a second pixel interval where the second pixel value is located that are different is greater than a preset pixel number threshold.
[0095] In the embodiment of the present invention, the preset pixel point quantity threshold is 3%-10%, preferably 5%.
[0096] For example, the preset pixel threshold is 5%. When the map size of the sweeping robot is consistent with the pre-stored map size, the first pixel value of each pixel on the map is determined first, and then the second pixel value of each pixel (i.e., the same pixel coordinate point) on the pre-stored map is determined. Then, based on the three pre-divided pixel areas, it is determined whether the first pixel value and the second pixel value of each pixel are in the same pixel area, and the number of pixels in different pixel areas is counted. For example, if the total number of pixels is 20,000, when the number of pixels in different pixel areas exceeds 1,000, the map information (i.e., map) can be uploaded.
[0097] For example, the preset pixel threshold is 6%. When the map size of the sweeping robot is consistent with the pre-stored map size, the first pixel value of each pixel on the map is first determined, and then the second pixel value of each pixel (i.e., the same pixel coordinate point) on the pre-stored map is determined. Then, based on the three pre-divided pixel areas, it is determined whether the first pixel value and the second pixel value of each pixel are in the same pixel area, and the number of pixels in different pixel areas is counted. For example, if the total number of pixels is 100,000, when the number of pixels in different pixel areas exceeds 6,000, the map information (i.e., map) can be uploaded.
[0098] The map synchronization device for a mobile robot provided by an embodiment of the present invention uploads map information when the number of different pixel points between a first pixel interval where a first pixel value is located and a second pixel interval where a second pixel value is located is greater than a preset pixel number threshold. There is no need to compare the differences in the full map. The synchronization of the mobile robot map can be achieved only when the number of different pixel points between pixel intervals is greater than a preset pixel number threshold, thereby saving the processor occupancy of the mobile robot, improving the efficiency of the mobile robot map synchronization, and effectively preventing the problem of network congestion when multiple users synchronize maps under weak network conditions.
[0099] Embodiment 8
[0100] Attend at the same time Figure 6 Based on the fifth, sixth, or seventh embodiment above, the device 600 further includes:
[0101] The compression unit 610 is used to compress the map information.
[0102] In the embodiment of the present invention, compressing map information refers to compressing pixels of the map, and the way of compressing the map information includes but is not limited to gz, lz4 compression and the like.
[0103] The map synchronization device for a mobile robot provided in an embodiment of the present invention reduces the size of the uploaded map and improves the map synchronization rate by compressing the map information before uploading the map information.
[0104] Embodiment 9
[0105] Figure 7 The following is a schematic diagram of the structure of a mobile robot provided by Embodiment 9 of the present invention. For the sake of convenience, only the parts related to the embodiment of the present invention are shown. The mobile robot includes:
[0106] Mobile robot body 10;
[0107] The image acquisition device 20 disposed on the mobile robot body 10 is used to scan the map information within the current preset range of the mobile robot; and
[0108] A processor (not labeled) is disposed in the mobile robot body 10, and the processor includes the map synchronization device 400, 500 or 600 of the mobile robot as described above.
[0109] The mobile robot provided in the embodiment of the present invention further includes a memory. Exemplarily, the computer program may be divided into one or more modules, one or more modules are stored in the memory, and executed by the processor to complete the present invention. One or more modules may be a series of computer program instruction segments capable of completing a specific function, and the instruction segments are used to describe the execution process of the computer program in the mobile robot.
[0110] Those skilled in the art will understand that the above description of the mobile robot is merely an example and does not constitute a limitation on the mobile robot. The mobile robot may include more or fewer components than described above, or a combination of certain components, or different components, for example, input and output devices, network access devices, buses, etc.
[0111] The processor may be a central processing unit (CPU), or other general-purpose processors, microcontroller units (MCU), digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the mobile robot, and various interfaces and lines are used to connect the various parts of the entire mobile robot.
[0112] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the mobile robot by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0113] If the module / unit integrated in the above mobile robot is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the unit functions in the above embodiments, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, it can implement the functions of the above-mentioned various method embodiments. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0114] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A map synchronization method for a mobile robot, characterized in that: The mobile robot is provided with an image acquisition device, and the method comprises the following steps: When the mobile robot starts to synchronize the map, the map information within the current preset range of the mobile robot is obtained, wherein the map information includes the map size and the first pixel value of the pixel point on the map; Determining whether a difference between the map information and pre-stored map information meets a preset map information upload condition, the pre-stored map information including a pre-stored map size and a second pixel value of the pixel point on the pre-stored map; When the judgment result is yes, uploading the map information; Among them, the judging whether the difference between the map information and the pre-stored map information meets the preset map information uploading conditions includes: judging whether there is a difference between the map size and the pre-stored map size; when the judgment result is no, determining the pixel interval where the first pixel value and the second pixel value of each pixel point are located; judging whether the number of pixel points that are different from the first pixel interval where the first pixel value is located and the second pixel interval where the second pixel value is located is greater than a preset pixel point number threshold; when the judgment result is yes, compressing the map information, and uploading the map information.
2. A map synchronization device for a mobile robot, used for implementing the map synchronization method for a mobile robot as claimed in claim 1, characterized in that: The device comprises: A map information acquisition unit, configured to acquire map information within a current preset range of the mobile robot when the mobile robot starts to synchronize the map, wherein the map information includes a map size and a first pixel value of a pixel point on the map; a difference determination unit, used to determine whether the difference between the map information and the pre-stored map information meets the preset map information uploading condition, the pre-stored map information including the pre-stored map size and the second pixel value of the pixel point on the pre-stored map; A map information uploading unit, used for uploading the map information when the judgment result is yes; The difference judgment unit specifically includes: A map size difference determination module, used to determine whether the map size is different from the pre-stored map size; A pixel interval determination unit, used for determining the pixel interval where the first pixel value and the second pixel value of each pixel point are located when the judgment result is no; a pixel number determination unit, configured to determine whether the number of pixels in a first pixel interval where the first pixel value is located and a second pixel interval where the second pixel value is located that are different from each other is greater than a preset pixel number threshold; A compression unit is used to compress the map information.
3. A mobile robot, characterized in that: The mobile robot comprises: Mobile robot body; An image acquisition device disposed on the mobile robot body is used to scan the mobile robot Map information within the current preset range; and A processor is arranged in the mobile robot body, and the processor includes the map synchronization device of the mobile robot as described in claim 2.
4. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the map synchronization method for a mobile robot according to claim 1 is implemented.
