A robot mapping method, device, robot and storage medium
Patent Information
- Application Number
- CN202311778727.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-21
- Publication Date
- 2026-10-13
- Estimated Expiration
- 2043-12-21
AI Technical Summary
[0004]然而,由于该方法的目标点是随机生成的,各个目标点之间没有关联性,因此机器人在探索时会来回重复行走,不能有序探索,最终导致快速建图的效率较低
[0039]可以理解的是,上述第二方面至第五方面的有益效果可以参见上述第一方面中的相关描述,在此不再赘述。
Smart Images

Figure CN117948962B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent mobile robot technology, and in particular to a robot mapping method, apparatus, robot, and storage medium. Background Technology
[0002] With the development of robotics technology, the application of intelligent mobile robots such as robotic vacuum cleaners, robotic mops, and food delivery robots is becoming increasingly widespread. For intelligent mobile robots, rapid mapping is a crucial function. Its basic principle is to quickly scan the surrounding environment using the robot's built-in sensors, thereby constructing an environmental map.
[0003] Currently, a fast mapping method based on fast exploration random trees is commonly used. This method only requires randomly generating target points to be explored in the area to be explored, without the need for algorithm modeling or geometric division of the area to be explored. It is simple to apply and has advantages such as high search coverage and wide search range.
[0004] However, since the target points of this method are randomly generated and there is no correlation between them, the robot will repeatedly walk back and forth during exploration and cannot explore in an orderly manner, which ultimately leads to low efficiency in rapid mapping. Summary of the Invention
[0005] In view of this, embodiments of this application provide a robot mapping method, apparatus, robot, and storage medium, which can improve the efficiency of rapid robot mapping.
[0006] The first aspect of this application provides a robot mapping method, including:
[0007] Get the robot's current position and the current map;
[0008] Select the first contour point corresponding to the current location from the current map contour;
[0009] If there is an area to be expanded around the contour segment from the first contour point to the historical contour point in the current map contour, then starting from the historical contour point, traverse and check whether there is a second contour point in the current map contour with an area to be expanded around it according to the first rotation direction; where the historical contour point corresponds to the robot's previous position, and the area to be expanded represents the unknown area to be updated to the known area.
[0010] If the current map outline contains a second outline point with surrounding areas to be expanded, then control the robot to move to the second outline point, use the first outline point to update the historical outline points, update the current map, and then return to execute the steps of obtaining the robot's current position and the current map, as well as subsequent steps.
[0011] In this embodiment, the robot's current position and the current map are first obtained. From the outline of the current map, a first contour point corresponding to the current position is selected. Then, from the outline of the current map, it is determined whether there is an area to be expanded around the contour segment from the first contour point to the historical contour point corresponding to the robot's previous position. If an area to be expanded exists, it means the map area where the contour segment is located needs to be expanded, i.e., the robot needs to be controlled to explore that area. Therefore, starting from the historical contour point, following a set rotation direction, the outline of the current map is traversed to check whether there is a second contour point with an area to be expanded around it. If a second contour point exists, it means the robot can select a point. Therefore, the robot is controlled to move to the second contour point, using the first contour point to update the historical contour point and update the current map. Then, the first step is returned to be executed, i.e., the exploration continues in the same way until rapid mapping is completed. This setup allows the robot to be controlled to explore in an orderly manner according to the map outline, avoiding repeated back-and-forth movement and thus improving the efficiency of rapid mapping.
[0012] In one implementation of this application, after selecting a first contour point corresponding to the current position from the contour of the current map, the method further includes:
[0013] If there is no area to be expanded around the contour segment from the first contour point to the historical contour point in the current map contour, then starting from the first contour point, traverse and check whether there is a second contour point in the current map contour with an area to be expanded around it according to the first rotation direction.
[0014] In one implementation of this application, whether there is a region to be expanded around the contour segment is determined in the following way:
[0015] Starting from the first contour point, the system traverses and detects whether there are multiple consecutive contour points in the contour segment with surrounding areas to be expanded, following the second rotation direction; wherein, the second rotation direction is opposite to the first rotation direction.
[0016] If a contour segment has multiple consecutive contour points with surrounding areas that need to be expanded, then it is determined that there are surrounding areas that need to be expanded in the contour segment; otherwise, it is determined that there are no surrounding areas that need to be expanded in the contour segment.
[0017] In one implementation of this application, starting from historical contour points, traversing and detecting whether there are second contour points in the contour of the current map with surrounding areas to be expanded, according to a first rotation direction, includes:
[0018] Starting from the historical contour points, traverse and check the contour of the current map in the first rotation direction to see if there are multiple consecutive contour points with surrounding areas to be expanded.
[0019] If the current map outline contains multiple consecutive outline points with surrounding areas to be expanded, then the second outline point is selected from these multiple outline points.
[0020] In one implementation of this application, selecting a first contour point corresponding to the current location from the contour of the current map includes:
[0021] Select a sub-outline that includes the current location from the outline of the current map;
[0022] Select the point from the sub-contours that is closest to the current position as the first contour point.
[0023] In one implementation of this application, before controlling the robot to move to the second contour point, the following steps are further included:
[0024] Search for all surrounding points of the second contour point;
[0025] From the surrounding locations, identify the target location that is inside the sub-contour, has not been visited by the robot, and has no obstacles within the defined surrounding area;
[0026] Update the second contour points using the target location points.
[0027] In one implementation of this application, before selecting the first contour point corresponding to the current position from the contour of the current map, the method further includes:
[0028] Binarize the current map to obtain a binary map;
[0029] The outline of the binarized map is moved a set distance toward the known area to obtain the target map;
[0030] Extract the outline of the target map and use it as the outline of the current map.
[0031] A second aspect of this application provides a robot mapping apparatus, comprising:
[0032] The location acquisition module is used to obtain the robot's current location and the current map.
[0033] The contour point selection module is used to select the first contour point corresponding to the current position from the contours of the current map;
[0034] The contour traversal module is used to detect whether there is a second contour point in the current map contour where there is a region to be expanded around the contour segment from the first contour point to the historical contour point, starting from the historical contour point and traversing in the first rotation direction. Here, the historical contour point corresponds to the robot's previous position, and the region to be expanded represents the unknown region that needs to be updated to the known region.
[0035] The map update module is used to control the robot to move to the second contour point if there is a second contour point in the current map contour where there is a surrounding area to be expanded. The robot then uses the first contour point to update the historical contour points and updates the current map. Finally, it returns to execute the steps of obtaining the robot's current position and the current map, as well as subsequent steps.
[0036] A third aspect of this application provides a robot including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the robot mapping method provided in the first aspect of this application.
[0037] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the robot mapping method provided in the first aspect of this application.
[0038] The fifth aspect of this application provides a computer program product that, when run on a robot, causes the robot to execute the robot mapping method provided in the first aspect of this application.
[0039] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description
[0040] Figure 1 This is a flowchart of a robot mapping method provided in an embodiment of this application;
[0041] Figure 2 This is a schematic diagram of an original environment map provided in an embodiment of this application;
[0042] Figure 3 Yes Figure 2 The diagram shows the target map obtained after binarizing and dilating the original environment map.
[0043] Figure 4 This is a schematic diagram showing the positions of the first contour point and historical contour points selected in the contour of the current map, provided in an embodiment of this application.
[0044] Figure 5 This is a schematic diagram illustrating the effect of correcting the second contour point according to an embodiment of this application;
[0045] Figure 6 This is a schematic diagram of the operation process of the robot mapping method provided in this application embodiment in a practical application scenario;
[0046] Figure 7 This is a schematic diagram of the structure of a robot mapping device provided in an embodiment of this application;
[0047] Figure 8 This is a schematic diagram of a robot provided in an embodiment of this application. Detailed Implementation
[0048] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application can also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail. Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance.
[0049] Currently, intelligent mobile robots typically employ a rapid mapping method based on fast exploration of random trees. This method is simple to apply and has advantages such as high search coverage and a wide search range. However, the robot tends to repeatedly move back and forth during exploration, failing to explore in an orderly manner, ultimately resulting in low efficiency in rapid mapping. To address the above problems, embodiments of this application provide a robot mapping method, apparatus, robot, and storage medium, which can improve the efficiency of rapid robot mapping. For more specific technical implementation details of the embodiments of this application, please refer to the method embodiments described below.
[0050] It should be understood that the implementing entities of the various method embodiments of this application are various types of intelligent mobile robots, such as sweeping robots, mopping robots, sweeping and mopping dual-purpose robots, food delivery robots, and delivery robots, etc. The embodiments of this application do not impose any restrictions on the specific type of intelligent mobile robot.
[0051] Please see Figure 1 This application illustrates a robot mapping method provided in an embodiment, comprising:
[0052] 101. Obtain the robot's current position and the current map;
[0053] First, the robot's current position and the current map are obtained. The robot can be any type of intelligent mobile robot. Its current position can be obtained through a positioning device. The current map represents the environmental map that the robot has established at the current moment, which typically includes known and unknown areas. The known areas include blank areas and obstacles. Different areas within the environmental map can be represented by different colors. For example, unknown areas can be represented by a first color (e.g., gray), known areas by a second color (e.g., white), and obstacles by a third color (e.g., black). The specific color used to represent which area can be arbitrarily set according to requirements.
[0054] 102. Select the first contour point corresponding to the current location from the current map contour;
[0055] After obtaining the robot's current position and the current map, select a contour point from the current map's outline that corresponds to the current position, and denote it as the first contour point. In practice, the first contour point can be any point in the map outline, but to reduce the robot's exploration distance during rapid mapping, a contour point that is as close as possible to the robot's current position should be selected as the first contour point.
[0056] In one implementation of this application, before selecting the first contour point corresponding to the current position from the contour of the current map, the method further includes:
[0057] (1) Perform binarization on the current map to obtain a binarized map;
[0058] (2) Move the outline of the binarized map a set distance toward the known area to obtain the target map;
[0059] (3) Extract the outline of the target map and use it as the outline of the current map.
[0060] After acquiring the current map, its outline needs to be extracted. This outline typically represents the boundary between unknown and known areas, as well as obstacles in the scene. Since the current map is the raw environment map, the boundaries between unknown and known areas may not be clear enough, leading to a decrease in the accuracy of outline extraction. Therefore, before extracting the outline, the current map can be preprocessed to make the boundaries between unknown and known areas clearer, thereby improving the accuracy of outline extraction. Specifically, the current map can be binarized to obtain a binary map, which uses only black and white colors for clear contrast. Then, the outline of the binary map is moved a set distance towards the known area to obtain the target map. This operation is called map dilation. Specifically, dilation can be set to n (n is generally 2 or 3 grids), that is, moving the outline of the binary map n grids towards the known area to obtain the target map. In the target map, the boundary between the unknown and known areas is already clear, so the outline of the target map can be extracted as the outline of the current map. The extracted outline contains the position coordinates of each outline point.
[0061] As an example, Figure 2 This is a schematic diagram of an original environment map provided for an embodiment of this application. Figure 2 In the original environment map shown, gray areas represent unknown areas, white areas represent known areas, and black areas represent obstacles. It can be seen that... Figure 2 The boundaries between unknown and known areas are not clear enough, which may lead to a decrease in the accuracy of map contour extraction.
[0062] In the Figure 2 After binarization and map dilation of the original environment map shown, the result is as follows: Figure 3 The diagram shows a target map. It can be seen that... Figure 3 The boundary between the unknown and known areas is relatively clear, so the map outline can be accurately extracted, where the gray dots represent the robot's current position.
[0063] In one implementation of this application, selecting a first contour point corresponding to the current location from the contour of the current map includes:
[0064] (1) Select a sub-outline containing the current location from the outline of the current map;
[0065] (2) Select the point closest to the current position from the sub-contours and use it as the first contour point.
[0066] Since the current map outline is quite large, to improve the efficiency of finding a suitable first outline point, the current map outline can be divided into multiple sub-outlines according to different regions. Then, the sub-outline containing the robot's current position is found, that is, determining which sub-outline the robot's current position is located within. After determining the sub-outline, the point within that sub-outline that is closest to the robot's current position is selected as the first outline point, which can be recorded using the variable m_index_point.
[0067] 103. Determine whether there are areas to be expanded around the contour segment from the first contour point to the historical contour point in the current map outline.
[0068] After selecting the first contour point, it is determined whether there is an area to be expanded around the contour segment from the first contour point to the historical contour point in the current map contour. In this embodiment, the robot's rapid mapping process is achieved by updating the current map every time the robot moves to a new position. It can be foreseen that before the robot moves to the current position, the robot's position is the previous position. Similar to the correspondence between the current position and the first contour point, the previous position also corresponds to a contour point, which is represented by the historical contour point and can be recorded by the variable m_tag_forward. Since the first contour point and the historical contour point are both points in the current map contour, they will divide the current map contour into two contour segments. Here, the shorter contour segment can be selected, and it is determined whether there is an area to be expanded around the contour segment. The area to be expanded represents the unknown area to be updated to the known area, that is, the unknown area to be explored. Since the location of the unknown area is known in the current map, the location of the contour segment is also known, so it is only necessary to detect whether the contour segment is near the unknown area.
[0069] like Figure 4 The image shows a schematic diagram illustrating the locations of the first contour point and historical contour points selected within the current map's outline. Figure 4 In the diagram, the first contour point is the point on the contour closest to the robot's current position, and the historical contour point is located to the upper left of the first contour point, corresponding to the robot's previous position.
[0070] In one implementation of this application, whether there is a region to be expanded around the contour segment is determined in the following way:
[0071] (1) Starting from the first contour point, traverse and detect whether there are multiple consecutive contour points in the contour segment with surrounding areas to be expanded in the second rotation direction; wherein, the second rotation direction is opposite to the first rotation direction;
[0072] (2) If there are multiple consecutive contour points in the contour segment with surrounding areas that need to be expanded, then it is determined that there are surrounding areas that need to be expanded in the contour segment; otherwise, it is determined that there are no surrounding areas that need to be expanded in the contour segment.
[0073] In the specific judgment, starting from the first contour point, the system traverses the contour segment according to the second rotation direction to check whether there are multiple consecutive contour points with surrounding areas that need to be expanded. The second rotation direction is opposite to the first rotation direction described later; for example, if the first rotation direction is counterclockwise, the second rotation direction is clockwise; if the first rotation direction is clockwise, the second rotation direction is counterclockwise. First, it is determined whether there is a surrounding area to be expanded for the first contour point. Specifically, it is determined whether the first contour point is within a certain radius centered on a point on the unknown contour area. If it is, it indicates that there is a surrounding area to be expanded for the first contour point; otherwise, it indicates that there is no surrounding area to be expanded for the first contour point. Each contour point can be judged in this way to determine whether there is a surrounding area to be expanded for each contour point. If there is a surrounding area to be expanded for the first contour point, the system continues to check whether there is a surrounding area to be expanded for the next adjacent contour point, and so on, to determine whether there are multiple consecutive contour points with surrounding areas that need to be expanded. For example, starting from the first contour point, the system can traverse and check whether there are m (m can generally be 7-8) consecutive contour points in the contour segment with surrounding areas that need to be expanded, in a clockwise direction. If such areas exist, it can be determined that there are surrounding areas that need to be expanded; otherwise, it can be determined that there are no surrounding areas that need to be expanded.
[0074] If there is an area to be expanded around the contour segment, proceed to step 104; if there is no area to be expanded around the contour segment, proceed to step 105.
[0075] 104. Starting from the historical contour points, traverse and check whether there are second contour points in the current map contour with surrounding areas to be expanded, according to the first rotation direction.
[0076] When there are areas to be expanded around the contour segment, starting from the historical contour points, the system iterates through the current map contour in the first rotation direction to check whether there are second contour points with surrounding areas to be expanded. For example, for... Figure 4 The first contour point and historical contour points shown can be used to find contour points in the contour segment where there are areas to be expanded. When there are areas to be expanded around the contour segment between the first contour point and the historical contour point, the current map contour can be traversed from the historical contour point in a counterclockwise direction. That is, the traversal can be started from the starting point of the contour segment. In this way, contour points with areas to be expanded around the contour segment can be found.
[0077] In one implementation of this application, starting from historical contour points, traversing and detecting whether there are second contour points in the contour of the current map with surrounding areas to be expanded, according to a first rotation direction, includes:
[0078] (1) Starting from the historical contour points, traverse and check whether there are multiple consecutive contour points in the current map contour with surrounding areas to be expanded in the first rotation direction.
[0079] (2) If the current map outline has multiple consecutive outline points with surrounding areas to be expanded, then select the second outline point from the multiple outline points.
[0080] In specific operation, starting from the historical contour point, the current map contour is traversed and checked in the first rotation direction to see if there are multiple consecutive contour points with surrounding areas to be expanded. If so, one contour point is selected from these multiple contour points as the second contour point. For example, starting from the historical contour point, the current map contour is traversed and checked in a clockwise direction to see if there are m consecutive contour points (m can generally be 7-8) with surrounding areas to be expanded. If so, one contour point is selected from these m contour points as the second contour point. The selection method can include various methods, such as selecting the middle contour point, selecting the last contour point (i.e., the mth contour point), and randomly selecting a contour point, etc. This application embodiment does not limit this.
[0081] If a second contour point with an area to be expanded is detected in the contour of the current map, proceed to step 106; otherwise, proceed to step 107.
[0082] 105. Starting from the first contour point, traverse and check whether there is a second contour point in the contour of the current map with surrounding areas to be expanded, according to the first rotation direction.
[0083] When there is no surrounding area to be expanded for the contour segment, starting from the first contour point, traverse and check whether there is a second contour point in the current map contour with surrounding areas to be expanded, following the first rotation direction. For example, for Figure 4 The first contour point and historical contour points shown can be skipped if there is no area to be expanded around the contour segment between them. The current map contour can be traversed starting from the first contour point in a counter-clockwise direction, i.e., starting from the end of the contour segment. In step 105, the method for detecting the second contour point can be the same as in step 104; please refer to the description of detecting the second contour point in step 104 for details. In addition to starting the traversal from the first contour point, another contour point near the first contour point can be selected, and the traversal can begin from that other contour point.
[0084] In particular, if the current map is the first map that the robot quickly builds, then the historical contour points can be considered to coincide with the first contour points, that is, m_tag_forward = m_index_point. At this time, it is also possible to start from the first contour point and traverse the contour of the current map according to the first rotation direction to detect whether there are second contour points with surrounding areas to be expanded.
[0085] If a second contour point with an area to be expanded is detected in the contour of the current map, proceed to step 106; otherwise, proceed to step 107.
[0086] 106. Control the robot to move to the second contour point, update the historical contour points using the first contour point, and update the current map;
[0087] If a second contour point with surrounding areas to be explored is detected within the current map's contour, it indicates that the area around the second contour point still needs exploration, and the robot's rapid mapping is not yet complete. Therefore, the robot can be controlled to move to the second contour point for exploration, and the current map will be updated after exploration. Furthermore, when the robot moves to the second contour point, the current position described in the previous steps becomes the previous position. Since historical contour points correspond to the previous position, the historical contour points need to be updated using the first contour point, i.e., setting m_tag_forward = m_index_point. After performing these operations, return to step 101 to begin the next loop process. It should be noted that when returning to step 101, the current position has been updated to the position of the second contour point, and the current map is also the updated map. Clearly, during the robot's multiple mapping loops, the current position, the first contour point, the second contour point, historical contour points, and the current map are all continuously updated.
[0088] In one implementation of this application, before controlling the robot to move to the second contour point, the following steps are further included:
[0089] (1) Search for all surrounding points of the second contour point;
[0090] (2) From each surrounding location point, determine the target location point that is inside the sub-contour, has not been visited by the robot, and has no obstacles within the surrounding set range;
[0091] (3) Update the second contour points using the target location points.
[0092] The second contour point selected as described above may be near obstacles, potentially causing a collision when the robot approaches it. Therefore, after determining the second contour point, it can be corrected to make its position more reasonable. For example, a point far from obstacles or in an open area can be selected for correction. In practice, various graph search algorithms, such as BFS or DFS, can be used to search for surrounding points of the second contour point. Then, from these surrounding points, select points that meet the following conditions: 1) The searched point is valid (i.e., a point on the map); 2) It is inside the sub-contour surrounding the robot's current position; 3) It is a point the robot has not visited before; 4) There are no obstacles within a defined surrounding area, for example, no obstacles within a range of 2-10 grid cells. After filtering according to the above conditions, the corresponding target point can be obtained. Then, the second contour point is updated using the target point, that is, the second contour point is corrected to the target point.
[0093] like Figure 5 The image shown illustrates the effect of correcting the second contour point. Figure 5 As can be seen, the second contour point before correction was located in the boundary area of the map contour. There were likely obstacles nearby, causing the robot to collide with them when exploring that location. The second contour point after correction is located in an open area with no obstacles nearby, thus avoiding the problem of the robot colliding with obstacles.
[0094] 107. Confirm that the robot has completed rapid mapping.
[0095] If no second contour point is detected, it means that the robot has no more areas to explore. Therefore, it is determined that the robot has completed the entire process of rapid mapping. At this time, the currently built map can be stored for the robot to use when working.
[0096] In this embodiment, the robot's current position and the current map are first obtained. From the outline of the current map, a first contour point corresponding to the current position is selected. Then, from the outline of the current map, it is determined whether there is an area to be expanded around the contour segment from the first contour point to the historical contour point corresponding to the robot's previous position. If an area to be expanded exists, it means the map area where the contour segment is located needs to be expanded, i.e., the robot needs to be controlled to explore that area. Therefore, starting from the historical contour point, following a set rotation direction, the outline of the current map is traversed to check whether there is a second contour point with an area to be expanded around it. If a second contour point exists, it means the robot can select a point. Therefore, the robot is controlled to move to the second contour point, using the first contour point to update the historical contour point and update the current map. Then, the first step is returned to be executed, i.e., the exploration continues in the same way until rapid mapping is completed. This setup allows the robot to be controlled to explore in an orderly manner according to the map outline, avoiding repeated back-and-forth movement and thus improving the efficiency of rapid mapping.
[0097] To facilitate understanding of the robot mapping method provided in the embodiments of this application, a practical application scenario is listed below.
[0098] like Figure 6 The diagram shown illustrates the operation flow of the robot mapping method provided in this application embodiment in a practical application scenario. Figure 6First, the current map and the robot's current position are obtained. After binarizing and dilating the current map, the map outline is extracted. Then, a sub-outline containing the robot's current position is selected from the map outline. The outline point closest to the robot on the sub-outline is selected as m_index_point, i.e., the first outline point, and the historical outline point m_tag_forward is determined. Next, it is determined whether there is a region to be expanded around the outline segment from the first outline point m_index_point to the historical outline point m_tag_forward. If there is a region to be expanded, the points in the map outline are traversed counterclockwise starting from the historical outline point m_tag_forward; if there is no region to be expanded, the points in the map outline are traversed counterclockwise starting from the first outline point m_index_point. Based on this operation method, the historical outline point m_tag_forward can also be called the outline point that did not have a region to be expanded in the previous clockwise search. Next, it checks if there are any areas to be expanded around the points in the map outline traversed counter-clockwise. If so, it means a point can be selected. The selected point is then corrected, and the robot moves to the corrected point to begin map building, i.e., updating the current map. Simultaneously, `m_tag_forward = m_index_point`, and then the process returns to the first step to begin the next loop. If all points in the map outline have been traversed counter-clockwise and no areas to be expanded are found, it means the robot can no longer select points, and the rapid map building process is complete. This setup allows the robot to explore and build the map systematically, thereby improving the efficiency of rapid map building.
[0099] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0100] The above mainly describes a robot mapping method; the following will describe a robot mapping device.
[0101] Please see Figure 7 One embodiment of a robot mapping device in this application includes:
[0102] The location acquisition module 701 is used to acquire the robot's current location and the current map.
[0103] The contour point selection module 702 is used to select the first contour point corresponding to the current position from the contour of the current map;
[0104] The contour traversal module 703 is used to detect whether there is a second contour point in the contour of the current map with an area to be expanded around the contour segment from the first contour point to the historical contour point, starting from the historical contour point and traversing in the first rotation direction; wherein, the historical contour point corresponds to the robot's previous position, and the area to be expanded represents the unknown area to be updated to the known area.
[0105] The map update module 704 is used to control the robot to move to the second contour point if there is a second contour point in the current map contour where there is a surrounding area to be expanded, update the historical contour points using the first contour point, update the current map, and then return to execute the steps of obtaining the robot's current position and the current map, as well as subsequent steps.
[0106] In one implementation of this application, the robot mapping device further includes:
[0107] The contour point traversal module is used to detect whether there is a second contour point in the current map contour where there is a region to be expanded, starting from the first contour point and traversing in the first rotation direction, if there is no region to be expanded in the contour segment from the first contour point to the historical contour point.
[0108] In one implementation of this application, the robot mapping device further includes:
[0109] The contour point detection module is used to detect whether there are multiple consecutive contour points in the contour segment with surrounding areas to be expanded, starting from the first contour point and traversing in the second rotation direction; wherein, the second rotation direction is opposite to the first rotation direction.
[0110] The module for determining the area to be expanded is used to determine if there is an area to be expanded around the contour segment if there are multiple consecutive contour points in the contour segment that are surrounded by an area to be expanded; otherwise, it determines that there is no area to be expanded around the contour segment.
[0111] In one implementation of this application, the contour traversal module includes:
[0112] The contour point detection unit is used to detect whether there are multiple consecutive contour points in the contour of the current map that have surrounding areas to be expanded, starting from historical contour points and traversing in the first rotation direction.
[0113] The contour point selection unit is used to select a second contour point from multiple contour points if the current map contour has multiple consecutive contour points with surrounding areas to be expanded.
[0114] In one implementation of this application, the contour point selection module includes:
[0115] The sub-contour selection unit is used to select a sub-contour containing the current location from the contours of the current map.
[0116] The contour point determination unit is used to select the point closest to the current position from the sub-contour as the first contour point.
[0117] In one implementation of this application, the robot mapping device further includes:
[0118] The surrounding point search module is used to search for the surrounding points of the second contour point;
[0119] The target point determination module is used to determine the target location points that are inside the sub-contour, have not been visited by the robot, and have no obstacles within the surrounding set range from various surrounding location points;
[0120] The contour point correction module is used to update the second contour points using the target location points.
[0121] In one implementation of this application, the robot mapping device further includes:
[0122] The binarization module is used to binarize the current map to obtain a binarized map.
[0123] The map inflation module is used to move the outline of the binarized map a set distance toward the known area to obtain the target map;
[0124] The contour extraction module is used to extract the contour of the target map and use it as the contour of the current map.
[0125] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the robot mapping method as described in any of the above embodiments.
[0126] This application also provides a computer program product that, when run on a robot, causes the robot to perform a robot mapping method as described in any of the above embodiments.
[0127] Figure 8 This is a schematic diagram of a robot provided in one embodiment of this application. Figure 8 As shown, the robot 8 in this embodiment includes: a processor 80, a memory 81, and a computer program 82 stored in the memory 81 and executable on the processor 80. When the processor 80 executes the computer program 82, it implements the steps in the embodiments of the various robot mapping methods described above, for example... Figure 1Steps 101 to 107 are shown. Alternatively, when the processor 80 executes the computer program 82, it implements the functions of each module / unit in the above-described device embodiments, for example... Figure 7 The functions of modules 701 to 704 are shown.
[0128] The computer program 82 can be divided into one or more modules / units, which are stored in the memory 81 and executed by the processor 80 to complete this application. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program 82 in the robot 8.
[0129] The processor 80 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0130] The memory 81 can be an internal storage unit of the robot 8, such as a hard drive or memory. The memory 81 can also be an external storage device of the robot 8, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory 81 can include both internal and external storage units of the robot 8. The memory 81 is used to store the computer program and other programs and data required by the robot. The memory 81 can also be used to temporarily store data that has been output or will be output.
[0131] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0132] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0133] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0134] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0135] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units through some interfaces, and may be electrical, mechanical, or other forms.
[0136] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of this application, depending on actual needs.
[0137] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0138] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0139] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A robot mapping method, characterized in that, include: Get the robot's current position and the current map; Select a first contour point corresponding to the current position from the contour of the current map; If there is an area to be expanded around the contour segment from the first contour point to the historical contour point in the current map contour, then starting from the historical contour point, the current map contour is traversed and checked in the first rotation direction to see if there is a second contour point with an area to be expanded around it; wherein, the historical contour point corresponds to the previous position of the robot, and the area to be expanded represents an unknown area that needs to be updated to a known area. If there is no area to be expanded around the contour segment from the first contour point to the historical contour point in the contour of the current map, then starting from the first contour point, traverse and detect whether there is a second contour point in the contour of the current map with an area to be expanded around it according to the first rotation direction. If the current map outline contains a second outline point with surrounding areas to be expanded, then control the robot to move to the second outline point, use the first outline point to update the historical outline point, and update the current map. Then return to execute the steps of obtaining the robot's current position and the current map, as well as subsequent steps. The presence of an area to be expanded around the contour segment is determined in the following way: Starting from the first contour point, the contour segment is traversed and detected according to the second rotation direction to see if there are multiple consecutive contour points with surrounding areas to be expanded; wherein, the second rotation direction is opposite to the first rotation direction; If a contour segment has multiple consecutive contour points with surrounding areas that need to be expanded, then it is determined that there are surrounding areas that need to be expanded in the contour segment; otherwise, it is determined that there are no surrounding areas that need to be expanded in the contour segment.
2. The method as described in claim 1, characterized in that, The step of traversing and detecting whether there are second contour points in the contour of the current map with surrounding areas to be expanded, starting from the historical contour points and following the first rotation direction, includes: Starting from the historical contour points, traverse and detect whether there are multiple consecutive contour points in the contour of the current map with surrounding areas that need to be expanded, according to the first rotation direction. If the current map outline has multiple consecutive outline points with surrounding areas to be expanded, then the second outline point is selected from the multiple outline points.
3. The method as described in claim 1, characterized in that, Selecting a first contour point corresponding to the current position from the contour of the current map includes: Select a sub-contour containing the current location from the contours of the current map; Select the point from the sub-contours that is closest to the current position as the first contour point.
4. The method as described in claim 3, characterized in that, Before controlling the robot to move to the second contour point, the method further includes: Search for each surrounding point of the second contour point; From the various surrounding location points, determine the target location point that is inside the sub-contour, has not been visited by the robot, and has no obstacles within the surrounding defined range; The second contour point is updated using the target location point.
5. The method according to any one of claims 1 to 4, characterized in that, Before selecting the first contour point corresponding to the current position from the contour of the current map, the method further includes: The current map is binarized to obtain a binarized map; The outline of the binarized map is moved a set distance toward the known area to obtain the target map; Extract the outline of the target map and use it as the outline of the current map.
6. A robot mapping device, characterized in that, include: The location acquisition module is used to obtain the robot's current location and the current map. The contour point selection module is used to select a first contour point corresponding to the current position from the contour of the current map; The contour traversal module is used to detect whether there is a second contour point in the contour of the current map with an area to be expanded around the contour segment from the first contour point to the historical contour point, starting from the historical contour point and traversing in the first rotation direction; wherein the historical contour point corresponds to the previous position of the robot, and the area to be expanded represents an unknown area to be updated to a known area. The contour point traversal module is used to detect whether there is a second contour point in the contour of the current map with an area to be expanded around the contour segment from the first contour point to the historical contour point if there is no area to be expanded around the contour segment from the first contour point to the historical contour point. The map update module is used to control the robot to move to the second contour point if there is a second contour point in the contour of the current map with a surrounding area to be expanded, update the historical contour point using the first contour point, update the current map, and then return to execute the steps of obtaining the robot's current position and the current map, as well as subsequent steps. The contour point detection module is used to detect, starting from the first contour point, whether there are multiple consecutive contour points in the contour segment with surrounding areas to be expanded, according to the second rotation direction; wherein, the second rotation direction is opposite to the first rotation direction; The module for determining the area to be expanded is used to determine that if the contour segment has multiple consecutive contour points with surrounding areas that need to be expanded, then the contour segment has surrounding areas that need to be expanded; otherwise, the contour segment does not have surrounding areas that need to be expanded.
7. A robot comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the robot mapping method as described in any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the robot mapping method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Mapping method of autonomous mobile device, electronic device and storage medium
CN114764238A
Rapid mapping method and device and cleaning robot
CN115191886A