Method and device for marking obstacles in robot map
By acquiring and grouping probability maps and height maps in the robot working environment, obtaining the location and edge information of obstacles, and accurately marking them in the robot map, the problem of inaccurate display of obstacles in the prior art is solved, and higher display accuracy is achieved.
Patent Information
- Application Number
- CN202210287032.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-23
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2042-03-23
AI Technical Summary
Existing sweeping robots cannot accurately display the identified obstacles to the correct position of the robot map, resulting in inaccurate display of obstacles in the robot map.
By obtaining probability maps and height maps, data grouping is obtained, the location and edge information of obstacles are obtained, and the obstacles are accurately marked in the robot map based on this information.
It realizes accurate marking of obstacles in the robot map, improving the display accuracy of obstacles in the robot map.
Smart Images

Figure CN114777759B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent robots, and in particular to a method and device for marking obstacles in a robot map. Background Art
[0002] With the continuous development and progress of robot technology, autonomous mobile robots are gradually applied to various scenarios, such as mining robots, underwater robots, catering robots, sweeping robots, etc. The smooth movement of autonomous mobile robots is mainly based on the working environment map, which expresses information such as paths and obstacles in the working environment. Commonly used robot environment map construction methods include: using SLAM (simultaneous localization and mapping) algorithm, vSLAM (Visual simultaneous localization and mapping, based on visual simultaneous localization and mapping) algorithm and satellite map construction method.
[0003] However, although the existing sweeping robots have autonomous navigation and obstacle recognition capabilities, they cannot accurately display the recognized obstacles at the correct position on the robot map. Therefore, marking the correct position of the obstacles in the robot map so that the obstacles can be accurately displayed is an urgent problem to be solved. Summary of the invention
[0004] In view of this, the present invention provides a method and device for marking obstacles in a robot map, the main purpose of which is to solve the problem of low accuracy in displaying the positions of obstacles in existing robot maps.
[0005] According to one aspect of the present invention, a method for marking obstacles in a robot map is provided, comprising:
[0006] Obtain a probability map and a height map, wherein the probability map is used to identify the probability distribution of obstacles existing at various positions in the robot working environment, and the height map is used to identify the height distribution of obstacles corresponding to various positions in the robot working environment;
[0007] Performing data grouping according to the probability map and the height map to obtain a plurality of data sets, each of the data sets identifying obstacle information of an obstacle, and the obstacle information at least includes obstacle position information and obstacle edge information;
[0008] The obstacles are marked on the map according to the obstacle information.
[0009] Furthermore, before obtaining the probability map and the height map, the method further includes:
[0010] Obtain the initial obstacle probability map and initial height map;
[0011] Collecting data collected by the robot during the working process and analyzing the collected data to obtain obstacle data, wherein the collected data at least includes image data and height data;
[0012] The initial probability map and the initial height map are adjusted according to the obstacle data, and the adjusted initial probability map is determined as the probability map, and the adjusted initial height map is determined as the height map.
[0013] Furthermore, after obtaining the obstacle probability map and the height map, the method further includes:
[0014] Combining the probability map and the height map and extracting a plurality of candidate points according to a preset probability threshold;
[0015] The data is grouped according to the probability map and the height map to obtain multiple data sets, including:
[0016] The multiple candidate points are clustered to obtain multiple groups of cluster data, each group of cluster data identifies one of the data sets.
[0017] Furthermore, the method further comprises:
[0018] Acquire a SLAM map of the robot's operating environment, wherein the SLAM map includes unknown areas marked as prohibited for the robot to pass through;
[0019] Calculate the area of a first region and the area of a second region respectively according to the SLAM map and the data set, the area of the first region being the largest continuous unknown region in the SLAM map, and the area of the second region being the area occupied by obstacles identified by the data set;
[0020] A ground obstacle is identified according to the area of the first region and the area of the second region, where the ground obstacle is an obstacle that prohibits the robot from shuttling in and out of the obstacle.
[0021] Furthermore, the method further comprises:
[0022] Collecting areas where the second area is smaller than a preset area threshold and is adjacent to each other in the SLAM map;
[0023] A minimum circumscribed polygon corresponding to the collected area is generated, and the area identified by the minimum circumscribed polygon is determined as the ground obstacle.
[0024] Furthermore, the method further comprises:
[0025] Grouping the candidate points according to the positions of the candidate points in each group of the cluster data, and extracting a first candidate point group, wherein the first candidate point group contains the largest number of candidate points;
[0026] Calculating a minimum circumscribed rectangle corresponding to the candidate points in the first candidate point group;
[0027] Each group of the cluster data is updated according to the minimum circumscribed rectangle, so that the obstacle information identified by the cluster data is corrected.
[0028] Furthermore, the method further comprises:
[0029] Analyze the SLAM map to obtain the obstacle direction;
[0030] The step of marking the obstacle in the map according to the obstacle information comprises:
[0031] The obstacle is marked in the map according to the obstacle position, obstacle edge and obstacle direction.
[0032] Furthermore, the method further comprises:
[0033] When the second regions overlap, judging whether the obstacles corresponding to the overlapping second regions have an encirclement relationship according to the overlapping second regions;
[0034] If not, the obstacle data set corresponding to the overlapping second region area is optimized.
[0035] Further, marking the obstacle in the map according to the obstacle information includes:
[0036] If the obstacle corresponding to the overlapping second region area has an enclosing relationship, the obstacle is marked in the map according to the enclosing relationship and the obstacle information.
[0037] According to another aspect of the present invention, a device for marking obstacles in a robot map is provided, comprising:
[0038] A first acquisition module is used to acquire a probability map and a height map, wherein the probability map is used to identify the probability distribution of obstacles existing at various positions in the robot working environment, and the height map is used to identify the height distribution of obstacles corresponding to various positions in the robot working environment;
[0039] A first grouping module, configured to group data according to the probability map and the height map to obtain a plurality of data sets, each of which identifies obstacle information of an obstacle, and the obstacle information at least includes obstacle position information and obstacle edge information;
[0040] The marking module is used to mark the obstacle in the map according to the obstacle information.
[0041] Furthermore, the device also includes:
[0042] The second acquisition module is used to obtain an initial probability map and an initial height map of obstacles;
[0043] A collection module, used to collect data collected by the robot during its working process;
[0044] A first analysis module, used for analyzing the collected data collected by the collection module to obtain obstacle data, wherein the collected data at least includes image data and height data;
[0045] An adjustment module, configured to adjust the initial probability map and the initial height map according to the obstacle data;
[0046] The determination module is used to determine the adjusted initial probability map as the probability map, and determine the adjusted initial height map as the height map.
[0047] Furthermore, the device also includes:
[0048] An extraction module, used for combining the probability map and the height map and extracting a plurality of candidate points according to a preset probability threshold;
[0049] The clustering module is used to perform clustering processing on the multiple candidate points to obtain multiple groups of cluster data, each group of the cluster data identifies one of the data sets.
[0050] Furthermore, the device also includes:
[0051] A third acquisition module is used to acquire a SLAM map of the robot's operating environment, wherein the SLAM map contains unknown areas marked as prohibited for the robot to pass;
[0052] A first calculation module is used to calculate the area of a first region and the area of a second region respectively according to the SLAM map and the data set, the area of the first region is the largest continuous unknown area in the SLAM map, and the area of the second region is the area occupied by obstacles identified by the data set;
[0053] The identification module is used to identify a ground obstacle according to the area of the first region and the area of the second region, wherein the ground obstacle is an obstacle that prohibits the robot from shuttling inside and outside the obstacle.
[0054] Furthermore, the device also includes:
[0055] A collecting module, used for collecting areas whose area of the second area is smaller than a preset area threshold and which are adjacent to each other in the SLAM map;
[0056] A generating module is used to generate a minimum circumscribed polygon corresponding to the collected area, and determine the area marked by the minimum circumscribed polygon as the ground obstacle.
[0057] Furthermore, the device also includes:
[0058] A second grouping module, used for grouping the candidate points according to the positions of the candidate points in each group of the cluster data, and extracting a first candidate point group, wherein the first candidate point group contains the largest number of candidate points;
[0059] A second calculation module, used to calculate the minimum circumscribed rectangle corresponding to the candidate points in the first candidate point group;
[0060] An updating module is used to update each group of the cluster data according to the minimum circumscribed rectangle so as to correct the obstacle information identified by the cluster data.
[0061] Furthermore, the device further comprises: a second parsing module,
[0062] The second parsing module is used to parse the SLAM map to obtain the obstacle direction;
[0063] The marking module is specifically used to mark the obstacle in the map according to the obstacle position, obstacle edge and obstacle direction.
[0064] Furthermore, the device also includes:
[0065] A judgment module, configured to judge whether the obstacles corresponding to the overlapping second area areas have an encirclement relationship according to the overlapping second area areas when the second area areas overlap;
[0066] The optimization module is used to optimize the obstacle data set corresponding to the overlapping second area if the obstacles corresponding to the overlapping second area do not have an encirclement relationship.
[0067] Further,
[0068] The marking module is specifically used to display the obstacle in the map according to the enclosing relationship and the obstacle information if the obstacle corresponding to the overlapping second region area has an enclosing relationship.
[0069] According to another aspect of the present invention, a storage medium is provided, wherein at least one executable instruction is stored in the storage medium, and the executable instruction enables a processor to perform operations corresponding to the above-mentioned method for marking obstacles in a robot map.
[0070] According to another aspect of the present invention, there is provided a terminal, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;
[0071] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the method for marking obstacles in the robot map.
[0072] By means of the above technical solution, the technical solution provided by the embodiment of the present invention has at least the following advantages:
[0073] The present invention provides a method and device for marking obstacles in a robot map. Compared with the prior art, the embodiment of the present invention obtains a probability map and a height map, wherein the probability map is used to identify the probability distribution of obstacles at various positions in the robot working environment, and the height map is used to identify the obstacle height distribution corresponding to various positions in the robot working environment; data is grouped according to the probability map and the height map to obtain multiple data sets, each of which identifies obstacle information of an obstacle, and the obstacle information at least includes obstacle position information and obstacle edge information; the obstacle is marked in the map according to the obstacle information, thereby realizing the identification of the position information and edge information of the obstacle in the working environment according to the probability distribution and height distribution data of the obstacle in the robot working environment, and marking the obstacle in the robot map according to the position information and edge information of the obstacle. Since the obstacle edge can identify whether the obstacle is a ground obstacle or a non-ground obstacle, accurate marking of the obstacle in the robot map is realized.
[0074] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0076] Figure 1 A flow chart of a method for marking obstacles in a robot map provided by an embodiment of the present invention is shown;
[0077] Figure 2 A flow chart of another method for marking obstacles in a robot map provided by an embodiment of the present invention is shown;
[0078] Figure 3 A block diagram of a device for marking obstacles in a robot map provided by an embodiment of the present invention is shown;
[0079] Figure 4 A block diagram showing another device for marking obstacles in a robot map provided by an embodiment of the present invention is shown;
[0080] Figure 5 A schematic diagram of the structure of a terminal provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0081] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0082] Although existing sweeping robots have autonomous navigation and obstacle recognition capabilities, it is an urgent problem to mark the correct position of obstacles in the robot map so that the obstacles can be accurately displayed. The embodiment of the present invention provides a method for marking obstacles in a robot map, such as Figure 1 As shown, the method includes:
[0083] 101. Obtain probability map and height map.
[0084] The probability map is used to identify the probability distribution of obstacles at each position in the grid map of the robot's working environment, and the height map is used to identify the height distribution of each position in the grid map of the robot's working environment. The obstacle can be a ground obstacle, that is, an obstacle that the robot cannot shuttle under the bottom of the obstacle, such as a wardrobe, a washing machine, etc., or a non-ground obstacle, that is, at least a part of the obstacle body is suspended, and the robot can normally operate on the suspended part of the obstacle and shuttle inside and outside it. In the embodiment of the present application, for two types of obstacles, ground obstacles and non-ground obstacles, the probability map and height map obtained can also be two types.
[0085] Furthermore, the probability map reflects the probability of the existence of an obstacle at each position in the grid map within the robot's operating environment. On the probability map, the area with a larger probability value indicates that the probability of an obstacle being placed at that position is greater. On the contrary, the area with a smaller probability value indicates that the probability of an obstacle being placed at that position is smaller. Similarly, the height map reflects the distribution of heights corresponding to each position in the grid map within the robot's operating environment. However, it should be noted that the obstacle probability map and the height distribution map can only identify the approximate distribution of the position and height of obstacles in the operating environment. If obstacles are to be displayed in the robot map, it is necessary to know the specific position of the obstacle, the position of the edge of the obstacle and other data. Therefore, in the embodiment of the present application, the probability map and the height map are first obtained so that the map can be further processed to obtain data for displaying obstacles in the map.
[0086] 102. Group obstacle data according to the probability map and the height map to obtain multiple data sets.
[0087] Each data set identifies obstacle information of an obstacle, and the obstacle information at least includes obstacle position information and obstacle edge information.
[0088] Specifically, this step can be to extract location points that can identify obstacles based on the probability map and the height map, and then determine the obstacles in the current working environment based on the area range corresponding to the extracted location points, but it is not limited to this. Similarly, the data set in this step can also be divided into a data set that identifies ground obstacles and a data set that identifies non-ground obstacles, and each data set can also be configured with identification information for identifying obstacles, such as obstacle name, obstacle number, etc., identification information of the room where the obstacle is located, obstacle type information, etc., so as to accurately mark the obstacles identified by each group of data sets.
[0089] 103. Mark the obstacle on the map according to the obstacle information.
[0090] By grouping data according to the probability map and the height map, a data set that can identify the location and edge of each obstacle is obtained. Then, each obstacle can be drawn according to each set of data and marked on the map for subsequent display. Specifically, the map display method can be a map display method in the prior art, and the embodiments of the present application do not specifically limit this.
[0091] The present invention provides a method and device for marking obstacles in a robot map. Compared with the prior art, the embodiment of the present invention obtains a probability map and a height map, wherein the probability map is used to identify the probability distribution of obstacles at various positions in the robot working environment, and the height map is used to identify the obstacle height distribution corresponding to various positions in the robot working environment; data is grouped according to the probability map and the height map to obtain multiple data sets, each of which identifies obstacle information of an obstacle, and the obstacle information at least includes obstacle position information and obstacle edge information; the obstacle is marked in the map according to the obstacle information, thereby realizing the identification of the position information and edge information of the obstacle in the working environment according to the probability distribution and height distribution data of the obstacle in the robot working environment, and marking the obstacle in the robot map according to the position information and edge information of the obstacle. Since the obstacle edge can identify whether the obstacle is a ground obstacle or a non-ground obstacle, accurate marking of the obstacle in the robot map is realized.
[0092] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another method for marking obstacles in a robot map is provided, such as Figure 2 As shown, the method includes:
[0093] 201. Obtain obstacle probability map and height map.
[0094] The probability map is used to identify the probability distribution of obstacles at various positions in the robot working environment, and the height map is used to identify the obstacle height distribution corresponding to each position in the robot working environment. The conceptual explanation and specific implementation of this step can refer to the corresponding description in the above step 101, and the embodiments of this application will not be repeated here.
[0095] It should be noted that the robot in the embodiment of the present application is a robot with a camera function and a distance measurement function, and the robot's distance measurement can be achieved by any one of a binocular camera, structured light, TOF (Time of flight), LDS (Laser Direct Structuring), etc., and the embodiment of the present application does not limit this. The robot can identify the type of obstacles encountered during walking by taking pictures, and can draw conclusions about the presence / absence of objects at a certain position on the ground plane and at a certain height from its current position by distance measurement.
[0096] In an embodiment of the present application, before step 201, it may also include: obtaining an initial probability map and an initial height map of obstacles; collecting data collected by the robot during the working process and parsing the collected data to obtain obstacle data; adjusting the initial probability map and the initial height map according to the obstacle data, and determining the adjusted initial probability map as the probability map, and determining the adjusted initial height map as the height map.
[0097] The collected data at least includes image data and height data, and the initial obstacle probability map and the initial height map can be generated for two types of obstacles, namely, ground obstacles and non-ground obstacles, according to prior probability and height, respectively.
[0098] Furthermore, when the robot is running in the working environment, it continuously takes pictures and identifies obstacles contained in the pictures based on the picture data. For the picture data of each frame of the picture and for the two types of obstacles, the obstacle data obtained by analysis only identifies two situations, namely, it does not contain any obstacle, or it contains one or two obstacles. When it does not contain any obstacle, the probability value of the field of view range and depth of field range identified by the frame image at the corresponding position in the probability map is reduced, and when it contains one or two obstacles, the probability value of the range identified by the frame image at the corresponding position on the probability map is increased, and according to the prior conditions of different types of obstacles, the probability value in the appropriate area on the probability map away from the robot direction can be increased, so as to obtain an accurate obstacle probability map.
[0099] As for the height map, the robot can continuously collect the height data of obstacles while running in the working environment, and project the height data onto the height map. Multiple height intervals can be set a priori in the initial height map. When the robot collects the height data of the obstacle, it is mapped to the initial height map according to the obstacle position and height data. If it is within the preset height interval, the height distribution probability at the current position and the current height is increased, otherwise it is reduced to obtain an accurate obstacle height map. The embodiment of the present application does not limit the method of obtaining the obstacle height data and the method of mapping the obtained height data to the height map.
[0100] In an embodiment of the present application, an initial probability map and an initial height map of obstacles are first created, and a data set for identifying obstacle information is optimized based on images and height data collected by the robot, and a data set is obtained that can identify the probability of the existence of various types of obstacles at a specified location, and whether there are obstacles at a specified location and a specified height range, and a probability map and a height map are generated based on the data set, thereby ensuring the accuracy of the map data and thereby improving the accuracy of obstacle marking in the robot map.
[0101] 202. Combine the probability map and the height map and extract multiple candidate points according to a preset probability threshold.
[0102] Among them, the preset probability threshold can be set according to the obstacle type and different application scenarios. For each obstacle, all points that satisfy the probability value of the point on the probability map exceeds the preset threshold and the probability of the point on the height map exceeds the preset threshold are collected as candidate points. The preset threshold in the probability map and the preset threshold in the height map can be the same or different, and the preset threshold can take different values according to different obstacle types, which is not specifically limited in the embodiments of the present application.
[0103] It should be noted that when extracting candidate points through probability maps alone or height maps alone, there is a possibility that the candidate points are inaccurate. However, by combining probability maps and height maps, candidate points can be extracted based on multi-dimensional data, ensuring the accuracy of data processing.
[0104] 203. Cluster the multiple candidate points to obtain multiple groups of cluster data.
[0105] Each group of clustered data identifies a data set, that is, identifies obstacle information of an obstacle, and the obstacle information at least includes an obstacle position and an obstacle edge.
[0106] In an embodiment of the present application, for any two candidate points, if the straight-line distance between them is less than a certain threshold, the two candidate points are considered to belong to the same class; for any two candidate points, if there is an obstacle-free or other blocking path between the two candidate points on the SLAM (simultaneous localization and mapping) map, and the shortest distance among all paths is less than a certain threshold, the two candidate points are considered to belong to the same class; for any two candidate points, when there is an obstacle (such as a wall) between the two candidate points, the two candidate points are considered not to belong to the same class.
[0107] In addition, after clustering to obtain multiple cluster data, the range of each cluster data identifier can be pre-judged first. When the range exceeds the reasonable obstacle range, the cluster data can be determined as abnormal data and deleted to ensure the accuracy of the obstacle data.
[0108] Further, to display the obstacles in the robot map, the embodiment of the present application further includes: obtaining the SLAM map of the robot working environment; calculating the first area and the second area according to the SLAM map and the data set respectively; identifying the floor obstacles according to the first area and the second area. Wherein, the SLAM map contains an unknown area marked as prohibiting the robot from passing through, the first area is the largest continuous unknown area in the SLAM map, and the second area is the floor area of the obstacles marked by the data set, and the floor obstacles are obstacles that prohibit the robot from shuttling inside and outside the obstacles.
[0109] Specifically, the method for judging whether an obstacle is floor data according to the data set obtained by clustering can be:
[0110] 1) Judge whether the ratio between the area of the first area and the area of the second area is greater than threshold A
[0111] 2) Judge whether the ratio between the area of the first area and the area of the second area is greater than threshold B (B < A), and for the polygon corresponding to the above-mentioned largest continuous unknown area, the ratio of the intercept segment of one or more sides of it to the straight line where the side of the clustering data identification range is located is greater than a certain threshold;
[0112] 3) Judge whether the ratio between the area of the first area and the area of the second area is greater than threshold C (C < A), and the ratio of the number of candidate points included in the above-mentioned largest continuous unknown area to the number of candidate points included in the clustering data identification range is greater than a certain threshold.
[0113] When judging according to a certain data set and meeting the above conditions, it is considered that the obstacle marked by the group of data sets is a floor obstacle. The thresholds in each judgment step can be determined according to prior data, and the embodiment of the present application does not make specific limitations on this. It should be noted that the floor obstacles are obstacles for the cleaning robot, that is, the robot needs to avoid the floor obstacles during the traveling process to successfully execute the cleaning task. Therefore, in the embodiment of the present application, candidate points are extracted through the obstacle probability map and the height map of the working environment and clustered, etc., to further determine the floor-type obstacles, so as to mark and display these obstacles in the form of floor-type obstacles, ensuring the correctness of the obstacle type marking and display, and providing reliable map data for the robot to travel in the working environment.
[0114] Further, the embodiment of the present application further includes: collecting areas in the SLAM map that are adjacent and have a second area smaller than a preset area threshold; generating a minimum circumscribed polygon corresponding to the collected areas, and determining the area marked by the minimum circumscribed polygon as the floor obstacle.
[0115] It should be noted that for obstacles with multiple obstacle legs, such as tables and chairs, the position of the obstacle support legs of such obstacles is displayed as an obstacle on the SLAM map, but the obstacle body other than the support leg obstacle is suspended in the air, which is a non-ground obstacle. Considering that the cross-sectional area of such support legs is relatively small, a data set identifying the obstacle support legs can be generated based on all directly adjacent data points within the clustering range on the SLAM map. Each obstacle support leg data set identifies a support leg with a certain cross-sectional area. The data set is screened according to the area threshold set a priori, that is, the support leg data set that is less than the preset area threshold is extracted. The position and footprint of multiple support legs of the obstacle can be obtained according to the support leg data set obtained by screening. Furthermore, the minimum circumscribed polygon box corresponding to the multiple support legs is calculated, and the polygon is checked. If it is within the preset range, the minimum circumscribed polygon can be determined as the footprint of the obstacle, so as to achieve accurate marking and display of the footprint of the non-ground obstacle and the obstacle support part. The height of the supporting legs and the height of the suspended body of such non-ground obstacles can be determined through the height data collected by the robot, and the embodiments of the present application do not make specific limitations on this.
[0116] Furthermore, in order to accurately identify the position of obstacles against the wall, an embodiment of the present application also includes: grouping according to the positions of candidate points in each group of the clustering data, and extracting a first candidate point group, which contains the largest number of candidate points; calculating the minimum enclosing rectangle corresponding to the candidate points in the first candidate point group; updating each group of the clustering data according to the minimum enclosing rectangle, so as to correct the obstacle information identified by the clustering data.
[0117] For non-wall obstacles, there are at least two faces that can be perceived by the robot. In actual obstacle scenes, for some ground obstacles, at least two faces are placed against the wall or blocked by other obstacles. The robot can only perceive one face of such obstacles during movement. Therefore, for such obstacles, the candidate points in the obstacle data set of the obstacle are grouped, and the candidate points that are directly adjacent or close to each other are summarized into a group. For the group containing the largest number of candidate points, the minimum bounding rectangle corresponding to the group is calculated, and the data in the obstacle data set is updated according to the bounding rectangle. Specifically, if the short side of the rectangle is less than a certain threshold and the long side is greater than a certain threshold, or the ratio between the short side and the long side of the rectangle meets a certain threshold, then it is determined that the obstacle is an obstacle that the robot can only perceive on one side, that is, the obstacle is a wall obstacle. At this time, the obstacle range is the long side of the rectangle as one side, and the other side takes a priori length according to the actual obstacle situation, or takes a certain proportion of the length of the known long side according to the actual obstacle situation. Then, in combination with the SLAM map or the height map, it is determined whether there is a support point within the obstacle range. If not, the obstacle range is appropriately shrunk so that the shrunk obstacle range conforms to the conventional obstacle range and has a support point.
[0118] Furthermore, the obstacle range can be adjusted to scale based on market research data, life experience, and preset a priori values of various types of obstacle ranges. When shrinking, for obstacles against the wall, it can be shrunk in a reasonable direction in combination with the wall information. For obstacles that cannot be determined or are not against the wall, it can be shrunk in the opposite direction toward the center of the obstacle range; when expanding, it can be expanded outward from the center of the obstacle range, and combined with SLAM map information to limit the conflict between the expanded obstacle range and obstacles such as walls. If the obtained obstacle range is much larger or much smaller than the reasonable obstacle range, then it can be determined that the obstacle data is abnormal and can be deleted; if the obtained obstacle range is slightly smaller or slightly larger than the reasonable obstacle range, its size can be adjusted to the reasonable obstacle range.
[0119] 204. Analyze the SLAM map to obtain the obstacle direction.
[0120] Specifically, this step can determine the direction of the obstacle based on the analysis results and in combination with various scenarios in actual applications. For obstacles whose use surfaces can be observed from the robot's perspective, such as wardrobes, the direction of such obstacles can be determined based on the image data uploaded by the robot. For obstacles against the wall, the SLAM map status can be combined to determine the direction of the obstacle based on the obstacle's proximity to the wall in the SLAM map, the obstacle's size, etc. In addition, for some obstacles, there is no obstacle direction, such as a dining table, so the direction of such obstacles can be ignored.
[0121] In the embodiment of the present application, there is no order relationship between parsing and obtaining the obstacle direction and optimizing the obstacle information, i.e., adjusting the obstacle range. That is, according to different application scenarios, the obstacle direction can be determined first and then the obstacle range can be adjusted, or the obstacle range can be adjusted first and then the obstacle direction can be determined. During the calculation process, the obstacle data of two dimensions can also be dynamically adjusted to obtain a plurality of adapted data sets for identifying obstacles.
[0122] 205. Mark the obstacle in the map according to the obstacle position, obstacle edge, and obstacle orientation.
[0123] Furthermore, the embodiment of the present application may also include: when there is overlap in the area of the second region, judging whether the obstacle corresponding to the overlapping second region has an encirclement relationship based on the overlapping second region; if not, optimizing the obstacle data set corresponding to the overlapping second region; if the obstacle corresponding to the overlapping second region has an encirclement relationship, marking the obstacle in the map according to the encirclement relationship and the obstacle information.
[0124] It should be noted that when the obstacles identified by the two obstacle data sets overlap in a large area, it may be that there is an error in the position of one or both of the two obstacles or there is an encirclement relationship between the two obstacles, such as a sofa and a coffee table. Therefore, in this step, it is first judged whether there is an encirclement relationship between the two obstacles, and when there is an encirclement relationship, they are appropriately adjusted according to their corresponding encirclement positions for display. When there is no encirclement relationship between the two obstacles, the two sets of obstacle data can be optimized according to the overlap direction of the two obstacles, such as shrinking the boundaries of the two obstacles to the opposite direction of the overlap to the appropriate position, so that the obstacles can be displayed according to the optimized obstacle information.
[0125] The present invention provides a method and device for marking obstacles in a robot map. Compared with the prior art, the embodiment of the present invention obtains a probability map and a height map, wherein the probability map is used to identify the probability distribution of obstacles at various positions in the robot working environment, and the height map is used to identify the obstacle height distribution corresponding to various positions in the robot working environment; data is grouped according to the probability map and the height map to obtain multiple data sets, each of which identifies obstacle information of an obstacle, and the obstacle information at least includes obstacle position information and obstacle edge information; the obstacle is marked in the map according to the obstacle information, thereby realizing the identification of the position information and edge information of the obstacle in the working environment according to the probability distribution and height distribution data of the obstacle in the robot working environment, and marking the obstacle in the robot map according to the position information and edge information of the obstacle. Since the obstacle edge can identify whether the obstacle is a ground obstacle or a non-ground obstacle, accurate marking of the obstacle in the robot map is realized.
[0126] Furthermore, as a response to the above Figure 1 The implementation of the method shown in the figure, the embodiment of the present application provides a device for marking obstacles in a robot map, such as Figure 3 As shown, the device includes: a first acquisition module 31, a first grouping module 32, and a marking module 33.
[0127] A first acquisition module 31 is used to acquire a probability map and a height map, wherein the probability map is used to identify the probability distribution of obstacles existing at various positions in the robot working environment, and the height map is used to identify the height distribution of obstacles corresponding to various positions in the robot working environment;
[0128] A first grouping module 32, configured to group data according to the probability map and the height map to obtain a plurality of data sets, each of which identifies obstacle information of an obstacle, and the obstacle information at least includes obstacle position information and obstacle edge information;
[0129] The marking module 33 is used to mark the obstacle in the map according to the obstacle information.
[0130] Furthermore, if Figure 4 As shown, the device also includes:
[0131] The second acquisition module 34 is used to acquire an initial probability map and an initial height map of obstacles;
[0132] A collection module 35, used to collect data collected by the robot during its working process;
[0133] A first analysis module 36, used to analyze the collected data collected by the collection module to obtain obstacle data, wherein the collected data at least includes image data and height data;
[0134] An adjustment module 37, configured to adjust the initial probability map and the initial height map according to the obstacle data;
[0135] The determination module 38 is configured to determine the adjusted initial probability map as the probability map, and determine the adjusted initial height map as the height map.
[0136] Furthermore, if Figure 4 As shown, the device also includes:
[0137] An extraction module 39, configured to combine the probability map and the height map and extract a plurality of candidate points according to a preset probability threshold;
[0138] The clustering module 310 is used to perform clustering processing on the multiple candidate points to obtain multiple groups of cluster data, each group of the cluster data identifies one of the data sets.
[0139] Furthermore, if Figure 4 As shown, the device also includes:
[0140] A third acquisition module 311 is used to acquire a SLAM map of the robot's operating environment, wherein the SLAM map contains unknown areas marked as prohibited for the robot to pass;
[0141] A first calculation module 312 is used to calculate the area of a first region and the area of a second region respectively according to the SLAM map and the data set, wherein the area of the first region is the largest continuous unknown region in the SLAM map, and the area of the second region is the area occupied by obstacles identified by the data set;
[0142] The identification module 313 is used to identify a ground obstacle according to the area of the first region and the area of the second region, wherein the ground obstacle is an obstacle that prohibits the robot from moving inside and outside the obstacle.
[0143] Furthermore, if Figure 4 As shown, the device also includes:
[0144] A collecting module 314 is used to collect the areas of the second region whose area is smaller than a preset area threshold and which are adjacent to each other in the SLAM map;
[0145] The generating module 315 is used to generate a minimum circumscribed polygon corresponding to the collected area, and determine the area marked by the minimum circumscribed polygon as the ground obstacle.
[0146] Furthermore, if Figure 4 As shown, the device also includes:
[0147] A second grouping module 316 is used to group the candidate points in each group of the cluster data according to their positions, and extract a first candidate point group, wherein the first candidate point group contains the largest number of candidate points;
[0148] A second calculation module 317, configured to calculate a minimum circumscribed rectangle corresponding to a candidate point in the first candidate point group;
[0149] The updating module 318 is used to update each group of the clustering data according to the minimum bounding rectangle so as to correct the obstacle information identified by the clustering data.
[0150] Furthermore, if Figure 4 As shown, the device further includes: a second parsing module 319,
[0151] The second parsing module 319 is used to parse the SLAM map to obtain the obstacle direction;
[0152] The marking module 33 is specifically used to mark the obstacle in the map according to the obstacle position, obstacle edge and obstacle direction.
[0153] Furthermore, if Figure 4 As shown, the device also includes:
[0154] A judgment module 320, configured to judge whether obstacles corresponding to the overlapping second area areas have an encirclement relationship according to the overlapping second area areas when the second area areas overlap;
[0155] The optimization module 321 is used to optimize the obstacle data set corresponding to the overlapping second area if the obstacles corresponding to the overlapping second area do not have an encirclement relationship.
[0156] Furthermore, if Figure 4 As shown,
[0157] The marking module 33 is specifically configured to display the obstacle on the map according to the enclosing relationship and the obstacle information if the obstacle corresponding to the overlapping second region has an enclosing relationship.
[0158] The present application provides a method and device for marking obstacles in a robot map. Compared with the prior art, the embodiment of the present invention obtains a probability map and a height map, wherein the probability map is used to identify the probability distribution of obstacles at various positions in the robot working environment, and the height map is used to identify the obstacle height distribution corresponding to each position in the robot working environment; data is grouped according to the probability map and the height map to obtain multiple data sets, each of which identifies obstacle information of an obstacle, and the obstacle information at least includes obstacle position information and obstacle edge information; obstacles are marked in the map according to the obstacle information, thereby realizing the identification of the position information and edge information of obstacles in the working environment according to the probability distribution and height distribution data of obstacles in the robot working environment, and marking the obstacles in the robot map according to the position information and edge information of the obstacles. Since the obstacle edge can identify whether the obstacle is a ground obstacle or a non-ground obstacle, accurate marking of the obstacles in the robot map is achieved.
[0159] According to one embodiment of the present invention, a storage medium is provided, wherein the storage medium stores at least one executable instruction, and the computer executable instruction can execute the method for marking obstacles in a robot map in any of the above method embodiments.
[0160] Figure 5 A schematic diagram of the structure of a terminal provided according to an embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the terminal.
[0161] like Figure 5 As shown, the terminal may include: a processor (processor) 402 , a communication interface (CommunicationsInterface) 404 , a memory (memory) 404 , and a communication bus 408 .
[0162] The processor 402 , the communication interface 404 , and the memory 406 communicate with each other via a communication bus 408 .
[0163] The communication interface 404 is used to communicate with other devices such as clients or other servers.
[0164] The processor 402 is used to execute the program 410, and specifically can execute the relevant steps in the embodiment of the method for marking obstacles in the robot map.
[0165] Specifically, the program 410 may include program codes, which include computer operation instructions.
[0166] The processor 402 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiment of the present invention. The one or more processors included in the terminal may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0167] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0168] The program 410 may be specifically configured to enable the processor 402 to perform the following operations:
[0169] Obtain a probability map and a height map, wherein the probability map is used to identify the probability distribution of obstacles existing at various positions in the robot working environment, and the height map is used to identify the height distribution of obstacles corresponding to various positions in the robot working environment;
[0170] Performing data grouping according to the probability map and the height map to obtain a plurality of data sets, each of the data sets identifying obstacle information of an obstacle, and the obstacle information at least includes obstacle position information and obstacle edge information;
[0171] The obstacles are marked on the map according to the obstacle information.
[0172] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0173] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for marking obstacles in a robot map, characterized in that: include: Obtain a probability map and a height map, wherein the probability map is used to identify the probability distribution of obstacles existing at various positions in the robot working environment, and the height map is used to identify the height distribution of obstacles corresponding to various positions in the robot working environment; Combining the probability map and the height map and extracting a plurality of candidate points according to a preset probability threshold, clustering the plurality of candidate points to obtain a plurality of groups of cluster data, each group of the cluster data identifies a data set, each of the data sets identifies obstacle information of an obstacle, and the obstacle information at least includes obstacle position information and obstacle edge information; The candidate points in each group of the data set are grouped according to their positions, and a first candidate point group containing the largest number of candidate points is extracted; a minimum bounding rectangle corresponding to the candidate points in the first candidate point group is calculated; if a ratio of a short side to a long side of the minimum bounding rectangle satisfies a certain threshold, it is determined that there is no supporting point within an obstacle range determined by taking the long side of the minimum bounding rectangle as one side and taking a certain proportion of the length of the long side as the other side according to the actual obstacle situation, the obstacle range is shrunk; The obstacles are marked on the map according to the obstacle information.
2. The method according to claim 1, characterized in that Before obtaining the probability map and the height map, the method further includes: Obtain the initial obstacle probability map and initial height map; Collecting data collected by the robot during the working process and analyzing the collected data to obtain obstacle data, wherein the collected data at least includes image data and height data; The initial probability map and the initial height map are adjusted according to the obstacle data, and the adjusted initial probability map is determined as the probability map, and the adjusted initial height map is determined as the height map.
3. The method according to claim 1, characterized in that The method further comprises: Acquire a SLAM map of the robot's operating environment, wherein the SLAM map includes unknown areas marked as prohibited for the robot to pass through; Calculate the area of a first region and the area of a second region respectively according to the SLAM map and the data set, the area of the first region being the largest continuous unknown region in the SLAM map, and the area of the second region being the area occupied by obstacles identified by the data set; A ground obstacle is identified according to the area of the first region and the area of the second region, where the ground obstacle is an obstacle that prohibits the robot from shuttling in and out of the obstacle.
4. The method according to claim 3, characterized in that The method further comprises: Collecting areas where the second area is smaller than a preset area threshold and is adjacent to each other in the SLAM map; A minimum circumscribed polygon corresponding to the collected area is generated, and the area identified by the minimum circumscribed polygon is determined as a non-ground obstacle.
5. The method according to claim 3, characterized in that: The method further comprises: Analyze the SLAM map to obtain the obstacle direction; The step of marking the obstacle in the map according to the obstacle information comprises: The obstacle is marked in the map according to the obstacle position, obstacle edge and obstacle direction.
6. The method according to claim 3, characterized in that The method further comprises: When the second regions overlap, judging whether the obstacles corresponding to the overlapping second regions have an encirclement relationship according to the overlapping second regions; If not, the obstacle data set corresponding to the overlapping second region area is optimized.
7. The method according to claim 6, characterized in that The step of marking the obstacle in the map according to the obstacle information comprises: If the obstacle corresponding to the overlapping second region area has an enclosing relationship, the obstacle is marked in the map according to the enclosing relationship and the obstacle information.
8. A device for marking obstacles in a robot map, characterized in that: include: A first acquisition module is used to acquire a probability map and a height map, wherein the probability map is used to identify the probability distribution of obstacles existing at various positions in the robot working environment, and the height map is used to identify the height distribution of obstacles corresponding to various positions in the robot working environment; An extraction module, used for combining the probability map and the height map and extracting a plurality of candidate points according to a preset probability threshold; A clustering module, used for clustering the plurality of candidate points to obtain a plurality of groups of cluster data, each group of the cluster data identifying a data set; A first grouping module, configured to group data according to the probability map and the height map to obtain a plurality of data sets, each of which identifies obstacle information of an obstacle, and the obstacle information at least includes obstacle position information and obstacle edge information; A marking module, used for marking obstacles in a map according to the obstacle information; A second grouping module, used for grouping the candidate points according to the positions of the candidate points in each group of the cluster data, and extracting a first candidate point group, wherein the first candidate point group contains the largest number of candidate points; A second calculation module, used to calculate the minimum circumscribed rectangle corresponding to the candidate points in the first candidate point group; The updating module is used to shrink the obstacle range if the ratio of the short side to the long side of the minimum circumscribed rectangle meets a certain threshold value, and then judge that there is no supporting point in the obstacle range determined by taking the long side of the minimum circumscribed rectangle as one side and taking a certain proportion of the length of the long side as the other side according to the actual obstacle situation.
9. The device according to claim 8, characterized in that The device also includes: The second acquisition module is used to obtain an initial probability map and an initial height map of obstacles; A collection module, used to collect data collected by the robot during its working process; A first analysis module, used for analyzing the collected data collected by the collection module to obtain obstacle data, wherein the collected data at least includes image data and height data; An adjustment module, configured to adjust the initial probability map and the initial height map according to the obstacle data; The determination module is used to determine the adjusted initial probability map as the probability map, and determine the adjusted initial height map as the height map.
10. The device according to claim 8, characterized in that The device also includes: A third acquisition module is used to acquire a SLAM map of the robot's operating environment, wherein the SLAM map contains unknown areas marked as prohibited for the robot to pass; A first calculation module is used to calculate the area of a first region and the area of a second region respectively according to the SLAM map and the data set, the area of the first region is the largest continuous unknown area in the SLAM map, and the area of the second region is the area occupied by obstacles identified by the data set; The identification module is used to identify a ground obstacle according to the area of the first region and the area of the second region, wherein the ground obstacle is an obstacle that prohibits the robot from shuttling inside and outside the obstacle.
11. The device according to claim 10, characterized in that The device also includes: A collecting module, used for collecting areas whose area of the second area is smaller than a preset area threshold and which are adjacent to each other in the SLAM map; The generating module is used to generate a minimum circumscribed polygon corresponding to the collected area, and determine the area marked by the minimum circumscribed polygon as a non-ground obstacle.
12. The device according to claim 10, characterized in that The device further comprises: a second parsing module, The second parsing module is used to parse the SLAM map to obtain the obstacle direction; The marking module is specifically used to mark the obstacle in the map according to the obstacle position, obstacle edge and obstacle direction.
13. The device according to claim 10, characterized in that The device also includes: A judgment module, configured to judge whether the obstacles corresponding to the overlapping second area areas have an encirclement relationship according to the overlapping second area areas when the second area areas overlap; The optimization module is used to optimize the obstacle data set corresponding to the overlapping second area if the obstacles corresponding to the overlapping second area do not have an encirclement relationship.
14. The device according to claim 13, characterized in that The marking module is specifically used to display the obstacle in the map according to the enclosing relationship and the obstacle information if the obstacle corresponding to the overlapping second region area has an enclosing relationship.
15. A storage medium storing at least one executable instruction, wherein the executable instruction enables a processor to execute an operation corresponding to the method for marking obstacles in a robot map according to any one of claims 1 to 7.
16. A terminal, comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the method for marking obstacles in a robot map according to any one of claims 1 to 7.
Citation Information
Patent Citations
Map processing method and cleaning robot
CN110393482A
Obstacle detection method and device, self-walking robot and storage medium
CN111990929A