Map data saving method, device, equipment and storage medium

By obtaining the map storage matrix of the space where the robot is located and detecting the target distance set, and determining the starting position of the map construction, the problem of unstable data storage of the robot map is solved, and stability and storage space are saved.

CN115114388BActive Publication Date: 2025-07-08SHENZHEN GEWAI DESIGN OPERATION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210538979.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-18
Publication Date
2025-07-08
Estimated Expiration
2042-05-18

AI Technical Summary

Technical Problem

In the prior art, after determining the map storage space, how to reasonably place the data obtained at every moment to avoid data loss caused by the map exceeding the storage area is a difficult problem.

Method used

By obtaining the map storage matrix of the space where the robot is located, detecting the target distance set from the edge of the space, determining the starting position of the map creation based on the target distance set and the map storage matrix, and completing the map data storage according to the starting position.

Benefits of technology

It effectively avoids the situation where map data exceeds the memory edge, ensures the stability of the map construction process, saves storage space, and reduces memory waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115114388B_ABST
    Figure CN115114388B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of data processing, and discloses a method, device, equipment and storage medium for saving map data. The method includes: obtaining a map storage matrix of the space where the robot is located; detecting a set of target distances of the robot from the edge of the space; determining a map building starting position according to the set of target distances and the map storage matrix; and completing the saving of map data according to the map building starting position. By the above method, the position of the current robot in the current space is determined, and further, according to the position of the current robot in the current space, the position in the map storage matrix in the memory where map building starts is selected, avoiding the situation that map data exceeds the memory edge during the map building process, thereby ensuring the stability of the map building process. Since the actual position is matched with the position in the map storage matrix, the actual map building size is made equivalent to the predetermined memory size, saving storage space and reducing the waste of memory space.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular, to a method, device, equipment and storage medium for saving map data. Background Art

[0002] During the storage process of map data, the robot needs to first determine the memory size required for the map, and then store it in the set memory space. After determining the appropriate memory size, for example, after a storage space of 600 * 800 = 480,000 bytes, the robot knows to put the map data obtained in real time into a 600 * 800 matrix. However, how to place the data obtained at each moment to ensure that the map data corresponding to the entire environment can be exactly saved in the 600 * 800 matrix is a major problem. Therefore, how to reasonably save the map in a certain size of space to avoid data loss caused by the map exceeding the storage area has become an urgent problem to be solved.

[0003] The above content is only used to assist in understanding the technical solution of the present invention, and does not represent an admission that the above content is prior art. Summary of the Invention

[0004] The main purpose of the present invention is to provide a method, device, equipment and storage medium for saving map data, aiming to solve the technical problem of how to reasonably save map data in the prior art.

[0005] To achieve the above purpose, the present invention provides a method for saving map data, the method includes the following steps:

[0006] Obtain a map storage matrix of the space where the robot is located;

[0007] Detect a set of target distances of the robot from the edge of the space;

[0008] Determine a map building starting position according to the set of target distances and the map storage matrix;

[0009] Complete the saving of map data according to the map building starting position.

[0010] Optionally, the determining the map building starting position according to the set of target distances and the map storage matrix includes:

[0011] Determine a first target distance according to the set of target distances;

[0012] Determine a second target distance according to the first target distance;

[0013] Determine the map building starting position according to the first target distance and the second target distance.

[0014] Optionally, determining the first target distance according to the set of target distances includes:

[0015] Filtering the set of target distances to obtain the maximum target distance in the set of target distances;

[0016] Determining the first target distance according to the maximum target distance in the set of target distances.

[0017] Optionally, determining the second target distance according to the first target distance includes:

[0018] Determining a first alternative distance and a second alternative distance according to the first target distance, wherein the line segment where the first alternative distance is located and the line segment where the second alternative distance is located are perpendicular to the line segment where the first target distance is located;

[0019] When the first alternative distance is greater than or equal to the second alternative distance, determining the first alternative distance as the second target distance;

[0020] When the first alternative distance is less than the second alternative distance, determining the second alternative distance as the second target distance.

[0021] Optionally, determining the starting position for map building according to the first target distance and the second target distance includes:

[0022] Obtaining the redundancy value corresponding to the map storage matrix;

[0023] Obtaining map accuracy information;

[0024] Determining the row information of the starting position for map building in the map storage matrix according to the first target distance, the map accuracy information, and the redundancy value;

[0025] Determining the column information of the starting position for map building in the map storage matrix according to the second target distance, the map accuracy information, and the redundancy value;

[0026] Determining the starting position for map building according to the row information and the column information.

[0027] Optionally, detecting the set of target distances of the robot from the edge of the space includes:

[0028] Determining N distance detection directions, where the angle between every two adjacent distance detection directions in the N distance detection directions is a preset angle, and N is an integer greater than 1;

[0029] Performing distance detection according to the N distance detection directions to obtain N target distances;

[0030] Determining the set of target distances according to the N target distances.

[0031] Optionally, obtaining the map storage matrix of the space where the robot is located includes:

[0032] Obtaining map contour information;

[0033] Determining map size information according to the map contour information;

[0034] Determining a redundancy value according to the map size information;

[0035] Generating a map storage matrix according to the map size information and the redundancy value.

[0036] In addition, to achieve the above object, the present invention also provides a map data storage device, which includes:

[0037] An obtaining module, configured to obtain the map storage matrix of the space where the robot is located;

[0038] A detection module, configured to detect a set of target distances of the robot from the edge of the space;

[0039] A processing module, configured to determine a map building start position according to the set of target distances and the map storage matrix;

[0040] The processing module is further configured to complete map data storage according to the map building start position.

[0041] In addition, to achieve the above object, the present invention also provides a map data storage device, which includes: a memory, a processor, and a map data storage program stored on the memory and executable on the processor, and the map data storage program is configured to implement the steps of the map data storage method as described above.

[0042] In addition, to achieve the above object, the present invention also provides a storage medium, on which a map data storage program is stored, and when the map data storage program is executed by a processor, it implements the steps of the map data storage method as described above.

[0043] The present invention obtains a map storage matrix of the space where the robot is located; detects a set of target distances of the robot from the edge of the space; determines a map building starting position according to the set of target distances and the map storage matrix; and completes the saving of map data according to the map building starting position. By the above method, the position of the current robot in the current space is determined. Further, according to the position of the current robot in the current space, the position in the map storage matrix in the memory where map building starts is selected, avoiding the situation that map data exceeds the memory edge during the map building process, thereby ensuring the stability of the map building process. Since the actual position is matched with the position in the map storage matrix, the actual map building size is made equivalent to the predetermined memory size, saving storage space and reducing the waste of memory space. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 is a schematic structural diagram of a map data saving device in the hardware operating environment related to the embodiment solution of the present invention;

[0045] Figure 2 is a schematic flowchart of the first embodiment of the map data saving method of the present invention;

[0046] Figure 3 is a map building schematic diagram of an embodiment of the map data saving method of the present invention;

[0047] Figure 4 is a schematic flowchart of the second embodiment of the map data saving method of the present invention;

[0048] Figure 5 is a schematic block diagram of the first embodiment of the map data saving device of the present invention.

[0049] The realization, functional features and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0050] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0051] Refer to Figure 1 , Figure 1 is a schematic structural diagram of a map data saving device in the hardware operating environment related to the embodiment solution of the present invention.

[0052] As Figure 1As shown in the figure, the map data storage device may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard. Optionally, the user interface 1003 may further include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be a high-speed Random Access Memory (RAM) or a stable Non-Volatile Memory (NVM), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0053] Those skilled in the art can understand that Figure 1 the structure shown in does not constitute a limitation on the map data storage device, and it may include more or fewer components than shown, or combine some components, or have different component arrangements.

[0054] As Figure 1 shown, the memory 1005, as a storage medium, may include an operating system, a network communication module, a user interface module, and a map data storage program.

[0055] In Figure 1 the map data storage device shown, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the map data storage device of the present invention may be provided in the map data storage device. The map data storage device calls the map data storage program stored in the memory 1005 through the processor 1001 and executes the map data storage method provided by the embodiments of the present invention.

[0056] The embodiments of the present invention provide a map data storage method. Referring to Figure 2 , Figure 2 is a schematic flowchart of the first embodiment of a map data storage method of the present invention.

[0057] In this embodiment, the map data storage method includes the following steps:

[0058] Step S10: Obtain a map storage matrix of the space where the robot is located.

[0059] It should be noted that the execution subject of this embodiment is a robot, and the robot can be a floor sweeping robot, an AGV cart, a cleaning robot, etc., or other devices with the same or similar functions as the cleaning robot. This embodiment does not limit this, and this embodiment only takes the cleaning robot as an example for illustration.

[0060] It should be explained that this embodiment is applied to the process of robot map building. After determining the appropriate memory size, the robot delimits a specific area to store the map in the form of a matrix. For example, after a storage space of 600 * 800 = 480,000 bytes, the robot knows that the map data obtained in real time should be placed in a 600 * 800 matrix. However, how to place the data obtained at each moment to ensure that the map data corresponding to the entire environment can just be stored in the 600 * 800 matrix is a relatively big problem. Sometimes, after obtaining the starting position of the robot at the first moment, the pixel value corresponding to the starting position is placed in the first row and first column of the matrix. If the robot can move to the right, the pixel value corresponding to the second position obtained at the second moment is placed in the first row and second column of the matrix. If the robot can move to the left, there is no storage position for the pixel value corresponding to the second position obtained at the second moment. Similarly, when moving upward, there is also no storage position, which will lead to abnormal map building. At the same time, since the map exceeds the storage range of the map storage matrix upward or to the left, a large amount of empty matrix space will appear in the lower right corner, resulting in a waste of storage resources. As Figure 3 shown, assuming that the starting point of map building is set in the first row and first column of the matrix, and the corresponding place in the map storage matrix is the upper left corner. At this time, if the robot moves to the left or upward and builds a map, the built image cannot find a corresponding position to store in the map storage matrix, and an error will occur during the map building process. Therefore, this embodiment proposes to place the pixel value corresponding to the starting position in the middle of the matrix to solve the above problems by determining the starting position.

[0061] It can be understood that the map storage matrix of the space where the robot is located is the space delimited in the memory according to the size of the current room or space area where the robot is located, and is stored in the form of a matrix. During the map building process, the information of each position on the map will be stored in the corresponding position of the map storage matrix, and finally the map data is stored in the form of each position on the map corresponding to each grid of the map storage matrix.

[0062] In this embodiment, map contour information is obtained; map size information is determined according to the map contour information; a redundancy value is determined according to the map size information; and a map storage matrix is generated according to the map size information and the redundancy value.

[0063] It should be noted that there is a process of determining the map outline before map construction to delimit the storage space in advance. For example, at the beginning of map construction, the sensors such as the camera or laser of the robot are controlled to rotate one week (or the robot can rotate), and information is collected to determine the map outline information of the current space environment. It is also possible to control the robot to drive around the edge of the space for one week to determine through the motion sensor. According to the size of the map outline information, the current map size, that is, the length and width of the map, is determined. It should be explained that the length and width do not mean that the map outline is rectangular, but because the map storage matrix must be a rectangle when mapped to the map. Therefore, the spans in the vertical and horizontal directions of the map outline can be determined as the length and width, and the number of rows and columns (matrix size) of the map storage matrix is determined based on the length and width of the map.

[0064] It should be noted that the redundancy value is some additional distances that need to be added based on the length and width of the map. This is to avoid errors in the map construction process. If the size of the matrix is just enough to completely store the map data, then as long as there is a little deviation in the map construction process, the map will exceed the storage range of the matrix and cause the map to be lost. Among them, the redundancy value can be a fixed value. Preferably, the redundancy value is determined according to the map size information, that is, the larger the map, the larger the corresponding redundancy value. This is because the probability and amplitude of errors are greater when the map is larger.

[0065] Specifically, according to N, M, and the preset s, the initial matrix size L = [(N / S) + error redundancy value] * [(M / S) + error redundancy value] is calculated, where N is the length of the map, M is the width of the map, and S is the map accuracy. For example, the size corresponding to each pixel point in the real world is 5cm x 5cm (map accuracy), the error redundancy value is 1000px, and one pixel corresponds to one element in the matrix. For an environment of 40m * 30m, a matrix of size [(40 / 0.05) + 100] * [(30 / 0.05) + 100] = 900 * 700 is required as the map storage matrix.

[0066] Step S20: Detect the set of target distances of the robot from the edge of the space.

[0067] It should be noted that in the process of detecting the set of target distances of the robot from the edge of the space, a lidar or other ranging device can be used to measure the horizontal straight-line distance of the robot from the edge of the space, such as a wall or an obstacle. According to the distance measurements at multiple different angles, the distances of the current robot from the edges of the space in different directions can be determined.

[0068] In this embodiment, N distance detection directions are determined, where the angle between every two adjacent distance detection directions among the N distance detection directions is a preset angle, and N is an integer greater than 1; distance detection is performed according to the N distance detection directions to obtain N target distances; a target distance set is determined according to the N target distances.

[0069] It should be noted that this embodiment proposes a preferred solution for establishing a target distance set. For example: As Figure 3 shown, it is determined that the due-up direction in the figure is 0°, and rotating 5° to the left based on 0° is 355°. Taking the example of collecting information every 5°, when determining h1, from 0 to 30° and 330° to 0, there are 12 corresponding distances. The maximum distance among the 12 is selected as h1; H2 can also use the above method. This preferred method avoids mistakenly taking the distance between an obstacle and the robot as the distance between the spatial edge obstacle and the robot. Of course, the target distance set can be the target distance set in any one or more of the up direction, down direction, left direction, and right direction. This embodiment takes the up direction as an example for illustration.

[0070] Among them, determining N distance detection directions means determining a certain direction as the up direction. For example Figure 3 the upward vertical direction in, and then setting N detection directions according to the up direction. In the example, it is to set 1 detection direction every 5° in the angle range of 0 to 30° and 330° to 0. At this time, N = 12.

[0071] Step S30: Determine the map building start position according to the target distance set and the map storage matrix.

[0072] It should be noted that after determining the target distance set, it is also necessary to select a suitable target distance from the target distance set. This step is to prevent obstacles from appearing in the detection direction. Among them, the maximum distance in the target distance set can be selected, and then the row or column for determining the map building start position is determined according to the maximum distance in the target distance set. For example: When setting 1 detection direction every 5° in the angle range of 0 to 30° and 330° to 0 in the due-up direction to obtain the target distance set, assuming that there are obstacles in the 1st to 11th directions, then the 12th direction must be the maximum distance in the target distance set. At this time, the row information of the map building start position is determined according to the distance corresponding to the 12th direction.

[0073] Step S40: Complete the saving of map data according to the map building start position.

[0074] It should be noted that after determining the starting position of map building, the robot stores the real-time scanned map data into the matrix starting from the starting position of map building, which is equivalent to synchronizing the starting position of the robot in the map to the corresponding position in the matrix, so as to ensure that no matter how the robot moves and builds the map in the map, the corresponding storage position can be found in the map storage matrix.

[0075] In this embodiment, a map storage matrix of the space where the robot is located is obtained; a set of target distances of the robot from the space edge is detected; a starting position of map building is determined according to the set of target distances and the map storage matrix; and map data is saved according to the starting position of map building. By the above method, the position of the current robot in the current space is determined, and further, according to the position of the current robot in the current space, the starting position of map building is selected from the map storage matrix in the memory, so as to avoid the situation that the map data exceeds the memory edge during the map building process, thereby ensuring the stability of the map building process. Since the actual position is matched with the position in the map storage matrix, the actual map building size is equivalent to the predetermined memory size, saving storage space and reducing the waste of memory space.

[0076] Reference Figure 4 , Figure 4 is a schematic flowchart of the second embodiment of a method for saving map data according to the present invention.

[0077] Based on the above first embodiment, in step S30 of the method for saving map data in this embodiment, it further includes:

[0078] Step S31: Determine a first target distance according to the set of target distances.

[0079] It should be noted that the first target distance is the distance of the robot in a certain direction. For example: Figure 3 in, the distance in the upward or downward direction. Just select the most reasonable distance from the set of target distances as the first target distance. This is because there may be large errors in the measurement process due to environmental factors or hardware defects. Therefore, after obtaining the set of target distances through multiple detections, screening to obtain the first target distance can avoid this situation.

[0080] In this embodiment, the set of target distances is screened to obtain the largest target distance in the set of target distances; the first target distance is determined according to the largest target distance in the set of target distances.

[0081] It should be noted that the step of screening the target distance set to obtain the maximum target distance in the target distance set can ensure the effectiveness of the first target distance. This is because during the detection process, an obstacle may block the detection process, resulting in an overly short target distance. Therefore, the farthest target distance in the target distance set can be selected as the first target distance to avoid the situation of obstacles in multiple detection directions.

[0082] Step S32: Determine a second target distance according to the first target distance.

[0083] It should be noted that according to the structure of the matrix, the position of each element in the matrix is mainly determined according to the row information and column information. For example, the map information of the initial position of the robot is stored in the 20th row and the 30th column. Therefore, mapping the row information and column information in the map is two mutually perpendicular directions. Therefore, it is necessary to determine the detection direction of the second target distance based on the first target distance, and then determine the second target distance according to this detection direction. Among them, the method for determining the first target distance can be applied according to the detection direction of the second target distance to determine the second target distance.

[0084] In this embodiment, a first alternative distance and a second alternative distance are determined according to the first target distance. The line segment where the first alternative distance is located and the line segment where the second alternative distance is located are perpendicular to the line segment where the first target distance is located. When the first alternative distance is greater than or equal to the second alternative distance, the first alternative distance is determined as the second target distance. When the first alternative distance is less than the second alternative distance, the second alternative distance is determined as the second target distance.

[0085] It can be understood that if the row information of the map starting position has been determined according to the first target distance, then to determine the column information, the direction perpendicular to the direction where the first target distance is located should be selected as the direction where the second alternative distance is located. For example, if the direction where the first target distance is located is 0°, then the direction where the second target distance is located should be 90° or 270°. Generally, 270°, that is, the due left direction of the robot, can be selected as the direction where the second target distance is located. However, if the distance in the due left direction is too short, it may be blocked by an obstacle. At this time, the due right direction can be selected as the second target distance. Among them, the determination process of the second target direction can also be determined in the same way as the first target distance. That is, after selecting 90° as the direction where the second target distance is located, based on 90°, a detection direction is set every 5° in the angle range of 60° to 120°, and the longest distance is selected from all detection directions as the second target direction.

[0086] Step S33: Determine the map starting position according to the first target distance and the second target distance.

[0087] It should be noted that according to the first target distance and the second target distance, it is possible to determine which row and column in the matrix the current position of the robot corresponds to, that is, to determine the starting position of the map construction.

[0088] In this embodiment, a redundancy value corresponding to the map storage matrix is obtained; map accuracy information is obtained; row information of the starting position of the map construction in the map storage matrix is determined according to the first target distance, the map accuracy information, and the redundancy value; column information of the starting position of the map construction in the map storage matrix is determined according to the second target distance, the map accuracy information, and the redundancy value; and the starting position of the map construction is determined according to the row information and the column information.

[0089] Specifically, as Figure 3 shown, the distances from the robot to the spatial edges above and to the left (for other directions, such as below and to the right, the following formulas change accordingly) are screened out from the above acquisition information as h1 and h2; in this embodiment, it is assumed that the distance in the upward direction of the robot is the first target distance and the distance in the leftward direction is the second target distance. Taking this setting as an example, the starting position point of the robot is placed in the (h1 / S + error redundancy value / 2)-th row and the (h2 / S + error redundancy value / 2)-th column of the above initial matrix, where h1 is the first target distance, h2 is the second target distance, S is the map accuracy, and the error redundancy value is the error redundancy value used when determining the size of the map storage matrix.

[0090] In this embodiment, the first target distance is determined according to the set of target distances; the second target distance is determined according to the first target distance; and the starting position of the map construction is determined according to the first target distance and the second target distance. Through the above method, the set of target distances is screened to obtain the most suitable target distances as the first target distance and the second target distance. By screening multiple target distances, the situation of errors when only measuring a single distance is avoided, and the fault tolerance rate of the process of determining the starting position of the map construction is improved.

[0091] Refer to Figure 5 , Figure 5 which is the structural block diagram of the first embodiment of the map data storage device of the present invention.

[0092] As Figure 5 shown, the map data storage device proposed in the embodiment of the present invention includes:

[0093] An acquisition module 10, configured to acquire a map storage matrix of the space where the robot is located.

[0094] A detection module 20, configured to detect a set of target distances of the robot from the spatial edges.

[0095] The processing module 30 is configured to determine a mapping starting position according to the target distance set and the map storage matrix.

[0096] The processing module 30 is further configured to complete the saving of map data according to the mapping starting position.

[0097] It should be understood that the above is only an example and does not constitute any limitation to the technical solution of the present invention. In specific applications, those skilled in the art can set according to needs, and the present invention does not make any restrictions in this regard.

[0098] In this embodiment, the acquisition module 10 acquires the map storage matrix of the space where the robot is located; the detection module 20 detects the target distance set of the robot from the edge of the space; the processing module 30 determines the mapping starting position according to the target distance set and the map storage matrix; the processing module 30 completes the saving of map data according to the mapping starting position. Through the above method, the position of the current robot in the current space is determined. Further, according to the position of the current robot in the current space, the position where the map storage matrix in the memory starts to map is selected, avoiding the situation that the map data exceeds the memory edge during the mapping process, thereby ensuring the stability of the mapping process. Since the actual position is matched with the position in the map storage matrix, the actual mapping size is made equivalent to the predetermined memory size, saving storage space and reducing the waste of memory space.

[0099] In one embodiment, the processing module 30 is further configured to determine a first target distance according to the target distance set;

[0100] Determine a second target distance according to the first target distance;

[0101] Determine the mapping starting position according to the first target distance and the second target distance.

[0102] In one embodiment, the processing module 30 is further configured to screen the target distance set to obtain the maximum target distance in the target distance set;

[0103] Determine the first target distance according to the maximum target distance in the target distance set.

[0104] In one embodiment, the processing module 30 is further configured to determine a first alternative distance and a second alternative distance according to the first target distance, and the line where the first alternative distance is located and the line where the second alternative distance is located are perpendicular to the line where the first target distance is located;

[0105] When the first alternative distance is greater than or equal to the second alternative distance, determine the first alternative distance as the second target distance;

[0106] When the first alternative distance is less than the second alternative distance, determine the second alternative distance as the second target distance.

[0107] In one embodiment, the processing module 30 is further configured to obtain a redundancy value corresponding to the map storage matrix;

[0108] Obtain map accuracy information;

[0109] Determine the row information of the mapping start position in the map storage matrix according to the first target distance, the map accuracy information, and the redundancy value;

[0110] Determine the column information of the mapping start position in the map storage matrix according to the second target distance, the map accuracy information, and the redundancy value;

[0111] Determine the mapping start position according to the row information and the column information.

[0112] In one embodiment, the detection module 20 is further configured to determine N distance detection directions, where the angle between every two adjacent distance detection directions among the N distance detection directions is a preset angle, and N is an integer greater than 1;

[0113] Perform distance detection according to the N distance detection directions to obtain N target distances;

[0114] Determine a target distance set according to the N target distances.

[0115] In one embodiment, the acquisition module 10 is further configured to obtain map contour information;

[0116] Determine map size information according to the map contour information;

[0117] Determine a redundancy value according to the map size information;

[0118] Generate a map storage matrix according to the map size information and the redundancy value.

[0119] In addition, to achieve the above object, the present invention also provides a map data storage device, which includes: a memory, a processor, and a map data storage program stored on the memory and executable on the processor, and the map data storage program is configured to implement the map data storage method as described above.

[0120] Since this map data storage device adopts all the technical solutions of the above all embodiments, it has at least all the beneficial effects brought by the technical solutions of the above embodiments, which will not be elaborated herein one by one.

[0121] In addition, an embodiment of the present invention further provides a storage medium, on which a map data saving program is stored. When the map data saving program is executed by a processor, the map data saving method described above is implemented.

[0122] Since this storage medium adopts all the technical solutions of the above-mentioned all embodiments, it has at least all the beneficial effects brought by the technical solutions of the above-mentioned embodiments, and will not be elaborated here one by one.

[0123] It should be noted that the workflow described above is only illustrative and does not limit the protection scope of the present invention. In actual applications, those skilled in the art can select some or all of them according to actual needs to achieve the purpose of the solution of this embodiment, and no limitation is made here.

[0124] In addition, for the technical details not described in detail in this embodiment, reference can be made to the map data saving method provided in any embodiment of the present invention, and no further elaboration will be made here.

[0125] In addition, it should be noted that in this article, the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or system. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of another identical element in the process, method, article or system including the element.

[0126] The serial numbers of the above-mentioned embodiments of the present invention are only for description and do not represent the superiority or inferiority of the embodiments.

[0127] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that makes a contribution to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as a read-only memory (ROM) / RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present invention.

[0128] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be similarly included in the patent protection scope of the present invention.

Claims

1. A method for saving map data, characterized in that, The method for saving map data includes: Obtain a map storage matrix of the space where the robot is located; Detect a set of target distances of the robot from the edge of the space; Determine a map building starting position according to the set of target distances and the map storage matrix; Complete the saving of map data according to the map building starting position; The determining of the map building starting position according to the set of target distances and the map storage matrix includes: Determine a first target distance according to the set of target distances; Determine a second target distance according to the first target distance; Determine the map building starting position according to the first target distance and the second target distance; The determining of the first target distance according to the set of target distances includes: Filter the set of target distances to obtain the maximum target distance in the set of target distances; Determine the first target distance according to the maximum target distance in the set of target distances; The determining of the second target distance according to the first target distance includes: Determine a first alternative distance and a second alternative distance according to the first target distance, where the line segment where the first alternative distance is located is perpendicular to the line segments where the second alternative distance and the first target distance are located respectively; When the first alternative distance is greater than or equal to the second alternative distance, determine the first alternative distance as the second target distance; When the first alternative distance is less than the second alternative distance, determine the second alternative distance as the second target distance.

2. The method according to claim 1, characterized in that The determining of the map building starting position according to the first target distance and the second target distance includes: Obtain the redundancy value corresponding to the map storage matrix; Obtain map accuracy information; Determine the row information of the map building starting position in the map storage matrix according to the first target distance, the map accuracy information and the redundancy value; Determine the column information of the map building starting position in the map storage matrix according to the second target distance, the map accuracy information and the redundancy value; Determine the map building starting position according to the row information and the column information.

3. The method according to claim 1, characterized in that, The detecting of the set of target distances of the robot from the edge of the space includes: Determine N distance detection directions, where the angle between every two adjacent distance detection directions among the N distance detection directions is a preset angle, and N is an integer greater than 1; Perform distance detection according to the N distance detection directions to obtain N target distances; Determine the set of target distances according to the N target distances.

4. The method according to any one of claims 1 to 3, characterized in that The obtaining of the map storage matrix of the space where the robot is located includes: Obtain map contour information; Determine map size information according to the map contour information; Determine the redundancy value according to the map size information; Generate a map storage matrix according to the map size information and the redundancy value.

5. A map data storage device, characterized in that, The map data saving device includes: An obtaining module, configured to obtain a map storage matrix of the space where the robot is located; A detecting module, configured to detect a set of target distances of the robot from the edge of the space; A processing module, configured to determine a map building starting position according to the set of target distances and the map storage matrix; The processing module is further configured to complete the saving of map data according to the map building starting position; The processing module is further configured to determine a first target distance according to the set of target distances; Determine a second target distance according to the first target distance; Determine a map building start position according to the first target distance and the second target distance; The processing module is further configured to screen the set of target distances to obtain the maximum target distance in the set of target distances; Determine a first target distance according to the maximum target distance in the set of target distances; The processing module is further configured to determine a first alternative distance and a second alternative distance according to the first target distance, and the line segment where the first alternative distance is located is perpendicular to the line segment where the second alternative distance is located and the line segment where the first target distance is located respectively; When the first alternative distance is greater than or equal to the second alternative distance, determine the first alternative distance as the second target distance; When the first alternative distance is less than the second alternative distance, determine the second alternative distance as the second target distance.

6. A map data storage device, characterized in that, The device includes: a memory, a processor, and a map data saving program stored on the memory and executable on the processor, and the map data saving program is configured to implement the steps of the map data saving method according to any one of claims 1 to 4.

7. A storage medium, characterized in that, A map data saving program is stored on the storage medium, and when the map data saving program is executed by a processor, the steps of the map data saving method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Method and device for constructing cost map based on pavement detection, medium and robot

    CN112489131A

  • Map data drawing method, module and equipment of sweeping robot and medium

    CN113749564A