Robot mapping method based on gap recognition and robot

By using a method that allows a robotic vacuum cleaner to identify target gaps along walls and gradually divide the space into zones, the problem of robotic vacuum cleaners being unable to recognize the house's layout and structure is solved, enabling rapid and accurate whole-house environmental division and mapping.

CN119336015BActive Publication Date: 2026-03-10AMICRO SEMICONDUCTOR CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Current robotic vacuum cleaners cannot recognize the house layout without a two-dimensional map, and cannot continuously divide the whole house environment into new room areas or identify the door positions of different room areas in real time without building a global map.

Method used

A robot mapping method based on gap recognition is adopted. The robot walks along the wall and identifies the target gap to form the first partition. It then enters the untraversed area through the target gap and gradually divides the target partition to achieve incremental mapping.

Benefits of technology

It improves the efficiency of mapping and area division of the robot vacuum cleaner while walking along the wall, and can identify door frames and divide the area without adding extra markers, so as to achieve fast and accurate division of the whole house environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336015B_ABST
    Figure CN119336015B_ABST
Patent Text Reader

Abstract

This application discloses a robot mapping method and a robot based on gap recognition. The robot mapping method includes: Step A, the robot walks along a wall and identifies target gaps to complete at least one closed-loop path, and encloses at least one ring of walls with at least one target gap as the first partition; then it enters the untraversed area through the identified target gap, and continues to walk according to a preset walking pattern while continuing to identify target gaps; Step B, whenever the robot identifies a new target gap, the robot does not pass through the new target gap, but continues to walk according to the preset walking pattern and identify target gaps until the robot completes a closed-loop area according to the preset walking pattern, marks the closed-loop area as the target partition, and then enters the untraversed area through the identified new target gap, and continues to walk according to the preset walking pattern while continuing to identify target gaps until the robot can no longer identify new target gaps.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of regional planning, and in particular to a robot mapping method and robot based on gap identification. Background Technology

[0002] For robotic vacuum cleaners, zoned cleaning is a very important function. Although the home environment is a highly structured environment, most robotic vacuum cleaners currently use LiDAR or depth camera detection technology to obtain the overall outline data of the environment before dividing it into zones. Before dividing the zones, the robotic vacuum cleaner will not recognize the room and door areas in its mapping and navigation. This solution is not suitable for robotic vacuum cleaners to recognize the house layout without a two-dimensional map.

[0003] In the robot mapping method disclosed in Chinese invention patent application number 202010764284.7, after the robot finishes its edge-walking in a preset edge direction, it identifies the door at the location of the reference segmentation boundary line based on the image feature information of the reference segmentation boundary line collected by the robot's camera, and marks this reference segmentation boundary line on the laser map, so that the door divides the indoor work area into different room sub-regions. However, during the robot's edge-walking in the preset edge direction, it only sets the reference segmentation boundary line around the same room area within the pre-built global laser map, without directly identifying the door frame. Even after identifying the door at the location of the reference segmentation boundary line, there is no specific control for the robot to navigate to multiple different room areas through the door at the location of the reference segmentation boundary line. Therefore, it is not yet possible to continuously divide the whole room environment into new room areas and identify the door positions of different room areas in real time without building a global map. Summary of the Invention

[0004] This application discloses a robot mapping method and a robot based on gap recognition, and the specific technical solution is as follows:

[0005] The robot mapping method based on gap recognition includes: Step A: The robot completes at least one closed-loop path by walking along walls and recognizing target gaps, and encloses at least one ring of walls with at least one target gap as the first partition; then the robot enters the untraversed area from the first partition through the recognized target gap, and continues to walk according to the preset walking pattern while continuing to recognize target gaps; then proceed to Step B; Step B: Whenever the robot recognizes a new target gap, the robot does not pass through the new target gap, but continues to walk according to the preset walking pattern and recognize target gaps until the robot completes a closed-loop area according to the preset walking pattern, and marks the closed-loop area as the target partition. Then the robot enters the untraversed area from the target partition through the recognized new target gap, and continues to walk according to the preset walking pattern while continuing to recognize target gaps until the robot can no longer recognize new target gaps, and the robot completes the region division.

[0006] The technical advantages of this application are as follows: By executing steps A and B, the robot identifies target gaps while walking along the wall. After completing the first loop, it forms the first partition and establishes a corresponding map. Then, based on the first partition, it enters untraversed areas through the identified target gaps. It continues to identify target gaps and walks a closed loop according to a preset walking pattern to divide a target partition. Incremental mapping is then performed based on individual target partitions. This process is recursively repeated across all room areas until no new target gaps are identified, at which point global mapping is completed, resulting in a complete map. This eliminates the need to pre-traverse the entire work area before starting partitioning or mapping. By identifying target gaps in each partition, the efficiency of both work and mapping is improved. Compared to existing technologies, this application does not require additional markers on the door. The robot only needs the gap feature formed by the door frame on the wall to be within its field of vision to identify the target gap, thereby locating the door frame and partitioning it. This achieves door frame location and area division marking in indoor and outdoor environments using a relatively low-computing-power algorithm.

[0007] Further, the specific method of step A includes: Step A1, the robot searches for a wall, walks along the wall and identifies target gaps, while building a map, and walks along the target gap when it is identified, until the robot has walked at least one closed loop path, obtains at least one ring of wall chains with at least one target gap, and encloses the at least one ring of wall chains with at least one target gap into the first partition, and sets up a partition map based on the first partition; then execute step A2; Step A2, the robot enters the untraversed area from the first partition through the target gap identified in step A1; then the robot walks according to a preset walking mode and continues to identify target gaps; then execute step B. Step A1 identifies multiple vertical projection lines of the wall located on the same plane or curved surface. By identifying the target gap, the relative positional relationship between different batches of continuously arranged vertical projection lines of the wall can be obtained. Then, step A2 uses the target gap as a boundary to effectively identify each independent space in the environment. As can be seen from the technical solution composed of steps A1 and A2, this application obtains the closed-loop path and the target gap, which helps to divide the first partition in the environment, that is, the first independent space; and determines the passable location information from the first independent space in the environment to the untraversed area based on the target gap. Moreover, it has good applicability to room layouts with complex layouts.

[0008] Further, the specific method of step B includes: Step B1, determining whether the robot has identified a new target gap; if yes, proceed to step B2; otherwise, proceed to step B4; Step B2, the robot continues to walk according to the preset walking mode without passing through the new target gap, while maintaining target gap identification, until the robot has walked through a closed loop area, then marks the closed loop area as a target partition, and adds the map information corresponding to the target partition to the partition map to form an incremental map; then proceed to step B3; Step B3, the robot enters the untraversed area from the target partition described in step B2 through the new target gap identified in step B1; then the robot walks according to the preset walking mode, while maintaining target gap identification; then proceed to step B1; Step B4, the robot completes the area division and sets the newly formed incremental map as the global map. During the recursive execution of steps B1 to B3, the coverage of the incremental map continuously expands, and the number of marked target partitions and target gaps increases. Until step B4 is executed, the latest incremental map has been updated to the global map, establishing an overall map of each target partition and the first partition that the robot has walked through in a target area. Compared with the existing technology that requires the robot to walk along the boundaries of each partition in advance and then build a map for each partition, steps A1 to A2 and steps B1 to B4 build the map and plan the partitions while walking, and record the position leading to the untraversed area and the boundary position of different partitions in the map when the target gap is identified, thus speeding up the robot's mapping and area division efficiency.

[0009] Further, in step A1, the method for the robot to search for walls includes: the robot acquiring environmental images, extracting vertical projection lines of the walls from the environmental images, and then identifying each combination of multiple vertical projection lines of the walls located in the same plane or the same curved surface as the wall to be searched. When the robot walks along the wall, each time it walks in the same direction, the plane or curved surface containing the combination of multiple vertical projection lines of the walls extracted in that same direction is regarded as a wall extending in one direction, i.e., a wall.

[0010] Further, in step A1, the method for the robot to complete a closed-loop path includes: Step A101, when the robot identifies the current wall, the robot walks along the current wall in a preset clockwise direction, while determining whether the robot has identified the target gap. If yes, proceed to step A102; otherwise, proceed to step A103. Step A102, determine whether the robot has walked back to the preset edge starting point. If yes, it is determined that the robot has completed a closed-loop path; otherwise, proceed to step A103. Step A103, the robot walks along the boundary formed by the location of the target gap mentioned in step A101, while maintaining the search wall; then proceed to step A104. Step A104, when the robot identifies the next wall, the robot updates the next wall to the current wall, and then proceeds to step A101. Wherein, when the robot completes a closed-loop path, the robot forms a wall chain with at least one target gap reserved, consisting of the walls and target gaps identified sequentially in steps A101 to A104, in a preset clockwise direction. When the robot completes a closed-loop path, it forms a wall chain with at least one target gap in the preset clockwise direction by sequentially identifying each wall and each target gap in steps A101 to A104; the projection lines of each wall and each target gap identified in steps A101 to A104 on the ground form a continuous line segment to form a complete closed loop.

[0011] Furthermore, in a frame of environmental image acquired in real time by the robot, the target gap is located between two adjacent walls; the target gap is surrounded by vertical projection lines of the walls on opposite sides of the two adjacent walls, forming two vertical projection lines corresponding to the target gap; wherein, the pixel distance between the two endpoints of the target gap is within a preset width threshold range, and the pixel distance between the intersection of the extensions of the two vertical projection lines corresponding to the target gap and the nearest endpoints of the two vertical projection lines corresponding to the target gap is within a preset projection distance threshold range; wherein, the target gap is used to connect the target partitions marked in each of the two adjacent executions of step B2, or to connect the first partition and the target partition marked in the first execution of step B2. In summary, the positional relationship between the two vertical projection lines corresponding to the target gap is determined.

[0012] Furthermore, after the robot completes the area division in step B4, it obtains the position information of each wall and the position information of the target gap in different target zones. Then, the robot walks along each wall in sequence and passes through each target gap in sequence to complete the vertical projection lines of each wall or the wall that makes up the wall. When completing the vertical projection lines of the wall, the robot can quickly move along the walls throughout the house, which plays the role of checking for omissions and improving the boundaries of the target zones.

[0013] Furthermore, the method for robot target gap recognition includes: the robot acquiring an environmental image and extracting multiple straight line segments from the image; based on the length, angle, and quantity characteristics of the line segments, selecting two reference vertical projection lines and one reference horizontal projection line that intersect from the multiple straight line segments; based on preset door frame size conditions, selecting two wall vertical projection lines and one door lintel line from the selected intersecting reference vertical projection lines and one door lintel line, and determining that the two wall vertical projection lines and one door lintel line form the target gap. By selecting the two intersecting reference vertical projection lines and one reference horizontal projection line, the accuracy of the robot in recognizing the door frame is improved.

[0014] Further, the method for selecting two reference vertical projection lines and one reference horizontal projection line that form an intersection relationship from the multiple straight line segments based on the line segment length characteristics, angle characteristics, and quantity characteristics includes: step A111, selecting straight line segments perpendicular to the ground from the multiple straight line segments; then, among the selected straight line segments perpendicular to the ground, selecting straight line segments with a length greater than a preset wall height threshold and marking them as reference vertical projection lines; then executing step A112; step A112, determining whether the number of reference vertical projection lines marked in step A111 is less than the value two. If yes, it is determined that the robot cannot filter out two vertical projection lines of the wall from the environmental image; otherwise, proceed to step A113. Step A113: Within the preset projection distance threshold range corresponding to the center of the environmental image, filter out straight line segments whose length is within the preset width threshold range, and then mark the filtered straight line segments whose length is within the preset width threshold range as reference horizontal projection lines; then proceed to step A114. Step A114: Determine whether the number of reference horizontal projection lines marked in step A113 is less than the value one. If yes, it is determined that the robot cannot filter out the door beam line from the environmental image; otherwise, proceed to step A115. Step A115: Filter out reference horizontal projection lines that conform to the door structure by enumerating reference vertical projection lines and reference horizontal projection lines, and then proceed to step A116. The reference horizontal projection line that conforms to the door structure is the reference horizontal projection line that intersects with the two reference vertical projection lines. Step A116: Determine if the number of reference horizontal projection lines conforming to the door structure selected in step A115 is greater than one. If yes, proceed to step A117; otherwise, determine that the robot cannot filter the door frame line from the environmental image. Step A117: Obtain multiple sets of two intersecting reference vertical projection lines and one reference horizontal projection line. Then, in each set of intersecting reference vertical projection lines and one reference horizontal projection line, mark the two reference vertical projection lines as two wall vertical projection lines and mark the one reference horizontal projection line as a door frame line. The extensions of the two reference vertical projection lines intersect. In summary, by executing steps A111 to A117, two wall vertical projection lines and one door frame line are determined as candidate door frame segments. Then, based on the positional relationship between the center point of each door beam line and the intersection of the extensions of the two vertical projection lines of the wall, the robot determines the orientation information of the door frame where the door beam line is located relative to the robot's current position. This is also equivalent to the orientation information of the door beam line relative to the robot's current position in the environmental image.

[0015] Furthermore, among the two reference vertical projection lines and one reference horizontal projection line that form an intersecting relationship, the endpoint closest to the intersection of the extensions of the two reference vertical projection lines is set as a corner point, and then the corner points of each reference vertical projection line are connected to form the reference horizontal projection line, so as to form a reference horizontal projection line that conforms to the door structure.

[0016] Further, the method for selecting two wall vertical projection lines and one door beam line to form the door frame from the two reference vertical projection lines and one reference horizontal projection line that form an intersection relationship, based on the preset door frame size conditions, includes: step A118, marking the set of two reference vertical projection lines and one reference horizontal projection line that form an intersection relationship determined in step A117 as a set of candidate door frame lines; then executing step A119; step A119, determining whether the physical distance between the vertical corner lines corresponding to the two reference vertical projection lines in the set of candidate door frame lines is within the preset door width distance range, if yes, executing step A120, otherwise, no two wall vertical projection lines to form the door frame can be selected; wherein, the robot uses a depth sensor to detect the physical distance between the vertical corner lines corresponding to the two reference vertical projection lines; step A120, calculating one of the door beam lines in the set of candidate door frame lines. The ratio between the length of the reference horizontal projection line and the physical distance is used to calculate the length of the vertical corner line corresponding to each reference vertical projection line based on this ratio and the length of each reference vertical projection line. Then, step A121 is executed. Step A121: Determine whether the length of the vertical corner line corresponding to each reference vertical projection line in a set of candidate door frame lines is within the preset door frame height range. If yes, mark the two reference vertical projection lines in a set of candidate door frame lines as two wall vertical projection lines used to form the door frame, and mark one reference horizontal projection line in a set of candidate door frame lines as a door beam line used to form the door frame; otherwise, no two wall vertical projection lines used to form the door frame can be selected. The target gap includes the door frame. The reference vertical projection line is the projection line formed by the robot collecting the vertical corner line into the coordinate system of the environmental image. The vertical corner line is perpendicular to the ground where the robot walks. In summary, this application converts the vertical projection lines from pixel size to physical size by performing steps A118 to A121, and on the basis of the physical size, determines and obtains two vertical projection lines of the wall surface and one door beam line used to form the door frame. It eliminates the interference of misjudgment of door leaf and side wall lines perpendicular to the ground, constructs a simplified model of the door frame, and obtains the vertical projection lines of the wall surface and door beam line that conform to the simplified model of the aforementioned door frame. Correspondingly, a complete and accurate door frame is identified in the environmental image.

[0017] Further, in step A121, the intersection points formed by the two vertical projection lines of the wall marked within a set of candidate door frame lines and the door beam line marked within the same set of candidate door frame lines in step A121 are marked as corner points, thus obtaining two corner points; the angle formed by the two corner points and the center of the environmental image is greater than a preset angle threshold; wherein, the length of each door beam line marked within the same set of candidate door frame lines in step A121 is greater than a preset door beam projection length; wherein, the extensions of the two reference vertical projection lines within the same set of candidate door frame lines intersect. This reflects the positional relationship between the two vertical projection lines of the wall within the environmental image, simplifying the door beam model in terms of angle features and door beam line length features.

[0018] A robot equipped with vision sensors is used to execute a robot mapping method. The method includes steps A and B to simultaneously identify target gaps and divide target areas. For step A, the robot specifically executes steps A1 and A2 to divide the environment into its first area. For step A1, the robot specifically executes steps A101 to A104 to walk along a wall, completing a closed-loop path and forming a chain of walls with at least one target gap, thus forming the first area. For step A1, the robot further executes steps A111 to A117 to determine potential areas. The robot selects two vertical projection lines of the walls and one lintel line that form the door frame. For step A1, the robot also performs steps A118 to A121 to convert the vertical projection lines from pixel size to physical size. Based on the physical size, it determines the two vertical projection lines of the walls and one lintel line that form the door frame, eliminating the interference of misjudgment of door leaf and side wall lines perpendicular to the ground, and constructing a simplified model of the door frame. Based on this simplified model of the door frame, the robot divides the room area in the indoor working area into a room area that closely resembles the actual environment, improving the rationality of the robot's zoning and enabling faster room cleaning.

[0019] Furthermore, the visual sensor employs a camera; the camera lens of the robot is mounted facing the ceiling of the indoor room area where the robot is located, so that the camera's field of view covers the surface of the ceiling and the space below it. Attached Figure Description

[0020] Figure 1 This is a flowchart of a robot mapping method based on gap recognition disclosed in an embodiment of this application.

[0021] Figure 2 This is a schematic diagram of a door frame to be identified in an environmental image disclosed in an embodiment of this application. The diagram shows a vertical projection line A1B1 on the wall and a door beam line B1C1 captured by the robot in front of or directly below the door frame. The robot's camera is set to face the ceiling.

[0022] Figure 3 This is a flowchart of the specific steps included in the sequential execution of steps A and B as disclosed in an embodiment of this application.

[0023] Figure 4 This is a flowchart of a method for a robot to complete a closed-loop path in step A1 of an embodiment of this application.

[0024] Figure 5 This application discloses a flowchart of a method for selecting one reference horizontal projection line and two reference vertical projection lines that form an intersecting relationship before a robot identifies a target gap.

[0025] Figure 6 This application discloses a flowchart of a method for a robot to select two vertical projection lines of the walls and one lintel line to form a door frame, according to one embodiment of the present application. Detailed Implementation

[0026] The technical solutions of the embodiments of this application will be described in detail below with reference to the accompanying drawings. To further illustrate the embodiments, this application provides accompanying drawings. These drawings are part of the disclosure of this application and are mainly used to illustrate the embodiments, and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments.

[0027] In a home environment, the position of a door frame is relatively fixed, while the door is rotatably installed within the frame. The door serves as a passageway connecting two rooms, and the width and shape of the door frame have standardized dimensions. Currently, robots determine the key boundaries connecting two rooms in a home environment by recognizing the position of the door frame. However, this involves collecting and combining door line features from multiple dimensions while the robot is stationary (insufficient sample selection will prevent adaptation to various door types). Alternatively, door line features can be collected using binocular vision or laser scanning, and multiple pairs of template values ​​can be matched for recognition. Both methods require pre-constructing a global map and marking the recognized values ​​within it for region division. This results in high sensor design costs and computational complexity, impacting the robot's efficiency in cross-regional navigation and regional mapping within the home environment.

[0028] To address the aforementioned technical issues, this application discloses a robot mapping method based on gap recognition. The robot mapping method is executed by a robot. To achieve rapid response and improve mapping efficiency, the robot can use a monocular camera to acquire images and identify walls and gaps within the acquired wall images. The robot can simultaneously acquire and identify walls and gaps while building a map. Of course, using a binocular camera or a depth sensor for image acquisition and recognition can also meet the corresponding recognition efficiency and zonal mapping effect.

[0029] See Figure 1 It can be seen that the robot mapping method includes:

[0030] Step A: The robot completes at least one closed-loop path by walking along the wall and identifying target gaps, forming the first partition by enclosing at least one chain of walls with at least one target gap. The prerequisite for the robot to walk along the wall and identify target gaps is that the robot first searches for the physical elements that make up the wall. These physical elements can be images of vertical corner lines, arranged along a certain direction to form the wall, thus establishing the foundation for the robot's wall-walking. The robot's target gap identification action and its wall-walking action in Step A are performed simultaneously. When a robot identifies a target gap in a wall, it marks a door frame within the wall and then walks along the marked door frame. This can be understood as the robot continuing to walk along the wall. By walking along the wall and identifying target gaps in this way, the robot can continuously walk through multiple closed-loop paths within the same room area without entering a new area through a target gap. Each closed-loop path corresponds to the collection and combination of data to form a wall chain (not necessarily a closed wall chain, but it will be composed of multiple links connected together. Each link can be regarded as parallel to the path the robot walks along the wall, and also as the horizontal outline of the wall). At least one target gap will be identified in the combined wall chain.

[0031] To improve mapping and region segmentation efficiency, when the robot completes its first closed-loop path, it encloses at least one ring of walls with at least one target gap to form the first zone. In the actual scenario of planning a room area, the robot completes a loop to enclose the first room area using the collected vertical corner lines and target gaps. This serves as the first zone the robot divides within a target area, and a map of the first zone is constructed accordingly. At least one door frame is set on the boundary of the first zone, initially providing only a relatively complete room map. Furthermore, the robot uses a monocular camera for visual recognition, enabling rapid initial mapping.

[0032] Then, the robot enters the untraversed area from the first partition by using the identified target gaps. That is, based on the accessibility of the target gaps (the target gaps must be large enough for the robot to pass through), after the robot walks around the first partition along the wall outline, it first walks to an identified target gap, and then uses the target gap to enter the untraversed area (the unmapped area) from the first partition. This can be understood as entering another partition. Then, in the other partition, it walks according to a preset walking mode and continues to identify target gaps. The preset walking mode may not be the wall-walking mode. In the other partition, it may adopt a bow-shaped walking mode, opening a walking mode with higher area coverage, and still continuing to identify target gaps in the untraversed area. It is also allowed to overlay the constructed map in this walking mode, especially to overlay the map on the first partition to achieve incremental mapping; then proceed to step B.

[0033] Step B: Whenever the robot identifies a new target gap, the robot does not pass through the new target gap. The new target gap is set to be different from the target gap already identified in the first partition or untraversed area disclosed in Step A. The robot continues to walk and identify target gaps according to the preset walking mode, and keeps building and updating the map. For example, the robot regenerates the map every 5 minutes, continuously overlays the real-time walking trajectory onto the local map, and then updates it to the global map. The robot continues walking according to a preset walking pattern until it completes a closed loop area. This closed loop area is marked as a target partition, also considered a traversed area. This can be understood as the robot using multiple target gaps to divide a target partition, thus creating a target partition within the untraversed area disclosed in step A. At this point, the identified target gaps are located in different directions within the traversed area, eliminating the need for repeated identification. The repeatedly traversed areas and their trajectories can be overlaid and displayed on the global map. The robot then uses newly identified target gaps to enter the untraversed area from the target partition, continuing to plan new target partitions within the untraversed area. This untraversed area is now within the untraversed area described in step A, but its coverage is smaller than that described in step A. The robot continues walking according to the preset walking pattern, maintaining target gap identification. This process is repeated, traversing different untraversed areas through various target gaps, until the robot can no longer identify new target gaps. At this point, the robot has identified all target gaps, and correspondingly, the robot has completed the area division, creating all target partitions within the target area.

[0034] The technical advantage of this application is that, by executing steps A and B, the robot identifies target gaps while walking along the wall, forming the first partition and establishing the corresponding map after completing the first loop. Then, based on the first partition, it enters the untraversed area through the identified target gaps, and continues to identify target gaps and walks through a closed loop area according to a preset walking pattern to divide a target partition. Incremental mapping is then performed based on a single target partition. This process is repeated recursively through each room area until no new target gaps are identified, at which point global mapping is completed and a complete map is obtained. This eliminates the need to pre-traverse the entire work area before starting partitioning or mapping, and improves work efficiency and mapping efficiency by identifying target gaps in each partition.

[0035] Compared with existing technologies, this application does not require adding extra markers to the door. It only requires the gap feature formed by the door frame on the wall to appear within the perception field of the robot of this application to identify the target gap, thereby locating the door frame and dividing it into zones based on the door frame. This achieves door frame positioning and zone division marking in indoor and outdoor environments through a relatively low computing power algorithm.

[0036] As one example, please refer to Figure 3 The diagram shown is a flowchart of a robot mapping method provided in a preferred embodiment of this application. The order of steps in the flowchart can be changed, and some steps can be omitted, depending on different requirements.

[0037] like Figure 3 As shown, the specific method of step A includes:

[0038] Step A1: The robot searches for walls, walks along the walls, and identifies target gaps while simultaneously building a map. Specifically, it collects images of the walls and target gaps, extracts pose information of image features such as points and lines, and marks them on the map for real-time mapping. When the robot identifies a target gap, it walks along the gap. If it passes the target gap, it continues walking along the wall to the next target gap. This continues until the robot completes a closed-loop path, acquiring at least one wall chain with at least one target gap. This wall chain is then used to form the first partition, and a partition map is set based on the first partition. Then, step A2 is executed. In step A1, each time the robot completes a closed-loop path, it acquires a wall chain with at least one target gap. The robot sets this wall chain with at least one target gap as the outline of the first partition and reflects it on the map in real time, updating it to a partition map.

[0039] In step A1, the method for the robot to search for walls includes: the robot acquiring environmental images using a monocular camera, whose field of view can cover at least all sidewalls of the wall, multiple vertical line segments resembling door frames, and door lintel lines; then, the robot extracts the vertical projection lines of the walls from the environmental images, and identifies each combination of multiple vertical projection lines located in the same plane or curved surface as the wall to be searched. The combination of multiple vertical projection lines in the same plane or curved surface corresponds to parallel vertical corner lines in the robot's actual walking environment, forming a wall side-by-side. When the robot walks along the wall, each time it moves in the same direction, the plane or curved surface containing the combination of multiple vertical projection lines extracted in that direction is considered a wall extending in that direction, i.e., a wall.

[0040] In step A1, the robot can determine the boundary of the corresponding independent space area based on the combination of vertical projection lines on the wall. The target gap is set on the boundary of the independent space area. The robot crossing the target gap can be understood as the robot crossing the boundary of the independent space area. Thus, the boundaries of all independent space areas in the environment and the number of independent space areas can be obtained. The independent space area can refer to an independent room or an independent open space.

[0041] The robot maps while walking along the wall, minimizing its movement along the edges of isolated obstacles in order to increase speed. It allows the robot to collide with the wall and does not impose specific restrictions on the distance between the robot's side and the wall.

[0042] Step A2: The robot identifies the target gaps in Step A1. Specifically, after identifying all target gaps and setting the partition map in the first partition, the robot first moves towards one of the target gaps identified in Step A1, then leaves the first partition and enters the untraversed area through that target gap. The robot then moves according to a preset walking pattern while continuing to identify target gaps. In the newly entered untraversed area, the robot will move according to the preset walking pattern while continuing to identify target gaps to identify new target gaps and determine the new partitions connected by these new target gaps. Then, Step B is executed.

[0043] Step A1 identifies multiple vertical projection lines of the wall located on the same plane or curved surface. By identifying the target gap, the relative positional relationship between different batches of continuously arranged vertical projection lines of the wall can be obtained. Then, step A2 uses the target gap as a boundary to effectively identify each independent space in the environment. As can be seen from the implementation method consisting of steps A1 and A2, this embodiment obtains the closed-loop path and the target gap, which helps to divide the first partition in the environment, that is, the first independent space; and determines the passable location information from the first independent space in the environment to the untraversed area based on the target gap. Moreover, it has good applicability to room layouts with complex layouts.

[0044] Based on the above embodiments, after executing step A2, step B is executed; the specific method of step B includes:

[0045] Step B1: Determine whether the robot has identified a new target gap. If yes, proceed to step B2; otherwise, proceed to step B4. The new target gap is the gap identified by the robot in the area outside the first partition. The new target gap does not include the target gap identified in step A1.

[0046] Step B2: The robot does not pass through the new target gap, but only marks the location of the new target gap on the map. The robot continues to walk according to the preset walking pattern while continuing to identify target gaps until the robot has walked through a closed loop area. The closed loop area is the total area that the robot has walked through according to the preset walking pattern without passing through any target gaps, and is bounded by the boundary of the wall and the boundary of the target gap location. The closed loop area is then marked as the target partition, and the map information corresponding to the target partition is added to the partition map to form an incremental map. Then, step B3 is executed. In step B2, the robot walks within the target partition according to the preset walking pattern, without passing through the new target gap to enter the new partition, and continues to walk and map within the original target partition. For example, when the robot walks a bow-shaped path, it does not bow through the target gap, but continues to walk the bow-shaped path within the original partition, so that the robot can keep walking the bow-shaped path within a closed loop area and continuously identify the updated target gaps.

[0047] Step B3: The robot enters the untraversed area from the target partition described in step B2 by using the new target gap identified in step B1. Then the robot walks according to the preset walking mode and continues to identify the target gap. Then, step B1 is executed, which recursively identifies new target gaps in the new partition and continuously adds new partition maps and target gaps to the map, allowing the locations of paths repeatedly walked by the robot to be superimposed and displayed.

[0048] Step B4: The robot completes the area division and sets the newly formed incremental map as the global map. At this point, the robot has not identified any new target gaps, and has already used all identified target gaps to complete the division of all target zones within the same map. Since there are multiple room areas within the robot's indoor and outdoor work area, by identifying multiple target gaps that can represent door frames, and using these multiple target gaps as entrances and exits between corresponding two target zones (room areas), multiple target gaps and multiple target zones can be cumulatively determined and divided by executing steps A1 and A2, as well as steps B1 to B4.

[0049] During the recursive execution of steps B1 to B3, the coverage of the incremental map continuously expands, and the number of marked target partitions and target gaps increases. Until step B4 is executed, the latest incremental map has been updated to the global map, establishing an overall map of each target partition and the first partition that the robot has walked through in a target area. Compared with the existing technology that requires the robot to walk along the boundaries of each partition in advance and then build a map for each partition, steps A1 to A2 and steps B1 to B4 build the map and plan the partitions while walking, and record the position leading to the untraversed area and the boundary position of different partitions in the map when the target gap is identified, thus speeding up the robot's mapping and area division efficiency.

[0050] As one embodiment, the flowchart of the method for the robot to complete a closed-loop path in step A1 is as follows: Figure 4 As shown, it specifically includes:

[0051] Step A101: When the robot detects the current wall, it walks along the wall in a preset clockwise direction. Specifically, it walks along the wall in a preset clockwise direction from a preset edge starting point. Simultaneously, it determines whether the robot has detected the target gap. If yes, proceed to step A102; otherwise, proceed to step A103. The preset clockwise direction can be clockwise or counterclockwise. For a wall, it can be distinguished as the current wall and the next wall based on the search time and search position. The method of defining a wall using a vertical projection line is described in the corresponding embodiment of step A1 above and will not be repeated here. When executing step A101, after detecting the current wall, the robot first walks to the front of the current wall and maintains a certain edge distance from it, thus determining the preset edge starting point. The preset edge starting point can be located vertically to the current wall, and the distance from the preset edge starting point to the current wall is between 0.5cm and 10cm, which can represent the distance between the robot's edge closest to the wall and the current wall.

[0052] Step A102: Determine whether the robot has walked back to the preset edge starting point used when the first step A101 was executed. If yes, it is determined that the robot has completed a closed loop path. If the preset edge starting point is located at the endpoint of a target gap that has been identified, the robot may repeatedly identify the same target gap at the preset edge starting point and be located directly below one side of the target gap. Otherwise, proceed to step A103.

[0053] Step A103: The robot walks along the boundary formed by the location of the target gap described in step A101, while maintaining the search wall; then proceed to step A104. It can be understood that the two sides of the target gap are different walls (each composed of different batches of continuously arranged vertical projection lines of the walls). The boundary formed by the location of the target gap is understood as directly below the target gap. The robot walks along the corresponding boundary without crossing the target gap, while simultaneously searching the next wall.

[0054] Step A104: When the robot detects the next wall, it updates the next wall to the current wall. When the robot completes the boundary formed by the location of the target gap described in step A101, it updates the position of the next wall detected by the robot to the preset edge starting point. Then, it executes step A101 to detect the target gap between two adjacent walls, or to search for the next wall every time it detects and walks along the target gap, until the robot walks back to the preset edge starting point used when it first executed step A101. The robot has completed a closed loop path.

[0055] In this embodiment, when the robot completes a closed-loop path, the robot forms a wall chain with at least one target gap reserved, consisting of the walls and target gaps identified in steps A101 to A104 in a predetermined clockwise direction; the projection lines of the walls and target gaps identified in steps A101 to A104 on the ground form a continuous line segment to form a complete closed loop.

[0056] In step A1, to search for walls and identify the target gap, the robot acquires images. In a frame of environmental image acquired in real time by the robot, the target gap is located between two adjacent walls; the target gap is surrounded by the vertical projection lines of the opposite side of the two adjacent walls, forming two vertical projection lines corresponding to the target gap; schematically, as shown... Figure 2 As shown, Figure 2 This is a schematic diagram of the environmental image captured by the robot in front of or directly below the door frame. The center point of the environmental image currently captured by the robot's camera is point O, which can represent the robot's current position. Line segment A1B1 is the vertical projection line of the wall to the left of the robot, and line segment D1C1 is the vertical projection line of the wall to the right of the robot. Figure 2 The extracted vertical projection lines A1B1, C1D1, and B1C1 of the wall surface are connected to form a target gap, which may be a door frame existing in the actual environment.

[0057] The pixel distance between the two endpoints of the target gap is within a preset width threshold range. In the vertical projection line A1B1 of the wall, the endpoint closest to the center of the environmental image is endpoint B1, and in the vertical projection line C1D1 of the wall, the endpoint closest to the center of the environmental image is endpoint C1. The pixel distance between the two endpoints of the target gap can be the pixel distance between endpoint B1 and endpoint C1, or the pixel distance between endpoint A1 and endpoint D1. When the pixel distance between endpoint B1 and endpoint C1 is the lower limit of the preset width threshold range, the pixel distance between endpoint A1 and endpoint D1 is the upper limit of the preset width threshold range.

[0058] Preferably, the minimum room width is typically between 60cm and 100cm, and the physical distance range calculated from the preset width threshold range is between 60cm and 100cm. The physical distance between endpoint A1 and endpoint D1 is 100cm (which will be smaller when converted to the pixel length occupied in the image), and the physical distance between endpoint B1 and endpoint C1 is 60cm (which will be smaller when converted to the pixel length occupied in the image).

[0059] The pixel distances between the intersection of the extended lines of the two vertical projection lines corresponding to the target gap and the nearest endpoints of the two vertical projection lines corresponding to the target gap are all within a preset projection distance threshold range; Figure 2 In the projection, the extension of the vertical projection line A1B1 on the wall intersects with the extension of the vertical projection line C1D1 on the wall. Preferably, the intersection point of the extension of the vertical projection line A1B1 on the wall and the extension of the vertical projection line C1D1 on the wall is point O. The pixel distance between point O and the nearest endpoint B1 of the vertical projection line A1B1 on the wall is equal to the length of line segment OB1, and the pixel distance between point O and the nearest endpoint C1 of the vertical projection line C1D1 on the wall is equal to the length of line segment OC1. Therefore, the physical distance range calculated from the preset projection distance threshold range is preferably 0 to 0.2m.

[0060] As those skilled in the field of machine vision know, converting pixel distance (the coordinate distance between two pixels) in an image to physical distance in the actual environment involves conversion factors determined by camera parameters, including focal length, field of view, and sensor size. Therefore, converting pixel distance to physical distance based on camera focal length and pixel size is a conversion method mastered by those in the field of machine vision.

[0061] In this application, the target gap is used to connect the target partitions marked in two adjacent executions of step B2, or to connect the first partition and the target partition marked in the first execution of step B2. If both the first partition and the target partition are room areas, the target gap represents a door frame. Therefore, the preset width threshold range allows the robot's body to pass through, correspondingly constraining the preset projection distance threshold range. In summary, the positional relationship between the two vertical projection lines of the wall corresponding to the target gap is determined.

[0062] Based on the aforementioned embodiments, after the robot completes the area division in step B4, it obtains the position information of each wall in different target zones and the position information of the target gaps, all of which are recorded in the global map. The robot can then use the position information of each wall and the position information of the target gaps marked in the global map to perform path planning and target gap location. Then, the robot walks along each wall in sequence and passes through each target gap in sequence to complete each wall or the vertical projection lines of the wall surfaces. When completing the vertical projection lines of the wall surfaces, the robot can quickly move along the walls throughout the house, which plays the role of checking for omissions and improving the boundaries of the target zones.

[0063] Understandably, the robot identifies the environmental space in different target zones, whether under user control or in automatic mode. These target zones can refer to indoor rooms, outdoor rooms, or a combination of indoor and outdoor rooms.

[0064] It should be noted that when the robot detects that it has walked to the location of the target gap marked on the map, and detects that the distance between the location of the target gap and the target gap is less than or equal to a preset value, the robot is controlled to walk forward in the direction of the target gap; when the robot detects that the distance between itself and the target gap is zero, the robot is controlled to continue walking forward and enter other rooms.

[0065] As one embodiment, a method for a robot to identify target gaps includes:

[0066] The robot acquires environmental images and extracts multiple straight line segments from them. Preferably, the robot can identify the straight line segments in the image using various edge detection algorithms, such as vertical and horizontal corner lines. Reference vertical and horizontal projection lines that form an intersection relationship are extracted from the environmental image to represent these segments. Specifically, the extensions of two reference vertical projection lines intersect, creating an intersection relationship. In the actual environment where the robot moves, the vertical corner lines represent line segments perpendicular to the floor of indoor and outdoor room areas. The vertical and horizontal corner lines are perpendicular to each other, but the reference vertical projection lines are not necessarily perpendicular to the horizontal corner lines.

[0067] Generally, after the robot can identify straight line segments in an image using various edge detection algorithms, the robot will use Hough transform to calculate the angle of each straight line segment from the environmental image (which can be pre-binarized) (which can be obtained based on the slope of the equation in which the extracted straight line segment is located). Then, the robot selects straight line segments that can represent the post line, beam line, side wall line, etc., based on the length and angle of the straight line segments.

[0068] In this embodiment, in order to ensure that the camera's field of view fully covers the door frame, the robot's camera lens is mounted facing the ceiling. Therefore, the camera's field of view can cover the ceiling above the robot and the area below the ceiling. If the door post perpendicular to the ground and the camera are facing the same direction, then based on the perspective principle of the lens, the extensions of the two reference vertical projection lines in the environmental image will eventually intersect.

[0069] Based on the characteristics of line segment length, angle, and quantity, two reference vertical projection lines and one reference horizontal projection line that form an intersection relationship are selected from the multiple line segments. Thus, the robot can exclude reference vertical projection lines and reference horizontal projection lines that cannot form an intersection relationship from three judgment factors: the length characteristics of a single line segment, the angle characteristics between two line segments, and the cumulative extracted number of line segments, thereby reducing the number of line segment samples required to screen vertical projection lines on the wall and door beam lines.

[0070] Based on preset door frame size conditions, two vertical wall projection lines and one door lintel line are selected from the two reference vertical projection lines and one reference horizontal projection line that intersect, forming the target gap. Specifically, the two selected vertical wall projection lines and one door lintel line intersect and form a gap towards the ground. The preset door frame size conditions further refine the aforementioned line segment length characteristics, improving the accuracy of the robot in recognizing door frames.

[0071] Since the two vertical projection lines of the walls and the lintel line that form the door frame are combinations of the actual door frame's projection lines in the environmental image, the two vertical projection lines intersect. The positional relationship between the intersection of the extensions of these two vertical projection lines and the center of the lintel line represents the distribution direction, azimuth angle, and other information of the door frame (or the target gap) relative to the robot's current position. When the robot determines the center of the lintel line, the door frame is positioned.

[0072] In some implementations, the endpoints of the two vertical projection lines of the wall surface that form the door frame are set as corner points, and then the corner points are connected to form a reference door beam line. The reference door beam line can be parallel to the reference horizontal projection line (i.e., the door beam line) directly extracted from the environmental image.

[0073] As one embodiment, the method for selecting two reference vertical projection lines and one reference horizontal projection line that form an intersection relationship from the plurality of line segments based on line segment length characteristics, angle characteristics, and quantity characteristics, such as... Figure 5 As shown, it specifically includes:

[0074] Step A111: Select the line segments perpendicular to the ground from the multiple line segments. Here, "perpendicular" is defined as the line segment that is perpendicular to the ground of the robot's actual walking environment (including vertical corner lines) and is displayed / projected in the environmental image; then mark the selected line segments perpendicular to the ground as reference vertical projection lines; then proceed to step A112.

[0075] Step A112: Determine if the number of reference vertical projection lines marked in step A111 is less than two. If yes, it is determined that the robot cannot filter out two vertical projection lines of the wall from the environmental image, and the robot pauses the execution of the robot mapping method; otherwise, proceed to step A113. This eliminates invalid reference vertical projection lines.

[0076] Step A113: Within the preset projection distance threshold range corresponding to the center of the environmental image, filter out straight line segments whose length is within the preset width threshold range, and then mark the filtered straight line segments whose length is within the preset width threshold range as reference horizontal projection lines; then execute step A114; Since the door beam line is generally set above the door frame and sandwiched between two reference vertical projection lines, the door beam line will be projected into the environmental image close to the center of the environmental image. Therefore, by setting a preset projection distance threshold range at the center of the environmental image, a reference horizontal projection line that can represent the door beam line can be searched at close range.

[0077] Step A114: Determine whether the number of reference horizontal projection lines marked in step A113 is less than one. If so, determine that the robot cannot filter out the gate beam lines from the environmental image, and suspend the robot mapping method. Otherwise, proceed to step A115 to eliminate invalid reference horizontal projection lines.

[0078] Step A115: Filter out reference horizontal projection lines that conform to the door structure by enumerating reference vertical projection lines and reference horizontal projection lines, and then execute step A116; wherein, the reference horizontal projection line that conforms to the door structure is a reference horizontal projection line that intersects with two reference vertical projection lines; therefore, it can be understood that there is at least one reference horizontal projection line and at least two reference vertical projection lines that conform to the door structure, and there are two reference vertical projection lines that intersect with both ends of a reference horizontal projection line respectively, and in addition, the extensions of the two reference vertical projection lines intersect.

[0079] Step A116: Determine whether the number of reference horizontal projection lines that conform to the door structure selected in step A115 is greater than the value one. If yes, proceed to step A117. Otherwise, determine that the robot cannot select door beam lines from the environmental image, and cause the robot to pause the execution of the robot mapping method, thereby eliminating invalid reference horizontal projection lines that conform to the door structure.

[0080] Therefore, when performing step A117, there may be multiple gantry beam lines extending in the same direction. The position occupied by the gantry beam line is then determined by the connection node of the two reference vertical projection lines connected to the reference horizontal projection line.

[0081] Step A117: Obtain multiple sets of two reference vertical projection lines and one reference horizontal projection line that form an intersecting relationship; then, in each set of two reference vertical projection lines and one reference horizontal projection line that form an intersecting relationship, mark the two reference vertical projection lines as two wall vertical projection lines and mark the one reference horizontal projection line as a door lintel line; wherein, the extensions of the two reference vertical projection lines intersect, and the two reference vertical projection lines and one reference horizontal projection line that form an intersecting relationship are connected to each other to form a gap.

[0082] Step A117 is equivalent to determining that among the reference horizontal and reference vertical projection lines conforming to the door structure, there are two vertical projection lines of the wall and one door beam line that intersect. Based on step A113, within the same frame of the environment image, the pixel distance between the intersection point of the extensions of the two vertical projection lines of the wall determined in step A117 and the center of the environment image is within the range of the preset projection distance threshold.

[0083] In summary, by executing steps A111 to A117, two vertical projection lines of the walls and one door beam line are determined as candidate door frame segments. Then, based on the positional relationship between the center point of each door beam line and the intersection point of the extension lines of the two vertical projection lines of the walls, the robot determines the orientation information of the door frame containing the door beam line relative to the robot's current position, which is also equivalent to the orientation information of the door beam line relative to the robot's current position in the environmental image.

[0084] In some embodiments, among the two reference vertical projection lines and one reference horizontal projection line that form an intersecting relationship, the endpoint of each reference vertical projection line that is closest to the intersection of the extensions of the two reference vertical projection lines is set as a corner point, and then the corner points of each reference vertical projection line are connected to form the reference horizontal projection line, so as to form a reference horizontal projection line that conforms to the door structure.

[0085] It should be noted that there is usually a wall above the door. To support this part of the wall, a precast wooden or reinforced concrete beam, called a door beam, is needed, which can reduce the impact of wall settlement on the door frame. In the environmental image of this embodiment, the door beam can be represented by the reference horizontal projection line through image recognition algorithm processing. On both sides below the door beam are two doorposts perpendicular to the ground. Similarly, in the environmental image of this embodiment, they can be represented by the reference vertical projection line through image recognition algorithm processing. Then, two adjacent reference vertical projection lines and one door beam line can form a door frame, forming a simplified door model.

[0086] As one embodiment, the method of selecting two vertical wall projection lines and one door lintel line to form the door frame from two reference vertical projection lines and one reference horizontal projection line that intersect, based on preset door frame size conditions, is as follows: Figure 6 As shown, it specifically includes:

[0087] Step A118: Mark the two reference vertical projection lines and one reference horizontal projection line that intersect as a set of candidate door frame lines, so that there are two wall vertical projection lines and one door beam line that intersect in a set of candidate door frame lines; then execute step A119.

[0088] Step A119: Determine whether the physical distance between the vertical corner lines corresponding to the two reference vertical projection lines within a set of candidate door frame lines is within the preset door width distance range. If yes, proceed to step A120; otherwise, no two vertical projection lines for forming the door frame can be selected, thus eliminating two reference vertical projection lines with inappropriate spacing. The robot uses a depth sensor to detect the physical distance between the vertical corner lines corresponding to the two reference vertical projection lines. The reference vertical projection lines are projection lines formed by the robot acquiring the vertical corner lines into the coordinate system of the environmental image, and the vertical corner lines are perpendicular to the ground where the robot walks.

[0089] In the robot's operating environment, the minimum room width ranges from 60cm to 100cm, and correspondingly, the preset door width distance is preferably between 60cm and 100cm. The robot's depth sensor's detection field of view also needs to cover the area between the doorpost lines on both sides of the door frame.

[0090] Step A120: Calculate the ratio between the length of a reference horizontal projection line within the set of candidate door frame lines and the physical distance. Then, based on this ratio and the length of each reference vertical projection line, calculate the length of the vertical corner line corresponding to each reference vertical projection line. This converts the reference vertical projection line from pixel size to physical size and represents it by the length of the vertical corner line. This ratio also applies to the physical size conversion operation of the reference horizontal projection line within the same frame of the environment image. Then, execute step A121. The length of the reference vertical projection line belongs to the pixel length occupied by the reference vertical projection line in the environment image. After conversion to the length of the vertical corner line, the actual height of the door frame is obtained so that the actual existing door frame can be determined in step A1.

[0091] Step A121: Determine whether the length of the vertical corner line corresponding to each reference vertical projection line within a set of candidate door frame lines is within the preset door frame height range. If so, mark the two reference vertical projection lines within the set of candidate door frame lines as the two wall vertical projection lines used to form the door frame, and mark one reference horizontal projection line within the set of candidate door frame lines as a door beam line used to form the door frame, thereby determining the door frame. The target gap includes the door frame, that is, by performing step A121, the door frame and its constituent straight line segments (which can correspond to the projection line segments in the environmental image) are identified in the wall. Otherwise, the two wall vertical projection lines used to form the door frame cannot be filtered out, thus eliminating wall vertical projection lines with unreasonable heights. The preset door frame height range is set to 1.6m to 2.5m, which conforms to the door frame height characteristics in the room.

[0092] In summary, this embodiment converts the vertical projection lines from pixel size to physical size by executing steps A118 to A121, and determines the two vertical projection lines of the wall and one door beam line used to form the door frame based on the physical size. It eliminates the interference of misjudgment of door leaf and side wall lines perpendicular to the ground, constructs a simplified model of the door frame, and obtains the vertical projection lines of the wall and door beam line that conform to the simplified model of the aforementioned door frame. Correspondingly, a complete and accurate door frame is identified in the environmental image.

[0093] It is worth noting that the vertical projection lines on the wall in this embodiment are simplified projection lines, and the wall thickness is negligible.

[0094] Of course, objects that conform to the simplified model of the aforementioned door frame, including vertical projection lines of the wall and door beams, also include square columns, side door panels, door leaves, walls between the ceiling and the door frame, thresholds, side walls, and front walls in the home environment.

[0095] In an embodiment where two vertical wall projection lines and one door lintel line can form a door frame, if two reference vertical projection lines within a set of candidate door frame lines are marked as two vertical wall projection lines for forming a door frame in step A121, and one reference horizontal projection line within a set of candidate door frame lines is marked as one door lintel line for forming a door frame in step A121, then: the intersection points formed by the two vertical wall projection lines marked in step A121 within a set of candidate door frame lines and the door lintel line marked in step A121 within the same set of candidate door frame lines are... Two corner points are obtained; the angle formed by the two corner points and the center of the environmental image is greater than a preset angle threshold, preferably 20 degrees; in step A121, the length of a door beam line marked in the same group of candidate door frame lines is greater than a preset door beam projection length, preferably 35 pixels long; moreover, the extensions of the two reference vertical projection lines in the same group of candidate door frame lines intersect, thereby reflecting the positional relationship between the two wall vertical projection lines in the environmental image, and completing the simplified door beam model in terms of angle features and door beam line length features respectively.

[0096] For illustrative purposes, see the attached document. Figure 2 It can be seen that, Figure 2 This is a schematic diagram of the environmental image captured by the robot in front of the door frame. The center of the environmental image currently captured by the robot's camera is located near point O, which is the intersection of the extensions of two vertical projection lines of the wall. The pixel distance between point O and the center of the environmental image is within the preset projection distance threshold range. The preset projection distance threshold range is used to represent the error range of the vertical corner line transformation into the pixel coordinate system. The error sources include image distortion caused by lens distortion of the camera.

[0097] In some ideal cases, point O is the center of the environment image. Then, the angle formed by corner points B1 and C1 and the center O of the environment image is angle B1OC1, which is greater than the preset angle threshold.

[0098] Line segment A1B1 is the vertical projection line of the wall on one side of the robot, extracted by the robot. Line segment D1C1 is the vertical projection line of the wall on the other side of the robot, extracted by the robot. Then, among the two endpoints of the vertical projection line A1B1, the endpoint B1 closer to point O is selected as a corner point. Among the two endpoints of the vertical projection line D1C1, the endpoint C1 closer to point O is selected as the other corner point. Then, corner point B1 and corner point C1 are connected to form line segment B1C1. Line segment B1C1 forms the door lintel line. Figure 2 The extracted vertical projection lines A1B1, C1D1, and B1C1 of the wall surface are connected to form the target gap, which is used to represent the door frame that exists in the actual environment.

[0099] In some embodiments, the robot's current position is represented by point O, which is the center of the environmental image; then the robot sets the direction from the center of the currently acquired environmental image to the center of the door beam line as the distribution direction of the door frame relative to the robot's current position, corresponding to... Figure 2 In this context, the center of the gate beam line is the midpoint H1 of the straight line segment B1C1. The direction from point O to point H1 is the distribution direction of the gate frame where the gate beam line B1C1 is located relative to the robot's current position (specifically, its pixel coordinate position in the image). It can also be understood that the robot is located in the direction of H1O of the gate frame where the gate beam line B1C1 is located, which is regarded as the robot walking along the OH1 direction to the front of the gate frame where the gate beam line B1C1 is located.

[0100] In some embodiments, the robot sets the angle between the direction from one corner point to another and the coordinate axes of the image coordinate system, or the angle transformed into the world coordinate system, as the angle information of the door lintel line, to convert it into the orientation information of the door lintel line within the outdoor / indoor room area; the direction from one corner point to another is an extension direction of the door lintel line in the image coordinate system, schematically represented as... Figure 2 Corner point B1 points in the direction of corner point C1. Specifically, the center of the portal beam line can be transformed into the world coordinate system to realize the transformation of the angle information of the portal beam line into the world coordinate system, that is, falling into the grid map and using the world coordinate system for positioning, which is suitable for use by robots during navigation and movement.

[0101] Based on the foregoing embodiments, this application discloses a robot equipped with a vision sensor, typically mounted on the top of the robot's body to cover a larger field of view. The robot is used to execute the robot mapping method mentioned in the foregoing embodiments, including executing steps A and B to simultaneously identify target gaps and divide target areas. For step A, the robot specifically executes steps A1 and A2 to divide the environment into its first partition. Regarding step A1, the robot specifically executes steps A101 to A104 to allow the robot to complete a closed-loop path along a wall and form a chain of walls with at least one target gap. This chain of walls with at least one target gap can then be used to enclose the area. The robot first divides the room into zones. For step A1, the robot further determines two vertical projection lines on the walls and one door lintel line as candidate door frame segments by executing steps A111 to A117. For step A1, the robot further converts the vertical projection lines from pixel size to physical size by executing steps A118 to A121, and determines the two vertical projection lines on the walls and one door lintel line used to form the door frame based on the physical size. This eliminates the interference of misjudgment of door panels and side wall lines perpendicular to the ground, and constructs a simplified model of the door frame. Based on this simplified model of the door frame, the robot divides the room area in the indoor working area into room areas that closely resemble the actual environment, improving the rationality of the robot's zoning and enabling faster room-by-room cleaning.

[0102] The program code corresponding to the robot mapping method disclosed in the foregoing embodiments is stored in the robot's built-in controller or memory. When the robot calls this program code, the robot is configured to execute the robot mapping method disclosed in the foregoing embodiments. Compared with the prior art, it does not require the installation of laser sensors, saving sensor costs and ensuring the mapping efficiency of the robot when navigating doorways in different room areas.

[0103] In one embodiment, the visual sensor is a camera. To achieve rapid response and improve mapping efficiency, the robot can use a monocular camera for image acquisition, identifying walls and gaps within the acquired wall images. The robot's camera lens is mounted facing the ceiling of the room where the robot is located, so that the camera's field of view covers the surface of the ceiling and the space below it. A door frame is located in the space below the ceiling, serving as an entrance / exit to different room areas. In this embodiment, the camera is positioned at the front of the robot body, with its orientation set horizontally upwards. The camera's optical axis can be approximately 90 degrees to the horizontal plane, and the environmental images acquired by the camera can at least cover the area between the door frame or the lintel of the door frame and the ceiling. This embodiment can use a single camera, maintaining multi-angle imaging while performing tasks in a single room area.

[0104] Because of the passability of a door, the same door frame can be detected from the front, back, and bottom. However, square pillars and door panels in a home environment can only be detected by the robot from a single direction. The passability of a door allows the robot's upward-facing camera to detect the same door frame from the front, back, and directly below. In the aforementioned embodiment, when the target gap is used to represent the door frame, the robot selects two reference vertical projection lines and one reference horizontal projection line that form an intersection relationship from multiple straight line segments extracted from the environmental image based on the characteristics of line segment length, angle, and quantity. The shadow lines are then selected. Based on the preset door frame size conditions, two vertical projection lines of the wall and one lintel line are selected from the two reference vertical projection lines and one reference horizontal projection line that form an intersecting relationship to form the door frame. The two vertical projection lines of the wall and one lintel line are then used to form the target gap, which is connected to form the door frame. This further eliminates the influence of multiple vertical line segments that form a door frame shape on the boundary between the front wall and the side wall of the indoor working area, such as the feature lines of square columns and the feature lines of door panels, which can cause misjudgments and improve the accuracy of door frame recognition.

[0105] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A robot mapping method based on gap recognition, characterized in that, The method comprises the following steps: Step A: the robot walks through at least one closed loop path by walking along the wall and identifying target gaps, and encloses the wall chain with at least one target gap found in at least one round into a first subarea; then the robot enters the unexplored area from the first subarea through the identified target gap, and walks according to a preset walking mode and keeps identifying target gaps; then step B is executed; Step B: whenever the robot identifies a new target gap, the robot does not pass through the new target gap, continues to walk according to the preset walking mode and identifies target gaps, until the robot walks through a closed loop area according to the preset walking mode, marks the closed loop area as a target subarea, then the robot enters the unexplored area from the target subarea through the new target gap identified, walks according to the preset walking mode and keeps identifying target gaps, until the robot does not identify a new target gap, and the robot completes the area division; The method for the robot to identify target gaps comprises the following steps: The robot collects an environment image and extracts a plurality of straight line segments from the environment image; According to the length feature, angle feature and number feature of the line segments, two reference vertical projection lines and one reference horizontal projection line forming a crossing relationship are selected from the plurality of straight line segments; According to a preset door frame size condition, two wall surface vertical projection lines and one door beam line used for composing a door frame are selected from the two reference vertical projection lines and the reference horizontal projection line forming the crossing relationship, and it is determined that the two wall surface vertical projection lines and the one door beam line used for composing the door frame enclose the target gap.

2. The robot mapping method of claim 1, wherein, The specific method of step A comprises the following steps: Step A1: the robot searches for a wall, walks along the wall and identifies target gaps, constructs a map at the same time, and walks along the target gap when a target gap is identified, until the robot walks through at least one closed loop path, obtains at least one round of wall chain with at least one target gap, encloses the wall chain with at least one target gap found in at least one round into a first subarea, and sets a subarea map according to the first subarea; then step A2 is executed; Step A2: the robot enters the unexplored area from the first subarea through the target gap identified in step A1; then the robot walks according to a preset walking mode and keeps identifying target gaps; then step B is executed.

3. The robot mapping method of claim 2, wherein, The specific method of step B comprises the following steps: Step B1: it is judged whether the robot identifies a new target gap, if yes, step B2 is executed, otherwise step B4 is executed; Step B2: the robot does not pass through the new target gap, continues to walk according to the preset walking mode and keeps identifying target gaps, until the robot walks through a closed loop area, marks the closed loop area as a target subarea, adds map information corresponding to the target subarea to the subarea map to form an incremental map; then step B3 is executed; Step B3: the robot enters the unexplored area from the target subarea in step B2 through the new target gap identified in step B1; then the robot walks according to the preset walking mode and keeps identifying target gaps; then step B1 is executed. Step B4: The robot completes the area division and sets the newly formed incremental map as the global map.

4. The robot mapping method of claim 2, wherein, In step A1, the method for the robot to search the wall includes: The robot collects environmental images, extracts vertical projection lines of the walls from the environmental images, and then identifies the combination of multiple vertical projection lines of the walls located in the same plane or the same curved surface as the wall to be searched.

5. The robot mapping method of claim 4, wherein, In step A1, the method for the robot to complete a closed-loop path includes: Step A101: When the robot detects the current wall, the robot walks along the current wall in a preset clockwise direction. At the same time, it is determined whether the robot has detected the target gap. If yes, step A102 is executed; otherwise, step A103 is executed. Step A102: Determine whether the robot has walked back to the preset edge starting point. If yes, it is determined that the robot has completed a closed loop path; otherwise, proceed to step A103. Step A103: The robot walks along the boundary formed by the location of the target gap described in step A101, while maintaining the search wall; then proceed to step A104. Step A104: When the robot detects the next wall, the robot updates the next wall to the current wall and then executes step A101. When the robot completes a closed-loop path, it forms a wall chain with at least one target gap by sequentially identifying each wall and each target gap in steps A101 to A104 in a preset clockwise direction.

6. The robot mapping method of claim 3, wherein, In a frame of environmental image captured in real time by the robot, the target gap is located between two adjacent walls; the target gap is surrounded by the vertical projection lines of the walls on the opposite side of the two adjacent walls, forming two vertical projection lines of the walls corresponding to the target gap; Wherein, the pixel distance between the two endpoints of the target gap is within a preset width threshold range, and the pixel distance between the intersection of the extensions of the two vertical projection lines of the wall corresponding to the target gap and the nearest endpoints of the two vertical projection lines of the wall corresponding to the target gap is within a preset projection distance threshold range; The target gap is used to connect the target partitions marked in two adjacent steps B2, or to connect the first partition and the target partition marked in the first step B2.

7. The robot mapping method of claim 3, wherein, After the robot completes the area division in step B4, it obtains the position information of each wall in different target zones and the position information of the target gaps. Then the robot walks along each wall in turn and passes through each target gap in turn.

8. The robot mapping method of claim 1, wherein, The method for selecting two reference vertical projection lines and one reference horizontal projection line that form an intersection relationship from the plurality of straight line segments based on the characteristics of line segment length, angle, and quantity includes: Step A111: Select straight segments perpendicular to the ground from the multiple straight segments; then, among the selected straight segments perpendicular to the ground, select straight segments with a length greater than a preset wall height threshold and mark them as reference vertical projection lines; then proceed to step A112. Step A112: Determine whether the number of reference vertical projection lines marked in step A111 is less than the value of two. If yes, it is determined that the robot cannot filter out two vertical projection lines of the wall from the environmental image; otherwise, proceed to step A113. Step A113: Within the preset projection distance threshold range corresponding to the center of the environmental image, select straight line segments whose length is within the preset width threshold range, and then mark the selected straight line segments whose length is within the preset width threshold range as reference horizontal projection lines; then proceed to step A114. Step A114: Determine whether the number of reference horizontal projection lines marked in step A113 is less than one. If yes, it is determined that the robot cannot filter out the gate beam lines from the environmental image; otherwise, proceed to step A115. Step A115: Filter out reference horizontal projection lines that conform to the door structure by enumerating reference vertical projection lines and reference horizontal projection lines, and then execute step A116; wherein, the reference horizontal projection line that conforms to the door structure is the reference horizontal projection line that intersects with the two reference vertical projection lines. Step A116: Determine whether the number of reference horizontal projection lines that conform to the door structure selected in step A115 is greater than the value one. If yes, proceed to step A117; otherwise, determine that the robot cannot select door beam lines from the environmental image. Step A117: Obtain multiple sets of two reference vertical projection lines and one reference horizontal projection line that form an intersecting relationship; then, in each set of two reference vertical projection lines and one reference horizontal projection line that form an intersecting relationship, mark the two reference vertical projection lines as two wall vertical projection lines and mark the one reference horizontal projection line as a door lintel line; wherein, the extensions of the two reference vertical projection lines intersect.

9. The robot mapping method of claim 8, wherein, Among the two reference vertical projection lines and one reference horizontal projection line that form an intersection, there exists: At the endpoints of each reference vertical projection line, the endpoint closest to the intersection of the extensions of the two reference vertical projection lines is set as a corner point. Then, the corner points of each reference vertical projection line are connected to form a reference horizontal projection line.

10. The method of claim 8, wherein, The method for selecting two vertical wall projection lines and one door beam line to form the door frame from two reference vertical projection lines and one reference horizontal projection line that intersect, based on preset door frame size conditions, includes: Step A118: Mark the two reference vertical projection lines and one reference horizontal projection line that intersect as a set of candidate door frame lines, as determined in step A117; then proceed to step A119. Step A119: Determine whether the physical distance between the vertical corner lines corresponding to the two reference vertical projection lines within a set of candidate door frame lines is within the preset door width distance range. If yes, proceed to step A120; otherwise, no two vertical projection lines of the wall surface used to form the door frame can be selected. The robot uses a depth sensor to detect the physical distance between the vertical corner lines corresponding to the two reference vertical projection lines. Step A120, calculate the ratio between the length of a reference horizontal projection line in the set of candidate door frame lines and the physical distance, and then convert the length of each reference vertical projection line into the length of the corresponding vertical corner line of the wall based on the ratio and the length of each reference vertical projection line, and then perform step A121; Step A121, determine whether the length of the vertical corner line corresponding to each reference vertical projection line in the set of candidate door frame lines is within the preset door frame height range, if yes, mark two reference vertical projection lines in the set of candidate door frame lines as two wall vertical projection lines for composing a door frame, and mark a reference horizontal projection line in the set of candidate door frame lines as a door beam line for composing a door frame; otherwise, the two wall vertical projection lines for composing a door frame cannot be screened out; wherein the target gap includes the door frame. The reference vertical projection line is a projection line formed by the robot collecting the vertical corner line of the wall into the coordinate system of the environment image, and the vertical corner line of the wall is perpendicular to the ground of the robot walking environment.

11. The robot mapping method of claim 10, wherein, Step A121 marks two wall vertical projection lines in the set of candidate door frame lines, and the intersection points of the two wall vertical projection lines and a door beam line marked in the same set of candidate door frame lines in step A121 are marked as corner points, and two corner points are obtained; the included angle formed by the two corner points and the center of the environment image is greater than a preset angle threshold. In step A121, the length of each door beam line marked in the same set of candidate door frame lines is greater than a preset door beam projection length.

12. A robot, the robot mounting a vision sensor, characterized in that The robot is used to perform the robot mapping method of any one of claims 1 to 11.

13. The robot of claim 12, wherein, The visual sensor adopts a camera; The lens of the camera of the robot is installed towards the ceiling of the indoor room area where the robot is located, so that the view angle of the camera covers the surface of the ceiling and the space below the ceiling. The lens of the camera of the robot is installed towards the ceiling of the indoor room area where the robot is located, so that the view angle of the camera covers the surface of the ceiling and the space below the ceiling.

Citation Information

Patent Citations

  • A boundary-based robot region partitioning method, chip, and robot

    CN111897334B

  • Dynamic region division method, region channel identification method and cleaning robot

    CN111459153A

  • Cross-regional channel identification method based on map image, robot and chip

    CN113925390A