Edge control method of robot, chip and robot

By distinguishing and processing edge-following and non-edge-following contour segments, and adjusting the robot's edge-following walking mode, the problem of low work efficiency caused by path loops in cleaning robots is solved, achieving efficient global edge-following cleaning and navigation.

CN116540689BActive Publication Date: 2025-11-18AMICRO SEMICONDUCTOR CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210092498.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-26
Publication Date
2025-11-18
Estimated Expiration
2042-01-26

AI Technical Summary

Technical Problem

Cleaning robots may experience path loops due to dynamic obstacles in indoor work areas, resulting in repeated walking or misjudging and completing global edge walking, leading to low work efficiency.

Method used

By distinguishing between edge-followed and edge-non-edge-followed contour segments, and combining the initial edge-following starting point and the predetermined edge-following direction to obtain the last edge-non-edge-followed contour segment, the robot's edge-following mode is adjusted to ensure that the robot stops edge-following when it determines the effective position of returning to the initial edge-following starting point or when the remaining edge-non-edge-followed contour segment trajectory length is small, and if necessary, a continuation point is set to continue edge-following.

Benefits of technology

This improves the robot's work efficiency, avoids the robot from wandering around in multiple circles in the global area and getting stuck in local areas, and ensures cleaning coverage and navigation accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116540689B_ABST
    Figure CN116540689B_ABST
Patent Text Reader

Abstract

The application discloses a kind of robot edge control method, chip and robot, the edge control method includes steps S1, according to the position relationship of initial edge starting point and not edge contour section in given edge direction obtains last not edge contour section;Step S2, according to the position relationship of initial edge starting point and last not edge contour section, and the trajectory length of last not edge contour section adjusts the mode of robot edge walking;Wherein, last not edge contour section is not edge contour section belonging to;Wherein, initial edge starting point is the position point in contour line when robot starts to execute edge walking. To improve the work efficiency of robot.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of robot edge walking, and more particularly to an edge control method, chip, and robot for a robot. Background Technology

[0002] One mode of cleaning robots is global edge-following mode, where the robot walks along the edge of the entire terrain, its direction of travel adjusted to be parallel to the edge. During global edge-following movement within an indoor work area (e.g., walking along the outline of a wall, with the robot's direction of travel parallel to the wall's outline), dynamic obstacles can cause the robot to detect and repeatedly return to the same position within a localized area (e.g., a 4m x 4m room unit). This is known as path looping. For example, if the difference between the rotation angle recorded at the current position and the rotation angle recorded at the starting point of the edge-following movement is a positive integer multiple of 360 degrees, the robot will continue edge-following within the same localized area without entering the planned cleaning state. Alternatively, when the robot detects a path loop within a localized area, it may mistakenly interpret this as having completed global edge-following movement across the entire indoor work area and stop edge-following to enter the planned cleaning state. All of these factors contribute to a decrease in the cleaning robot's efficiency. Summary of the Invention

[0003] To address the aforementioned technical deficiencies, this invention discloses a robot edge-tracing control method, a chip, and a robot. This edge-tracing control method controls the robot to stop edge-tracing when it has completely traversed the global working area (indoor working area) and returned to a valid edge-tracing starting point, or to navigate to a new valid edge-tracing starting point to continue edge-tracing when the robot is spinning or trapped in a local area within the global working area, thereby overcoming the problem of low robot work efficiency. The specific technical solution is as follows:

[0004] A method for edge-following control of a robot includes steps S1, obtaining the last non-edge-following contour segment based on the positional relationship between the initial edge-following starting point and the non-edge-following contour segment in a predetermined edge-following direction; and step S2, adjusting the robot's edge-following movement mode based on the positional relationship between the initial edge-following starting point and the last non-edge-following contour segment, as well as the trajectory length of the last non-edge-following contour segment; wherein the last non-edge-following contour segment is a non-edge-following contour segment; and wherein the initial edge-following starting point is the position point in the contour line along which the robot begins edge-following movement.

[0005] Furthermore, the method for obtaining the last non-edge contour segment based on the positional relationship between the initial edge starting point and the non-edge contour segment in the predetermined edge direction includes starting from the initial edge starting point, sequentially traversing the non-edge contour segments in the predetermined edge direction, and traversing the non-edge contour segments without repetition in the predetermined edge direction; when the last non-edge contour segment is traversed, the last non-edge contour segment is set as the last non-edge contour segment.

[0006] Furthermore, the edge control method further includes: when it is detected that the robot walks along the edge multiple times or rotates around a central position point multiple times, determining that the robot's motion path is in a loop state, and controlling the robot to execute step S1.

[0007] Furthermore, the specific method of step S2 includes controlling the robot to stop walking along the edge when the distance between the initial edge-following start point and the end point of the last non-edge-following contour segment is detected to be greater than a preset distance; and controlling the robot to stop walking along the edge when the trajectory length of the last non-edge-following contour segment is detected to be less than a preset distance; wherein, the preset distance is related to the robot's body size.

[0008] Furthermore, the specific method of step S2 also includes detecting that the distance between the initial edge-following starting point and the end point of the last non-edge-following contour segment is less than or equal to a preset distance, and detecting that the trajectory length of the last non-edge-following contour segment is greater than or equal to a preset distance, controlling the robot to move from the current position point to the effective edge-following position point of the continuation edge point, and then starting from the effective edge-following position point of the continuation edge point, following the predetermined edge-following direction, walking along the edge of the last non-edge-following contour segment.

[0009] Furthermore, if step S1 fails to obtain the last non-edge contour segment, it is determined that the non-edge contour segment does not exist, and the robot is controlled to stop walking along the edge; if step S1 obtains the last non-edge contour segment, step S2 is executed.

[0010] Further, the continuation point is the first endpoint traversed on the last non-edge contour segment according to the predetermined edge-tracing direction, such that the effective edge-tracing position of the continuation point is configured as the position point where the robot begins to walk along the edge of the last non-edge contour segment; the end point of the last non-edge contour segment is the last endpoint traversed on the last non-edge contour segment according to the predetermined edge-tracing direction; wherein, the initial edge-tracing start point and the end point of the last non-edge contour segment are connected by an edge-traced contour segment, or the initial edge-tracing start point and the end point of the last non-edge contour segment coincide; wherein, the edge-traced contour segment is the contour line traversed by the robot during its edge-tracing movement according to the predetermined edge-tracing direction; the position traversed by the robot is the effective edge-tracing position of the corresponding position point in the edge-traced contour segment.

[0011] Furthermore, the last non-edge-following contour segment is a non-edge-following contour segment that extends from the initial edge-following starting point in a direction opposite to the predetermined edge-following direction; the edge-following contour segment is the contour line that the robot follows when it moves along the edge in the predetermined edge-following direction from the effective edge-following position point of the initial edge-following starting point, and is marked in the map constructed by the robot; wherein, the edge-followable contour line includes edge-following contour segments and non-edge-following contour segments; the initial edge-following starting point is located in the edge-followable contour line.

[0012] Furthermore, the edge-adaptable contour line is a closed line formed by connecting the contour lines of unknown areas and the contour lines of obstacles in the map constructed by the robot. A closed region is formed inside the closed line, allowing the robot to walk along the edge-adaptable contour line within this closed region. Each point on the edge-adaptable contour line has a valid edge-adaptive position point within the closed region that has a preset distance from its corresponding point on the edge-adaptable contour line and is a point where the robot is allowed to pass. When the distance between the robot's current position point and the valid edge-adaptive position point of its corresponding point on the edge-adaptable contour line is less than or equal to the preset distance, the corresponding point on the edge-adaptable contour line is marked as a point in the edge-adapted contour segment. The non-edge-adaptive contour segment is the contour line in the edge-adaptable contour line other than the edge-adapted contour segments. The edge-adapted contour segments and the non-edge-adaptive contour segments are connected to form the edge-adaptable contour line.

[0013] Furthermore, the preset spacing is greater than or equal to the robot's body radius; wherein, when the robot walks along the edge contour line, the robot's current forward direction is parallel to the edge contour line it is currently following, so as to form an edge-walking posture.

[0014] Further, the predetermined edge-following direction is either clockwise or counterclockwise; wherein, when the predetermined edge-following direction is clockwise, the predetermined edge-following direction is configured as the left edge-following direction for the robot to walk along the edge, such that the position point in the outline of the obstacle along which the robot is traversed is located to the left of the robot's forward direction, wherein the initial edge-following starting point is located to the left of the robot's forward direction; wherein, when the predetermined edge-following direction is counterclockwise, the predetermined edge-following direction is configured as the right edge-following direction for the robot to walk along the edge, such that the position point in the outline of the obstacle along which the robot is traversed is located to the right of the robot's forward direction, wherein the initial edge-following starting point is located to the right of the robot's forward direction.

[0015] A chip with a built-in control program for controlling a robot to perform the edge control method.

[0016] A robot equipped with a vision sensor or a laser sensor, and the robot having the chip built-in for controlling the robot to perform the edge control method.

[0017] The beneficial technical effects of this invention are as follows: Based on distinguishing between edge-followed and non-edge-followed contour segments, this invention combines the initial edge-following starting point and the predetermined edge-following direction to obtain the last non-edge-followed contour segment. Then, based on the distance and positional relationship between the initial edge-following starting point and the endpoint of the last non-edge-followed contour segment, it changes the robot's edge-following movement. This allows the robot to stop edge-following when it determines a valid edge-following position point to return to the initial edge-following starting point, when the remaining trajectory length of the last non-edge-followed contour segment is small, or when there is no non-edge-followed contour segment. This allows the robot to promptly enter the planned cleaning state, avoiding multiple loops along the entire area. Furthermore, when the robot determines there is no valid edge-following position point to return to the initial edge-following starting point and the remaining trajectory length of the last non-edge-followed contour segment is long, it sets the starting point of the last non-edge-followed contour segment in the predetermined edge-following direction as a continuation point, and then controls the robot to continue edge-following from the valid edge-following position point of the continuation point, preventing the robot from being trapped in a local area within the global working area. This improves the robot's working efficiency. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating a robot edge control method disclosed in one embodiment of the present invention.

[0019] Figure 2 This is a schematic diagram of edge information marking in a map disclosed in an embodiment of the present invention; wherein, point A1 is the initial edge starting point of the robot, and starting from point A1, the markings are arranged counterclockwise: contour segment A1B1 is the edge-trimmed contour segment, contour segment B1C1 is the edge-not-trimmed contour segment, contour segment C1D1 is the edge-trimmed contour segment, contour segment D1E1 is the edge-not-trimmed contour segment, contour segment E1F1 is the edge-trimmed contour segment, contour segment F1G1 is the edge-not-trimmed contour segment, contour segment G1H1 is the edge-trimmed contour segment, contour segment H1I1 is the edge-not-trimmed contour segment, and contour segment I1A1 is the edge-trimmed contour segment.

[0020] Figure 3 This is a schematic diagram of edge information marking in a map disclosed in another embodiment of the present invention; wherein, point A2 is the initial edge starting point of the robot, and starting from point A2, the markings are arranged counterclockwise: contour segment A2B2 is the edge-trimmed contour segment, contour segment B2C2 is the edge-not-trimmed contour segment, contour segment C2D2 is the edge-trimmed contour segment, contour segment D2E2 is the edge-not-trimmed contour segment, contour segment E2F2 is the edge-trimmed contour segment, contour segment F2G2 is the edge-not-trimmed contour segment, contour segment G2H2 is the edge-trimmed contour segment, contour segment H2I2 is the edge-not-trimmed contour segment, and contour segment I2A2 is the edge-trimmed contour segment. Detailed Implementation

[0021] The technical solutions of the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. To further illustrate the embodiments, the present invention provides accompanying drawings. These drawings are part of the disclosure of the present invention, 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. With reference to these drawings, those skilled in the art should be able to understand other possible implementations and the advantages of the present invention. The flowchart depicts a process or method. Although the flowchart describes the steps as sequential processes, many of the steps can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the steps can be rearranged. The process can be terminated when its operation is complete, but may also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subroutine, etc.

[0022] It should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," and "counterclockwise," etc., indicating orientation or positional relationships, are based on the map orientation or pixel positional relationships shown in the accompanying drawings. They are used solely for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the referred device, boundary, pixel, unit grid, outline segment, path, route, trajectory, or element must have a specific orientation, be constructed in a specific orientation, or undergo traversal operations. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of the stated features.

[0023] As is known from the background technology, judging whether a robot has walked around the outline of an indoor work area solely based on its motion angle and posture can lead to misjudgment, especially when it is obstructed by movable objects in the room (such as the opening and closing of doors, the movement of tables and chairs), causing it to get stuck in a local area. Specifically, in some embodiments, before the robot returns to the effective edge-walking starting point, it may spin or get stuck in a local area, such as the bottom of a dining table in a restaurant (where there is a lot of dirt). The robot may repeatedly perform edge-walking operations in this local area, resulting in the robot rotating an angle that reaches or even exceeds 360 degrees. However, whether it's the first or second circle of edge walking, if the robot gets stuck, spins, or slips due to the aforementioned obstacles and cannot continue walking along the wall, the robot detects a path loop in a local area. In this case, the robot will choose to stop edge walking and can only plan and clean in that local area, resulting in low cleaning coverage. Alternatively, when the cleaning robot walks along the edge in the global area, it is equivalent to walking along the wall outline in the entire indoor work area. If the same path loop exists in one local area, the cleaning robot may easily misjudge that it has completed the global edge walking in the entire indoor work area and stop edge walking to enter the planned cleaning state. This results in the cleaning robot only marking information in a local area in the entire room area, leading to low cleaning coverage. Therefore, after a path loop occurs, it is urgent to find a reasonable starting point for edge walking in the outline of the indoor work area, an effective edge walking position point that allows the robot to continue edge walking.

[0024] In general, a robot's edge-walking involves starting from any location within the room, searching for wall obstacles, and upon detecting a wall, adjusting its direction of travel to be parallel to the wall. This detected wall location is recorded as the initial edge-walking starting point. The robot's coordinates and angle of travel (the angle of travel relative to the X-axis or Y-axis) are recorded in a real-time map. From this initial starting point, the robot continues its edge-walking (traveling along the wall's contour) while remaining parallel to the wall. The robot's direction of travel is adjusted to be parallel to the wall's extension direction, i.e., parallel to the extension or tangent of the wall's contour line, forming the robot's edge-walking posture. In this edge-walking mode, the robot marks each point it traverses on the real-time map, storing information about whether the edge was traversed at the marked location (grid or pixel). When the area the robot traverses is a global region (such as the entire indoor work area), the edge-walking is global edge-walking. The robot uses ranging sensors (including laser sensors or vision sensors) installed on its body to collect position information in the environment. The collected position information is then converted into pixels and configured one by one in a grid map composed of unit cells. Each unit cell represents a pixel and is configured with corresponding map coordinates. The map coordinate system is different from the sensor coordinate system, but it is also configured with an origin, Y-axis and X-axis.

[0025] It should be noted that the robot will encounter various obstacles during its edge-walking process. To effectively simplify the description of the indoor work area, indoor obstacles can be treated as follows: 1. If the distance between an obstacle and a wall is less than the minimum distance the robot can travel, and the robot cannot pass smoothly, it is treated as a wall-mounted obstacle. 2. When the distance between two obstacles is very close and the robot cannot pass smoothly, they can be treated as a single obstacle. 3. The edge-walking area of ​​the robot in this application is mainly the indoor room area. Obstacles are objects within the indoor room area that can collide with the robot. The point where an object collides with the robot is defined as the collision point. This collision point is recorded as a point on the contour surface of the object colliding with the robot, or it can be regarded as a point on the projection line of the contour of the object colliding with the robot on the ground. In some implementation scenarios, the actual path formed by the robot's edge-walking is distributed along the contour line of the obstacle, and there is a gap between the robot and the contour line of the obstacle. It can be that the robot starts edge-walking after colliding with the obstacle, and the contour line of the obstacle corresponds to... Figure 2 The black outlines in the map (including outline segments that have been followed and outline segments that have not been followed) are configured for the robot to walk along the edges.

[0026] As an embodiment, this invention discloses a robot edge-following control method. The execution subject of this edge-following control method is a robot, which can be understood as a controller installed inside the robot capable of running program code. It is applicable to robots that are performing edge-following movement, especially robots performing edge-following movement within a global area. The edge-following control method includes step S1: obtaining the last non-edge-following contour segment based on the positional relationship between the initial edge-following starting point and the non-edge-following contour segment in a predetermined edge-following direction; within a preset working area, the robot starts from the valid edge-following position point of the initial edge-following starting point and performs edge-following movement according to the predetermined edge-following direction to mark the edge-following contour segment in the map constructed by the robot; wherein, the initial edge-following starting point is a position point in the contour line followed when the robot begins to perform edge-following movement. In some embodiments, the predetermined edge-following direction is a clockwise or counterclockwise direction; the positional relationship includes the distance relationship between the point and the non-edge-following contour segment and the connection order of the non-edge-following contour segment along the predetermined edge-following direction, specifically the order of distribution positions, involving the order in which the robot scans, traverses, or moves through; then the robot executes step S2. In this case, there must be a line segment connecting every two non-edge contour segments, or a line segment connecting every two line segments.

[0027] In this embodiment, the preset working area can be the indoor working area mentioned in the background art, or it can be a global area, formed by the area surrounded by edge-following contour segments and non-edge-following contour segments, including unknown areas and areas occupied by obstacles, or it can be a contour line composed of unknown grids and grids occupied by obstacles, involving the contour line of areas not detected by the robot. The preset working area is applicable to multi-room scenarios. When a door is opened, it can be considered as entering a local area; the walls of multiple rooms are continuous, and the robot moves along the walls of the rooms, constituting edge-following movement; the preset working area fully considers the setting of the contour of the indoor working area, especially the walls protruding towards the center of the room, the walls distributed in continuous straight lines, and the obstacles against the walls, which may affect the determination of whether the robot moves around the edge once or multiple times and ends the edge-following behavior. It also considers the influence of the coverage area of ​​working areas of various sizes and shapes on the determination of whether the robot moves around the edge once or ends the edge-following behavior, so that the edge-following control method is applicable to the layout of home environments. This is not limited to whether the robot moves around the wall once or multiple times in the working area, thus effectively avoiding the problem of missed cleaning during edge-following cleaning.

[0028] Step S2: Adjust the robot's edge-walking mode based on the positional relationship between the initial edge-following starting point and the last non-edge-following contour segment, as well as the trajectory length of the last non-edge-following contour segment. Step S2 executes edge-walking control operations based on the last non-edge-following contour segment obtained in Step S1 to adjust the edge-following mode. The positional relationship between the initial edge-following starting point and the last non-edge-following contour segment includes the distance relationship between the starting and ending points of the initial edge-following starting point and the last non-edge-following contour segment, specifically a straight-line distance relationship. The last non-edge-following contour segment is a non-edge-following contour segment, and its distribution position is associated with the initial edge-following starting point. The trajectory length of the last non-edge-following contour segment (actually a contour line) determines the robot's type definition and affects whether the robot needs to continue edge-following along the last non-edge-following contour segment.

[0029] By combining steps S1 and S2 and considering the path characteristics of specific types, the system overcomes the misjudgment of the cleaning robot's movement around the entire work area and the impact of being trapped in local areas in cleaning scenarios with complex obstacle walls. This allows the cleaning robot to stop moving along the edge under appropriate conditions, which helps avoid subsequent missed cleaning or repeated cleaning and improves the robot's work efficiency.

[0030] As a second embodiment, the method for obtaining the last non-edge contour segment based on the positional relationship between the initial edge-starting point and the edge-traced contour segments in the predetermined edge-tracing direction, specifically step S1, includes: in the map constructed by the robot in real time, the robot starts from the initial edge-tracing point and sequentially traverses the non-edge contour segments along the predetermined edge-tracing direction. It is worth noting that the robot does not move during the process of traversing the contour segments of the map, but this does not mean that the robot must stop performing edge-tracing. The non-edge contour segments are traversed without repetition according to the predetermined edge-tracing direction. When the last non-edge contour segment is traversed, the last non-edge contour segment is set as the last non-edge contour segment, and the last non-edge contour segment is used as the judgment criterion in step S2, so that the robot can subsequently choose to perform edge-tracing along the last non-edge contour segment.

[0031] In this embodiment, both the edge-followed and non-edge-followed contour segments are marked on the map built by the robot in real time. The robot can identify them in real time and update the markings on the map accordingly. In some mobile scenarios, the robot will update the most recently followed non-edge-followed contour segment to an edge-followed contour segment. The initial edge-following starting point is a point on the contour line that the robot follows when it begins edge-following. It can be a point on an edge-followed contour segment or a point on a non-edge-followed contour segment, but it cannot be considered the robot's edge-following behavior point. It can be the first point followed within the preset working area.

[0032] In the embodiment where the robot is equipped with a laser sensor, the map that the robot builds in real time is a raster map converted from point cloud information collected in real time by the laser sensor, also known as a laser raster map. This can be a map image that has undergone binarization processing. After binarization, the pixel values ​​of the raster used to mark obstacles and unknown areas are different from the pixel values ​​of the raster used to mark open areas (areas not occupied by obstacles and accessible to the robot). Specifically, the pixel values ​​of the raster used to mark obstacles and unknown areas are less than or equal to 128, corresponding to... Figure 2 and Figure 3 The outline segment formed by the black trajectory line is used to mark the grid cells of open areas (areas not occupied by obstacles and accessible to the robot) with pixel values ​​greater than 128. For ease of description, this embodiment marks the outline segment as represented by black pixels, indicating the outline line followed by the robot during edge walking, except for the attached reference numerals and arrows. The arrows are only used to indicate the position points corresponding to the reference numerals. The outline segment is divided into edge-followed outline segments and non-edge-followed outline segments in the continuous trajectory line. The outline segment can be regarded as being arranged in segments along the outline line of the obstacle, consistent with the projection line of the obstacle's outline on the robot's travel plane (the ground of the indoor work area). Each grid cell or pixel in the map that makes up the non-edge-followed outline segment and the edge-followed outline segment is marked with information indicating whether it has been moved by the robot. In some embodiments, when the distance between the robot's current position point and the effective edge-following position point of one or more points in the non-edge-followed outline segment is less than or equal to a preset spacing, the corresponding point in the edge-followed outline is marked as an edge-followed point, thus forming the point in the edge-followed outline segment. Since each grid or pixel in the map of a non-edge-following contour segment does not have information indicating that it has been moved by the robot, the robot can distinguish between non-edge-following and edge-following contour segments by enumerating the information associated with each point on the corresponding contour line. Thus, in the map constructed by the robot, the contour lines of scanned obstacles and the contour lines of unknown areas are marked. The outer perimeter of the unknown area's contour line may contain known areas accessible to the robot and / or known areas occupied by obstacles. The closed contour line formed by connecting the contour lines of some unknown areas with the contour lines of some obstacles is designated as the edge-following contour line, configured as the contour line that the robot can follow while moving along the edge.

[0033] It should be noted that both the edge-following contour segment and the non-edge-following contour segment belong to the edge-following contour line, which is essentially the contour line along which the robot moves along the edge. It can be regarded as the contour boundary line, that is, the edge-following contour line includes the edge-following contour segment and the non-edge-following contour segment. After the robot collides with the obstacle, it is configured to walk along the contour line of the obstacle according to the predetermined edge-following direction, and the robot's forward direction is parallel to the extension direction of the corresponding contour line or the corresponding tangent direction, forming the robot's edge-following posture. In this embodiment, the edge-following contour line is also equivalent to being formed by connecting the non-edge-following contour segment and the edge-following contour segment.

[0034] It should be added that the robot walks along the walls of the room. For ease of description and understanding, in the map constructed by the robot, the actual outer wall or obstacles against the wall are regarded as the top-view projection lines of the walls and obstacles on the floor of the indoor working area (including the specific room floor). When there is an obstacle adjacent to the outer wall, the robot treats the surface of the obstacle that is not in contact with the outer wall as the outer wall when moving. The edge control method disclosed in this embodiment can be applied to multi-room scenarios. Because when the door is open, the walls of multiple rooms are continuous, and the robot moves along the room walls, it can choose to periodically go back and forth, eventually traversing multiple rooms.

[0035] As an embodiment three, the edge control method further includes: when it is detected that the robot walks along the edge multiple times or rotates around a central position point multiple times, determining that the robot's motion path is in a loop state, including a global loop or a local loop, and controlling the robot to execute step S1. Specifically, when the robot walks along the edge multiple times within the preset working area mentioned in the previous embodiment, it is identified as the robot's motion path being in a global loop state; on the other hand, when the robot spins around in a local area within the preset working area, it is considered a scenario where it is detected that the robot rotates around a central position point multiple times, and the robot's motion path is determined to be in a local loop state. This can be a path formed by rotation or a complete loop along the local area, forming a closed shape; corresponding to Figure 2 The robot may get stuck in a localized area, either spinning around or walking along the edge multiple times. Figure 2 In the upper local area #1, a new edge starting point needs to be found to navigate the robot to start a new edge movement along that starting point.

[0036] Specifically, if the difference between the rotation angle recorded by the robot at its current position and the rotation angle recorded at the effective edge position point of the initial edge starting point is a positive integer multiple of 360 degrees, then the robot's motion path is determined to be in a loop state, belonging to the loop state of the robot's motion path within the global area (the preset working area). Alternatively, if the difference between the rotation angle recorded by the robot at its current position and the rotation angle recorded at the effective edge position point of the initial edge starting point is greater than a positive integer multiple of 360 degrees, then the robot's motion path is determined to be in a loop state, belonging to the loop state of the robot's motion path within the global area (the preset working area). Specifically, when the robot converts the point cloud information collected in real time by the laser sensor into a map image, the rotation angle recorded by the robot at a certain position is the deflection angle of the corresponding pixel in the map image relative to the coordinate axis direction, which contains point cloud information.

[0037] Similarly, specifically, if the difference between the rotation angle recorded by the robot at its current position and the rotation angle recorded at the effective edge position point (where the robot starts walking along the edge of the contour in the local area of ​​the preset working area) is greater than or equal to a positive integer multiple of 360 degrees, it is determined that the robot has walked along the edge multiple times in the local area of ​​the preset working area. In this case, the robot's motion path is determined to be in a local loop state, which is a loop state of the robot's motion path in the local area. Among these loops, the robot may return to the effective edge position point of the contour edge starting point.

[0038] In some embodiments, it can be determined that the robot has rotated multiple times around a central point by detecting that the change in the robot's rotation angle within a local area is greater than or equal to a positive integer multiple of 360 degrees, thus determining that the robot's movement path is in a loop state. Preferably, the central point can be the center of the local area or the center of the robot's body. In some embodiments, when the robot slips in a local area of ​​the preset working area due to insufficient time to brake automatically, for example, when the robot's collision sensor malfunctions and the robot cannot detect a collision, the robot will continuously spin against the obstacle while walking along the edge, causing the encoder to calculate that the robot has moved a relatively large distance, even greater than the preset distance threshold, but in reality, the robot has not moved. In this case, the path formed by the robot's slippage can also be regarded as being in a loop state. The robot still records the error data generated during the corresponding behavior as normal data, causing the constructed map to be incorrect. This leads the robot to mistakenly believe that the area is a new area, and it cannot end the cleaning of the area and navigate to other areas, resulting in very low cleaning efficiency and poor navigation accuracy.

[0039] As an example four, such as Figure 1 As shown, the edge control method specifically includes:

[0040] Step S101: The robot moves along the edge in a predetermined direction. Then, the robot executes step S102, which is performed when the robot determines it is in the edge-moving mode. Specifically, the robot starts from the valid edge-moving position point of the initial edge-moving starting point, moves along the edge in a predetermined direction, and marks the position on the map built by the robot in real time. Figure 2 or Figure 3 The outline segments include non-edge outline segments and edge outline segments.

[0041] It should be noted that the edge-traversable contour line includes both followed and non-followed contour segments. Essentially, it represents the contour line that the robot needs to follow for edge-traversing. However, the edge-traversable contour line may not be completely followed, resulting in non-followed contour segments. In this embodiment, the edge-traversable contour line composed of corresponding grids or pixels approximates the obstacle's contour line as closely as possible. In some implementation scenarios, when the robot walks along a low obstacle, the distance between the robot and the low obstacle is relatively far to prevent pushing and crashing into it. In this case, the edge-traversable contour line marked by the robot may not follow the predicted direction. The prediction may not be accurate, but it at least indicates the approximate direction of edge-traversing and is as close as possible to the obstacle's contour. The initial edge-tracing starting point is located within the edge-tracing contour line. Preferably, the distance between the edge-tracing contour line and the actual path the robot travels along the edge is greater than or equal to the robot's body radius to prevent frequent collisions with obstacles during edge-tracing. When the distance between the robot's current position and a position on the edge-tracing contour line it is traveling along is less than the robot's body radius, the robot will collide with the obstacle to which the edge-tracing contour line belongs, and will also trigger the entry into a new edge-tracing working mode or obstacle avoidance mode.

[0042] Step S102: Determine whether the robot's motion path is in a loop state. If yes, proceed to step S103; otherwise, return to step S101. The method for determining the loop state is described in Embodiment 3. However, the determination of the loop state in step S102 does not constitute a necessary technical feature of this invention. The robot can skip step S102 and directly proceed to step S103, thus not being limited to executing step S103 only in a loop state. This allows for adjustment of edge-following behavior in various complex working scenarios, enhancing the environmental adaptability of the edge-following control method.

[0043] Step S103: Obtain the last non-edge contour segment based on the positional relationship between the initial edge starting point and the non-edge contour segment in the predetermined edge direction; then the robot executes step S104. For details on the method of obtaining the last non-edge contour segment in step S103, please refer to Embodiment 2.

[0044] Step S104: Determine whether the last non-edge-following contour segment was obtained in step S103. If yes, proceed to step S105; otherwise, proceed to step S108. It should be noted that if the last non-edge-following contour segment cannot be obtained in step S103, it means that the robot cannot obtain non-edge-following contour segments in the map. Therefore, only edge-following contour segments remain in the edge-following contour lines. This indicates that the robot has already followed (walked along the edge) all edge-following contour lines and does not need to continue edge-following. This allows for a more accurate determination that the robot's motion path is currently in a loop state.

[0045] Step S105: Determine whether the distance between the initial edge-following start point and the end point of the last non-edge-following contour segment is greater than the preset distance. If yes, proceed to step S108; otherwise, proceed to step S106. Specifically, when the distance between the initial edge-following starting point and the end point of the last non-edge-following contour segment is greater than a preset distance, for the robot's body size, in the predetermined edge-following direction, the edge-following contour segments between the initial edge-following starting point and the end point of the last non-edge-following contour segment cannot be ignored. This indicates that the robot has walked back to the effective edge-following position point of the initial edge-following starting point along the last edge-following contour segment (the last edge-following contour segment traversed sequentially without repetition according to the predetermined edge-following direction). This also more accurately determines that the robot's movement path is currently in a loop state. Conversely, when the distance between the initial edge-following starting point and the end point of the last non-edge-following contour segment is less than or equal to the preset distance, this indicates that in the predetermined edge-following direction, the edge-following contour segments between the initial edge-following starting point and the end point of the last non-edge-following contour segment are ignored by the robot. That is, in the predetermined edge-following direction, only non-edge-following contour segments exist between the initial edge-following starting point and the starting point of the last non-edge-following contour segment.

[0046] Step S106: Determine whether the trajectory length of the last non-edge-following contour segment is less than a preset distance. If yes, proceed to step S108; otherwise, proceed to step S107. Specifically, when the trajectory length of the last non-edge-following contour segment is less than the preset distance, for the robot's body size, the last non-edge-following contour segment can be ignored. In the predetermined edge-following direction, regardless of whether there is a followable contour line between the initial edge-following starting point and the end point of the last non-edge-following contour segment, it can be considered that the robot has moved back to the effective edge-following position point of the initial edge-following starting point according to the predetermined edge-following direction. This can more accurately determine that the robot's movement path is currently in a loop state, but it may not necessarily traverse all followable contour lines, and the trajectory length of the last non-edge-following contour segment may not be the shortest. When the trajectory length of the last non-edge-following contour segment is greater than or equal to the preset distance, the last non-edge-following contour segment cannot be ignored. Step S107 needs to be executed to control the robot to walk along the edge of the last non-edge-following contour segment.

[0047] In this embodiment, the setting of the preset distance affects the edge-walking capability of the edge-walking contour. That is, the larger the robot's body size, the larger the preset distance should be, making the minimum trajectory length for the robot to walk along the edge larger, and making shorter edge-walking contours easier to ignore. Conversely, the smaller the robot's body size, the smaller the preset distance should be, making the minimum trajectory length for the robot to walk along the edge smaller, and making edge-walking contours less likely to be ignored. This allows the robot to walk along more edge-walking contours, resulting in a larger area covered by the robot's edge-walking.

[0048] Optionally, the execution order of steps S105 and S106 can be interchanged without affecting the subsequent adjustment method for the robot's edge-walking. It should be noted that the preset distance is related to the robot's body size, and the preset distance can be selected as three times the robot's body diameter.

[0049] Step S107: Control the robot to move from the current position to the effective edge position of the continuation point. The robot sets a continuation point on the edge-following contour line and configures effective edge position points for the robot to move along the edge. These effective edge position points are pixels or grids already marked on the map. The initial edge-following starting point and its effective edge position points also use the same map configuration method. This step selects the point and assigns it new position information. Then, starting from the effective edge position point of the continuation point, the robot moves along the last non-edge-following contour segment according to the predetermined edge-following direction. Then, it returns to step S102 or directly executes step S103, which is equivalent to repeating the aforementioned steps S1 and S2 to update the last non-edge-following wheel. The robot's path may become a loop or generate new non-edge contour segments during its edge-walking process on the last non-edge contour segment due to the action of individual dynamic obstacles. In this case, the robot's path may be repeated until it returns to the valid edge position point of the initial edge-starting point. In this case, steps S101 to S107 need to be repeated to update the last non-edge contour segment and the continuation point until the distance between the initial edge-starting point and the end point of the last non-edge contour segment is detected to be greater than a preset distance, and / or the trajectory length of the last non-edge contour segment is detected to be less than a preset distance. Then, the robot jumps to step S108. Alternatively, the robot jumps to step S108 until it is detected that the last non-edge contour segment cannot be obtained in step S103.

[0050] Step S108: The robot stops its edge-walking and does not set a continuation point. The robot then stops its edge-walking mode within the preset working area, ensuring that it does not navigate to the valid edge position point of the continuation point after obtaining the last non-edge-walking contour segment, and does not need to start edge-walking from that point. The robot then enters a working mode; for example, if it is a cleaning robot, it switches from edge-walking mode to planned cleaning mode and performs planned cleaning within the preset working area.

[0051] Combining steps S101 to S108, the edge-following control method, based on distinguishing between edge-followed and non-edge-followed contour segments, obtains the last non-edge-followed contour segment by combining the initial edge-following starting point and the predetermined edge-following direction. Then, based on the distance and positional relationship between the initial edge-following starting point and the endpoint of the last non-edge-followed contour segment, it changes the robot's edge-following movement. This allows the robot to stop edge-following when it determines a valid edge-following position point to return to the initial edge-following starting point, when the remaining trajectory length of the last non-edge-followed contour segment is small, or when there is no non-edge-followed contour segment. This allows the robot to promptly enter the planned cleaning state, preventing the robot from circling the entire area multiple times. It also allows the robot to set a continuation point when it determines there is no valid edge-following position point to return to the initial edge-following starting point and the remaining trajectory length of the last non-edge-followed contour segment is long. The robot then continues edge-following from the valid edge-following position point of the continuation point, preventing the robot from spinning or getting trapped in a local area within the global working area. This makes the edge control method applicable to home environments and effectively avoids issues such as missed cleaning or repeated cleaning during edge cleaning by the cleaning robot, thereby improving the robot's cleaning efficiency.

[0052] As one embodiment, when the robot detects that the distance between the initial edge-following start point and the end point of the last non-edge-following contour segment is less than or equal to the preset distance, and detects that the trajectory length of the last non-edge-following contour segment is greater than or equal to the preset distance, the corresponding edge-following information is marked as follows: Figure 2 As shown, the initial starting point along the edge is point A1, and the predetermined direction along the edge is counterclockwise. Figure 2 In the process, starting from the initial edge-traversing point, the non-edge-traversed contour segments traversed counterclockwise are, in order, non-edge-traversed contour segment B1C1, non-edge-traversed contour segment D1E1, non-edge-traversed contour segment F1G1, and non-edge-traversed contour segment H1I1; simultaneously, starting from the initial edge-traversing point, the edge-traversed contour segments traversed counterclockwise are, in order, edge-traversed contour segments A1B1, edge-traversed contour segment C1D1, edge-traversed contour segment E1F1, edge-traversed contour segment G1H1, and edge-traversed contour segment I1A1, where edge-traversed contour segments A1B1 and I1A1 are subordinate to edge-traversed contour segment I1B1. Therefore, in Figure 2 In this embodiment, the last non-edge contour segment traversed by the robot is the non-edge contour segment H1I1, that is, the last non-edge contour segment H1I1 is obtained, specifically the route extending counterclockwise from position point H1 to position point I1. Figure 2The trajectory H1I1 is formed by connecting the associated pixels in the image. Viewed counter-clockwise, the starting point of the non-edge-following contour segment H1I1 is position point H1, and the ending point is position point I1. In this embodiment, if the robot detects that the distance (straight-line distance) between the initial edge-following starting point A1 and the ending point I1 of the last non-edge-following contour segment H1I1 is less than or equal to the preset distance, it indicates that the edge-following contour segment I1A1 between the initial edge-following starting point A1 and the ending point I1 of the last non-edge-following contour segment H1I1 in the predetermined edge-following direction can be ignored by the robot, i.e., it is considered that the robot has not moved within contour segment I1A1. Furthermore, the robot also detects that the trajectory length of the last non-edge-following contour segment H1I1 (the trajectory length of contour segment H1I1) is greater than or equal to... When setting the preset distance, the last un-edge contour segment H1I1 cannot be ignored. The last un-edge contour segment H1I1 is a contour line that the robot is allowed to follow during edge walking, but has not yet been followed. The robot sets position point H1 as the continuation point, which serves as the starting point for the subsequent un-edge contour segment H1I1 that the robot will follow. Then the robot moves to the valid edge position point of the continuation point H1, and starts from the valid edge position point of the continuation point H1, and walks along the last un-edge contour segment H1I1 according to the predetermined edge direction.

[0053] In another embodiment, when the robot detects that the distance between the initial edge-following start point and the end point of the last non-edge-following contour segment is greater than a preset distance, the robot is controlled to stop edge-following; and / or, when the robot detects that the trajectory length of the last non-edge-following contour segment is less than a preset distance, the robot is controlled to stop edge-following. The corresponding edge-following information marking can also be found in [reference needed]. Figure 3 The initial starting point along the edge is point A2, and the predetermined direction along the edge is counterclockwise. Figure 2 In the process, starting from the initial edge-traversing point, the non-edge-traversed contour segments traversed counterclockwise are, in order, non-edge-traversed contour segment B2C2, non-edge-traversed contour segment D2E2, non-edge-traversed contour segment F2G2, and non-edge-traversed contour segment H2I2; simultaneously, starting from the initial edge-traversing point, the edge-traversed contour segments traversed counterclockwise are, in order, edge-traversed contour segments A2B2, edge-traversed contour segment C2D2, edge-traversed contour segment E2F2, edge-traversed contour segment G2H2, and edge-traversed contour segment I2A2, where edge-traversed contour segments A2B2 and I2A2 are subordinate to edge-traversed contour segment I2B2. Therefore, in Figure 3 In this embodiment, the last non-edge contour segment traversed by the robot is the non-edge contour segment H2I2, that is, the last non-edge contour segment H2I2 is obtained, specifically the route extending counterclockwise from position point H2 to position point I2. Figure 3The trajectory H2I2 is formed by connecting the associated pixels in the image. Viewed counter-clockwise, the starting point of the non-edge-following contour segment H2I2 is position point H2, and the ending point is position point I2. In this embodiment, when the robot detects that the trajectory length of the last non-edge-following contour segment H2I2 (the trajectory length of the contour segment H2I2) is less than a preset distance, for the robot's body size, the last non-edge-following contour segment H2I2 can be ignored. Then, in the predetermined edge-following direction, there exists an edge-following contour segment I2A2. Regardless of the trajectory length of the edge-following contour segment I2A2, it is determined that the robot has moved back to the valid edge-following position point of the initial edge-following starting point A2 according to the predetermined edge-following direction. This can be determined as the robot... Figure 3 The robot completes a counter-clockwise loop within the corresponding area, then stops its edge-walking. The robot may not necessarily traverse all possible edge-traversable contour lines, and the trajectory length of the last non-edge-traversed contour segment H2I2 may not be the shortest. In this case, the robot stops its edge-walking. Alternatively, if the robot detects that the distance between the initial edge-traversing starting point A2 and the endpoint I2 of the last non-edge-traversed contour segment H2I2 is greater than a preset distance, then, for the robot's body size, the edge-traversed contour segment I2A2 between the initial edge-traversing starting point A2 and the endpoint I2 of the last non-edge-traversed contour segment in the predetermined edge-traversing direction cannot be ignored. The edge-traversed contour segment I2A2, as the last edge-traversed contour segment that the robot sequentially traverses without repetition according to the predetermined edge-traversing direction, represents the contour line traversed by the robot during its edge-traversing process. This confirms that the robot has returned to the valid edge-traversing position point of the initial edge-traversing starting point A2, and can also more accurately determine the robot's movement path within the predetermined edge-traversing direction. Figure 3 The corresponding area is in a loop state, at which point the robot is controlled to stop walking along the edge.

[0054] In the foregoing embodiment, the continuation point is the first endpoint traversed on the last non-edge contour segment according to the predetermined edge-tracing direction. This first endpoint is marked with state information indicating that it has not been traversed by the robot, meaning the robot has not traversed along this first endpoint or the contour line containing it. Therefore, the effective edge-tracing position of the continuation point is configured as the position point where the robot begins edge-tracing along the last non-edge contour segment. Correspondingly, Figure 2 The endpoint H1 of the non-edge-following contour segment H1I1 is set as the continuation point; the continuation point serves as the collision point. In some embodiments, the robot collides with the continuation point in the contour line of the obstacle at the effective edge-following position of the continuation point. The endpoint of the last non-edge-following contour segment is the last endpoint traversed on the last non-edge-following contour segment according to the predetermined edge-following direction. This last endpoint is marked with state information indicating that it has not been traversed by the robot along the edge, corresponding to... Figure 2The endpoint I1 of the non-edge contour segment H1I1, or, corresponding to Figure 3 The endpoint I2 of the non-edge contour segment H2I2; in Figure 2 and Figure 3 In this embodiment, the initial edge-following starting point and the end point of the last non-edge-following contour segment exist within the edge-followed contour segment. In other embodiments, the initial edge-following starting point may coincide with the end point of the last non-edge-following contour segment to adapt to complex and varied indoor work areas. This embodiment allows the robot to collide with obstacles at the effective edge-following position point of the initial edge-following starting point, triggering the robot to enter the edge-following walking mode. Simultaneously, this embodiment also allows the robot to collide with obstacles at the effective edge-following position point of the continuation edge, triggering the robot to enter the edge-following walking mode. It should be noted that the edge-followed contour segment is the contour line traversed by the robot during its edge-following movement according to the predetermined edge-following direction. The position traversed by the robot is the effective edge-following position of the corresponding position point within the edge-followed contour segment, which can be set within a preset distance range of the corresponding position point within the edge-followed contour segment. Especially when the robot is a cleaning robot, this overcomes the misjudgment of edge-following termination caused by dynamic obstacles, thereby promoting the robot to efficiently and effectively complete the full-coverage cleaning of unknown areas, avoiding missed cleaning and repeated cleaning, and improving cleaning efficiency.

[0055] As can be seen from the foregoing embodiments, the last non-edge contour segment is a non-edge contour segment that extends from the initial edge starting point along a direction opposite to the predetermined edge direction; the edge-followed contour segment is the contour line that the robot follows when it starts from the effective edge position point of the initial edge starting point and walks along the edge in the predetermined edge direction, and is marked in the map constructed by the robot; wherein, after the robot walks along the non-edge contour segment, it is converted into an edge-followed contour segment in the map constructed by the robot in real time. A non-edge-following contour segment belongs to a followable contour line, and an edge-following contour segment belongs to a followable contour line. The initial edge-following starting point is the first edge-following starting point that the robot follows when performing edge-following movement, that is, the starting point of the first followable contour line traversed by the robot according to the predetermined edge-following direction. Along the predetermined edge-following direction, the starting point of each non-edge-following contour segment is the edge-following starting point of that non-edge-following contour segment, and the starting point of each edge-following contour segment is the edge-following starting point of that edge-following contour segment, which is also the endpoint of that edge-following contour segment. Among them, the followable contour line includes edge-following contour segments and non-edge-following contour segments. The initial edge-following starting point is located in the followable contour line, which means that the initial edge-following starting point can be set in the edge-following contour segment or in the non-edge-following contour segment, and can be adjusted according to the actual edge-following movement environment, so as to find the last non-edge-following contour segment, which is conducive to planning the edge-following path corresponding to the robot walking around the obstacle edge, and to the robot predicting the path taken along the edge based on the obstacle edge on the map.

[0056] In the foregoing embodiments, the edge-traversable contour line is a closed line formed by connecting the contour lines of unknown regions and the contour lines of obstacles in the map constructed by the robot. A closed region is formed inside this closed line, allowing the robot to walk along the edge-traversable contour line within this closed region. For example, several adjacent and contacting obstacles form a contour line with gaps, which can be surrounded by the contour lines of unknown regions. A closed line is formed by connecting the contour lines of the unknown regions and the contour lines of the obstacles, thus creating a closed region inside the closed line. Similarly, several discrete obstacles form a contour line with multiple gaps, and the corresponding gaps can... When an area is surrounded by the outline of an unknown region, the outline of the unknown region is connected to the outline of the obstacle to form a closed line, thus forming a closed region inside the closed line. While there is also an open area at the aforementioned gap, due to the limited detection range of the robot's ranging sensors (laser sensors or vision sensors), an unknown region will always exist outside the open area. Therefore, the outline of the unknown region, which has a larger coverage area, is directly used to surround the corresponding gap formed by the obstacle's area. The outline of the unknown region is then connected to the outline of the obstacle to form a closed line, forming a closed region inside the closed line for the robot to walk along the edge. During the robot's movement along the edge-walking outline within this closed region, the extension direction of the edge-walking outline or the tangent direction at a certain point on the edge-walking outline is parallel to the robot's current direction of travel. In some embodiments, a stepped-along outline segment connects two non-stepped outline segments traversed sequentially according to the predetermined edge-walking direction; similarly, a non-stepped outline segment connects two stepped-along outline segments traversed sequentially according to the predetermined edge-walking direction. It should be noted that the non-edge-following contour segment is the contour line other than the edge-following contour segment in the edge-following contour line. That is, the non-edge-following contour segment is also the contour edge line that the robot can follow during edge walking, but has not yet been followed by the robot. The edge-following contour segment and all the non-edge-following contour segments are connected to form the edge-following contour line. This can be understood as, in the map constructed by the robot or in the preset working area, all the edge-following contour segments and all the non-edge-following contour segments are connected to form the edge-following contour line.

[0057] Specifically, for the aforementioned closed area that can be enclosed along the edge contour line, in Figure 2The structure is as follows: Along a counter-clockwise direction, the edge-following contour segment I1B1, the non-edge-following contour segment B1C1, the edge-following contour segment C1D1, the non-edge-following contour segment D1E1, the edge-following contour segment E1F1, the non-edge-following contour segment F1G1, the edge-following contour segment G1H1, and the non-edge-following contour segment H1I1 are sequentially connected to form a closed region, equivalent to the preset working area. The aforementioned edge-following contour lines are used to characterize the complete contour lines that the robot needs to traverse to move along the edge within the preset working area. For the closed region enclosed by the aforementioned edge-following contour lines, in... Figure 3 It is manifested as follows: along the counterclockwise direction, the edge-following contour segment I2B2, the edge-non-edge-following contour segment B2C2, the edge-following contour segment C2D2, the edge-non-edge-following contour segment D2E2, the edge-following contour segment E2F2, the edge-non-edge-following contour segment F2G2, the edge-following contour segment G2H2, and the edge-non-edge-following contour segment H2I2 are connected in sequence to form a closed area, which is equivalent to the preset working area. The aforementioned edge-following contour line is used to characterize the complete contour line that the robot can follow when walking along the edge in the preset working area.

[0058] In the foregoing embodiments, each effective edge-following position point in the edge-following contour line is a position point within the closed area that has a preset distance from the corresponding point in the edge-following contour line. This position point allows the robot to pass through and is also a position point where the robot is allowed to collide with obstacles. During edge-following, the robot's forward direction at the effective edge-following position point can be adjusted to be parallel to the tangent direction of the corresponding point (understood as a position point) in the edge-following contour line. It should be noted that when the distance between the robot's current position point and the effective edge-following position point of the corresponding point in the edge-following contour line is less than or equal to the preset distance, the corresponding point in the edge-following contour line is marked as a point in the edge-followed contour segment. In some embodiments, when the distance between the robot's current position point and the effective edge-following position points of one or more points in the non-edge-followed contour segment is less than or equal to the preset distance, the corresponding points in the edge-following contour line are all marked as edge-followed points, thus forming points in the edge-followed contour segment. Preferably, the preset spacing is greater than or equal to the robot's body radius. When the robot walks along the edge contour line, the robot's current forward direction is parallel to the edge contour line it is currently following, so as to form an edge-walking posture. The closer the preset spacing is to the robot's body radius, the more consistent the path formed by the robot walking along the edge becomes with the edge contour line, including the direction, length, and coverage area.

[0059] Preferably, when the predetermined edge-following direction is clockwise, it is configured as the left edge-following direction for the robot's movement, such that the position point in the outline of the obstacle along which the robot moves is located to the left of the robot's forward direction, wherein the initial edge-following starting point is located to the left of the robot's forward direction. Preferably, when the predetermined edge-following direction is counterclockwise, it is configured as the right edge-following direction for the robot's movement, such that the position point in the outline of the obstacle along which the robot moves is located to the right of the robot's forward direction, wherein the initial edge-following starting point is located to the right of the robot's forward direction. Within the preset working area, which in this embodiment is equivalent to a global area, the robot moving clockwise along the edge of the obstacle in the left edge-following direction moves along the edge of the obstacle in the preset working area, and the robot moving counterclockwise along the edge of the obstacle in the right edge-following direction moves along the edge of the obstacle in the preset working area. During the robot's counterclockwise edge-following movement along the edge of the wall, the right side of the robot body collides with the wall, and the collision point on the wall in the corresponding direction is marked as the right collision point, which is also a position point in the edge-following outline. As the robot moves clockwise along the edge of the wall, its left side collides with the wall, and the collision point on the wall in the corresponding direction is marked as the left collision point, which is also a position point in the edge contour line.

[0060] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0061] In the above embodiments, a robot capable of performing sweeping tasks (hereinafter referred to as a sweeping robot) is used as an example to illustrate the technical solution of this application, but it is not limited to sweeping robots. The robot in the various embodiments of this application refers to any mechanical device capable of highly autonomous spatial movement in its environment, such as a sweeping robot, a companion robot, or a guide robot, or it can be an air purifier, a self-driving vehicle, etc. Of course, the tasks performed by different robot forms will vary, and this is not limited thereto.

[0062] To understand the embodiments corresponding to the boundary configuration methods described herein, it is possible to implement them using hardware, software, firmware, middleware, microcode, or any combination thereof. For hardware implementations, the processing unit may be implemented within one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, other electronic units designed to perform the functions described herein, or combinations thereof. When embodiments are implemented using software, firmware, middleware, or microcode, program code, or code segments, they may be stored in a machine-readable medium such as a storage component.

[0063] Based on the foregoing embodiments, another embodiment of the present invention discloses a chip with a built-in control program, which is used to control the robot to execute the edge control method described in the foregoing embodiments. The chip, based on distinguishing between edge-followed and non-edge-followed contour segments, combines the initial edge-following starting point and the predetermined edge-following direction to obtain the last non-edge-followed contour segment. Then, based on the distance and positional relationship between the initial edge-following starting point and the endpoint of the last non-edge-followed contour segment, it changes the robot's edge-following movement. This allows the robot to stop edge-following when it determines it has returned to the initial edge-following starting point (i.e., the robot returns to the valid edge-following position point of the initial edge-following starting point), or when the remaining trajectory length of the last non-edge-followed contour segment is small, or when there is no non-edge-followed contour segment. This allows the robot to promptly enter the planned cleaning state, avoiding multiple loops along the global area. It also allows the robot to set a continuation point when it determines it has not returned to the initial edge-following starting point (i.e., the robot returns to the valid edge-following position point of the initial edge-following starting point) and the remaining trajectory length of the last non-edge-followed contour segment is long. The robot then continues edge-following from the valid edge-following position point of the continuation point, preventing the robot from spinning or getting trapped in a local area within the global working area.

[0064] To understand the embodiments corresponding to the work area planning method described in this application, it is necessary to understand that they can be implemented by hardware, software, firmware, middleware, microcode, or any combination thereof. For hardware implementation, the processing unit can be implemented within one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, other electronic units designed to perform the functions described herein, or combinations thereof. When embodiments are implemented in software, firmware, middleware, or microcode, program code, or code segments, they can be stored in a machine-readable medium such as a storage component.

[0065] Another embodiment of the present invention discloses a robot, the top of which may be equipped with a vision sensor or a laser sensor. The robot has a built-in chip as described in the above embodiment, which is used to process the pixels collected by the vision sensor or the laser sensor and converted into pixels in the map to obtain the continuation point, and to control the robot to adjust the way it walks along the edge according to the edge control method. Based on the aforementioned embodiments, the robot, after distinguishing between edge-followed and non-edge-followed contour segments, obtains the last non-edge-followed contour segment by combining the initial edge-following starting point and the predetermined edge-following direction. Then, based on the distance and positional relationship between the initial edge-following starting point and the endpoint of the last non-edge-followed contour segment, the robot changes its edge-following movement. This allows the robot to stop edge-following when it determines that it has returned to the initial edge-following starting point (i.e., the robot returns to the valid edge-following position point of the initial edge-following starting point), or when the remaining trajectory length of the last non-edge-followed contour segment is small, or when there is no non-edge-followed contour segment. This allows the robot to promptly enter the planned cleaning state, avoiding multiple loops along the global area. It also allows the robot to set a continuation point when it determines that it has not returned to the initial edge-following starting point (i.e., the robot returns to the valid edge-following position point of the initial edge-following starting point) and the remaining trajectory length of the last non-edge-followed contour segment is long. The robot then continues edge-following from the valid edge-following position point of the continuation point, preventing the robot from spinning or getting trapped in a local area within the global working area. This makes the edge control method applicable to home environments and effectively avoids issues such as missed areas or repeated cleaning during edge cleaning by the robot, thus improving the robot's work efficiency.

[0066] Generally, depending on the requirements of edge navigation, the robot can be equipped with multiple LiDAR and vision sensors, positioned in different locations, to obtain point cloud data of obstacles around the robot. Among them, the LiDAR sensor supports real-time scanning to build a LiDAR map, which is then stored in the chip built into the robot.

[0067] The above embodiments are only for illustrating the technical concept and features of the present invention, and are intended to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They should not be construed as limiting the scope of protection of the present invention. All equivalent transformations or modifications made in accordance with the spirit and essence of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A method of edge control of a robot, characterized by, The edge following control method comprises: Step S1, obtaining a last non-edge following contour segment according to a position relationship between an initial edge following start point and the non-edge following contour segments in a predetermined edge following direction; The method of obtaining the last non-edge following contour segment according to the position relationship between the initial edge following start point and the non-edge following contour segments in the predetermined edge following direction comprises: starting from the initial edge following start point, sequentially traversing the non-edge following contour segments in the predetermined edge following direction, and traversing the non-edge following contour segments in the predetermined edge following direction without repetition; when the last non-edge following contour segment is traversed, setting the last non-edge following contour segment as the last non-edge following contour segment; Step S2, adjusting a robot edge following manner according to a position relationship between the initial edge following start point and the last non-edge following contour segment, and a track length of the last non-edge following contour segment; The specific method of step S2 comprises: when it is detected that a distance between the initial edge following start point and an end point of the last non-edge following contour segment is greater than a preset distance, controlling the robot to stop edge following; when it is detected that the track length of the last non-edge following contour segment is less than the preset distance, controlling the robot to stop edge following; wherein the preset distance is associated with a body size of the robot; The specific method of step S2 further comprises: when it is detected that the distance between the initial edge following start point and the end point of the last non-edge following contour segment is less than or equal to the preset distance, and it is detected that the track length of the last non-edge following contour segment is greater than or equal to the preset distance, controlling the robot to move from a current position point to an effective edge following position point of a continuation point, and then starting from the effective edge following position point of the continuation point, edge following is performed along the last non-edge following contour segment in the predetermined edge following direction; The continuation point is a first end point traversed on the last non-edge following contour segment in the predetermined edge following direction, so that the effective edge following position point of the continuation point is configured as a position point at which the robot starts edge following along the last non-edge following contour segment; The last non-edge following contour segment belongs to the non-edge following contour segments; The initial edge following start point is a position point in a contour line along which the robot starts to perform edge following.

2. The method of claim 1, wherein, The edge following control method further comprises: when it is detected that the robot edge follows multiple laps or the robot rotates multiple laps around a center position point, it is determined that a motion path of the robot is in a loop state, and the robot is controlled to perform step S1.

3. The method of claim 1, wherein When the last non-edge following contour segment cannot be obtained by step S1, it is determined that the non-edge following contour segments do not exist, and the robot is controlled to stop edge following; When the last non-edge following contour segment is obtained by step S1, step S2 is started to be performed.

4. The method of claim 1, wherein The end point of the last non-edge following contour segment is a last end point traversed on the last non-edge following contour segment in the predetermined edge following direction; The initial edge following start point is connected with the end point of the last non-edge following contour segment by an edge following contour segment, or the initial edge following start point coincides with the end point of the last non-edge following contour segment; The edge following contour segment is a contour line along which the robot edge follows in the process of edge following in the predetermined edge following direction; a position walked by the robot is an effective edge following position of a corresponding position point in the edge following contour segment.

5. The method of claim 1 or 2, wherein The last un-followed contour segment is an un-followed contour segment extending from the initial followed start point in a direction opposite to the predetermined followed direction; The followed contour segment is a contour line followed by the robot when the robot walks in the predetermined followed direction from an effective followed position point of the initial followed start point, and is marked in a map constructed by the robot; The initial followed start point is a point on the followable contour line.

6. The method of claim 5, wherein, The followable contour line is a closed line formed by connecting a contour line of an unknown area and a contour line of an obstacle in a map constructed by the robot, and a closed area is formed inside the closed line, so that the robot walks along the followable contour line in the closed area; An effective followed position point of each point on the followable contour line is a position point in the closed area having a preset distance from the corresponding point on the followable contour line and allowing the robot to pass through; When a distance between a current position point of the robot and an effective followed position point of a corresponding point on the followable contour line is less than or equal to the preset distance, the corresponding point on the followable contour line is marked as a point in the followed contour segment. The un-followed contour segment is a contour line on the followable contour line other than the followed contour segment.

7. The method of claim 6, wherein, The preset distance is greater than or equal to a body radius of the robot; and when the robot walks along the followable contour line, a forward direction of the robot is parallel to the followable contour line being followed by the robot to form a walking posture.

8. The method of claim 5, wherein, The predetermined followed direction is a clockwise direction or a counterclockwise direction; When the predetermined followed direction is the clockwise direction, the predetermined followed direction is configured as a left followed direction of the robot, so that a position point on a contour of an obstacle being followed by the robot is located on a left side of a forward direction of the robot, and the initial followed start point is located on the left side of the forward direction of the robot; When the predetermined followed direction is the counterclockwise direction, the predetermined followed direction is configured as a right followed direction of the robot, so that a position point on a contour of an obstacle being followed by the robot is located on a right side of a forward direction of the robot, and the initial followed start point is located on the right side of the forward direction of the robot.

9. A chip, which has a control program built in, characterized by The control program is configured to control the robot to perform the following control method according to any one of claims 1 to 8.

10. A robot, which is installed with a vision sensor or a laser sensor, characterized in that, The robot comprises the chip according to claim 9, and is configured to control the robot to perform the following control method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Control method for autonomous mobile robot walking along edge

    CN108196555A

  • Method for judging circle along global working area, chip and visual robot

    CN111596662A